[issue43976] Allow Python distributors to add custom site install schemes

2022-01-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I don't have a good answer, but given the title of this issue (which is specifically scoped to site install schemes), I'm tempted to say we should deal with prefixes in a separate, perhaps broader issue, and there address the reported issue (that a user's p

[issue46241] importlib.utils.find_spec() has issues with "tests" folder

2022-01-05 Thread Brett Cannon
Brett Cannon added the comment: This is working as intended. Because you don't have a `__init__.py` file in your `tests` directory, Python considers it a potential namespace package. As such, Python keeps searching for a "normal" package that defines `__init__.py` for the same package name.

[issue46256] Objects __del__ called after module have been removed

2022-01-05 Thread Christopher Vickery
Christopher Vickery added the comment: The app has to open a db connection during module initialization to trigger the problem, so I can't provide a self-contained way to reproduce the problem. The closest I can come is the attached file, format_rules_annotated.py. With lines 66-69 in place,

[issue46274] backslash creating statement out of nothing

2022-01-05 Thread Jeremy
New submission from Jeremy : A source of one or more backslash-escaped newlines, and one final newline, is not tokenized the same as a source where those lines are "manually joined". The source ``` \ \ \ ``` produces the tokens NEWLINE, ENDMARKER when piped to the tokenize module. Whereas th

[issue46241] importlib.utils.find_spec() has issues with "tests" folder

2022-01-05 Thread Daniël van Noord
Daniël van Noord added the comment: Thanks Brett for that explanation! Makes sense actually now that I think about it. I also wondered how astroid got onto my sys.path, but that's something for another time :) -- ___ Python tracker

[issue46275] caret location for syntax error pointing with f-strings

2022-01-05 Thread William Navaraj
New submission from William Navaraj : Currently for non-f-string syntax errors, the caret points to the correct location of the syntax errors Example 1: ``` a=foo)+foo()+foo() ``` a=foo)+foo()+foo() ^ SyntaxError: unmatched ')' For f-string syntax errors, the caret points two

[issue46275] caret location for syntax error pointing with f-strings

2022-01-05 Thread William Navaraj
William Navaraj added the comment: A potential solution or in that direction https://github.com/williamnavaraj/cpython/tree/fix-issue-46275 Example 1: ``` temp=f"blank {foo)" ``` temp=f"blank {foo)" ^ SyntaxError: f-string: unmatched ')' Example 2: ``` temp=f"b

[issue46276] ImportError: DLL load failed while importing

2022-01-05 Thread Zombo
New submission from Zombo : This code fails: >>> import _frida Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed while importing _frida: The specified module could not be found. works as expected with Python 3.9 https://github.com/frida/frida-python/blob/

[issue46277] '''...''' error

2022-01-05 Thread Yongfan Ming
New submission from Yongfan Ming : define: str_='''... ... .. .. . ... ''' get: str='...\n\n..\n..\n.\n\n' if '...' in the second line, all '...' will be not read. -- components: Unicode messages: 409816 nosy: ezio.melotti, sumowi, vstinner priority: normal severity: normal status: ope

[issue46277] '''...''' error

2022-01-05 Thread Yongfan Ming
Yongfan Ming added the comment: just happend in jupyter notebook . -- Added file: https://bugs.python.org/file50543/20220106143913.png ___ Python tracker ___ _

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2022-01-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 35d6540c904ef07b8602ff014e520603f84b5886 by Victor Stinner in branch 'main': bpo-46006: Revert "bpo-40521: Per-interpreter interned strings (GH-20085)" (GH-30422) https://github.com/python/cpython/commit/35d6540c904ef07b8602ff014e520603f84b5886

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2022-01-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 35d6540c904ef07b8602ff014e520603f84b5886 by Victor Stinner in branch 'main': bpo-46006: Revert "bpo-40521: Per-interpreter interned strings (GH-20085)" (GH-30422) https://github.com/python/cpython/commit/35d6540c904ef07b8602ff014e520603f84b5886

<    1   2