[issue32408] Performance regression in urllib.proxy_bypass_environment

2021-03-31 Thread Xiang Zhang
Xiang Zhang added the comment: Sorry, it's #39057 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue32408] Performance regression in urllib.proxy_bypass_environment

2021-03-31 Thread Xiang Zhang
Xiang Zhang added the comment: I think this issue has already been solved by #39507. The time difference is: before: time python3 -c 'import urllib.request; urllib.request.proxy_bypass_environment("1.1.1.1")' real0m0.912s user0m0.902s sys 0m0.010s after: time python3 -c 'impor

[issue43688] [C API] Fix Py_INCREF and Py_DECREF in the limited C API for Python built in debug mode

2021-03-31 Thread STINNER Victor
New submission from STINNER Victor : Currently, setup.py doesn't build xxlimited and xxlimited_35 extension modules with the limited C API if Python is built in debug mode. I only found two functions affected by Py_DEBUG macro in the limited C API: Py_INCREF() and Py_DECREF(). Example: --- #

[issue43670] Typo in 3.10 changelog

2021-03-31 Thread Inada Naoki
Inada Naoki added the comment: Thank you for reporting. This typo is fixed in GH-43574. -- nosy: +methane resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker _

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread Jiaxin Peng
Jiaxin Peng added the comment: Steve's PR zooba:bpo-43567 works as expected. Really clean implementation! Thanks! -- resolution: -> works for me ___ Python tracker ___ __

[issue43686] re.match appears to hang with certain combinations of pattern and string

2021-03-31 Thread Dennis Sweeney
Dennis Sweeney added the comment: It's well-known that regular expressions can take exponential time. You can try searching this bug tracker for "re exponential". Common suggestions are to try a third-party module, or to write better regexes where possible. Note that the important bits of th

[issue43685] __call__ not being called on metaclass

2021-03-31 Thread Joël Larose
Joël Larose added the comment: OMG! Ok, thanks guys! Switching to super().__new__ made all the difference! I can't believe I didn't think to try to change this line. Regarding the call to cast, I know it's only for type checking. Trying to write code that works checks with mypy. I probab

[issue43685] __call__ not being called on metaclass

2021-03-31 Thread Dennis Sweeney
Dennis Sweeney added the comment: typing.cast doesn't actually do anything, it only exists as a hint for type-checkers. As William noted, using the 3-argument type(...) as you showed will only return a type, not a mcs. I think you may want super().__new__(mcs, name, bases, namespace), which

[issue43687] use unicode_state empty string before unicode_init. without define WITH_DOC_STRINGS

2021-03-31 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +23876 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25129 ___ Python tracker ___ ___

[issue43687] use unicode_state empty string before unicode_init. without define WITH_DOC_STRINGS

2021-03-31 Thread junyixie
New submission from junyixie : use unicode_state empty string before unicode_init. without define WITH_DOC_STRINGS. PyType_Ready call PyUnicode_FromString, if doc string striped, cause crash. unicode_get_empty() must not be called before _PyUnicode_Init() or after _PyUnicode_Fini() PyType_R

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +23875 pull_request: https://github.com/python/cpython/pull/25128 ___ Python tracker ___ _

[issue43686] re.match appears to hang with certain combinations of pattern and string

2021-03-31 Thread Alexander Grigoriev
New submission from Alexander Grigoriev : Certain patterns and input strings cause re.match to take exponentially longer time. This can be expected because of recursive nature of matching some patterns, but it can take surprisingly long time with some combination of a pattern and input data o

[issue43685] __call__ not being called on metaclass

2021-03-31 Thread William Pickard
William Pickard added the comment: This line is the cause of your issue: "new_cls: SingletonMeta = cast(SingletonMeta, type(name, bases, namespace))" More specifically, your call to type() actually erases all information about your meta class. If you did "type(S)", you would've seen "type" r

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +23874 pull_request: https://github.com/python/cpython/pull/25127 ___ Python tracker ___ _

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +23873 pull_request: https://github.com/python/cpython/pull/25126 ___ Python tracker ___ _

[issue43685] __call__ not being called on metaclass

