[issue46981] Empty typing.Tuple

2022-04-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I tried out 3.11 on my pyanalyze type checker and got some failures because of this change, because my previous trick for distinguishing between Tuple and Tuple[()] failed. 3.10: >>> from typing import get_args, Tuple >>> get_args(Tuple[()]) ((),) >>>

[issue47061] Deprecate modules listed in PEP 594

2022-04-07 Thread Brett Cannon
Change by Brett Cannon : -- pull_requests: +30436 pull_request: https://github.com/python/cpython/pull/32410 ___ Python tracker ___

[issue47255] Many broken :meth: roles in the docs

2022-04-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: There are a lot of places in the rest of the docs that have the same problem: Doc % git grep ':meth:`__' | grep -v whatsnew | wc -l 610 I wonder if we can make the :meth: role globally default to linking to object.__dunder__. Would that require a

[issue47255] Many broken :meth: roles in the docs

2022-04-07 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +30435 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32409 ___ Python tracker ___

[issue47255] Many broken :meth: roles in the docs

2022-04-07 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : The docs for the hash() builtin use :meth:`__hash__`, but this doesn't actually link to the datamodel documentation for __hash__: it needs :meth:`~object.__hash__` instead. I'm fixing this in the builtin functions docs, but there are probably more

[issue47254] enhanced dir?

2022-04-07 Thread apostofes
apostofes added the comment: plus I would want it to have some more methods, ``` l = [1, 2, 3] ``` using enhanced dir should give, ``` {'list': {'__add__', '__contains__', '__delitem__', '__eq__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__iadd__', '__imul__',

[issue47254] enhanced dir?

2022-04-07 Thread apostofes
apostofes added the comment: would adding an argument to dir be a possible solution, like, ``` l = [1, 2, 3] dir(l, categorize=True) ``` -- ___ Python tracker ___

[issue34975] start_tls() difficult when using asyncio.start_server()

2022-04-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: https://discuss.python.org/t/need-reconsideration-of-bpo-34975-add-start-tls-method-to-streams-api/14720 would like to see this reconsidered. reopening. -- nosy: +gregory.p.smith resolution: wont fix -> stage: resolved -> status: closed -> open

[issue47103] Copy pgort140.dll when building for PGO

2022-04-07 Thread Steve Dower
Steve Dower added the comment: New changeset 80c115385c01f456cdc6550543cf2112ae7a8161 by Steve Dower in branch '3.9': bpo-47103: Copy pgort140.dll into output directory when building PGInstrument on Windows (GH-32083)

[issue47254] enhanced dir?

2022-04-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This would be nice, but backward compatibility alone means we can't change dir() to return a dictionary. What you propose would make more sense as a new function, perhaps in a package like pydoc or a third-party tool like IPython. -- nosy:

[issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC)

2022-04-07 Thread neonene
neonene added the comment: >What exactly does "pgo hard reject" mean? In my recognition, "pgo hard reject" is based on the PGOptimizer's heuristic, "reject" is related to the probe count (hot/cold). https://developercommunity.visualstudio.com/t/1531987#T-N1535774 And there was a reply

[issue47250] New object.__getstate__() method introduced refleaks

2022-04-07 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset e2d78baed385c349d756e96d8f0def0268fa9c4f by Dong-hee Na in branch 'main': bpo-47250: Fix refleak from object.__getstate__() (GH-32403) https://github.com/python/cpython/commit/e2d78baed385c349d756e96d8f0def0268fa9c4f --

[issue47250] New object.__getstate__() method introduced refleaks

2022-04-07 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue47254] enhanced dir?

2022-04-07 Thread apostofes
Change by apostofes : -- keywords: +patch pull_requests: +30433 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32408 ___ Python tracker ___

[issue47103] Copy pgort140.dll when building for PGO

2022-04-07 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +30432 pull_request: https://github.com/python/cpython/pull/32407 ___ Python tracker ___

[issue47254] enhanced dir?

2022-04-07 Thread apostofes
New submission from apostofes : current dir gives output like this, ``` from collection import OrderedDict od = OrderedDict({'a': 1, 'b': 2, 'c': 3}) print(dir(od)) ``` ``` ['__class__', '__contains__', '__delattr__', '__delitem__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__',

[issue47103] Copy pgort140.dll when building for PGO

2022-04-07 Thread Steve Dower
Steve Dower added the comment: New changeset b0ec17b6d9e0fb61081b6d15a1b2a14b607851b7 by Steve Dower in branch '3.10': bpo-47103: Copy pgort140.dll into output directory when building PGInstrument on Windows (GH-32083)

[issue47245] potential undefined behavior with subprocess using vfork() on Linux?

2022-04-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks! I agree with you that this is probably not an actual problem on Linux. _I did look at the various glibc architecture vfork.s implementations: Cute tricks used on some where they need to avoid a stack modifying traditional return from vfork()._

[issue47253] LOAD_GLOBAL instruction with wrong source position

2022-04-07 Thread 15r10nk
New submission from 15r10nk <15r10nk-python-iss...@polarbit.de>: The LOAD_GLOBAL instruction has a different/wrong source position if it refers the name of an imported module. -- files: test3.py messages: 416945 nosy: 15r10nk priority: normal severity: normal status: open title:

[issue20907] behavioral differences between shutil.unpack_archive and ZipFile.extractall

2022-04-07 Thread Semyon
Change by Semyon : -- nosy: +MarSoft ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47233] show_caches option affects code positions reported by dis.get_instructions(...)

