[issue43310] Method __del__ with callable

2021-02-23 Thread Andrey Petukhov
New submission from Andrey Petukhov : Is it possible to use callable to replace __del__ method of class? if so, how to get self variable? class A(object): """A.""" class C(object): """Callable.""" def __call__(self, *args, **kwargs): print("call", args, kwargs) def

[issue43297] bz2.open modes behaving differently than standard open() modes

2021-02-23 Thread Philipp Freyer
Philipp Freyer added the comment: I understand and accept that but I would recommend highlighting this difference in the documentation a bit more since this information can be easily skipped when reading the documentation. I still find it important to hint to this stronger since I've seen

[issue36094] When using an SMTP SSL connection,, get ValueError.

2021-02-23 Thread Gert Burger
Change by Gert Burger : -- nosy: +gertburger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43297] bz2.open modes behaving differently than standard open() modes

2021-02-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Josh and will mark this as closed. It is unfortunate, but the time to get an API right is before it lands, not years after people have come to depend on it. -- nosy: +rhettinger resolution: -> wont fix stage: -> resolved status:

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2021-02-23 Thread keven wang
keven wang added the comment: Agree w/ PR here to remove resource tracker unlinking as a quick fix: https://github.com/python/cpython/pull/15989 This will at least make the unlink behavior more controllable, which is not the case currently (on mac and linux). Would love to have this

[issue43297] bz2.open modes behaving differently than standard open() modes

2021-02-23 Thread Josh Rosenberg
Josh Rosenberg added the comment: All of the compression modules (gzip, lzma) have this behavior, not just bz2; it's consistent in that sense. Changing it now, after literally decades with the old behavior, would needlessly break existing programs. As you say, it's documented clearly, I'm

[issue43209] system cannot find the file specified in subprocess.py

2021-02-23 Thread Josh Rosenberg
Change by Josh Rosenberg : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2021-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 653e17b2cb35e6cd48e2bdca0c1b27b38bed7170 by Terry Jan Reedy in branch '3.8': [3.8] bpo-41841: prepare for 3.8.9 (GH-24635) https://github.com/python/cpython/commit/653e17b2cb35e6cd48e2bdca0c1b27b38bed7170 --

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2021-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset d81a20454eae1868059e45d54e0270e3b4d2e409 by Terry Jan Reedy in branch '3.9': [3.9] bpo-41841: revise header (GH-24634) https://github.com/python/cpython/commit/d81a20454eae1868059e45d54e0270e3b4d2e409 --