2021-03-31 Thread Joël Larose
New submission from Joël Larose : Hi, I'm trying to implement a metaclass for the singleton pattern, with the intent of creating type-appropriate sentinels. After trying several approaches, I've come up with what I thought would be an elegant solution. However, I've run into a bit of a sna

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki
Inada Naoki added the comment: New changeset 58cffba1874f0e9a9731b25a3e11a011bfbbf95f by Inada Naoki in branch 'master': bpo-43651: Fix EncodingWarning in test_io (GH-25097) https://github.com/python/cpython/commit/58cffba1874f0e9a9731b25a3e11a011bfbbf95f -- ___

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki
New submission from Inada Naoki : New changeset 55f31be44b7e3ee24a67134f99543512a9b630e4 by Inada Naoki in branch 'master': bpo-43651: Fix EncodingWarning in test_file and test_file_eintr (GH-25109) https://github.com/python/cpython/commit/55f31be44b7e3ee24a67134f99543512a9b630e4 --

[issue42914] pprint numbers with underscore

2021-03-31 Thread Wm. Keith van der Meulen
Change by Wm. Keith van der Meulen : -- nosy: +wkeithvan nosy_count: 7.0 -> 8.0 pull_requests: +23872 pull_request: https://github.com/python/cpython/pull/25124 ___ Python tracker

[issue43330] xmlrpc.Server URI query and fragment are discarded from HTTP query since py3

2021-03-31 Thread Julien Castiaux
Julien Castiaux added the comment: Duplicate of 43433 -- message_count: 1.0 -> 2.0 pull_requests: +23871 resolution: -> duplicate status: open -> closed pull_request: https://github.com/python/cpython/pull/25057 ___ Python tracker

[issue43593] pymalloc is not aware of Memory Tagging Extension (MTE) and crashes

2021-03-31 Thread Neil Schemenauer
Neil Schemenauer added the comment: > If MTE is actually being used, system software assigns "random" values to 4 > of the higher-order bits. Oh, interesting. Two ideas about handling that: we could change our assertion check to be different on ARM platforms that we know have a certain size

[issue42955] Add sys.stdlib_module_names: list of stdlib module names (Python and extension modules)

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: New changeset ad493edf5791e7abb2588852e876b8584945c653 by Victor Stinner in branch 'master': bpo-42955: Add _overlapped to sys.stdlib_module_names (GH-25122) https://github.com/python/cpython/commit/ad493edf5791e7abb2588852e876b8584945c653 -- _

[issue42840] `type` takes **kwargs for __init_subclass__

2021-03-31 Thread miss-islington
miss-islington added the comment: New changeset b3c1e2c493e67f84b1034ac6c49492a459b0736d by Miss Islington (bot) in branch '3.9': bpo-42840: Document providing kwargs to type. (GH-24173) https://github.com/python/cpython/commit/b3c1e2c493e67f84b1034ac6c49492a459b0736d -- __

[issue43677] Descriptor.rst - Reference to Py_MethodType is not up to date

2021-03-31 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 4.0 -> 5.0 pull_requests: +23870 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25123 ___ Python tracker

[issue42955] Add sys.stdlib_module_names: list of stdlib module names (Python and extension modules)

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23869 pull_request: https://github.com/python/cpython/pull/25122 ___ Python tracker ___ __

[issue37945] [Windows] test_locale.TestMiscellaneous.test_getsetlocale_issue1813() fails

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: > Great! For the first time in over 2 years, the test suite passes on a > Windows repository build on my machine. Nice :-) -- ___ Python tracker

[issue43684] Add combined opcodes

2021-03-31 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +23868 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25090 ___ Python tracker ___

[issue43684] Add combined opcodes

2021-03-31 Thread Guido van Rossum
New submission from Guido van Rossum : I'm lining up some PRs (inspired by some of Mark Shannon's ideas) that add new opcodes which are straightforward combinations of existing opcodes. For example, ADD_INT is equivalent to LOAD_CONST + BINARY_ADD, for certain small (common) integer constants

[issue37945] [Windows] test_locale.TestMiscellaneous.test_getsetlocale_issue1813() fails

2021-03-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Great! For the first time in over 2 years, the test suite passes on a Windows repository build on my machine. I will test installed 3.10 after the next alpha release. (3.10.0a7 has other failures as well.) -- _

