[issue44224] urllib.parse.urljoin behaves differently in Python 3.9.5

2021-05-24 Thread rushter
rushter added the comment: Sorry, I found the commit that mentions this https://github.com/python/cpython/commit/0593ae84af9e0e8332644e7ed13d7fd8306c4e1a It's not live on Python.org though. -- stage: -> resolved status: open -> closed ___

[issue44224] urllib.parse.urljoin behaves differently in Python 3.9.5

2021-05-24 Thread rushter
New submission from rushter : Since Python 3.9.5, `urllib.parse.urljoin` now strips newlines from the destination URL. I think this should be at least mentioned in the `/Misc/NEWS.d`. Python 3.8.10: >>> urllib.parse.urljoin('http://a.ru', '\nsome/location') 'http://a.ru/\nsome

[issue34393] json.dumps - allow compression

2018-08-13 Thread rushter
rushter added the comment: You can use the gzip module. with gzip.GzipFile('products.json', 'w') as outfile: outfile.write(json.dumps(data, outfile, sort_keys=True)) -- nosy: +rushter ___ Python tracker <https://bugs.python.org/issue34