cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-67041: Allow to distinguish between empty and not defined URI components

Open serhiy-storchaka opened this issue 1 year ago • 9 comments

Changes in the urllib.parse module:

  • Add option ~allow_none~ missing_as_none in urlparse(), urlsplit() and urldefrag(). If it is true, represent not defined components as None instead of an empty string.
  • Add option keep_empty in urlunparse() and urlunsplit(). If it is true, keep empty non-None components in the resulting string. By default it is the same as the allow_none value for the result of the urlparse() and urlsplit() calls.
  • ~Add option keep_empty in the geturl() method of DefragResult, SplitResult, ParseResult and the corresponding bytes counterparts.~
  • Issue: gh-67041

serhiy-storchaka avatar Aug 25 '24 07:08 serhiy-storchaka