[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-43665 "AIX: test_importlib regression (ENV change)" as a duplicate of this issue. test_multiprocessing_pool_circular_import() of test_importlib now triggers this crash as well. -- ___ Python tracker

[issue43665] AIX: test_importlib regression (ENV change)

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Crash in _PyThreadState_DeleteExcept() at fork in the process child ___ Python tracker _

[issue43665] AIX: test_importlib regression (ENV change)

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: Interesting part of the traceback: pthread_cond_signal@AF29_12(??, ??) at 0xd11b1568 ... release_sentinel ... _PyThreadState_DeleteExcept ... PyOS_AfterFork_Child(), line 600 in "posixmodule.c" It sounds like a variant of bpo-40092: "Crash in _PyThreadState_D

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread anthony shaw
anthony shaw added the comment: Guido, regen.vcxproj targets 142 as the SDK version, which is most likely a mistake. The other projects are part of the main PCBuild.sln solution, which has a variable for the base SDK version. If you need to change it quickly, you can either open it in VS and

[issue24275] lookdict_* give up too soon

2021-03-31 Thread Hristo Venev
Hristo Venev added the comment: Sorry, I must have missed Inada Naoki's reply. I will try to send a pull request this weekend. -- ___ Python tracker ___ _

[issue24275] lookdict_* give up too soon

2021-03-31 Thread Jim Jewett
Jim Jewett added the comment: What is the status on this? If you are losing interest, would you like someone else to turn your patch into a pull request? -- ___ Python tracker _

[issue17305] IDNA2008 encoding is missing

2021-03-31 Thread Derek Wilson
Derek Wilson added the comment: why the downgrade from security to enhancement and critical to high? this is a significant issue that can impact everything from phishing to TLS certificate domain validation and SNI. -- ___ Python tracker

[issue43631] Update to OpenSSL 1.1.1k

2021-03-31 Thread Christian Heimes
Christian Heimes added the comment: CI, macOS and Windows infrastructure have been updated. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue17305] IDNA2008 encoding is missing

2021-03-31 Thread Christian Heimes
Change by Christian Heimes : -- priority: critical -> high type: security -> enhancement versions: +Python 3.10 -Python 3.8, Python 3.9 ___ Python tracker ___ _

[issue36997] Document that spwd is considered harmful

2021-03-31 Thread Christian Heimes
Change by Christian Heimes : -- priority: high -> normal type: security -> enhancement versions: +Python 3.10 -Python 2.7, Python 3.7 ___ Python tracker ___ ___

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-03-31 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +lukasz.langa priority: critical -> release blocker ___ Python tracker ___ ___ Python-bugs-lis

[issue43223] [security] http.server: Open Redirection if the URL path starts with //

2021-03-31 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes, lukasz.langa, ned.deily priority: normal -> release blocker ___ Python tracker ___

[issue43124] [security] smtplib multiple CRLF injection

2021-03-31 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes, lukasz.langa, ned.deily priority: normal -> release blocker ___ Python tracker ___

[issue43105] [Windows] Can't import extension modules resolved via relative paths in sys.path

2021-03-31 Thread Steve Dower
Steve Dower added the comment: Added one possible change as a PR, but will need the importlib folk to weigh in on whether it's the best place. I also need to write a test (and possibly fix any tests that currently check that relative paths are _not_ resolved... letting CI handle that for me)

[issue43105] [Windows] Can't import extension modules resolved via relative paths in sys.path

2021-03-31 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +23867 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25121 ___ Python tracker ___

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: @Jiaxin Please test steve's PR. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue43593] pymalloc is not aware of Memory Tagging Extension (MTE) and crashes

2021-03-31 Thread Tim Peters
Tim Peters added the comment: I'm skeptical ;-) If MTE is actually being used, system software assigns "random" values to 4 of the higher-order bits. When obmalloc punts to the system malloc, presumably those bits will be randomized in the addresses returned by malloc. Then it's just not pos

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread Steve Dower
Steve Dower added the comment: I've attached my PR that streamlines this, it should be good (as in, reliable/fast) to do the regen on every build, but the "build.bat --regen" command is retained to force it. -- ___ Python tracker

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +23866 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25120 ___ Python tracker _

