[issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning

2020-05-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +19417 pull_request: https://github.com/python/cpython/pull/20110 ___ Python tracker ___

[issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning

2020-05-15 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19416 pull_request: https://github.com/python/cpython/pull/20109 ___ Python tracker

[issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning

2020-05-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6e57237faf0da8904e0130a11350cae3c5062b82 by Victor Stinner in branch 'master': bpo-40055: test_distutils leaves warnings filters unchanged (GH-20095) https://github.com/python/cpython/commit/6e57237faf0da8904e0130a11350cae3c5062b82 --

[issue40479] Port _hashlib to OpenSSL 3.0.0

2020-05-15 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +19415 pull_request: https://github.com/python/cpython/pull/20108 ___ Python tracker ___

[issue40479] Port _hashlib to OpenSSL 3.0.0

2020-05-15 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +19414 pull_request: https://github.com/python/cpython/pull/20107 ___ Python tracker ___

[issue40634] Ignored "BlockingIOError: [Errno 11] Resource temporarily unavailable" are still haunting us

2020-05-15 Thread Yaroslav Halchenko
New submission from Yaroslav Halchenko : This is a reincarnation of previous issues such as - older https://bugs.python.org/issue21595 which partially (with ack on that) addressed the issue awhile back - more recent https://bugs.python.org/issue38104 which was closed as "wont fix" since

[issue39837] Make Azure Pipelines optional on GitHub PRs

2020-05-15 Thread STINNER Victor
STINNER Victor added the comment: > Oh, and Victor, you should probably email python-dev to let everyone know you > requested this change and it's been made. Otherwise people may be surprised > that it changed without any discussion or notification. I wanted to wait until the situation was

[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 A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: If the patch requires a rewrite and its value is uncertain then I'll excuse myself from this issue. -- ___ Python tracker ___

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

2020-05-15 Thread Eric V. Smith
Eric V. Smith added the comment: I think that's reasonable, although I could see someone objecting ("just use simplejson instead"). I suggest discussing this on the python-ideas mailing list and see what people think over there. It might help to create a PR first, if it's not a lot of work.

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

2020-05-15 Thread Дилян Палаузов
Дилян Палаузов added the comment: I used python 3.6, I exported all dependencies with `pip list`, then upgraded to python 3.8 and imported the exported dependencies. Uninstalling the “typing” module has helped. Do you mean, that python 3.8 includes the “typing” modules, so that it may not

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

2020-05-15 Thread Haoyu SUN
Haoyu SUN added the comment: Thank you for the timely reply, Eric. How about we add an optional argument (like the argument "ignore_nan" defaults to False as the package simplejson does) to functions like json.dumps(). So that user can choose whether he needs NaN encoded as NaN or null,

[issue40192] time.thread_time isn't outputting in nanoseconds in AIX

2020-05-15 Thread STINNER Victor
STINNER Victor added the comment: time.thread_time() is documented as: "Return the value (in fractional seconds) of the sum of the system and user CPU time of the current thread. It does not include time elapsed during sleep." https://docs.python.org/dev/library/time.html#time.thread_time So

[issue25920] PyOS_AfterFork should reset socketmodule's lock

2020-05-15 Thread Hugh Redelmeier
Change by Hugh Redelmeier : -- nosy: +hugh ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40192] time.thread_time isn't outputting in nanoseconds in AIX

2020-05-15 Thread STINNER Victor
STINNER Victor added the comment: I found this documentation on AIX thread_cputime(): https://www.ibm.com/support/knowledgecenter/ssw_aix_71/t_bostechref/thread_cputime.html """ Syntax #include int thread_cputime (tid, ctime) tid_t tid; thread_cputime_t * ctime ; typedef struct {

[issue40192] time.thread_time isn't outputting in nanoseconds in AIX

2020-05-15 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: current: >>> import time >>> import time >>> time.get_clock_info('thread_time') namespace(adjustable=False, implementation='clock_gettime(CLOCK_THREAD_CPUTIME_ID)', monotonic=True, resolution=0.01) >>> time.thread_time() 0.07 PR 19381: >>> import time >>>

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

2020-05-15 Thread Eric V. Smith
Eric V. Smith added the comment: Since this is documented behavior (https://docs.python.org/3.8/library/json.html#infinite-and-nan-number-values), we can't change it by default without breaking code. What JavaScript JSON encoders and decoders specifically have a problem with this behavior?

Re: Decorators with arguments?

2020-05-15 Thread Peter Otten
Christopher de Vidal wrote: > Help please? Creating an MQTT-to-Firestore bridge and I know a decorator > would help but I'm stumped how to create one. I've used decorators before > but not with arguments. > > The Firestore collection.on_snapshot() method invokes a callback and sends > it three

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

2020-05-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: You seem to use typing backport that has this issue : https://github.com/python/typing/issues/573 -- nosy: +xtreak ___ Python tracker

[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

Re: Multithread and locking issue

2020-05-15 Thread Chris Angelico
On Fri, May 15, 2020 at 6:25 PM Cameron Simpson wrote: > > On 15May2020 05:57, Stephane Tougard wrote: > >On 2020-05-15, Chris Angelico wrote: > >> Seconded. If you know how many threads you're going to have, just > >> open > >> that many connections. If not, there's a connection-pooling

[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 ___

Re: Multithread and locking issue

2020-05-15 Thread Cameron Simpson
On 15May2020 05:57, Stephane Tougard wrote: On 2020-05-15, Chris Angelico wrote: Seconded. If you know how many threads you're going to have, just open that many connections. If not, there's a connection-pooling feature as part of psycopg2 (if I'm not mistaken). This would be far far easier

Re: Multithread and locking issue

2020-05-15 Thread Antoon Pardon
Op 15/05/20 om 00:36 schreef Stephane Tougard: Hello, A multithreaded software written in Python is connected with a Postgres database. To avoid concurrent access issue with the database, it starts a thread who receive all SQL request via queue.put and queue.get (it makes only insert, so

[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. --

Re: Multithread and locking issue

2020-05-15 Thread Stephane Tougard
On 2020-05-15, Chris Angelico wrote: > Seconded. If you know how many threads you're going to have, just open > that many connections. If not, there's a connection-pooling feature as > part of psycopg2 (if I'm not mistaken). This would be far far easier > to work with than a fragile queueing

<    1   2