[issue46252] SSLWantReadError causes _SelectorSocketTransport to close

2022-01-04 Thread Christian Heimes
Change by Christian Heimes : -- assignee: christian.heimes -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46238] Improve constants usage / definition in asyncio.windows_events

2022-01-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 1b111338cfe7840feea95e30ea8124063c450c65 by Nikita Sobolev in branch 'main': bpo-46238: reuse `_winapi` constants in `asyncio.windows_events` (GH-30352) https://github.com/python/cpython/commit/1b111338cfe7840feea95e30ea8124063c450c65

[issue46238] Improve constants usage / definition in asyncio.windows_events

2022-01-04 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46239] Incosistent error message in asyncio: windows_events / windows_utils

2022-01-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 5a2a65096c3ec2d37f33615f2a420d2ffcabecf2 by Nikita Sobolev in branch 'main': bpo-46239: improve error message when importing `asyncio.windows_events` (GH-30353) https://github.com/python/cpython/commit/5a2a65096c3ec2d37f33615f2a420d2ffcabecf2

[issue46239] Incosistent error message in asyncio: windows_events / windows_utils

2022-01-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28597 pull_request: https://github.com/python/cpython/pull/30388 ___ Python tracker _

[issue46239] Incosistent error message in asyncio: windows_events / windows_utils

2022-01-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +28598 pull_request: https://github.com/python/cpython/pull/30389 ___ Python tracker ___ __

[issue46187] Optionally support rounding for math.isqrt()

2022-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is i, rem = isqrt_rem(n) i + (rem != 0) better than (isqrt(n<<2) + 1) >> 1 or n and isqrt(n-1) + 1 ? As for use cases, there were few cases in my experience when I needed the ceiling square root, mostly in simple experiments in REPL, but i

[issue46239] Incosistent error message in asyncio: windows_events / windows_utils

2022-01-04 Thread miss-islington
miss-islington added the comment: New changeset 86d1b8c13fcaf8a974cf2ae23b31fe87dfdb6267 by Miss Islington (bot) in branch '3.9': bpo-46239: improve error message when importing `asyncio.windows_events` (GH-30353) https://github.com/python/cpython/commit/86d1b8c13fcaf8a974cf2ae23b31fe87dfdb6

[issue46239] Incosistent error message in asyncio: windows_events / windows_utils

2022-01-04 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46239] Incosistent error message in asyncio: windows_events / windows_utils

2022-01-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset cf48a148190a6ccadc144cab2e2046e95c20fb57 by Miss Islington (bot) in branch '3.10': bpo-46239: improve error message when importing `asyncio.windows_events` (GH-30353) (#30388) https://github.com/python/cpython/commit/cf48a148190a6ccadc144cab2e2

[issue44092] [sqlite3] Remove special rollback handling

2022-01-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset a09062c267a94200ad299f779429fea1b571ee35 by Erlend Egeberg Aasland in branch 'main': bpo-44092: Move What's New entry to where it belongs (GH-30381) https://github.com/python/cpython/commit/a09062c267a94200ad299f779429fea1b571ee35 -

[issue46212] Avoid temporary `varargs` tuple creation in argument passing

2022-01-04 Thread colorfulappl
colorfulappl added the comment: I am a rookie in Python, did not notice changing PyAPI_FUNC means breaking backward compatibility. I have reverted _PyArg_UnpackKeywordsWithVararg and committed again. -- ___ Python tracker

[issue46249] [sqlite3] move set lastrowid out of the query loop

2022-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.01.2022 00:49, Erlend E. Aasland wrote: > > Erlend E. Aasland added the comment: > > I see that PEP 249 does not define the semantics of lastrowid for > executemany(). What's the precedence here, MAL? IMO, it would be nice to be > able to fetch t

[issue46249] [sqlite3] move set lastrowid out of the query loop

2022-01-04 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thank you for your input Marc-André. For SQLite, it's pretty simple: we use an API called sqlite3_last_insert_rowid() which takes the database connection as it's argument, not a statement pointer. This function returns "the rowid of the most recent succes

[issue46254] Better fitting type for iterating in the trace_init C function

2022-01-04 Thread Uriya Harpeness
Change by Uriya Harpeness : -- components: C API nosy: uriya1998 priority: normal severity: normal status: open title: Better fitting type for iterating in the trace_init C function type: enhancement versions: Python 3.11 ___ Python tracker

[issue46245] Add support for dir_fd in shutil.rmtree()

2022-01-04 Thread Yassir Karroum
Yassir Karroum added the comment: No problem, I'll resume working on issue25927, thanks for the fix. -- ___ Python tracker ___ ___

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-04 Thread Yassir Karroum
Change by Yassir Karroum : -- versions: +Python 3.11 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46202] remove opcode POP_EXCEPT_AND_RERAISE

