[issue33645] Importing bs4 fails with -3 option in Python 2.7.15

2018-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that this will fix your case (there may be other bug in BeautifulSoup4 or other changes in your environment), but it fixed a bug in Python. Thank you for your report. -- resolution: -> fixed stage: patch review -> resolved status: ope

[issue33645] Importing bs4 fails with -3 option in Python 2.7.15

2018-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d5e7556e522f4662ad34b35924b6c76895df340e by Serhiy Storchaka in branch '2.7': bpo-33645: Fix an "unknown parsing error" in the parser. (GH-7119) https://github.com/python/cpython/commit/d5e7556e522f4662ad34b35924b6c76895df340e -- __

[issue33645] Importing bs4 fails with -3 option in Python 2.7.15

2018-05-25 Thread Florian Schulze
Florian Schulze added the comment: You are right, this actually happens with Python 2.7.14 as well. I was fooled by a warnings.filterwarnings matching to a path in my codebase. That one did match for my Python 2.7.15 testing but didn't for my Python 2.7.14 testing, because those were done in

[issue33645] Importing bs4 fails with -3 option in Python 2.7.15

2018-05-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +6753 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue33645] Importing bs4 fails with -3 option in Python 2.7.15

2018-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, I was fooled by the message about Beautiful Soup. It is not a message of an error, it is a part of source line, printed for a SyntaxError. Seems sources of Beautiful Soup intentionally contain a code invalid in Python 3. There is a bug in Python. The to

[issue33645] Importing bs4 fails with -3 option in Python 2.7.15

2018-05-25 Thread Florian Schulze
Florian Schulze added the comment: Yes, it's third party code, but that worked up until Python 2.7.14 and only broke with 2.7.15, which is why I reported it here. The expected behaviour is not a SyntaxError, but a DeprecationWarning, which is what you get pre Python 2.7.15. So this is a regre

[issue33645] Importing bs4 fails with -3 option in Python 2.7.15

2018-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The Python interpreter itself does not have references to Beautiful Soup. This error is generated by third-party code. Report a bug on the Beautiful Soup bug tracker. -- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status:

[issue33645] Importing bs4 fails with -3 option in Python 2.7.15

2018-05-25 Thread Florian Schulze
New submission from Florian Schulze : Since Python 2.7.15 import bs4 (BeautifulSoup4) fails when using the -3 option on the Python binary. ... 'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>'You need to convert the code, either by instal