2022-04-07 Thread 15r10nk
15r10nk <15r10nk-python-iss...@polarbit.de> added the comment: I moved the line. Is there anything else required? unittests? -- ___ Python tracker ___

[issue47252] socket.makefile documentation is missing data regarding the 'buffering' parameter

2022-04-07 Thread Alon Menczer
New submission from Alon Menczer : The documentation of the socket.makefile method is missing data regarding the behavior of the `buffering` parameter. -- assignee: docs@python components: Documentation messages: 416943 nosy: alon.menczer, docs@python priority: normal severity: normal

[issue47233] show_caches option affects code positions reported by dis.get_instructions(...)

2022-04-07 Thread 15r10nk
Change by 15r10nk <15r10nk-python-iss...@polarbit.de>: -- keywords: +patch pull_requests: +30430 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32406 ___ Python tracker

[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-04-07 Thread PySimpleGUI
PySimpleGUI added the comment: Hi Ned... thank you kindly for the response. Code was provided on Dec 26, 2021 that reproduces the problem. We've taken the extra step of verifying on Linux and Mac that indeed the problem is on those operating systems as well. I'm struggling to

[issue46522] concurrent.futures.__getattr__ raises the wrong AttributeError message

2022-04-07 Thread Gobot1234
Gobot1234 added the comment: I was just looking through the git diff for this PR and found a bug in this https://github.com/python/cpython/pull/30887/files#diff-2828caacf5c85c7bd6023ea0e4a381cc5c65179a9822398534c5e9ad9ccbd90dR73. There's a missing f on the io __getattr__'s message

[issue47179] pymalloc should align to max_align_t

2022-04-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: > If we want to respect sizeof(max_align_t) alignment, we can compute > sizeof(max_align_t) in configure and uses the result in obmalloc.c. I expect > that it's either 16 or 32, so we can maybe just hardcode ALIGNMENT_SHIFT > using something like: "if ==

[issue47177] Frames should store next_instr instead of lasti

2022-04-07 Thread Brandt Bucher
Change by Brandt Bucher : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue47177] Frames should store next_instr instead of lasti

2022-04-07 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset ef6a482b0285870c45f39c9b17ed827362b334ae by Brandt Bucher in branch 'main': bpo-47177: Replace `f_lasti` with `prev_instr` (GH-32208) https://github.com/python/cpython/commit/ef6a482b0285870c45f39c9b17ed827362b334ae --

[issue47251] Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE

2022-04-07 Thread Pieter Eendebak
Change by Pieter Eendebak : -- keywords: +patch pull_requests: +30429 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32404 ___ Python tracker ___

[issue47251] Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE

2022-04-07 Thread Pieter Eendebak
New submission from Pieter Eendebak : The implementations of BINARY_SUBSCR_LIST_INT and BINARY_SUBSCR_TUPLE_INT are almost identical. They can be merged, so there is one opcode less and the code is shared. -- components: Interpreter Core messages: 416937 nosy: pieter.eendebak

