[issue42872] Inconsistent exception thrown by mkdir on different OSes

2021-01-09 Thread Hong Xu
New submission from Hong Xu : Consider the following code: - import pathlib def main(): pathlib.Path('tmp').touch() pathlib.Path('tmp/tmp_sub').mkdir(parents=True) main() Run the code above in an empty directory. On Linux, it throws

[issue42872] Inconsistent exceptions thrown by mkdir on different OSes

2021-01-09 Thread Hong Xu
Change by Hong Xu : -- title: Inconsistent exception thrown by mkdir on different OSes -> Inconsistent exceptions thrown by mkdir on different OSes ___ Python tracker ___

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Hong Xu
Change by Hong Xu : -- title: Inconsistent exceptions thrown by mkdir on different OSes -> Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes ___ Python tracker __

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-09 Thread John McCabe
John McCabe added the comment: Thank you all for your time. I hope you don't feel it has been wasted since, at the very least, it confirms an issue in tkinter usage, albeit that the actual cause of the issue is TK itself. -- ___ Python tracker

[issue24464] "sqlite3_enable_shared_cache" deprecation warning when compiling with macOS system SQLite3

2021-01-09 Thread Berker Peksag
Berker Peksag added the comment: New changeset d16f6176abdecbb7ab231dc78beccfaa095beff6 by Erlend Egeberg Aasland in branch 'master': bpo-24464: Fix sqlite3.enable_shared_cache() deprecation wrapper (GH-24170) https://github.com/python/cpython/commit/d16f6176abdecbb7ab231dc78beccfaa095beff6

[issue42873] Exponential time and space requirements for compilation of nested try/finally blocks

2021-01-09 Thread Mark Dickinson
New submission from Mark Dickinson : tl;dr - contrived (but relatively short) code involving nested try/finally blocks can produce disproportionately large bytecode. I'm not expecting or suggesting any action here, but the situation seemed at least worth noting. Feel free to close this issue

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

2021-01-09 Thread Steve Dower
Steve Dower added the comment: That's the same patch that I'd write, and I agree, we should hook this. If the fields are documented anywhere, we should add the audit event data to get them into the table in the docs. Otherwise, that patch looks good to me. -- ___

[issue42874] configure errors

2021-01-09 Thread Martin Wheatley
New submission from Martin Wheatley : I'm installin Python 3.91. on a Solaris 10 system (I known it's 'old' but I have a legacy installation to support). Running ./configure the following errors are seen... checking PROFILE_TASK... -m test --pgo checking for --with-lto... no checking for llvm

[issue42873] Exponential time and space requirements for compilation of nested try/finally blocks

2021-01-09 Thread Mark Dickinson
Mark Dickinson added the comment: For extra fun, you can add `break` and `continue` paths into the mix to get a 5-fold instead of 3-fold code size increase per level of nesting. It's still contrived code, though. Example where do_cleanup() ends up with 5**4 = 625 paths: def f():

[issue42873] Exponential time and space requirements for compilation of nested try/finally blocks

2021-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And there may be more than one return/break/continue statement in the try block. It increases the base of the degree. At least for "return" we perhaps can merge different cases. But it would complicate the compiler and cannot help in other cases.

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, some operations can raise instances of different OSError subclasses on different platforms, because the corresponding C function sets different errno. It is so, and we cannot do anything with this. It is just a part of the difference between plaforms.

[issue42873] Exponential time and space requirements for compilation of nested try/finally blocks

2021-01-09 Thread Mark Shannon
Mark Shannon added the comment: I don't see what the problem is here. People just don't write code like that, at least not if they do code review ;) And even, in the *extremely* rare case that they do, the code executes correctly and reasonably quickly. It just uses a bit of extra memory. --

[issue42873] Exponential time and space requirements for compilation of nested try/finally blocks

2021-01-09 Thread Mark Dickinson
Mark Dickinson added the comment: > And there may be more than one return/break/continue statement in the try > block. It increases the base of the degree. Ah, interesting. My understanding was that that can't happen, but I'll double check. In the control flow, all 'return' statements that l

[issue42873] Exponential time and space requirements for compilation of nested try/finally blocks

2021-01-09 Thread Mark Dickinson
Mark Dickinson added the comment: > I don't see what the problem is here. People just don't write code like that. Yes, agreed; as I said in the original post, I'm not expecting any action, but the effect did seem interesting enough to be worth noting in an issue (if only so that it can be re

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Eryk Sun
Eryk Sun added the comment: NT filesystems are specified to fail with STATUS_OBJECT_PATH_NOT_FOUND (0xC03A) if a parent component in a path either does not exist or is not a directory. In the Windows API, this translates to ERROR_PATH_NOT_FOUND (3), which in the C runtime translates to E

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2021-01-09 Thread Johan Dahlin
Change by Johan Dahlin : -- nosy: +Johan Dahlin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue42875] argparse incorrectly shows help string on a new line in case of long command string