[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2021-02-23 Thread Dong-hee Na
Dong-hee Na added the comment: @obfusk Thank you Felix for reporting and contributing! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.9 ___ Python tracker

[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2021-02-23 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 1f433406bd46fbd00b88223ad64daea6bc9eaadc by Felix C. Stegerman in branch 'master': bpo-42151: don't set specified_attributes=1 in pure Python ElementTree (GH-22987) https://github.com/python/cpython/commit/1f433406bd46fbd00b88223ad64daea6bc9eaadc

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2021-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset b9fe16a02717e89a2141311de1e36161af4de9a9 by Terry Jan Reedy in branch 'master': bpo-41841: Revise header (GH-24633) https://github.com/python/cpython/commit/b9fe16a02717e89a2141311de1e36161af4de9a9 --

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2021-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Everything before x.y.0 is in one section. Multiple sections thereafter are a nuisance. Idea: Put everything thereafter in one also. So file is set once header revised after 3.x.0 is released. Thought of 'x.y.z: date' separator, with one line above and

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2021-02-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +23419 pull_request: https://github.com/python/cpython/pull/24635 ___ Python tracker ___

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2021-02-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +23418 pull_request: https://github.com/python/cpython/pull/24634 ___ Python tracker ___

[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2021-02-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +23417 pull_request: https://github.com/python/cpython/pull/24633 ___ Python tracker ___

[issue43283] IDLE: Explain print slowness and speedup method

2021-02-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43283] IDLE: Explain print slowness and speedup method

2021-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset bdf0fece5bbc2fc9fffbf0f314c7022e24e747df by Miss Islington (bot) in branch '3.8': bpo-43283: Add IDLE doc paragraph about print speed (GH-24615) (GH-24632) https://github.com/python/cpython/commit/bdf0fece5bbc2fc9fffbf0f314c7022e24e747df

[issue43098] tarfile list() method does not show file type

2021-02-23 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43283] IDLE: Explain print slowness and speedup method

2021-02-23 Thread miss-islington
miss-islington added the comment: New changeset e202f1e4dbe02fbcae9f6afed863b7221b39c984 by Miss Islington (bot) in branch '3.9': bpo-43283: Add IDLE doc paragraph about print speed (GH-24615) https://github.com/python/cpython/commit/e202f1e4dbe02fbcae9f6afed863b7221b39c984 --

[issue43209] system cannot find the file specified in subprocess.py

2021-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Steve, should this be closed as 'not a bug'? -- nosy: +terry.reedy ___ Python tracker ___ ___

[issue43283] IDLE: Explain print slowness and speedup method

2021-02-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +23416 pull_request: https://github.com/python/cpython/pull/24632 ___ Python tracker ___

[issue43283] IDLE: Explain print slowness and speedup method

2021-02-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +23415 pull_request: https://github.com/python/cpython/pull/24631 ___ Python tracker ___

[issue43283] IDLE: Explain print slowness and speedup method

2021-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 2827e8a177c2a6584fada594bca6829c53a2872f by Terry Jan Reedy in branch 'master': bpo-43283: Add IDLE doc paragraph about print speed (GH-24615) https://github.com/python/cpython/commit/2827e8a177c2a6584fada594bca6829c53a2872f --

[issue43309] str.replace() TypeError exception message backward

2021-02-23 Thread bland328
bland328 added the comment: Dumb misunderstanding on my part--didn't realize replace() would actually work on a bytes-type object, so *I* had it backwards. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue43309] str.replace() TypeError exception message backward

2021-02-23 Thread bland328
New submission from bland328 : Attempting to replace a character in a bytes string literal results in an exception saying that "a bytes-like object is required, not 'str'", when (unless I'm missing something) it should say the opposite. To repro: >>> x=b'abc' >>> x.replace('a','z')

[issue43263] threading module unable to run

2021-02-23 Thread twoone3
twoone3 <3197653...@qq.com> added the comment: After my test, when the exe calls the dll, the dll calls Python. If the Python code involves multiple threads, the process will be stuck. -- Added file: https://bugs.python.org/file49831/test.zip ___

[issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu

2021-02-23 Thread Ned Deily
Change by Ned Deily : -- nosy: +doko ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError

2021-02-23 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Larry Brasfield's comment https://sqlite.org/forum/forumpost/6430fc589d?t=h aligns with https://bugs.python.org/issue43251#msg387428 I'll think twice before posting there again, though. -- ___ Python

[issue43263] threading module unable to run

2021-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: [twoone3] > Have you been studying this problem? Not personally, no. Sorry, but I'm afraid this really isn't an actionable bug report as it stands: we still don't have an effective way to reproduce, and it's far from clear that this is actually a bug in

[issue43308] subprocess.Popen leaks file descriptors opened for DEVNULL or PIPE stdin/stdout/stderr arguments

2021-02-23 Thread cptpcrd
New submission from cptpcrd : TL;DR: subprocess.Popen's handling of file descriptors opened for DEVNULL or PIPE inputs/outputs has serious problems, and it can be coerced into leaking file descriptors in several ways. This can cause issues related to resource exhaustion. # The basic problem

[issue43115] locale.getlocale fails if locale is set

2021-02-23 Thread Eryk Sun
Eryk Sun added the comment: > All getlocale is used for in _strptime.py is comparing the value > returned to the previous value returned. Which is why _strptime should be calling setlocale(LC_TIME), the same as the calendar module. That's not to say that I don't think getlocale() and

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset b798ab06937f8bb24b444a49dd42e11fff15e654 by Irit Katriel in branch 'master': bpo-43146: fix None-handling in single-arg traceback.print_exception(None) (GH-24629)

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Irit Katriel
Irit Katriel added the comment: The new PR makes it print `NoneType: None`, which is at least consistent with what the same functions do without the Issue26389 shortcut. -- ___ Python tracker

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +23414 pull_request: https://github.com/python/cpython/pull/24629 ___ Python tracker ___

[issue43307] Sync site.py and sysconfig.py with PyPy

2021-02-23 Thread mattip
Change by mattip : -- keywords: +patch pull_requests: +23413 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24628 ___ Python tracker ___

[issue42994] Missing MIME types for opus, AAC, 3gpp and 3gpp2

2021-02-23 Thread Nathan Beals
Nathan Beals added the comment: As per the instructions on the contributing guide, I'm "pinging" this issue after 30 days. -- ___ Python tracker ___

[issue43307] Sync site.py and sysconfig.py with PyPy

2021-02-23 Thread mattip
New submission from mattip : PyPy added some enhancements to sysconfig.py to deal with multiple implementations. site.py copies parts of sysconfig.py to save time when importing. It would be nice to backport these enhamncements, maybe other implementations could reuse them. --

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Irit Katriel
Irit Katriel added the comment: > So the remaining question is what to do for print_exception(None)? Yes. > Honestly the current (new) behavior of printing `NoneType: None` seems fine. That's not the current behaviour - I removed that fix from the PR till we agree what to do. Currently we

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: So the remaining question is what to do for print_exception(None)? Honestly the current (new) behavior of printing `NoneType: None` seems fine. -- ___ Python tracker

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Irit Katriel
Irit Katriel added the comment: The PR just merged fixes the issue that was reported by Florian (what I broke). That impacted pre-3.10 APIs so was an actual regression. The issue with traceback.print_exception(None) is new to 3.10, and was introduced in issue 26389. --

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: So the PR just merged fixes that, right? Color me confused. -- ___ Python tracker ___ ___

[issue37736] asyncio.wait_for is still confusing

2021-02-23 Thread Andrew Borba
Andrew Borba added the comment: > The key word here is "misbehaving". Cooperative concurrency does require > cooperation. Your stance makes sense in an ideal environment where we control every Task that our application deals with. However, there are some cases in which busted Task

[issue43306] Error in multiprocessing.Pool's initializer doesn't stop execution

2021-02-23 Thread Dávid Nemeskey
New submission from Dávid Nemeskey : There is an inconsistency in how multiprocessing.Pool handles exceptions thrown in the workers: - exceptions raised by the mapped function stop execution right away - exceptions raised in an initializer are ignored and the pool continues spawning new

[issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu

2021-02-23 Thread Christian Bachmaier
Change by Christian Bachmaier : -- type: -> compile error ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu

2021-02-23 Thread Christian Bachmaier
Christian Bachmaier added the comment: The same situation in Ubuntu development branch's package python3.9.2-0ubuntu2 . Inserting the follwing if sysconfig.get_config_var('MULTIARCH'): masd = sysconfig.get_config_var('multiarchsubdir') if masd.startswith(os.sep):

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Irit Katriel
Irit Katriel added the comment: The other thing is not related to the one reported here, but I found it while writing the test for this. We have a new API in 3.10, where you can do traceback.print_exception(ex) (so you don't need to give the whole type,val,tb triplet). But: >>>

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: Are you going to create a separate PR or a new issue for the other thing? (And what exactly *is* the other thing? Please summarize.) -- ___ Python tracker

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 26f18b8540b49d592af66361f8df1a03953d1768 by Irit Katriel in branch 'master': bpo-43146: fix regression in traceback.print_exception(None) (GH-24463) https://github.com/python/cpython/commit/26f18b8540b49d592af66361f8df1a03953d1768

[issue43263] threading module unable to run

2021-02-23 Thread twoone3
twoone3 <3197653...@qq.com> added the comment: Have you been studying this problem? -- ___ Python tracker ___ ___ Python-bugs-list

[issue43292] xml.ElementTree iterparse filehandle left open

2021-02-23 Thread Tom Dougherty
Tom Dougherty added the comment: "erase all files" -- nosy: +dtom9424 type: crash -> security ___ Python tracker ___ ___

[issue43305] A typo in /Modules/_io/bufferedio.c

2021-02-23 Thread Ma Lin
New submission from Ma Lin : 654PyErr_Fetch(, , ); 655if (v == NULL || !PyErr_GivenExceptionMatches(v, PyExc_BlockingIOError)) { ↑ this should be t https://github.com/python/cpython/blob/v3.10.0a5/Modules/_io/bufferedio.c#L654-L655

[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2021-02-23 Thread mattip
mattip added the comment: PyPy issue https://foss.heptapod.net/pypy/pypy/-/issues/3181 shows another problem with the pure-python ElementTree implementation, that again is not reflected in the C implementation. Is there a code owner for this stdlib module? --

[issue37198] _parse_localename fail to parse 'en_IL'

2021-02-23 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg345454 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue17441] Do not cache re.compile

2021-02-23 Thread abcdenis
abcdenis added the comment: JFYI. regex library now supports avoiding cache: https://bitbucket.org/mrabarnett/mrab-regex/issues/387/compilaton-flag-to-avoid-storing-compiled#comment-59117125 -- nosy: +abcdenis ___ Python tracker

[issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError

2021-02-23 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Sure! Here it is: https://sqlite.org/forum/forumpost/574c6bc66c -- ___ Python tracker ___

[issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError

2021-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please give a link to the discussion? -- ___ Python tracker ___ ___ Python-bugs-list

[issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError

2021-02-23 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: After discussing the matter briefly on the SQLite forum, I'm no longer 100% certain about this. There seems to be uncertainty about which other conditions can produce NULL, although memory error seems to be the most probable. I consider closing both

[issue43239] PyCFunction_New is not exported with PyAPI_FUNC

2021-02-23 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 7bb1cafa4e3d648669212ea4c6d11d6eafc6da23 by Petr Viktorin in branch 'master': bpo-43239: Export PyCFunction_New with PyAPI_FUNC (GH-24551) https://github.com/python/cpython/commit/7bb1cafa4e3d648669212ea4c6d11d6eafc6da23 --

[issue42627] urllib.request.getproxies() misparses Windows registry proxy settings

2021-02-23 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43298] Windows build cannot detect missing Windows SDK

2021-02-23 Thread Kevin Thomas
Kevin Thomas added the comment: Hi Steve actually there was none installed which was strange as I had Visual Studio installed but it was not checked by default. After selecting it and installing it, everything works as expected. Updating the error message in some way might be helpful.

[issue43304] THONNY 3.3.0 failing to install package MULTIPROCESSING

2021-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: Closing as third-party. But for the record, I suspect the problem here is arising from confusion between standard library modules and third-party packages: the multiprocessing package is not a 3rd party package like NumPy (for example): instead, it's part

[issue22673] document the special features (eg: fdclose=False) of the standard streams

2021-02-23 Thread Eryk Sun
Change by Eryk Sun : -- components: +IO versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___

[issue22976] multiprocessing Queue empty() is broken on Windows

2021-02-23 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue22961] ctypes.WinError & OSError

2021-02-23 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43298] Windows build cannot detect missing Windows SDK

2021-02-23 Thread Steve Dower
Steve Dower added the comment: > I did not have the latest installed which is Win10SDK_10.0.18362, therefore > it did trigger that original error in msg387518. Did you have any other version installed? It should include one by default, which is why we don't mention it in the quick

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-02-23 Thread Steve Dower
Steve Dower added the comment: Thanks for the ping. I'll try and check in later this week to finish it up. -- ___ Python tracker ___

[issue43261] Python 3.9 repair on Windows do not recover pip module

2021-02-23 Thread Steve Dower
Steve Dower added the comment: Thanks! Interestingly, it seems like it ought to have re-run, but decided not to. I wonder if there's been some change to how Windows Installer deals with using registry keys to control custom actions? Unfortunately, MSI is an incredibly complicated installer,

[issue43115] locale.getlocale fails if locale is set

2021-02-23 Thread Anders Munch
Anders Munch added the comment: >> What does use getlocale is time.strptime and datetime.datetime.strptime, so >> when getlocale fails, strptime fails. > Would they work with getlocale() returning None for the encoding ? Yes. All getlocale is used for in _strptime.py is comparing the value

[issue43304] THONNY 3.3.0 failing to install package MULTIPROCESSING

2021-02-23 Thread Andre Roberge
Andre Roberge added the comment: Thonny has its own discussion site where you can report such problems: https://groups.google.com/g/thonny -- nosy: +aroberge ___ Python tracker

[issue35056] Test leaks of memory not managed by Python allocator

2021-02-23 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22299] resolve() on Windows makes some pathological paths unusable

2021-02-23 Thread Eryk Sun
Eryk Sun added the comment: ntpath.realpath() has since been implemented, and it addresses the problem by keeping the extended (verbatim) path prefix in the result if the input argument has it, and otherwise removing the prefix if the final path resolves correctly without it. --

[issue43303] ASAN : Memory leak in compilation

2021-02-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: To run the address sanitizer you need to deactivate pymalloc and pass some of the asan flags to avoid false positives. Check our our buildbot configuration for it:

[issue43261] Python 3.9 repair on Windows do not recover pip module

2021-02-23 Thread Svyatoslav
Svyatoslav added the comment: Attached logs created right before I created this post. -- Added file: https://bugs.python.org/file49829/Temp.zip ___ Python tracker ___

[issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction

2021-02-23 Thread Ma Lin
Change by Ma Lin : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: