[issue44648] Inspect.getsource raises wrong error on classes in interactive session

2021-07-30 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Andrei! ✨ 🍰 ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-07-30 Thread Eryk Sun
Eryk Sun added the comment: I'd prefer a generic wording regarding the platform, and overall simpler phrasing without examples: "On some platforms, it may also be raised if an operation attempts to open or traverse a non-directory file as if it were a directory." The latter doesn't apply t

[issue44783] SSL needs client OCSP stapling

2021-07-30 Thread Philip Prindeville
New submission from Philip Prindeville : When TLS client certificates are used for authentication, servers need to ensure that the certificate is current and hasn't been revoked. In zero-trust and other architectures with heavy use of micro-services, server-side validation of the client cert

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-07-30 Thread Andrei Kulakov
Andrei Kulakov added the comment: Eryk: sounds good, updated the PR. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue42698] Deadlock in pysqlite_connection_dealloc()

2021-07-30 Thread hydroflask
hydroflask added the comment: Unfortunately I am currently unable to write a repro for this bug but I am 100% certain it exists from analyzing the code. In our application (which is a large multithreaded application) after I made the changes consistent with this report the deadlock vanished

[issue44780] Incorrect message: "Invalid decimal literal" (python 3.10)

2021-07-30 Thread Andre Roberge
Andre Roberge added the comment: Here's another related case. Python 3.9: >>> a = 1½ File "", line 1 a = 1½ ^ SyntaxError: invalid character '½' (U+00BD) Python 3.10 >>> a = 1½ File "", line 1 a = 1½ ^ SyntaxError: invalid decimal literal --

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-07-30 Thread Danny Lin
Danny Lin added the comment: It should be emphasized that it may happen on a **file operation**... So at least be something like: "On some platforms, it may also be raised if a file operation involves an attempt to open or traverse a non-directory file as if it were a directory." --

[issue44780] Incorrect message: "Invalid decimal literal" (python 3.10)

2021-07-30 Thread Andre Roberge
Andre Roberge added the comment: Third case. Showing only the output for Python 3.10 >>> a = 3 ⁄ 7 # entered with a space around ⁄ File "", line 1 a = 3 ⁄ 7 ^ SyntaxError: invalid character '⁄' (U+2044) >>> a = 3⁄7# no added space File "", line 1 a = 3⁄7 ^ Sy

[issue44784] test_importlib uses deprecated SelectableGroups interface

2021-07-30 Thread Irit Katriel
New submission from Irit Katriel : % ./python.exe -E -We -m test -v test_importlib == ERROR: test_entry_points_groups_get (test.test_importlib.test_metadata_api.APITests) -

[issue44785] test_pickle issues "DeprecationWarning: The Tix Tk.."

2021-07-30 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue44785] test_pickle issues "DeprecationWarning: The Tix Tk.."

2021-07-30 Thread Irit Katriel
New submission from Irit Katriel : % ./python.exe -E -We -m test -v test_pickle == ERROR: test_import (test.test_pickle.CompatPickleTests) -- Traceback (most r

[issue44784] test_importlib uses deprecated SelectableGroups interface

2021-07-30 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue44786] test_check_c_globals "crashed" and then "FutureWarning: Possible nested set at position 12"

2021-07-30 Thread Irit Katriel
New submission from Irit Katriel : % ./python.exe -E -We -m test -v test_check_c_globals ... test test_check_c_globals crashed -- Traceback (most recent call last): File "/Users/iritkatriel/src/cpython-1/Lib/test/libregrtest/runtest.py", line 335, in _runtest_inner refleak = _runtest_in

[issue44786] test_check_c_globals "crashed" and then "FutureWarning: Possible nested set at position 12"

2021-07-30 Thread Irit Katriel
Change by Irit Katriel : -- components: +Tests ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue44773] case_insensitive kwarg in str.replace()