[issue43492] Upgrade to SQLite 3.35.4 in macOS and Windows

2021-03-31 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Quoting Dr. R. Hipp: "There will be a fix called version 3.35.4" https://sqlite.org/forum/forumpost/7dbf046041519a07a0a083b8346a7d0ecb7d6fc4eca5ca23605eeb4452109d91 -- title: Upgrade to SQLite 3.35.3 in macOS and Windows -> Upgrade to SQLite

[issue4111] Add Systemtap/DTrace probes

2021-03-31 Thread hai shi
Change by hai shi : -- pull_requests: +23865 pull_request: https://github.com/python/cpython/pull/25115 ___ Python tracker ___ ___ Py

[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2021-03-31 Thread hai shi
hai shi added the comment: > By the way, maybe Py_LIMITED_API should be defined in xxlimited.c, rather > than in setup.py. +1. Defining Py_LIMITED_API in xxlimited.c is more direct than in setup.py. so I created the PR-25115. -- ___ Python tracke

[issue4111] Add Systemtap/DTrace probes

2021-03-31 Thread hai shi
Change by hai shi : -- pull_requests: -23859 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2021-03-31 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +23864 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25115 ___ Python tracker ___

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: Anthony, can you help us out here? Is there a problem with regen.vcsproj, either by depending on VS 2019 (which we don't officially support yet) or by missing the changes in the names of some generated files? -- nosy: +anthonypjshaw __

[issue43665] AIX: test_importlib regression (ENV change)

2021-03-31 Thread Michael Felt
Michael Felt added the comment: On 31/03/2021 18:46, STINNER Victor wrote: > STINNER Victor added the comment: > > test.test_importlib.test_threaded_import.ThreadedImportTests.test_multiprocessing_pool_circular_import > > This test comes from bpo-41567 and it simply runs a script. You can run

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2021-03-31 Thread Mark Shannon
Mark Shannon added the comment: The bytecode instruction set has changed a lot since 3.6, so I think a backport would be impractical. 3.6 is in security fix only mode, so you'd need to take this up with Red Hat. -- ___ Python tracker

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-03-31 Thread Mark Shannon
Change by Mark Shannon : -- assignee: -> Mark.Shannon stage: -> needs patch type: -> performance ___ Python tracker ___ ___ Pytho

[issue43665] [AIX] test_importlib: test_multiprocessing_pool_circular_import() killed by SIGTRAP (coredump)

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- title: AIX: test_importlib regression (ENV change) -> [AIX] test_importlib: test_multiprocessing_pool_circular_import() killed by SIGTRAP (coredump) ___ Python tracker _

[issue43665] AIX: test_importlib regression (ENV change)

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: test.test_importlib.test_threaded_import.ThreadedImportTests.test_multiprocessing_pool_circular_import This test comes from bpo-41567 and it simply runs a script. You can run the script directly: ./python -X dev Lib/test/test_importlib/partial/pool_in_thread

[issue42823] Incorrect frame.f_lineno when frame.f_trace is set

2021-03-31 Thread Mark Shannon
Mark Shannon added the comment: Ned, can I close this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-03-31 Thread Mark Shannon
New submission from Mark Shannon : Every time we send, or throw, to a generator, the C code in genobject.c needs to check what state the generator is in. This is inefficient and couples the generator code, which should just be a thin wrapper around the interpreter, to the internals of the int

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2021-03-31 Thread Michael Felt
Michael Felt added the comment: Sure. Probably have to rebase first. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue43682] Make static methods created by @staticmethod callable

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: > Isn't the problem that Python functions are (non-overriding) descriptors, but > builtin-functions are not descriptors? > Changing static methods is not going to fix that. > How about adding wrappers to make Python functions behave like builtin > functions a

[issue43682] Make static methods created by @staticmethod callable

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: > Changing static methods is not going to fix that. My plan for the _pyio module is: (1) Make static methods callable (2) Decorate _pyio.open() with @staticmethod That would only fix the very specific case of _pyio.open(). But open() use case seems to be com

[issue43672] Raise ImportWarning when calling find_loader()

2021-03-31 Thread Brett Cannon
Change by Brett Cannon : -- keywords: +patch pull_requests: +23863 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25119 ___ Python tracker ___ ___

[issue4928] tempfile.NamedTemporaryFile: automatic cleanup by OS

2021-03-31 Thread Hunor Portik
Hunor Portik added the comment: Hello I would really appreciate and I think many of us if every time I havent have to remember everything. Im not a Sys admin, devops, or who has in his mind every low level step and just shakes out of his little finger... Why do I have to take care at the hig

[issue43682] Make static methods created by @staticmethod callable

2021-03-31 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue43682] Make static methods created by @staticmethod callable

