[issue24076] sum() several times slower on Python 3 64-bit

2021-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds good, you have my blessing. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24076] sum() several times slower on Python 3 64-bit

2021-09-20 Thread Stefan Behnel
Stefan Behnel added the comment: > The patch looks fine, but it looks a bit like benchmark chasing. Is the speed > of builtin sum() of a sequence of integers important enough to do this bit of > inlining? Given that we already accepted essentially separate loops for the int, float and

[issue45249] SyntaxError location range indicator does not work in doctests

2021-09-20 Thread Andrei Kulakov
Change by Andrei Kulakov : -- title: Syntax error location range indicator does not work in doctests -> SyntaxError location range indicator does not work in doctests ___ Python tracker

[issue45249] Syntax error location range indicator does not work in doctests

2021-09-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: Thinking a bit more on this, I'm not sure this can be closed, as SyntaxError indicators seems not to be working. I'm not sure if this is limited to doctests or not. I've updated the title to narrow it down to SyntaxErrors. I can look more into this if

[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-20 Thread Andrei Kulakov
Change by Andrei Kulakov : -- nosy: +kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45252] Missing support for Source Specific Multicast

2021-09-20 Thread CireSnave
New submission from CireSnave : It appears that Python's socket module is missing support for the IGMPv3 socket options needed to support Source Specific Multicast. Many developers appear to be adding the necessary constants through something like: if not hasattr(socket,

[issue24076] sum() several times slower on Python 3 64-bit