2021-07-30 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond that this should be rejected. -- nosy: +eric.smith ___ Python tracker ___ ___

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-07-30 Thread Eryk Sun
Eryk Sun added the comment: > It should be emphasized that it may happen on a **file operation** I think it's adequately covered by "attempts to open or traverse a non-directory file". The reader should know that opening "/path/to/file/somename.txt" requires traversing the components in the

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-07-30 Thread Andrei Kulakov
Andrei Kulakov added the comment: Eryk: On MacOS, I get Not a directory error on all 3: NotADirectoryError: [Errno 20] Not a directory: 'spam' NotADirectoryError: [Errno 20] Not a directory: 'spam/' NotADirectoryError: [Errno 20] Not a directory: 'spam/eggs' --

[issue44782] LRU class given as example in OrderedDict docs not work on pop

2021-07-30 Thread Dennis Sweeney
Dennis Sweeney added the comment: Related (regarding od.popitem()): https://bugs.python.org/issue27275 -- nosy: +Dennis Sweeney ___ Python tracker ___

[issue44785] test_pickle issues "DeprecationWarning: The Tix Tk.."

2021-07-30 Thread E. Paine
Change by E. Paine : -- keywords: +patch nosy: +epaine nosy_count: 1.0 -> 2.0 pull_requests: +26012 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27496 ___ Python tracker __

[issue44773] case_insensitive kwarg in str.replace()

2021-07-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Raymond and Eric. Note that in general case the problem is more complex that you may expect. First, some characters can match two characters (e.g. 'ß' matches 'SS'), and therefore indexes of characters are different in different cases. Second,

[issue44648] Inspect.getsource raises wrong error on classes in interactive session

2021-07-30 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 nosy_count: 5.0 -> 6.0 pull_requests: +26013 pull_request: https://github.com/python/cpython/pull/27484 ___ Python tracker ___ _

[issue44787] Missing valid directive %D in datetime.strftime() documentation

2021-07-30 Thread Marty
New submission from Marty : Output of: datetime.datetime.now().strftime('%D') is equivalent for: datetime.datetime.now().strftime('%m/%d/%y') Is there a reason that directive %D is missing in documentation? Are there other hidden directives? https://docs.python.org/3/library/datetime.html#strf

[issue44648] Inspect.getsource raises wrong error on classes in interactive session

2021-07-30 Thread Jason R. Coombs
Change by Jason R. Coombs : -- nosy: +jaraco nosy_count: 6.0 -> 7.0 pull_requests: +26014 pull_request: https://github.com/python/cpython/pull/27436 ___ Python tracker ___

[issue44738] io_uring as a new backend to selectors and asyncio

2021-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Continue the discussion, including adding new info, to the #41271 -- nosy: +terry.reedy resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add support for io_uring to cpython ___ Py

[issue44744] [security] Open redirect attack due to insufficient validation in Urlparse

2021-07-30 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +Library (Lib) -Parser stage: -> test needed type: -> security ___ Python tracker ___ __

[issue44748] argparse: a bool indicating if arg was encountered

2021-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Joker, please don't mess with headers. Enhancements only appear in future versions; argparse is a library module, not a test module. -- components: +Library (Lib) -Tests nosy: +terry.reedy stage: -> test needed versions: +Python 3.11 -Python 3.9 __

[issue44771] Adopt changes from importlib_resources 5.2

2021-07-30 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +26015 pull_request: https://github.com/python/cpython/pull/27497 ___ Python tracker ___ _

[issue44787] Missing valid directive %D in datetime.strftime() documentation

2021-07-30 Thread Eric V. Smith
Eric V. Smith added the comment: It's dependent on the platform's C library's strftime(). I think (but don't promise) that we document the C89 codes, but each platform might provide additional ones. -- nosy: +eric.smith ___ Python tracker

[issue27498] Regression in repr() of class object

2021-07-30 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +26016 pull_request: https://github.com/python/cpython/pull/27498 ___ Python tracker ___ ___

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-07-30 Thread Eryk Sun
Eryk Sun added the comment: > On MacOS, I get Not a directory error on all 3 Confirmation on Linux and macOS suffices for "most POSIX systems", based on market share for desktops and servers. It would be nice to also confirm this for FreeBSD, AIX, HP-UX, and Solaris, but I suppose it isn't n