2021-03-31 Thread Mark Shannon
Mark Shannon added the comment: Isn't the problem that Python functions are (non-overriding) descriptors, but builtin-functions are not descriptors? Changing static methods is not going to fix that. How about adding wrappers to make Python functions behave like builtin functions and vice ver

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-31 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +23862 pull_request: https://github.com/python/cpython/pull/25118 ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-31 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +23861 pull_request: https://github.com/python/cpython/pull/25116 ___ Python tracker ___

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: > It is still can be set as a class attribute in user code, so I think that > removing OpenWrapper needs a deprecated period. I'm fine with deprecating the function by defining a __getattr__() function in io.py and _pyio.py. But only if it doesn't block the

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: > OpenWrapper was added in ce3a72aec6eaa0293c397c8d0407f7afe0072b2f (issue1267) > and was only used to set __builtin__.open It is useless in CPython, since CPython always use the C implementation of the io module, and in the io module, io.OpenWrapper is just

[issue43665] AIX: test_importlib regression (ENV change)

2021-03-31 Thread Michael Felt
Michael Felt added the comment: On 30/03/2021 09:40, STINNER Victor wrote: > STINNER Victor added the comment: > > A core dump is a very bad sign of health. > > Can you please try to bisect which test is causing the segfault using > bisect_cmd? Try the command: > > ./python -m test.bisect_cmd

[issue43682] Make static methods created by @staticmethod callable

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- title: Make function wrapped by staticmethod callable -> Make static methods created by @staticmethod callable ___ Python tracker ___ ___

[issue43682] Make function wrapped by staticmethod callable

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: > I don't understand what the problem is. _pyio.open is a function not a static > method. The problem is that _pyio.open doesn't behave exactly as io.open when it's used to define a method: --- #from io import open from _pyio import open class MyClass: m

[issue43682] Make function wrapped by staticmethod callable

2021-03-31 Thread Mark Shannon
Mark Shannon added the comment: I don't understand what the problem is. _pyio.open is a function not a static method. >>> import _pyio >>> _pyio.open -- nosy: +Mark.Shannon title: Make static methods created by @staticmethod callable -> Make function wrapped by staticmethod callabl

[issue20309] Not all method descriptors are callable

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: I proposed again a similar idea, but only for @staticmethod: bpo-43682. -- nosy: +vstinner ___ Python tracker ___ ___

[issue43682] Make static methods created by @staticmethod callable

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- title: Make function wrapped by staticmethod callable -> Make static methods created by @staticmethod callable ___ Python tracker ___ ___

[issue43682] Make function wrapped by staticmethod callable

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: > Seems like a duplicate of #20309. My usecase is to avoid any behavior difference between io.open and _pyio.open functions: PEP 399 "Pure Python/C Accelerator Module Compatibility Requirements". Currently, this is a very subtle difference when it's used to

[issue43681] doctest forgets previous imports

2021-03-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue43682] Make function wrapped by staticmethod callable

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +23860 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25117 ___ Python tracker ___ _

[issue43682] Make function wrapped by staticmethod callable

2021-03-31 Thread Mark Dickinson
Mark Dickinson added the comment: Seems like a duplicate of #20309. -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs

[issue43682] Make function wrapped by staticmethod callable

2021-03-31 Thread STINNER Victor
New submission from STINNER Victor : Currently, static methods created by the @staticmethod decorator are not callable as regular function. Example: --- @staticmethod def func(): print("my func") class MyClass: method = func func() # A: regular function MyClass.method() # B: class met

[issue43681] doctest forgets previous imports