2021-01-09 Thread Pavel Ditenbir
New submission from Pavel Ditenbir : Steps to reproduce. Run the attached script: $ python3 argparse-indent-sample.py --help The output is: usage: argparse-indent-sample.py [-h] CMD ... optional arguments: -h, --help show this help message and exit service: CMD

[issue38822] Inconsistent os.stat behavior for directory with Access Denied

2021-01-09 Thread CrouZ
CrouZ added the comment: The problem exists in Python 3.8 as well, with the difference that ``os.path.isdir("D:\\System Volume Information\\")`` also returns False. Tested with Python 3.8.2 and 3.8.7. -- versions: +Python 3.8 ___ Python tracker <

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2021-01-09 Thread Philippe Ombredanne
Philippe Ombredanne added the comment: The changes introduced by this ticket in https://github.com/python/cpython/commit/9fc720e5e4f772598013ea48a3f0d22b2b6b04fa#r45794801 are problematic. I discovered this from having tests failing when testing on Python 3.7 and up The bug is that calling

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2021-01-09 Thread Philippe Ombredanne
Philippe Ombredanne added the comment: Actually this is problematic on multiples counts: 1. the behaviour changes and this is a regression 2. even if that new buggy behaviour was the one to use, it should not give preference to knownfiles ovr init-provided files, but at least take the provide

[issue42861] ipaddress - add ability to get next closet network of any prefix size

2021-01-09 Thread Faisal Mahmood
Faisal Mahmood added the comment: Updated the title and method naming, I previously mentioned the "next subnet" and called the method "next_subnet", but technically this is wrong. What this method should be doing is finding the next closest network of prefix size n. So I guess the method de

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

2021-01-09 Thread Ammar Askar
Ammar Askar added the comment: `tb_frame` is documented under https://docs.python.org/3/reference/datamodel.html > Special read-only attributes: tb_frame points to the execution frame of the > current level `tb_code` can similarly be documented here and the note about the audit event can b

[issue42850] Process hangs when calling urllib.request in a multiprocessing.Process with import of sounddevice package

2021-01-09 Thread Guido van Rossum
Guido van Rossum added the comment: No, let's leave 3.7 alone -- it's in security-fixes-only mode. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker _

[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-09 Thread Guido van Rossum
Guido van Rossum added the comment: Quickest way to get that done is to send in a PR that updates whatsnew. -- nosy: +gvanrossum ___ Python tracker ___ ___

[issue42875] argparse incorrectly shows help string on a new line in case of long command string

2021-01-09 Thread Pavel Ditenbir
Change by Pavel Ditenbir : -- keywords: +patch pull_requests: +23003 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24177 ___ Python tracker ___ _

[issue42876] '''"""''' != '""""'

2021-01-09 Thread Andreas Zeller
New submission from Andreas Zeller : The following line of code fails in Python 3.6, which I find surprising. >>> assert '''"""''' == '' # Fails Note that the following all pass as expected: >>> assert """'''""" == "'''" # Passes >>> assert '''""''' == '""' # Passes -- compone

[issue42752] multiprocessing Queue leaks a file descriptor associated with the pipe writer (#33081 still a problem)

2021-01-09 Thread mattip
mattip added the comment: In the expert index https://devguide.python.org/experts/ it lists @davin, @pitrou as referrents for multiprocessing. Adding then to the Nosy list -- ___ Python tracker

[issue42877] TracebackException saves more data than it needs

2021-01-09 Thread Irit Katriel
New submission from Irit Katriel : TracebackException saves both __cause__ and __context__ even though format() ignores the __context__ if there is __cause__. If we change the constructor to save only what format() needs, it will save space and simplify the code. -- components: Libra

[issue42877] TracebackException saves more data than it needs

2021-01-09 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +23005 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24179 ___ Python tracker ___ ___

[issue42877] TracebackException saves more data than it needs

2021-01-09 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue42876] '''"""''' != '""""'

2021-01-09 Thread Eryk Sun
Eryk Sun added the comment: > assert '''"""''' == '' # Fails The left-hand side is a triple-quote string literal [1][2] that contains 3 double-quote characters. The right-hand side is a single-quote string literal that contains 4 double-quote characters. Use the interactive shell to che

[issue42861] ipaddress - add ability to get next closet network of any prefix size

2021-01-09 Thread Faisal Mahmood
Change by Faisal Mahmood : -- keywords: +patch pull_requests: +23006 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24180 ___ Python tracker ___ _

[issue42766] urllib.request.HTTPPasswordMgr uses commonprefix instead of commonpath

2021-01-09 Thread Yair Frid
Change by Yair Frid : -- keywords: +patch nosy: +Fongeme nosy_count: 1.0 -> 2.0 pull_requests: +23007 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24181 ___ Python tracker

[issue42878] urllib.request.HTTPPasswordMgr.is_suburi does not care about order

2021-01-09 Thread Yair Frid
New submission from Yair Frid : In docs, it mentions that the function returns true if the base is a 'suburi' of test, but in reality, if is_suburi(base, test) then is_suburi(test, base) which is wrong in most cases (other than where base ~= test, meaning they are the same location) I am unsu

[issue33065] IDLE debugger: failure stepping through module loading

2021-01-09 Thread Timothy Geiser
Timothy Geiser added the comment: This issue is still open, 8.5 months after identifying the underlying cause. What needs done to get a fix for this merged? Manual testing, or adding test cases? Anything I can do to help? I have 3.9.1 successfully built on a Raspberry Pi that I can reproduce

[issue42879] SystemError from class 'int'

2021-01-09 Thread Jason Oliver
New submission from Jason Oliver : This is my first bug report so I hope that this is correctly formatted. I am learning how to use pygame and encountered the following error: SystemError: returned a result with an error set I googled the error message and came across the following answer on

[issue42531] importlib.resources.path() raises TypeError for packages without __file__

2021-01-09 Thread Jason R. Coombs
Jason R. Coombs added the comment: > Regardless of whether PR 23611 is accepted, the test that it adds should be > added to Python master to guard against regressions. I can submit that as a > separate PR. Before I do that, do I need to create a new bpo ticket, or can I > just reference this

[issue42531] importlib.resources.path() raises TypeError for packages without __file__

2021-01-09 Thread Jason R. Coombs
Jason R. Coombs added the comment: Can you tell me more about the use-case that exhibited this undesirable behavior? That is, what loader is it that supports `open_binary` but not `is_resource` and doesn't have a `__origin__`? -- ___ Python tracke

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Irit Katriel
Irit Katriel added the comment: See also issue41737. -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42850] Process hangs when calling urllib.request in a multiprocessing.Process with import of sounddevice package