[issue45542] Using multiple comparison operators can cause performance issues

2022-04-07 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47250] New object.__getstate__() method introduced refleaks

2022-04-07 Thread Alex Waygood
Change by Alex Waygood : -- title: Add object.__getstate__() introduced refleaks -> New object.__getstate__() method introduced refleaks ___ Python tracker ___

[issue39187] urllib.robotparser does not respect the longest match for the rule

2022-04-07 Thread Andre Burgaud
Andre Burgaud added the comment: Hi Matele, Thanks for looking into this issue. I have seen indeed some implementations that were based on the Python implementation and that had the same problems. The Crystal implementation in particular (as far as I remember, as it was a while ago). As a

[issue47250] Add object.__getstate__() introduced refleaks

2022-04-07 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +30428 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32403 ___ Python tracker ___

[issue47250] Add object.__getstate__() introduced refleaks

2022-04-07 Thread Brandt Bucher
Brandt Bucher added the comment: Found it. This line should be removed: https://github.com/python/cpython/blob/4c92427fb85e420404a9bd26347e32acc1bbd3b7/Objects/typeobject.c#L5033 -- nosy: +brandtbucher ___ Python tracker

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-04-07 Thread Christian Heimes
Christian Heimes added the comment: In GH-32352 I changed only tests that I was able to execute under wasm32-emscripten. As far as I know TK does not build for WASM. Somebody would have to port TCL/TK to WebGL or SDL2 to make it work in the browser. --

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Christian: IDLE and test_idle require threading. I once tested for threading in test_idle (not sure about IDLE itself) but removed the test when threading was made supposedly non-optional. Test_idle still tests for tkinter and idlelib. For PR 32352. did

[issue1666807] Incorrect file path reported by inspect.getabsfile()

2022-04-07 Thread Guido van Rossum
Guido van Rossum added the comment: @Ewout, the current workaround (until pydevd is fixed) is to add -Xfrozen_modules=off to the Python command line. -- ___ Python tracker

[issue47120] Make all jump opcodes relative

2022-04-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +30427 pull_request: https://github.com/python/cpython/pull/32400 ___ Python tracker ___

[issue47250] Add object.__getstate__() introduced refleaks

2022-04-07 Thread STINNER Victor
Change by STINNER Victor : -- title: Add object.__getstate__() introduced a refleak -> Add object.__getstate__() introduced refleaks ___ Python tracker ___

[issue26579] Support pickling slots in subclasses of common classes

2022-04-07 Thread STINNER Victor
STINNER Victor added the comment: > bpo-26579: Add object.__getstate__(). (GH-2821) > https://github.com/python/cpython/commit/884eba3c76916889fd6bff3b37b8552bfb4f9566 This change introduced reference leaks: see bpo-47250. -- ___ Python tracker

[issue47250] Add object.__getstate__() introduced a refleak

2022-04-07 Thread STINNER Victor
New submission from STINNER Victor : The following change introduced reference leaks: --- commit 884eba3c76916889fd6bff3b37b8552bfb4f9566 Author: Serhiy Storchaka Date: Wed Apr 6 20:00:14 2022 +0300 bpo-26579: Add object.__getstate__(). (GH-2821) Copying and pickling instances

[issue47247] Default arguments for access 'mode' parameters in pathlib and os should display as octal literals

2022-04-07 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a duplicate of #46782. -- nosy: +eric.smith ___ Python tracker ___ ___

[issue47248] Possible slowdown of regex searching in 3.11

2022-04-07 Thread Ma Lin
Ma Lin added the comment: Could you give the two versions? I will do a git bisect. I tested 356997c~1 and 356997c [1], msvc2022 non-pgo release build: # regex_dna ### an +- std dev: 151 ms +- 1 ms -> 152 ms +- 1 ms: 1.01x slower t significant # regex_effbot ### an +- std dev: 2.47 ms +-

[issue47249] test_multiprocessing_fork probabilistic failure