2021-03-31 Thread Ethan Furman
Ethan Furman added the comment: Note that this only appears to be a problem under CI. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue43681] doctest forgets previous imports

2021-03-31 Thread Ethan Furman
New submission from Ethan Furman : In the Python 3.10 Doc/library/enum.rst file was the following: .. class:: FlagBoundary *FlagBoundary* controls how out-of-range values are handled in *Flag* and its subclasses. .. attribute:: STRICT Out-of-range values cause a :exc:`ValueErr

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: OpenWrapper was added in ce3a72aec6eaa0293c397c8d0407f7afe0072b2f (issue1267) and was only used to set __builtin__.open (I suppose that at thet moment dumbdbm.py still set open as a class attribute). It is still can be set as a class attribute in user code

[issue43659] AIX: test_curses crashes buildbot

2021-03-31 Thread Michael Felt
Michael Felt added the comment: FYI: from a core dump - top of where is: Segmentation fault in winsnstr at 0xd3ebc050 0xd3ebc050 (winsnstr+0x190) a4190002 lhzu r0,0x2(r25) (dbx) where winsnstr(??, ??, ??) at 0xd3ebc050 unnamed block in IPRA.$_curses_window_insstr_impl(self = 0x100f

[issue43678] TypeError: get() got an unexpected keyword argument 'vars'

2021-03-31 Thread Eric V. Smith
New submission from Eric V. Smith : Please provide example code that we can run which demonstrates the problem. -- nosy: +eric.smith ___ Python tracker ___

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As for dbm.dumb, it was an attempt to make _Database._commit() working at the shutdown stage (it is indirectly called from __del__()). See issue723231. Although in Python 2 __builtin__.open != io.open, and in Python 3.0 the code already uses io.open direct

[issue4111] Add Systemtap/DTrace probes

2021-03-31 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 nosy_count: 25.0 -> 26.0 pull_requests: +23859 pull_request: https://github.com/python/cpython/pull/25115 ___ Python tracker ___ ___

[issue43677] Descriptor.rst - Reference to Py_MethodType is not up to date

2021-03-31 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's PyMethod_Type. -- nosy: +eric.smith, rhettinger ___ Python tracker ___ ___ Python-bug

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: I also opened a discussion on python-dev about OpenWrapper and staticmethod: https://mail.python.org/archives/list/python-...@python.org/thread/QZ7SFW3IW3S2C5RMRJZOOUFSHHUINNME/ -- ___ Python tracker

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +methane ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +23858 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25114 ___ Python tracker ___ _

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
New submission from STINNER Victor : The OpenWrapper function of io and _pyio is an undocumented hack allowing to use the builtin open() function as a method: class MyClass: method = open MyClass.method(...)# class method MyClass().method(...) # instance method It is only needed by

[issue43674] strange effect at recursion limit

2021-03-31 Thread TW
TW added the comment: Eryk, thanks much for your detailled and clear explaining! Can confirm that using os.write makes it raise the RecursionError where I expected it to be. Also print() raising the RecursionError explains the behaviour I have seen. Sadly, this also shows that handling Recu

[issue39228] traceback.FrameSummary does not handle exceptions from `repr()`

2021-03-31 Thread Martin
Martin added the comment: pdb uses vanilla repr as well: https://github.com/python/cpython/blob/f3ab670fea75ebe177e3412a5ebe39263cd428e3/Lib/pdb.py#L1180 -- ___ Python tracker __

[issue43679] ttk.Sizegrip disappears under Windows 10 UI Scaling, with dpiAware set true and >1 scaling

2021-03-31 Thread MikeS
New submission from MikeS : When using tkinter on Windows (10) with a >1 HiDpi screen the sizegrip disappear with dpiawareness is on. A minimal example is as follows: import tkinter as tk import tkinter.ttk as ttk from ctypes import windll, pointer, wintypes windll.shcore.SetProcessDpiAwarenes

[issue37945] [Windows] test_locale.TestMiscellaneous.test_getsetlocale_issue1813() fails

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: Ok, the initial issue has been fixed: test_locale pass again on Windows. Let's continue the discussion on getlocale() in bpo-43557 "Deprecate getdefaultlocale(), getlocale() and normalize() functions" ;-) -- priority: release blocker -> resolution:

  1   2   >