2021-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: The patch looks fine, but it looks a bit like benchmark chasing. Is the speed of builtin sum() of a sequence of integers important enough to do this bit of inlining? (It may break if we change the internals of Py_Long, as Mark Shannon has been wanting to

[issue24076] sum() several times slower on Python 3 64-bit

2021-09-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I created a PR from my last patch, inlining the unpacking > of single digit integers. Thanks, that gets to the heart of the issue. I marked the PR as approved (though there is a small coding nit you may want to fix). --

[issue45251] signal.SIGCLD alias is not available on OSX

2021-09-20 Thread Thomas Caswell
New submission from Thomas Caswell : The module attribute signal.SIGCLD (https://docs.python.org/3/library/signal.html#signal.SIGCLD) is an "archaic" (quoting from the GNU C Library source) alias for signal.SIGCHLD (https://docs.python.org/3/library/signal.html#signal.SIGCHLD).

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-20 Thread STINNER Victor
STINNER Victor added the comment: wait.py: script to test the time.sleep() function. Press CTRL+C multiple times during the sleep to check that even if the sleep is interrupted, time.sleep() sleeps the expected duration. -- Added file: https://bugs.python.org/file50289/wait.py

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26882 pull_request: https://github.com/python/cpython/pull/28483 ___ Python tracker ___

[issue45246] the sorted() documentation should refer to operator

2021-09-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: -0 on this. While it is true that __lt__ is used, we don't really want people to exploit that fact. Doing so will get them into trouble elsewhere. For example, max(seq) uses __gt__. Also, when mixing types, a return of NotImplemented will trigger a

[issue45226] Misleading error message when pathlib.Path.symlink_to() fails with permissions error

2021-09-20 Thread Barney Gale
Barney Gale added the comment: `os.symlink()` and `pathlib.Path.symlink_to()` have reversed argument orders, but in the repro steps you're supplying arguments in the same order. -- nosy: +barneygale ___ Python tracker

[issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are

2021-09-20 Thread Brett Cannon
New submission from Brett Cannon : There's some inaccuracies when it comes to iterable and iterators (async and not). See https://mail.python.org/archives/list/python-...@python.org/thread/3W7TDX5KNVQVGT5CUHBK33M7VNTP25DZ/#3W7TDX5KNVQVGT5CUHBK33M7VNTP25DZ for background. Should probably

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-20 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2021-09-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: False alarm. I misread the diff. All is well. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

2021-09-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: fixed -> status: closed -> ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

2021-09-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg402274 ___ Python tracker ___ ___ Python-bugs-list

[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

2021-09-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: False alarm. I misread the diff. All is well. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue45021] concurrent.futures race condition

2021-09-20 Thread miss-islington
miss-islington added the comment: New changeset b06c3b364720ce8e8dfb74dfa24434e067ac89ba by Miss Islington (bot) in branch '3.9': [3.9] bpo-45021: Fix a hang in forked children (GH-28007) (GH-28481) https://github.com/python/cpython/commit/b06c3b364720ce8e8dfb74dfa24434e067ac89ba

[issue45021] concurrent.futures race condition

2021-09-20 Thread miss-islington
miss-islington added the comment: New changeset d0d83a94314402366e04e7ea2638f809510eb830 by Miss Islington (bot) in branch '3.10': [3.10] bpo-45021: Fix a hang in forked children (GH-28007) (GH-28480) https://github.com/python/cpython/commit/d0d83a94314402366e04e7ea2638f809510eb830

[issue45249] Fine grained error locations do not work in doctests

2021-09-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: Pablo: that works fine, thanks! I will look into updating the doctest docs, and will close this issue later today ( or you can close it if you like). -- ___ Python tracker

[issue45021] concurrent.futures race condition

2021-09-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: I expect the unittest for this might causes hangs on some platforms in the future as it mixes fork and threads which is a posix-nono. If so, we should just disable it on all but specific known-to-pass build configs as a future PR. 3.9 and 3.10 PRs will

[issue45249] Fine grained error locations do not work in doctests

2021-09-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Can you try a doctest that fails on something that is not a SyntaxError. Something like: >>> def foo(x): ...return x + 42 >>> foo(None) -- ___ Python tracker

[issue45249] Fine grained error locations do not work in doctests

2021-09-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ah, but that is a different issue. This is not PEP 657, this is a SyntaxError, so is related how those are printed, which I think is separared. -- ___ Python tracker

[issue45021] concurrent.futures race condition

2021-09-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +26881 pull_request: https://github.com/python/cpython/pull/28481 ___ Python tracker ___

[issue45021] concurrent.futures race condition

2021-09-20 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +26880 pull_request: https://github.com/python/cpython/pull/28480 ___ Python tracker

[issue45021] concurrent.futures race condition

2021-09-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 0bfa1106acfcddc03590e1f5d6789dbad3affe70 by nullptr in branch 'main': bpo-45021: Fix a hang in forked children (GH-28007) https://github.com/python/cpython/commit/0bfa1106acfcddc03590e1f5d6789dbad3affe70 -- nosy: +gregory.p.smith

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-20 Thread STINNER Victor
STINNER Victor added the comment: > It looks like the `_thread` module does not actually expose > `PyThread_exit_thread` --- the similarly named `thread_PyThread_exit_thread` > just raises SystemExit. Oh right, I was confused by the function name: "thread_PyThread_exit_thread()". It's a

[issue45155] Add default arguments for int.to_bytes()

2021-09-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 9510e6f3c797b4398aaf58abc1072b9db0a644f9 by Raymond Hettinger in branch 'main': bpo-45155: Apply new byteorder default values for int.to/from_bytes (GH-28465) https://github.com/python/cpython/commit/9510e6f3c797b4398aaf58abc1072b9db0a644f9

[issue40503] PEP 615: Add zoneinfo module

2021-09-20 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-20 Thread Jeremy Maitin-Shepard
Jeremy Maitin-Shepard added the comment: It looks like the `_thread` module does not actually expose `PyThread_exit_thread` --- the similarly named `thread_PyThread_exit_thread` just raises SystemExit. >From a search in the codebase, it appears `PyThread_exit_thread` is currently >used

[issue45249] Fine grained error locations do not work in doctests

2021-09-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: Sorry, I should have noted I’m referring to the line 1 1 Which is underlined by a single caret, but on the command line it has 3 carets as expected. -- ___ Python tracker

[issue45155] Add default arguments for int.to_bytes()

2021-09-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +26879 pull_request: https://github.com/python/cpython/pull/28465 ___ Python tracker ___

[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

2021-09-20 Thread Thomas
Thomas added the comment: I added a pull request to attempt to fix this issue. It received a label but no review and has gone stale, so I am sending out a ping. -- ___ Python tracker

[issue45249] Fine grained error locations do not work in doctests

2021-09-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hu, could you explain a bit more in detail what is the expected output? I can see highlighting in the exec call that you pasted: exec(compile(example.source, filename, "single", ^^^ The

[issue35712] Make NotImplemented unusable in boolean context

2021-09-20 Thread Alex Waygood
Alex Waygood added the comment: Thanks, Serhiy, that makes sense. I'll consider raising this elsewhere, as you suggest. -- ___ Python tracker ___

[issue45249] Fine grained error locations do not work in doctests

2021-09-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've ran into this when looking at doctest docs, the issue is that they use the old example where a single column is highlighted, I want to update it to explain why doctest output differs from the one you get from REPL, but I probably need to understand why

[issue45249] Fine grained error locations do not work in doctests

2021-09-20 Thread Andrei Kulakov
New submission from Andrei Kulakov : It seems like fine grained error locations do not work in failed doctest traceback output: version 3.11.0a0 file contents: -- def a(x): """ >>> 1 1 1 """ import doctest doctest.testmod() OUTPUT --- Failed example:

[issue35712] Make NotImplemented unusable in boolean context

2021-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interesting, it is because object().__eq__(object()) returns NotImplemented instead of False. object.__eq__ could return False if arguments have same type (or in some other cases). I think it would not break anything, and it would fix your case. But I am

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 04dea46dde25d58f242171181805f0e71a042963 by Miss Islington (bot) in branch '3.9': bpo-45229: Make pickle tests discoverable (GH-28467) (GH-28479) https://github.com/python/cpython/commit/04dea46dde25d58f242171181805f0e71a042963 -- nosy:

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 74c6acc76fa00f1b80e96c8d4608ba1487387949 by Miss Islington (bot) in branch '3.10': bpo-45229: Make pickle tests discoverable (GH-28467) (GH-28478) https://github.com/python/cpython/commit/74c6acc76fa00f1b80e96c8d4608ba1487387949 -- nosy:

[issue35712] Make NotImplemented unusable in boolean context

2021-09-20 Thread Alex Waygood
Alex Waygood added the comment: Thanks, Vedran. I read https://bugs.python.org/issue35712#msg349303 before adding my message, but am not quite clear why my snippet is the same situation. `next(filter((2).__eq__, 'text'))` surely returns 't' because `(2).__eq__('t')` returns

[issue45237] Python subprocess not honoring append mode for stdout on Windows

2021-09-20 Thread Steve Dower
Steve Dower added the comment: > This change has been discussed, but I don't know whether or not it's just a > pipe dream Still a bit of a pipe dream, but I'll add this issue as something that would be fixed by it (to stack up against the list of things that would be broken...) --

[issue44848] Upgrade macOS and Windows installers to use SQLite 3.36.0

2021-09-20 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44848] Upgrade macOS and Windows installers to use SQLite 3.36.0

2021-09-20 Thread Steve Dower
Steve Dower added the comment: New changeset 5846c9b71ee9277fe866b1bdee4cc6702323fe7e by Erlend Egeberg Aasland in branch 'main': bpo-44848: Update Windows installer to use SQLite 3.36.0 (GH-27622) https://github.com/python/cpython/commit/5846c9b71ee9277fe866b1bdee4cc6702323fe7e --

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-20 Thread Steve Dower
Steve Dower added the comment: I'd guess that these tests are assuming that sys.executable contains only ASCII characters. All the tests run in a non-ASCII working directory, so it's only the runtime that is not tested propersy here. The easiest way for Ming Hua to test this is to install

[issue40413] Py_RunMain() crashes on subsequence call

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 29e431419a0c23340099a9cd8cf23ec9c7788879 by Miss Islington (bot) in branch '3.9': bpo-40413: test_embed tests calling Py_RunMain() multiple times (GH-28466) (GH-28471)

[issue35712] Make NotImplemented unusable in boolean context

2021-09-20 Thread Vedran Čačić
Vedran Čačić added the comment: Please see the message https://bugs.python.org/issue35712#msg349303. Filtering with those dunder sesqui-dispatch methods really is a bug magnet. -- ___ Python tracker

[issue40503] PEP 615: Add zoneinfo module

2021-09-20 Thread Steve Dower
Steve Dower added the comment: That looks like a relocatable path anyway, which means you wouldn't want to compile it into the binary. Your patch to select a default value at runtime is probably better. The compile-time option is meant for a system directory. --

[issue35712] Make NotImplemented unusable in boolean context

2021-09-20 Thread Alex Waygood
Alex Waygood added the comment: The following code now leads to a `DeprecationWarning`, but I am unclear why it should. ``` >>> from enum import Enum >>> >>> class CardColour(Enum): ... """Enumeration of the two colours in a pack of cards.""" ... ... BLACK = 'black' ... RED =

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +26876 pull_request: https://github.com/python/cpython/pull/28478 ___ Python tracker

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e6ba992288fdbe71aa808cfb6955f6f99da7e349 by Serhiy Storchaka in branch 'main': bpo-45229: Make pickle tests discoverable (GH-28467) https://github.com/python/cpython/commit/e6ba992288fdbe71aa808cfb6955f6f99da7e349 --

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +26877 pull_request: https://github.com/python/cpython/pull/28479 ___ Python tracker ___

[issue34093] Reproducible pyc: FLAG_REF is not stable.

2021-09-20 Thread Eric Snow
Eric Snow added the comment: FWIW, I found a faster solution than calling `w_object()` twice. Currently the logic for w_ref() (used for each "complex" object) looks like this: * if ob_ref == 1 * do not apply FLAG_REF * marshal normally * else if seen for the first time * apply

[issue45055] Fresh build on Windows fails the first time for zlib.c

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: Looks like we can lose this with fixes merged for 3.9 - 3.11. -- nosy: +lukasz.langa resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue1514420] Traceback display code can attempt to open a file named ""

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: Fixed for Python 3.11. Thanks! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue1514420] Traceback display code can attempt to open a file named ""

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset f71300cb0442f16ee9abc938e12537aec1eb5979 by Irit Katriel in branch 'main': bpo-1514420: Do not attempt to open files with names in <>s when formatting an exception (GH-28143)

[issue40497] subprocess.check_output() accept the check keyword argument

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: Fixed with GH-19897 for Python 3.11. Thanks! ✨  ✨ -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.11 -Python 3.7, Python 3.8, Python 3.9 ___ Python tracker

[issue40497] subprocess.check_output() accept the check keyword argument

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 4d2957c1b9a915f76da418e89bf9b5add141ca3e by Rémi Lapeyre in branch 'main': bpo-40497: Fix handling of check in subprocess.check_output() (GH-19897) https://github.com/python/cpython/commit/4d2957c1b9a915f76da418e89bf9b5add141ca3e --

[issue45055] Fresh build on Windows fails the first time for zlib.c

2021-09-20 Thread miss-islington
miss-islington added the comment: New changeset 50c0551f97f86bbf9f659e1bbe78a14df7754cbe by Miss Islington (bot) in branch '3.9': bpo-45055: Add retry when downloading externals on Windows (GH-28399) https://github.com/python/cpython/commit/50c0551f97f86bbf9f659e1bbe78a14df7754cbe

[issue45055] Fresh build on Windows fails the first time for zlib.c

2021-09-20 Thread miss-islington
miss-islington added the comment: New changeset ee41d01326ddf48c411c019a4e63343668ebd829 by Miss Islington (bot) in branch '3.10': bpo-45055: Add retry when downloading externals on Windows (GH-28399) https://github.com/python/cpython/commit/ee41d01326ddf48c411c019a4e63343668ebd829

[issue34093] Reproducible pyc: FLAG_REF is not stable.

2021-09-20 Thread Eric Snow
Eric Snow added the comment: It turns out that I don't need this after all (once I merged gh-28392 and bpo-45188 was resolved). That impacts how much time I have to spend on this, so I might not be able to pursue this further. That said, I think it is worth doing and the PR I have up

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread Miro Hrončok
Miro Hrončok added the comment: > It would mean that extensions compiled against the release candidates may not > be binary compatible with the final release If that's true, I definitively argue not to do that. We've told everybody it won't happen. --

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread John Ehresman
John Ehresman added the comment: Is adding the field back an option at this point? It would mean that extensions compiled against the release candidates may not be binary compatible with the final release My take is that use_tracing is an implementation and version dependent field, and

[issue45055] Fresh build on Windows fails the first time for zlib.c

2021-09-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +26875 pull_request: https://github.com/python/cpython/pull/28477 ___ Python tracker ___

[issue45055] Fresh build on Windows fails the first time for zlib.c

2021-09-20 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +26874 pull_request: https://github.com/python/cpython/pull/28476 ___ Python tracker

[issue45055] Fresh build on Windows fails the first time for zlib.c

2021-09-20 Thread Steve Dower
Steve Dower added the comment: New changeset ef9e22b253253615098d22cb49141a2a1024ee3c by Steve Dower in branch 'main': bpo-45055: Add retry when downloading externals on Windows (GH-28399) https://github.com/python/cpython/commit/ef9e22b253253615098d22cb49141a2a1024ee3c --

[issue45213] Frozen modules are looked up using a linear search.

2021-09-20 Thread Eric Snow
Eric Snow added the comment: On Mon, Sep 20, 2021 at 12:55 AM Raymond Hettinger wrote: > If you close this out, consider adding a prominent comment so that the issue > will be on the minds of people looking at this code. Good idea! -- ___ Python

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread Stefan Behnel
Stefan Behnel added the comment: > The code in the examples given above are using `tstate->use_tracing` assuming > that its meaning is to determine whether tracing is turned on or not. No, actually not. It is using the field in the same way as CPython, simply because most of this code was

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Can someone repeat the benchmarks with https://github.com/python/cpython/pull/28475 ? -- ___ Python tracker ___

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-20 Thread Mark Shannon
Mark Shannon added the comment: If we are hitting a size limit for PGO, then we need to reduce the size of _PyEval_EvalFrameDefault, to let the compiler do its job. Force inlining stuff is not going to help. Reverting https://github.com/python/cpython/pull/25244 for 3.10 seems to be the

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-20 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +26873 pull_request: https://github.com/python/cpython/pull/28475 ___ Python tracker ___

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for doing this. When I started setting up the IDLE test suite 8 years ago, I was a bit confused about the mixture of old ways (test_main) and new ways (unittest.main and possibly load_tests) in the test suite. Fortunately, Nick C. told me which

[issue45248] Documentation example in copyreg errors

2021-09-20 Thread Ciaran Welsh
Change by Ciaran Welsh : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45248] Documentation example in copyreg errors

2021-09-20 Thread Ciaran Welsh
New submission from Ciaran Welsh : The example on https://docs.python.org/3/library/copyreg.html does not work: ``` import copyreg, copy, pickle class C: def __init__(self, a): self.a = a def pickle_c(c): print("pickling a C

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread Xtrem532
Change by Xtrem532 : -- nosy: +Xtrem532 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39747] test_os debug assertion failure

2021-09-20 Thread Irit Katriel
Irit Katriel added the comment: If I understand Steve's comment it sounds like there's nothing we can do here. Shall we close it as not a bug? -- nosy: +iritkatriel resolution: -> not a bug status: open -> pending ___ Python tracker

[issue45155] Add default arguments for int.to_bytes()

2021-09-20 Thread 4-launchpad-kalvdans-no-ip-org
Change by 4-launchpad-kalvdans-no-ip-org : -- nosy: +4-launchpad-kalvdans-no-ip-org ___ Python tracker ___ ___ Python-bugs-list

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +26872 pull_request: https://github.com/python/cpython/pull/28474 ___ Python tracker ___

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread Mark Shannon
Mark Shannon added the comment: IMO those failures are bugs in the projects listed not in CPython. Relying on the exact meaning, or even the existence of an undocumented field of a C struct is not, nor ever has been, safe. The user of the field is assuming a meaning that is not known to the

[issue45247] Add explicit support for Cython to the C API.

2021-09-20 Thread Mark Shannon
New submission from Mark Shannon : As the C API has evolved it has grown features in an ad-hoc way, driven by the needs to whoever has bothered to add the code. Maybe we should be a bit more principled about this. Specifically we should make sure that there is a well defined interface

[issue45200] Address Sanitizer: libasan dead lock in pthread_create() (test_multiprocessing_fork.test_get() hangs)

2021-09-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I didn't check the error rate of this issue. Usually, I'm not sure why, but > I'm the one affected by every single test which fails randomly :-D If you wish, as a compromise we can ignore multiprocessing tests on ASAN build for now and leave them

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2021-09-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Also, the ordered dict dealloc is already doing that: https://github.com/python/cpython/blob/a856364cc920d8b16750fd1fadc902efb509754c/Objects/odictobject.c#L1372-L1373 -- ___ Python tracker

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2021-09-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I'm thinking that edit to tp_dealloc was incorrect. What edit are you referring to? PR 18749 only touches tp_clear and tp_traverse, not tp_dealloc -- ___ Python tracker

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-20 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-13077 "Windows: Unclear behavior of daemon threads on main thread exit". -- ___ Python tracker ___

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-20 Thread STINNER Victor
STINNER Victor added the comment: I don't think that there is a "good default behavior" where Python currently calls PyThread_exit_thread(). IMO we should take the problem from the other side and tries to reduce cases when Python can reach this case. Or even make it impossible if possible.

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-20 Thread STINNER Victor
STINNER Victor added the comment: PyThread_exit_thread() is exposed as _thread.exit() and _thread.exit_thread(). PyThread_exit_thread() is only called in take_gil() (at 3 places in the function) if tstate_must_exit(tstate) is true. It happens in two cases: * (by design) at Python exit if a

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-20 Thread neonene
neonene added the comment: >release with the performance regression I'm OK with the option. The limitation of PGO seems to me a bit weird and it might be unexpected for MSVC team. -- ___ Python tracker

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread STINNER Victor
STINNER Victor added the comment: > A Cython issue report: https://github.com/cython/cython/issues/4153 Cython 0.29.24 released at July 13, 2021 with a fix (2 commits): * https://github.com/cython/cython/commit/be3b178296975b976107f41a6383291701e0297f *

[issue40413] Py_RunMain() crashes on subsequence call

2021-09-20 Thread miss-islington
miss-islington added the comment: New changeset 3d16fc90ce36acaa846ee88bdd124f84d49395b3 by Miss Islington (bot) in branch '3.10': bpo-40413: test_embed tests calling Py_RunMain() multiple times (GH-28466) https://github.com/python/cpython/commit/3d16fc90ce36acaa846ee88bdd124f84d49395b3

[issue45246] the sorted() documentation should refer to operator

2021-09-20 Thread Dimitri Papadopoulos Orfanos
Change by Dimitri Papadopoulos Orfanos : -- keywords: +patch pull_requests: +26871 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28472 ___ Python tracker

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a856364cc920d8b16750fd1fadc902efb509754c by Serhiy Storchaka in branch 'main': bpo-45229: Use doctest.DocTestSuite instead of run_doctest (GH-28468) https://github.com/python/cpython/commit/a856364cc920d8b16750fd1fadc902efb509754c

[issue40413] Py_RunMain() crashes on subsequence call

2021-09-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +26870 pull_request: https://github.com/python/cpython/pull/28471 ___ Python tracker ___

[issue40413] Py_RunMain() crashes on subsequence call

2021-09-20 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +26869 pull_request: https://github.com/python/cpython/pull/28470 ___ Python tracker

[issue40413] Py_RunMain() crashes on subsequence call

2021-09-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5e2c32e08ed77081cabd9d51f0589f81c1572732 by Victor Stinner in branch 'main': bpo-40413: test_embed tests calling Py_RunMain() multiple times (GH-28466) https://github.com/python/cpython/commit/5e2c32e08ed77081cabd9d51f0589f81c1572732

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2021-09-20 Thread STINNER Victor
STINNER Victor added the comment: I close the issue as "not a bug". If you disagree, please comment the issue :-) Steven Stewart-Gallus: > In the code FD_DIR is "/proc/self/fd" on Linux. I'm not sure this code > is correct. This seems as if it would have the same problems as > iterating over

[issue45027] Allow basicConfig to configure any logger, not just root

2021-09-20 Thread Vinay Sajip
Vinay Sajip added the comment: > This selectively _disables_ a logger. That isn't the same thing as > selectively _enabling_ only the loggers you want to enable. Your earlier comment referred to getting unwanted messages from third-party loggers. Suppressing the messages implies disabling

  1   2   >