[issue44667] tokenize.py emits spurious NEWLINE if file ends on a comment without a newline

2021-07-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch nosy: +pablogsal nosy_count: 1.0 -> 2.0 pull_requests: +26017 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27499 ___ Python tracker

[issue44782] LRU class given as example in OrderedDict docs not work on pop

2021-07-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list m

[issue44788] Possibility to specify port in __init__ of ftplib.FTP

2021-07-30 Thread Marty
New submission from Marty : I think all that's needed is to add new parameter port in __init__ and then add it to self.connect() as argument: def __init__(self, host='', port=0, user='', passwd='', acct='', timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *,

[issue44789] Code compliance concern in Parser/pegen/pegen.c

2021-07-30 Thread Dennis Clarke
New submission from Dennis Clarke : With release 3.9.6 I see failures in compile on three system architectures and with three compilers. I did check with GCC 10.2.1 ( Debian 10.2.1-6 ) on IBM Power and also with FreeBSD UNIX LLVM/Clang 12.0.1 on AMD64 and also with Oracle Studio C99 strict in So

[issue44771] Adopt changes from importlib_resources 5.2

2021-07-30 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset e63e6311aa258a5f3f49a7aed9fdde445fd384d6 by Jason R. Coombs in branch 'main': bpo-44771: Sync with importlib_resources 5.2.2, fixing refleak. (#27497) https://github.com/python/cpython/commit/e63e6311aa258a5f3f49a7aed9fdde445fd384d6 -

[issue44789] Code compliance concern in Parser/pegen/pegen.c

2021-07-30 Thread Dennis Sweeney
Dennis Sweeney added the comment: To be specific, is this about the fact that .arg is a member of `struct _arg` (typedef'ed as `arg_ty`), while at the same time arg() is a macro? as in: https://github.com/python/cpython/blob/0f42b726c87f72d522893f927b4cb592b8875641/Parser/pegen/pegen.c#L37

[issue44667] tokenize.py emits spurious NEWLINE if file ends on a comment without a newline

2021-07-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b6bde9fc42aecad5be0457198d17cfe7b481ad79 by Pablo Galindo Salgado in branch 'main': bpo-44667: Treat correctly lines ending with comments and no newlines in the Python tokenizer (GH-27499) https://github.com/python/cpython/commit/b6bde9f

[issue44667] tokenize.py emits spurious NEWLINE if file ends on a comment without a newline

2021-07-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +26019 pull_request: https://github.com/python/cpython/pull/27501 ___ Python tracker ___ __

[issue44667] tokenize.py emits spurious NEWLINE if file ends on a comment without a newline

2021-07-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +26018 pull_request: https://github.com/python/cpython/pull/27500 ___ Python tracker _

[issue44667] tokenize.py emits spurious NEWLINE if file ends on a comment without a newline

2021-07-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44784] test_importlib uses deprecated SelectableGroups interface

2021-07-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +jaraco ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue44789] Code compliance concern in Parser/pegen/pegen.c

2021-07-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Dennis Clarke, thanks for the report. Unfortunately we don't know how to reproduce the problems you mention. Could you please indicate what are you running? For instance, I can compile with 11.1.0 with absolutely no problems here. -- ___

[issue44767] python -m flask run gives OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

2021-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: This tracker is for fixing bugs in CPython and its stdlib, not for bugs in 3rd party applications or their usage. Your report does not point to a bug in python itself. Try asking about this issue on a flask forum, python-list, maybe stackoverflow.com, or m

[issue44776] Docs on mobile do not use monospace font for code snippets, misaligning carets of improved error messages

2021-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Wrong tracker. Not 3rd party, but not a bug in the doc .rst files or cpython code files. -- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue44790] Recursion causes Crash