2022-01-04 Thread Mark Shannon
Mark Shannon added the comment: New changeset a94461d7189d7f1147ab304a332c8684263dc17e by Irit Katriel in branch 'main': bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302) https://github.com/python/cpython/commit/a94461d7189d7f1147ab304a332c8684263dc17e -- nosy: +Mark.Shanno

[issue46240] Incorrect hint about forgetting a comma

2022-01-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28599 pull_request: https://github.com/python/cpython/pull/30390 ___ Python tracker _

[issue46240] Incorrect hint about forgetting a comma

2022-01-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 70f415fb8b632247e28d87998642317ca7a652ae by Pablo Galindo Salgado in branch 'main': bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378) https://github.com/python/cpython/commit/70f415fb8b63

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset e09d94a140a5f6903017da9b6ac752ba041d69da by Pablo Galindo Salgado in branch 'main': bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341) https://github.com/python/cpython/commit/e09d94a140a5f6903017d

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +28601 pull_request: https://github.com/python/cpython/pull/30392 ___ Python tracker ___ __

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28600 pull_request: https://github.com/python/cpython/pull/30391 ___ Python tracker _

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have also almost finished this issue (only needed to add some tests and docs). -- ___ Python tracker ___

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-04 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46240] Incorrect hint about forgetting a comma

2022-01-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks Andre for the report! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46249] [sqlite3] move set lastrowid out of the query loop

2022-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.01.2022 11:02, Erlend E. Aasland wrote: > > Erlend E. Aasland added the comment: > > Thank you for your input Marc-André. > > For SQLite, it's pretty simple: we use an API called > sqlite3_last_insert_rowid() which takes the database connection as

[issue46181] Destroying an expaned Combobox prevents Entry focus until Alt+Tab

2022-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue46119] Update bundled pip to 21.3.1 and setuptools to 59.7.0

2022-01-04 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +28602 pull_request: https://github.com/python/cpython/pull/30393 ___ Python tracker ___

[issue46254] Better fitting type for iterating in the trace_init C function

2022-01-04 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +28603 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30394 ___ Python tracker _

[issue46202] remove opcode POP_EXCEPT_AND_RERAISE

2022-01-04 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-04 Thread miss-islington
miss-islington added the comment: New changeset 743394f2811796b30b618d4cb6dd582715f8638c by Miss Islington (bot) in branch '3.10': bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341) https://github.com/python/cpython/commit/743394f2811796b30b618d4cb6dd5

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-04 Thread Yassir Karroum
Yassir Karroum added the comment: Alright, I'll stop working on it then, thanks for the fix ! -- ___ Python tracker ___ ___ Python-

[issue33252] [doc] Clarify ResourceWarning documentation

2022-01-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28604 pull_request: https://github.com/python/cpython/pull/30395 ___ Python tracker _

[issue33252] [doc] Clarify ResourceWarning documentation

2022-01-04 Thread miss-islington
miss-islington added the comment: New changeset b949845b36b999185ed2bdf8a04dca1da39f3002 by Hugo van Kemenade in branch 'main': bpo-33252: Document that ResourceWarning is ignored by default (GH-30358) https://github.com/python/cpython/commit/b949845b36b999185ed2bdf8a04dca1da39f3002 ---

[issue33252] [doc] Clarify ResourceWarning documentation

2022-01-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +28605 pull_request: https://github.com/python/cpython/pull/30396 ___ Python tracker ___ __

[issue43224] Add support for PEP 646