2021-01-09 Thread Robin Scheibler
Robin Scheibler added the comment: Thank you very much for your help! -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

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

2021-01-09 Thread Ryan Hileman
Change by Ryan Hileman : -- keywords: +patch pull_requests: +23010 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24182 ___ Python tracker ___ ___

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: No problem. While your failing example was 'too long', you *did* search and find the appropriate previous issue, with my inadequate response and incorrect resolution, even though closed. I appreciate having my understanding fixed. IDLE uses several entry b

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

2021-01-09 Thread Ryan Hileman
Ryan Hileman added the comment: PR submitted, waiting on CLA process. I added documentation at the field sites, but the audit event table generation does not handle attributes or object.__getattr__ very well at all, so I'm not updating the audit table for now. The `.. audit-event:: object._

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2021-01-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Phillipe: I was the first to comment, but had no futher involvement with this issue until now. Multiple people, including coredevs, considered the old behavior to be buggy and multiple people, including coredevs, contributed to the fix. You are unlikely to

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Hong Xu
Hong Xu added the comment: Should we update the document at least? The document doesn't mention NotADirectoryError or its super classes at all. -- ___ Python tracker ___

[issue33065] IDLE debugger: failure stepping through module loading

2021-01-09 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +23011 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/24183 ___ Python tracker __

[issue33065] IDLE debugger: failure stepping through module loading

2021-01-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am reluctant to make changes without adding tests, and until I focused again on how to do so, because of your ping, I had no idea how to do so. The added test results in the same error, "AttributeError: 'BinData' object has no attribute 'length'" without t

[issue33065] IDLE debugger: failure stepping through module loading

2021-01-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 81f87bbf9f65702062021a78abd9b8f82c98a414 by Terry Jan Reedy in branch 'master': bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183) https://github.com/python/cpython/commit/81f87bbf9f65702062021a78abd9b8f82c98a414 ---

[issue33065] IDLE debugger: failure stepping through module loading

2021-01-09 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +23012 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/24184 ___ Python tracker

[issue33065] IDLE debugger: failure stepping through module loading

2021-01-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +23013 pull_request: https://github.com/python/cpython/pull/24185 ___ Python tracker ___ __

[issue33065] IDLE debugger: failure stepping through module loading

2021-01-09 Thread miss-islington
miss-islington added the comment: New changeset 5ded7efa6a7a232dd4a41e6e65e4dae47146514b by Miss Islington (bot) in branch '3.8': bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183) https://github.com/python/cpython/commit/5ded7efa6a7a232dd4a41e6e65e4dae47146514b -

[issue33065] IDLE debugger: failure stepping through module loading

2021-01-09 Thread miss-islington
miss-islington added the comment: New changeset 799f8489d418b7f9207d333eac38214931bd7dcc by Miss Islington (bot) in branch '3.9': bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183) https://github.com/python/cpython/commit/799f8489d418b7f9207d333eac38214931bd7dcc -

[issue42880] ctypes: variadic function call still doesn't work on Apple Silicon

2021-01-09 Thread Ziqiao Kong
New submission from Ziqiao Kong : Hello! Thanks for your contribution on porting python to native Apple Silicon. I have noticed that there is an issue https://bugs.python.org/issue41100 and corresponding Github PR https://github.com/python/cpython/pull/22855 stating that variadic functions AB

[issue33065] IDLE debugger: failure stepping through module loading

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