Thanks for sharing your thoughts.

I was originally thinking that if the problem is contained only to 3.8.1
and 3.7.6 and, reverted 3.8.2.
If revert is not an option, then, I can add either of these in the
documentation as the recommendation to deal with this problem.

1. Special case the "sys.version_info < (3, 8, 1)" for urlparse behavior.
2. Recommend making sure that urlparse is used on URL with the scheme. If
the URL had a scheme ("http" or anything supported), the parsing behavior
remains consistent.

It is only with schema-less URL this backport broke the parsing and upset
maintainers of certain utilities (correctly).





On Tue, Feb 11, 2020 at 5:26 AM Łukasz Langa <luk...@langa.pl> wrote:

> I'll let others voice their opinions but my intuition for 3.8.x is to
> leave your patch be. True, it should not have been backported but it was,
> and it was already released as part of 3.8.1 and now 3.8.2rc1.
>
> The user will have to special-case the change in behavior anyway. I feel
> like it is easier for them to do so by only special-casing
> "sys.version_info < (3, 8, 1)". The alternative if you revert your patch
> will be to special case both "sys.version_info < (3, 9)" and
> "sys.version_info == (3, 8, 1)" (let alone 3.8.2rc1). That is worse I think.
>
> So, the only thing to do is to clearly document that there was a change,
> not in 3.9 but in 3.8.1 and forward.
>
> Agreed that it's a bit of a mess for 3.7 since that was way later in the
> release cadence with only 3.7.6 getting the change. I will let Ned decide
> here.
>
> - Ł
>
>
> On 10 Feb 2020, at 15:27, Senthil Kumaran <sent...@uthcode.com> wrote:
>
> Hello Python-Committers,
>
> In https://bugs.python.org/issue27657, I introduced a regression in a
> minor release.
> The original patch to parsing logic of URL, cleaned up a lot of corner
> cases (https://github.com/python/cpython/pull/661) and I felt good about
> the change.
> However, the mistake was with the backport.
>
> Demo:
>
> $ ./python
> Python 3.8.0 (default, Feb 10 2020, 06:15:43)
> [GCC 9.2.1 20191008] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from urllib.parse import urlparse
> >>> urlparse('localhost:8080')
> ParseResult(scheme='', netloc='', path='localhost:8080', params='',
> query='', fragment='')
>
> ----
>
> $ ./python
> Python 3.8.1+ (heads/3.8:b086ea5edc, Feb 10 2020, 06:15:44)
> [GCC 9.2.1 20191008] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from urllib.parse import urlparse
> >>> urlparse('localhost:8080')
> ParseResult(scheme='localhost', netloc='', path='8080', params='',
> query='', fragment='')
>
> ---
>
> When I read an associated bug report against a user of the software (like
> this: https://github.com/mozilla/bleach/issues/503) - I feel that this
> was a mistake.
> The change of test-suite in minor versions should have alerted me, but I
> seem to have missed it.
>
> I am planning to revert this change in 3.8.2 and 3.7.7
> Should I highlight this in any documentation?  Thoughts and opinions?
>
> Thank you,
> Senthil
>
>
> _______________________________________________
> python-committers mailing list -- python-committers@python.org
> To unsubscribe send an email to python-committers-le...@python.org
> https://mail.python.org/mailman3/lists/python-committers.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-committers@python.org/message/2ONL562L35S77FGCLYH2ZDWVAXHH2BZP/
> Code of Conduct: https://www.python.org/psf/codeofconduct/
>
>
>
_______________________________________________
python-committers mailing list -- python-committers@python.org
To unsubscribe send an email to python-committers-le...@python.org
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/python-committers@python.org/message/4KKEDTY772EDZLGUWOSI6L54XJPBZRID/
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to