2022-01-04 Thread Matthew Rahtz
Change by Matthew Rahtz : -- components: +Parser, Tests nosy: +lys.nikolaou, pablogsal title: Add support for PEP 646 (Variadic Generics) to typing.py -> Add support for PEP 646 versions: +Python 3.11 -Python 3.10 ___ Python tracker

[issue46255] Remove unnecessary check in _IOBase._check*() methods

2022-01-04 Thread Ma Lin
New submission from Ma Lin : These methods are METH_NOARGS, in all cases the second parameter will be NULL. {"_checkClosed", _PyIOBase_check_closed, METH_NOARGS}, {"_checkSeekable", _PyIOBase_check_seekable, METH_NOARGS}, {"_checkReadable", _PyIOBase_check_readable, METH_NOARGS},

[issue46255] Remove unnecessary check in _IOBase._check*() methods

2022-01-04 Thread Ma Lin
Change by Ma Lin : -- keywords: +patch pull_requests: +28606 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30397 ___ Python tracker ___ _

[issue33252] [doc] Clarify ResourceWarning documentation

2022-01-04 Thread Irit Katriel
Irit Katriel added the comment: New changeset 01b12942d0ba2fd3c2efdfb796e8816efc607ee7 by Miss Islington (bot) in branch '3.10': bpo-33252: Document that ResourceWarning is ignored by default (GH-30358) (GH-30395) https://github.com/python/cpython/commit/01b12942d0ba2fd3c2efdfb796e8816efc607

[issue33252] [doc] Clarify ResourceWarning documentation

2022-01-04 Thread Irit Katriel
Irit Katriel added the comment: New changeset 8f082e2bf43c1367e30d00874267dd25f7256cd0 by Miss Islington (bot) in branch '3.9': bpo-33252: Document that ResourceWarning is ignored by default (GH-30358) (GH-30396) https://github.com/python/cpython/commit/8f082e2bf43c1367e30d00874267dd25f7256c

[issue33252] [doc] Clarify ResourceWarning documentation

2022-01-04 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46251] logger.config.configure_formatter executes arbitrary code

2022-01-04 Thread MarkBaggett
MarkBaggett added the comment: Let me also mention that the problem really includes anything that uses the resolve() functions. Here is a working example that puts an exploit in a HANDLER rather than a FORMATTER. $ ls /tmp/alsoworked ls: cannot access '/tmp/alsoworked': No such file or direc

[issue43224] Add support for PEP 646

2022-01-04 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +28607 pull_request: https://github.com/python/cpython/pull/30398 ___ Python tracker ___ ___

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2022-01-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28608 pull_request: https://github.com/python/cpython/pull/30400 ___ Python tracker _

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2022-01-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 7d7817cf0f826e566d8370a0e974bbfed6611d91 by Kumar Aditya in branch 'main': bpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168) https://github.com/python/cpython/commit/7d7817cf0f826e566d8370a0e974bbfed6611d91

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2022-01-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +28609 pull_request: https://github.com/python/cpython/pull/30401 ___ Python tracker ___ __

[issue43976] Allow Python distributors to add custom site install schemes

2022-01-04 Thread Miro Hrončok
Miro Hrončok added the comment: In Fedora 36+ / Python 3.10+ we now use an install_scheme that looks like this: 'purelib': '{base}/local/lib/python{py_version_short}/site-packages', 'platlib': '{platbase}/local/{platlibdir}/python{py_version_short}/site-packages', 'scripts': '{base

[issue46244] typing._TypeVarLike missing __slots__

2022-01-04 Thread Ken Jin
Ken Jin added the comment: Good catch Arie. Would you like to submit a PR for this? -- ___ Python tracker ___ ___ Python-bugs-list

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-04 Thread Georg Brandl
Change by Georg Brandl : -- nosy: -georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Ken Jin
Ken Jin added the comment: > It does seem inconsistent that Any is not considered a type but list[int] is Yeah, almost none of the typing "types" are types ever since PEP 560. Issue45755 was a side effect too. -- ___ Python tracker

[issue46246] importlib.metadata.DeprecatedList appears to be missing __slots__

2022-01-04 Thread Jason R. Coombs
Jason R. Coombs added the comment: Today I learned something. Thanks Arie. Yes, I agree that's a mistake. Perhaps the test suite should also have a test to capture the missed expectation (that __dict__ should not be present or setting attributes on EntryPoints instances should fail). --

