[issue40633] json.dumps() should encode float number NaN to null

2020-05-15 Thread Haoyu SUN
New submission from Haoyu SUN : Float numbers in Python can have 3 special number: nan, inf, -inf, which are encoded by json module as "NaN", "Infinity", "-Infinity". These representations are not compatible with JSON specifications RFC7159: https://tools.ietf.org/html/rfc7159.html#page-6

[issue40632] AttributeError: type object 'Callable' has no attribute '_abc_registry'

2020-05-15 Thread Дилян Палаузов
New submission from Дилян Палаузов : I have the newest cpython 3.8 (07bd5cf3d9551ae), installed with `./configure --enable-loadable-sqlite-extensions --disable-ipv6 --with-system-expat --with-system-libmpdec --enable-shared && make && make install`. Calling `pip-20.1 install -U meson` prints:

[issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given"

2020-05-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: First, the code for checking arguments was significantly changed in recent versions. So if we are going to make these changes the patch should be not just rebased, but rewritten from zero. Second, the error messages for wrong number of positional

[issue40334] PEP 617: new PEG-based parser

2020-05-15 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- pull_requests: +19413 pull_request: https://github.com/python/cpython/pull/20106 ___ Python tracker ___

[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-15 Thread Glenn Travis
Glenn Travis added the comment: Is there no way to edit a previous comment? Anyway, I can get it to work as described, but the Launcher Preferences window also opens when I run a script. Did I miss a setting? -- ___ Python tracker

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-05-15 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-05-15 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Whoops, false alarm. It's just that we moved the check for invalid starred expressions to the parser, while it previously was in the compiler. ╰─ ./python.exe -X oldparser Python 3.9.0a6+ (heads/master-dirty:003708bcf8, May 15 2020, 15:08:21) [Clang

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-05-15 Thread Mark Shannon
Mark Shannon added the comment: Those numbers are for code without immortal objects. They don't apply in this case, as the branch misprediction rate would rise. -- ___ Python tracker

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-05-15 Thread Lysandros Nikolaou
New submission from Lysandros Nikolaou : The new PEG parser fails when a parenthesised expression with a single child (a group) contains a starred expression. Example: ╰─ ./python.exe Python 3.9.0a6+ (heads/master-dirty:4a12d12186, May 15 2020, 14:53:45) [Clang 11.0.0 (clang-1100.0.33.8)] on

[issue36264] os.path.expanduser should not use HOME on windows

2020-05-15 Thread Christoph Reiter
Christoph Reiter added the comment: Config on Windows should go into APPDATA not USERPROFILE/HOME, on macOS it should go to "$HOME/Library/Application Support" and on Linux $XDG_CONFIG_HOME or $HOME/.config. So using using HOME on all platforms for config is not what those platforms

[issue38938] Possible performance improvement for heaqq.merge()

2020-05-15 Thread Dennis Sweeney
Dennis Sweeney added the comment: As Serhiy suggested, keeping the algorithm but moving the Python implementation to be a generator again (as I recently changed in PR 18427) gives another performance boost (although this unrolling is many lines of code). Timing the C implementation:

[issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible)

2020-05-15 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +19412 pull_request: https://github.com/python/cpython/pull/20104 ___ Python tracker ___

[issue36264] os.path.expanduser should not use HOME on windows

2020-05-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: I addressed the [setuptools test suite issue](https://github.com/pypa/setuptools/issues/2112) with [this commit](https://github.com/pypa/setuptools/commit/f866311d60f54499c3637309e3429780d8c8f218). What was a one-line elegant solution is now multiple lines

[issue36264] os.path.expanduser should not use HOME on windows

2020-05-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: I should also point out that this was a documented feature of Python that was removed without any deprecation period. -- ___ Python tracker

[issue36264] os.path.expanduser should not use HOME on windows

2020-05-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: Today I ran into an issue due to this change. I have a test that sets `os.environ['HOME']` in order to ensure that `os.path.expanduser(~)` returns that value

[issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible)

2020-05-15 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +19411 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20103 ___ Python tracker ___

[issue40492] -m cProfile -o f.pstats with a script that does chdir() writes to the changed directory and not `.`

2020-05-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure what is better: to fix it at high level, in main() for cProfile and cProfile, or at low level, in methods runctx() and run() of profile._Utils. -- ___ Python tracker

[issue40028] Math module method to find prime factors for non-negative int n

2020-05-15 Thread Mark Dickinson
Mark Dickinson added the comment: @Rémi Lapeyre (since you requested re-opening of the issue :-) Are you interested in putting together a PEP for this? -- ___ Python tracker

[issue40028] Math module method to find prime factors for non-negative int n

2020-05-15 Thread Christian Heimes
Christian Heimes added the comment: > I don't think the interface needs much bikeshedding, as long as the > implementer chooses something reasonable. Bikeshedding works more like "build it and they will come". It's going to happen especially when the interface looks easy. --

<    1   2