2022-04-07 Thread tongxiaoge
tongxiaoge added the comment: I previously suspected the patch d0d83a9 (https://github.com/python/cpython/commit/d0d83a94314402366e04e7ea2638f809510eb830) fixed this problem, so I upgraded python3 to 3.10.2, but the problem still occurred. --

[issue47249] test_multiprocessing_fork probabilistic failure

2022-04-07 Thread tongxiaoge
New submission from tongxiaoge : This problem is probabilistic. I run Python3 all test cases on OBS. In recent months, there have been about three times that the test cases hang on probabilistically. The current version with problems is 3.10.2, this problem has also appeared in 3.10.0 and

[issue1666807] Incorrect file path reported by inspect.getabsfile()

2022-04-07 Thread Ewout ter Hoeven
Ewout ter Hoeven added the comment: When running anything with a freshly installed version of Python 3.11.0a7 on 64-bit Windows, the following message is printed: --- pydev debugger: CRITICAL WARNING: This version of

[issue47136] The variable __module__ in the class body getting an undesirable value from __prepare__ of the metaclass

2022-04-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: It would be nice if the class creation process was documented a bit better. Here is my experiment to see what is going on: ``` # the global `__name__` is normally the module's name. __name__ = "something" class Meta_default_prepare(type): def

[issue47248] Possible slowdown of regex searching in 3.11

2022-04-07 Thread Mark Shannon
New submission from Mark Shannon : The 3 regular expression benchmarks in the pyperformance suite, regex_v8, regex_effbot and regex_dna show slowdowns between 3% and 10%. Looking at the stats, nothing seems wrong with specialization or the memory optimizations. Which strongly suggests a

[issue47246] Race condition in `threadig.Thread._wait_for_tstate_lock`

2022-04-07 Thread Dieter Maurer
Dieter Maurer added the comment: The observation was caused by a bug which has been fixed in newer Python versions (3.9+ if I remember correctly). `isAlive` was called on a `_DummyThread` (while `_DummyThread` overides `is_alive` it had forgotten to override `isAlive` as well). --

[issue47247] Default arguments for access 'mode' parameters in pathlib and os should display as octal literals

2022-04-07 Thread Aidan Woolley
New submission from Aidan Woolley : E.g. 0o777 rather than 511 This is a regression since the docs for 3.9 Affected functions/methods: pathlib.Path.mkdir pathlib.Path.touch os.open os.mkdir os.makedirs os.mkfifo os.mknod -- assignee: docs@python components: Documentation messages:

[issue47246] Race condition in `threadig.Thread._wait_for_tstate_lock`

2022-04-07 Thread Dieter Maurer
Dieter Maurer added the comment: Apparently, the explanation is not that easy: `_stop` first sets `_is_stopped` to `True` and only then `_tstate_lock` to `None`. Therefore, the race should not cause the `AssertionError`. I observed the `AssertionError` in Python 3.6. The related `threading`

[issue47246] Race condition in `threadig.Thread._wait_for_tstate_lock`

2022-04-07 Thread Dieter Maurer
New submission from Dieter Maurer : I have observed an `AssertionError (assert self._is_stopped)` in `threading.Thread._wait_for_tstate_lock`. This indicates that Python's internal state has been corrupted. The analysis revealed the following race condition: `_wait_for_tstate:lock` contains

[issue43528] "connect_read_pipe" raises errors on Windows for STDIN

2022-04-07 Thread Kumar Aditya
Change by Kumar Aditya : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe ___ Python tracker

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2022-04-07 Thread Kumar Aditya
Kumar Aditya added the comment: Most of the static variables were removed by GH-31366 so I closed those PRs as they were outdated, however some static variable still exist. -- nosy: +kumaraditya ___ Python tracker

[issue47245] potential undefined behavior with subprocess using vfork() on Linux

2022-04-07 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: In short: both this bug report and [1] are invalid. The reason why doing syscall(SYS_vfork) is illegal is explained by Florian Weimer in [2]: >The syscall function in glibc does not protect the on-stack return address >against overwriting, so it can't be

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-04-07 Thread Christian Heimes
Christian Heimes added the comment: New changeset 2b16a08bc77475917dd5c96417aef4c5210b45ac by Christian Heimes in branch 'main': bpo-40280: Detect missing threading on WASM platforms (GH-32352) https://github.com/python/cpython/commit/2b16a08bc77475917dd5c96417aef4c5210b45ac --