[issue44899] tarfile: add support for creating an archive of potentially changing files

2022-01-04 Thread Marko Tuononen
Change by Marko Tuononen : -- keywords: +patch pull_requests: +28610 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30402 ___ Python tracker ___ _

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2022-01-04 Thread miss-islington
miss-islington added the comment: New changeset 9a9061d1ca7e28dc2b7e326153e933872c7cd452 by Miss Islington (bot) in branch '3.9': bpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168) https://github.com/python/cpython/commit/9a9061d1ca7e28dc2b7e326153e933872c7cd452

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2022-01-04 Thread miss-islington
miss-islington added the comment: New changeset ba124672d7bf490bea2930a3e8371823db5d4cae by Miss Islington (bot) in branch '3.10': bpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168) https://github.com/python/cpython/commit/ba124672d7bf490bea2930a3e8371823db5d4ca

[issue46248] Compilation errors on macOS

2022-01-04 Thread Ronald Oussoren
Ronald Oussoren added the comment: Part of the problem here is that most keys in the result of sysconfig.get_config_vars() are copied as-is from the CPython Makefile and pyconfig.h header file. The keys copied from the Makefile are in a lot of cases not useful for users of python because th

[issue43224] Add support for PEP 646

2022-01-04 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +gvanrossum, kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2022-01-04 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46256] Objects __del__ called after module have been removed

2022-01-04 Thread Daniele Varrazzo
New submission from Daniele Varrazzo : The following bug has been reported to Psycopg: https://github.com/psycopg/psycopg/issues/198 At the end of the program, errors such as the following are dumped: Exception ignored in: Traceback (most recent call last): File "/opt/homebrew

[issue26208] decimal C module's exceptions don't match the Python version

2022-01-04 Thread Cédric Krier
Change by Cédric Krier : -- nosy: +ced ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue45173] Remove configparser deprecations

2022-01-04 Thread Hugo van Kemenade
Hugo van Kemenade added the comment: Searching 4,764 sdists from the top 5,000 PyPI packages, these 13 contain "LegacyInterpolation": configparser-5.1.0.tar.gz configparser2-4.0.0.tar.gz eth_abi-2.1.1.tar.gz eth-account-0.5.6.tar.gz eth-hash-0.3.2.tar.gz eth-utils-1.10.0.tar.gz hexbytes-0.2.2

[issue46070] _PyImport_FixupExtensionObject() regression causing a crash in subintepreters

2022-01-04 Thread STINNER Victor
STINNER Victor added the comment: Fedora issue: https://bugzilla.redhat.com/show_bug.cgi?id=2034962 -- ___ Python tracker ___ ___ P

[issue46256] Objects __del__ called after module have been removed