2021-07-30 Thread Michael Wang
New submission from Michael Wang : Ultimately it seems that deep recursion after setting the recursion limit actually crashes python -- components: Interpreter Core files: bug.py messages: 398619 nosy: michaeljwang10 priority: normal severity: normal status: open title: Recursion cause

[issue44788] Possibility to specify port in __init__ of ftplib.FTP

2021-07-30 Thread Jack DeVries
Jack DeVries added the comment: The only thing to consider is that connections are flakey, and the user might typically want to explicitly handle them in most cases. Therefore, it's a better API if the .connect() call appears in the user's code. If anything, it might be better to create a ne

[issue44788] Possibility to specify port in __init__ of ftplib.FTP

2021-07-30 Thread Jack DeVries
Jack DeVries added the comment: > user might typically want to explicitly handle them in most cases. *Explicitly handle exceptions -- ___ Python tracker ___ _

[issue44790] Recursion causes Crash

2021-07-30 Thread Jack DeVries
Jack DeVries added the comment: The default recursion limit is 1,000; you're increasing it by a factor of 10. It is documented that raising the recursion limit can cause crashes. What kind of crash are you seeing? Segmentation fault or stack overflow? Also, provide more details about your sy

[issue44790] Recursion causes Crash

2021-07-30 Thread Jack DeVries
Jack DeVries added the comment: Also, see related: bpo-44393 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue44784] test_importlib uses deprecated SelectableGroups interface

2021-07-30 Thread Jason R. Coombs
Jason R. Coombs added the comment: In addition to the two reported, there are two others: - test_entry_points_dict_construction - test_entry_points_by_index that also fail. I've been able to replicate the issue in importlib_metadata, so I'll fix it there first. -- _

[issue44784] test_importlib uses deprecated SelectableGroups interface

2021-07-30 Thread Jason R. Coombs
Jason R. Coombs added the comment: All four of those tests had used `capture_warnings` in an attempt to capture them, but it did not alter the warnings filter. -- ___ Python tracker

[issue44784] test_importlib uses deprecated SelectableGroups interface

2021-07-30 Thread Jason R. Coombs
Jason R. Coombs added the comment: Patch at https://github.com/python/importlib_metadata/pull/333. -- ___ Python tracker ___ ___ Py

[issue44790] Recursion causes Crash

2021-07-30 Thread Dennis Sweeney
Dennis Sweeney added the comment: Indeed, this behavior is documented at https://docs.python.org/3/library/sys.html?highlight=setrecursionlimit#sys.setrecursionlimit : "a too-high limit can lead to a crash". I'd recommend refactoring to use iteration rather than recursion: def fact(n):

[issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order

2021-07-30 Thread Andrei Kulakov
Andrei Kulakov added the comment: This can be closed as fixed. -- nosy: +andrei.avk ___ Python tracker ___ ___ Python-bugs-list mai

[issue42026] index function return first index for same element if repetitive in a list

2021-07-30 Thread Andrei Kulakov
Andrei Kulakov added the comment: this can be closed I believe. -- nosy: +andrei.avk ___ Python tracker ___ ___ Python-bugs-list ma

[issue42026] index function return first index for same element if repetitive in a list

2021-07-30 Thread Dennis Sweeney
Change by Dennis Sweeney : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue44782] LRU class given as example in OrderedDict docs not work on pop

2021-07-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm thinking that the current LRU() recipe should be changed to lru_cache() API using an OrderedDict internally rather than inheriting from it. The current recipe was intended to be a sketch rather than a complete class; otherwise, methods like get() wo

[issue44782] LRU class given as example in OrderedDict docs not work on pop

2021-07-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2021-07-30 Thread Dennis Sweeney
Dennis Sweeney added the comment: bpo-44782 was opened about the `class LRU(OrderedDict)` in the OrderedDict docs, and its pop() method failing. I think Serhiy's patch here (before revert) may be a good idea (to re-apply). I think it is reasonable to ignore user-implemented dunder methods fro

<    1   2