2022-01-04 Thread Christopher Vickery
Christopher Vickery added the comment: If the attached module is run with no command line arguments, it will reproduce the problem without doing anything else. When run using Python 3.9 it does not cause the problem. (This module comes from https://github.com/cvickery/transfer-app, with an u

[issue41945] http.cookies.SimpleCookie.parse error after [keys] or some JSON data values

2022-01-04 Thread Jan Novak
Jan Novak added the comment: New examples with the structured data. Problems are with quotes and spaces inside { or [ cookie-script.com set those cookie data: CookieScriptConsent={"action":"accept","categories":"[\\"performance\\"]"} Python loads only cookies before that JSON structure >>>

[issue46187] Optionally support rounding for math.isqrt()

2022-01-04 Thread Tim Peters
Tim Peters added the comment: > Is > > i, rem = isqrt_rem(n) > i + (rem != 0) > > better than > > (isqrt(n<<2) + 1) >> 1 > > or > > n and isqrt(n-1) + 1 > > ? Define "better"? The first way is by far the most obvious of the three, and the second way the least obvious. The first way also

[issue46244] typing._TypeVarLike missing __slots__

2022-01-04 Thread Arie Bovenberg
Arie Bovenberg added the comment: @kj I would very much like to! Seems like a good place to start contributing :) -- ___ Python tracker ___ ___

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: So is it too late to change this? This went out with 3.10, Serhiy has argued it's a bugfix. -- ___ Python tracker ___

[issue46257] Convert statistics sum of squares to a single pass algorithm

2022-01-04 Thread Raymond Hettinger
New submission from Raymond Hettinger : The existing code makes two passes, one to compute the mean and another to compute the sum of squared differences from the mean. A consequence of making two passes is that iterator inputs must be converted to a list before processing. This throws away

[issue46257] Convert statistics sum of squares to a single pass algorithm

2022-01-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +28611 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30403 ___ Python tracker __

[issue46258] Minor algorithmic improvements for math.isqrt

2022-01-04 Thread Mark Dickinson
New submission from Mark Dickinson : There are a couple of minor algorithmic improvements possible for the math.isqrt fast path (which is used for nonnegative integers smaller than 2**64). On my machine those improvements produce a little over a 10% speedup. The current algorithm for values u

[issue46258] Minor algorithmic improvements for math.isqrt

2022-01-04 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +28612 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/30333 ___ Python tracker

[issue41011] [venv] record which executable and command were used to create a virtual environment

2022-01-04 Thread Éric Araujo
Change by Éric Araujo : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Alex Waygood
Alex Waygood added the comment: `isinstance(list[int], type)` returns `True` in 3.9 as well, so the behaviour has been around for a while. (Not a comment on whether the change is worth making, just a note.) -- ___ Python tracker

[issue45609] Specialize STORE_SUBSCR

2022-01-04 Thread Mark Shannon
Mark Shannon added the comment: New changeset 7537f6008704b20e2d04a7ef1c0cfa34121cc5eb by Dennis Sweeney in branch 'main': bpo-45609: More specialization stats for STORE_SUBSCR (GH-30193) https://github.com/python/cpython/commit/7537f6008704b20e2d04a7ef1c0cfa34121cc5eb -- _

[issue46259] float formatting error?

2022-01-04 Thread John Holman
New submission from John Holman : Example: str(1.12345678901234) Out[24]: '1.123456789011' shouldn't the last digit should be 2? -- messages: 409696 nosy: johngholman priority: normal severity: normal status: open title: float formatting error? type: behavior versions: Python

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, so it is probably here to stay. We could justify it (after the fact :-) by saying that you can instantiate list[int], but not Any. Are there exceptions to that? (I.e. are there other annotation types that have isinstance(X, type) return False but can

[issue46259] float formatting error?

2022-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: The two numbers you gave become the same when rounded to the limited internal precision used by floats. >>> 1.12345678901234 == 1.123456789011 True When it comes to displaying the number, Python tries to show the shortest possible member of the e

[issue46259] float formatting error?

2022-01-04 Thread John Holman
John Holman added the comment: Thanks - sorry to waste your time. On Tue, 4 Jan 2022 at 18:17, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > The two numbers you gave become the same when rounded to the limited > internal precision used by floats. > > >>> 1.123456

[issue17951] TypeError during gdb backtracing

2022-01-04 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> python-gdb.py fails with TypeError("'FakeRepr' object is not subscriptable") is gdb fails to read debug symbols ___ Python tr

[issue46009] sending non-None values makes generator raise StopIteration on next access

2022-01-04 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset 31e43cbe5f01cdd5b5ab330ec3040920e8b61a91 by Brandt Bucher in branch 'main': bpo-46009: Remove GEN_START (GH-30367) https://github.com/python/cpython/commit/31e43cbe5f01cdd5b5ab330ec3040920e8b61a91 -- ___

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My plan was to fix as much bugs in the stdlib and backport workaround to 3.9 and 3.10, then propose to revert this "feature" in 3.11. There is a risk of introducing some regressions by this change, but we can handle it. I think it is better to do it now an

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Alex Waygood
Alex Waygood added the comment: Yes, there are a few exceptions to that :( ``` >>> from typing import Annotated >>> x = Annotated[int, "idk some int"] >>> x() 0 >>> isinstance(x, type) False >>> >>> from re import Pattern >>> y = Pattern[str] >>> y() Traceback (most recent call last): File "

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Alex Waygood
Alex Waygood added the comment: I agree with Serhiy. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue46248] Compilation errors on macOS

2022-01-04 Thread Sandip Shah
Sandip Shah added the comment: Hi, Like I mentioned in the ticket, I am trying to compile libplist, libimobiledevice , and libimobiledevice-glue-1.0 on my mac. These are needed to do any development on a mobile device (specifically for testing / automation). I use Python for a lot of develop

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: I'm still wondering why speed.python.org showed such a slowdown, and how we can revert that. Here's a new theory. Thanks to an investigation I did together with Eric, I now suspect that the release of setuptools 60.0.0 on Dec 19 is a smoking gun. PyPerform

[issue46249] [sqlite3] move set lastrowid out of the query loop

2022-01-04 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > If possible, it's usually better to have the .executemany() create a > cursor with an output array providing the row ids, e.g. using "INSERT ... > RETURNING ..." (PostgreSQL). That way you can access all row ids and > can also provide the needed detail in

[issue46249] [sqlite3] move set lastrowid out of the query loop

2022-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.01.2022 21:02, Erlend E. Aasland wrote: > > Erlend E. Aasland added the comment: > >> If possible, it's usually better to have the .executemany() create a >> cursor with an output array providing the row ids, e.g. using "INSERT ... >> RETURNING ...

[issue46249] [sqlite3] move set lastrowid out of the query loop

2022-01-04 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: True that :) I'll close GH-30371 and prepare GH-30380 for review. I'll request your review if you don't mind. -- ___ Python tracker ___ _

[issue46249] [sqlite3] move set lastrowid out of the query loop and enable it for executemany()

2022-01-04 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- title: [sqlite3] move set lastrowid out of the query loop -> [sqlite3] move set lastrowid out of the query loop and enable it for executemany() ___ Python tracker ___

[issue46260] Misleading SyntaxError on f-string

2022-01-04 Thread Matt Delengowski
New submission from Matt Delengowski : Example code ``` foo = 1 f"blank (open paren {foo )" ``` Error report File "", line 1 f"blank (open paren {foo )" ^ SyntaxError: f-string: unmatched ')' The problem is due to unmatched '}' however. -- compo

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: More data. On my Mac, with SETUPTOOLS_USE_DISTUTILS=stdlib, using -X importtime I see the following extra modules being imported: import time: 278 |278 | types import time: 112 |112 | _operator import time:

[issue46260] Misleading SyntaxError on f-string

2022-01-04 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: I now agree with Serhiy's plan. We should execute ASAP so people get a chance to try this in the next alpha release. We will still allow instantiating e.g. list[int], right? -- ___ Python tracker

[issue46249] [sqlite3] move set lastrowid out of the query loop and enable it for executemany()

2022-01-04 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: There are some inaccuracies in the docs I need to fix first, since those changes must be backported, and I want the updated docs applied upon the corrected docs; I'll open a separate issue/PR for that. -- ___ P

[issue46261] [doc] fix inaccuracies in sqlite3.Cursor.lastrowid docs

2022-01-04 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : The sqlite3 docs say that lastrowid is set to None after executemany(), or after execute()'ing statements that are not INSERTs or REPLACEs. This is not true; in those cases, lastrowid is preserved. lastrowid is only None in a pristine cursor. Suggesting

[issue46261] [doc] fix inaccuracies in sqlite3.Cursor.lastrowid docs

2022-01-04 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Oh, and the docs says that lastrowid "provides the rowid of the last modified row". This is not true; it provides the row id of the last _inserted_ row. -- ___ Python tracker

[issue46261] [doc] fix inaccuracies in sqlite3.Cursor.lastrowid docs

2022-01-04 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I also suggest to add a note about tables without rowids, quoting the SQLite docs: Inserts into WITHOUT ROWID tables are not recorded. -- ___ Python tracker ___

[issue46261] [doc] fix inaccuracies in sqlite3.Cursor.lastrowid docs

2022-01-04 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +28613 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30407 ___ Python tracker __

[issue46261] [doc] fix inaccuracies in sqlite3.Cursor.lastrowid docs

2022-01-04 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FYI: https://sqlite.org/c3ref/last_insert_rowid.html -- ___ Python tracker ___ ___ Python-bugs

[issue31188] Makefile.pre.in: commoninstall: reformat

2022-01-04 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7 ___ Python tracker ___ __

  1   2   >