[issue43901] Lazy-create an empty annotations dict in all unannotated user classes and modules

2021-04-25 Thread Larry Hastings
Change by Larry Hastings : -- keywords: +patch pull_requests: +24322 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25623 ___ Python tracker

[issue43940] int casting to float results to a different value in memory

2021-04-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: I believe that this may be the same issue as this thread https://mail.python.org/archives/list/python-...@python.org/thread/35NECLGFIVAHWTIPAYDBJOJJX3FSY233/ in particular this comment:

[issue43940] int casting to float results to a different value in memory

2021-04-25 Thread Huang Yang
Huang Yang added the comment: Also reproducible by: from ctypes import * i = int('7f94e57c', 16) cp = pointer(c_int(i)) fp = cast(cp, POINTER(c_float)) print(fp.contents.value) # nan p = pointer(c_float(fp.contents.value)) ip = cast(p, POINTER(c_int)) print(hex(ip.contents.value))

[issue43941] Unit test failure in test_gdb only with -O0

2021-04-25 Thread Larry Hastings
New submission from Larry Hastings : Recent Python source trees fail a regression test in test_gdb. Oddly, the behavior only appears up when optimization is turned off. To reproduce: % git clone cpython buildtrunk % cd buildtrunk % ./configure % vi Makefile # change "-O3" to "-O0" !! %

[issue43940] int casting to float results to a different value in memory

2021-04-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +mark.dickinson, rhettinger, tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23975] numbers.Rational implements __float__ incorrectly

2021-04-25 Thread Sergey B Kirpichev
Change by Sergey B Kirpichev : -- pull_requests: +24321 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25619 ___ Python tracker ___

[issue43940] int casting to float results to a different value in memory

2021-04-25 Thread Huang Yang
Huang Yang added the comment: It's reproducible only if the float is nan, with prefix 7f or ff. Seems the value is OR operated by 0x0040. -- ___ Python tracker ___

[issue43940] int casting to float results to a different value in memory

2021-04-25 Thread Huang Yang
New submission from Huang Yang : from ctypes import * import struct i = int('7f94e57c', 16) cp = pointer(c_int(i)) fp = cast(cp, POINTER(c_float)) print(fp.contents.value) # nan print(struct.pack(">f", fp.contents.value).hex()) # 7fd4e57c # value changed: 7f94e57c -> 7fd4e57c --

[issue43936] os.path.realpath() normalizes paths before resolving links on Windows

2021-04-25 Thread Eryk Sun
Eryk Sun added the comment: > os.path.realpath() normalizes paths before resolving links > on Windows Normalizing the input path is required in order to be consistent with the Windows file API. OTOH, the target path of a relative symlink gets resolved in a POSIX-ly correct manner in the

[issue43939] Deadlock in logging

2021-04-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: A few thoughts: * We normally say "all bets are off" when it comes to manipulating Python internals with ctypes. This issue is just one of many ways to wreak havoc. * The programming pattern of killing running threads at arbitrary points in their

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset b47f05157bd05c5825c26389af5be3064a2c1313 by Miss Islington (bot) in branch '3.9': bpo-43534: Fix the turtle module working with multiple root windows GH-25593 https://github.com/python/cpython/commit/b47f05157bd05c5825c26389af5be3064a2c1313

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 9ca20fdc4c27e31832adbd6d393a87e7d8953e3c by Miss Islington (bot) in branch '3.8': bpo-43534: Fix the turtle module working with multiple root windows GH-25594 https://github.com/python/cpython/commit/9ca20fdc4c27e31832adbd6d393a87e7d8953e3c

[issue11100] test_fdopen: close failed in file object destructor

2021-04-25 Thread Irit Katriel
Irit Katriel added the comment: Closing since python 2.7 is no longer maintained. Please create a new issue if this is still an issue in 3.8+ -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python

[issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible)

2021-04-25 Thread Irit Katriel
Irit Katriel added the comment: There has been no progress on PR12607. I think we should at least deprecate Py_TRASHCAN_SAFE_BEGIN/END in 3.10 and tell people to use Py_TRASHCAN_BEGIN/END instead. -- ___ Python tracker

[issue43939] Deadlock in logging

2021-04-25 Thread DaRoee
Change by DaRoee : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43532] Add keyword-only fields to dataclasses

2021-04-25 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: +24320 pull_request: https://github.com/python/cpython/pull/25608 ___ Python tracker ___

[issue43938] Document that dataclasses.FrozenInstanceError derives from AttributeError

2021-04-25 Thread Llandy Riveron Del Risco
Change by Llandy Riveron Del Risco : -- keywords: +patch nosy: +llandy3d nosy_count: 2.0 -> 3.0 pull_requests: +24319 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25603 ___ Python tracker

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-25 Thread miss-islington
miss-islington added the comment: New changeset f84f1b5c638eeb6e13c287fe5ebf3a7d2fdb60e9 by Saiyang Gou in branch 'master': bpo-38605: Update __future__ module doc as `annotations` is now "mandatory in 3.11" (GH-25602)

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-25 Thread Saiyang Gou
Change by Saiyang Gou : -- pull_requests: +24318 pull_request: https://github.com/python/cpython/pull/25602 ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-25 Thread Guido van Rossum
Guido van Rossum added the comment: Let's post the list here and post a brief mention of this issue on python-dev. -- ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-25 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thanks for the background info, Guido! I'll prepare a list. Should we continue the discussion on Discourse or python-dev? -- ___ Python tracker

[issue43908] array.array should remain immutable

2021-04-25 Thread Guido van Rossum
Guido van Rossum added the comment: My main concern is that types that were immutable in previous Python versions shouldn't become mutable as a surprise side effect of making them heap types. I don't know which types have become mutable this way though. My other concern is that the language

[issue29732] Heap out of bounds read in tok_nextc()

2021-04-25 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: -> resolved status: pending -> closed ___ Python tracker ___ ___

[issue31055] All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source"

2021-04-25 Thread Irit Katriel
Irit Katriel added the comment: Another option is to just add a link to https://devguide.python.org/docquality/ -- nosy: +iritkatriel versions: +Python 3.11 -Python 2.7 ___ Python tracker

[issue27420] Docs for os.link - say what happens if link already exists

2021-04-25 Thread Irit Katriel
Irit Katriel added the comment: There is a general note at the top of the module: "Note: All functions in this module raise OSError (or subclasses thereof) in the case of invalid or inaccessible file names and paths, or other arguments that have the correct type, but are not accepted by the

[issue26810] inconsistent garbage collector behavior across platforms when using ctypes data-structures

2021-04-25 Thread Irit Katriel
Irit Katriel added the comment: I don't think GC is even guaranteed to do exactly the same thing in two different runs on the same platform. If objects are hashed by id (memory address) and then traversed then couldn't the order in which unrelated objects are deleted be non-deterministic?

[issue32822] finally block doesn't re-raise exception if return statement exists inside

2021-04-25 Thread robertohueso
Change by robertohueso : -- keywords: +patch nosy: +robertohueso nosy_count: 4.0 -> 5.0 pull_requests: +24317 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25600 ___ Python tracker

[issue43939] Deadlock in logging

2021-04-25 Thread DaRoee
New submission from DaRoee : I've recently encountered a weird bug. To make a long story short, I’ve been using an external package to make sure my threads stop working in time, and appearently it’s been using ctypes.pythonapi.PyThreadState_SetAsyncExc. There is a slight chance, that this code

[issue43938] Document that dataclasses.FrozenInstanceError derives from AttributeError

2021-04-25 Thread Eric V. Smith
New submission from Eric V. Smith : This is a newcomer friendly issue. The documentation just needs a sentence that FrozenInstanceError is derived from AttributeError. -- assignee: docs@python components: Documentation keywords: easy, newcomer friendly messages: 391861 nosy:

[issue24026] Python hangs forever in wait() of threading.py

2021-04-25 Thread Irit Katriel
Irit Katriel added the comment: Python 2.7 is no longer maintained. If this is still a problem in python 3.8+, and you manage to produce a repro script, please open a new issue for it. -- nosy: +iritkatriel resolution: -> third party stage: -> resolved status: open -> closed

[issue35676] unittest assert helper methods have incorrect signature in docs

2021-04-25 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.7, Python 3.8 ___ Python tracker ___

[issue8579] Add missing tests for FlushKey, LoadKey, and SaveKey in winreg

2021-04-25 Thread Irit Katriel
Change by Irit Katriel : -- components: +Tests nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4 ___ Python tracker

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-25 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: +Anthony Sottile nosy_count: 14.0 -> 15.0 pull_requests: +24316 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/25596 ___ Python tracker

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-25 Thread Senthil Kumaran
Senthil Kumaran added the comment: I have added a PR to remove ascii newlines and tabs from URL input. It is as per the WHATWG spec. However, I still like to research more and find out if this isn't introducing behavior that will break existing systems. It should also be aligned the

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-25 Thread Senthil Kumaran
Change by Senthil Kumaran : -- keywords: +patch pull_requests: +24315 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25595 ___ Python tracker

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +24314 pull_request: https://github.com/python/cpython/pull/25594 ___ Python tracker ___

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +24313 pull_request: https://github.com/python/cpython/pull/25593 ___ Python tracker ___

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8af929fc76f21fb123f6a47cb3ebcf4e5b758dea by Serhiy Storchaka in branch 'master': bpo-43534: Fix the turtle module working with multiple root windows (GH-25591) https://github.com/python/cpython/commit/8af929fc76f21fb123f6a47cb3ebcf4e5b758dea

[issue38490] statistics: add covariance, Pearson's correlation, and simple linear regression

2021-04-25 Thread Tal Einat
Tal Einat added the comment: Thanks for the suggestion, PR, and great heaps of patience and perseverance, Tymek! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue38490] statistics: add covariance, Pearson's correlation, and simple linear regression

2021-04-25 Thread Tal Einat
Tal Einat added the comment: New changeset 09aa6f914dc313875ff18474770a0a7c13ea8dea by Tymoteusz Wołodźko in branch 'master': bpo-38490: statistics: Add covariance, Pearson's correlation, and simple linear regression (#16813)

[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6077efa2b2be17e736d061fe74f933dc616c64b2 by Miss Islington (bot) in branch '3.8': [3.9] bpo-43655: Tkinter and IDLE dialog windows are now recognized as dialogs by window managers on macOS and X Window (GH-25187). (GH-25588) (GH-25592)

[issue43914] Highlight invalid ranges in SyntaxErrors

2021-04-25 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-25 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +24312 pull_request: https://github.com/python/cpython/pull/25592 ___ Python tracker

[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9a165399aec930f27639dd173426ccc33586662b by Serhiy Storchaka in branch '3.9': [3.9] bpo-43655: Tkinter and IDLE dialog windows are now recognized as dialogs by window managers on macOS and X Window (GH-25187). (GH-25588)

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -24310 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43937] Turtle uses the default root window

2021-04-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +24311 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25591 ___ Python tracker

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread miss-islington
miss-islington added the comment: New changeset c70f268523cb3213693710e14c0fcae81fd3fa7a by Miss Islington (bot) in branch '3.8': bpo-43534: Make dialogs in turtle.textinput() and turtle.numinput() transitient again (GH-24923)

[issue43664] Compiling long expression leads to segfault (again)

2021-04-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Eval with too high string multiplication crashes newer Python versions ___ Python tracker

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread miss-islington
miss-islington added the comment: New changeset 7248ce30bb84f2d5af855a867cc4e3cc40a07fb5 by Miss Islington (bot) in branch '3.9': bpo-43534: Make dialogs in turtle.textinput() and turtle.numinput() transitient again (GH-24923)

[issue39529] Deprecate get_event_loop()

2021-04-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.10 ___ Python tracker

[issue39529] Deprecate get_event_loop()

2021-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 172c0f2752d8708b6dda7b42e6c5a3519420a4e8 by Serhiy Storchaka in branch 'master': bpo-39529: Deprecate creating new event loop in asyncio.get_event_loop() (GH-23554)

[issue42609] Eval with too high string multiplication crashes newer Python versions

2021-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset face87c94e67ad9c72b9a3724f112fd76c1002b9 by Serhiy Storchaka in branch 'master': bpo-42609: Check recursion depth in the AST validator and optimizer (GH-23744) https://github.com/python/cpython/commit/face87c94e67ad9c72b9a3724f112fd76c1002b9

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +24310 pull_request: https://github.com/python/cpython/pull/25591 ___ Python tracker ___

[issue43937] Turtle uses the default root window

2021-04-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Some of methods in the turtle module implicitly use the default root window: call global mainloop() and create PhotoImage without specifying the master window. It can cause a problem if multiple root windows are used. -- components: Library

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b5adc8a7e5c13d175b4d3e53b37bc61de35b1457 by Serhiy Storchaka in branch 'master': bpo-43534: Make dialogs in turtle.textinput() and turtle.numinput() transitient again (GH-24923)

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +24309 pull_request: https://github.com/python/cpython/pull/25590 ___ Python tracker ___

[issue43534] turtle.textinput window is not transient

2021-04-25 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +24308 pull_request: https://github.com/python/cpython/pull/25589 ___ Python tracker

[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +24307 pull_request: https://github.com/python/cpython/pull/25588 ___ Python tracker ___

[issue43655] Tkinter: make X window & macOS recognize dialogs as such

2021-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3bb3fb3be09d472a43cdc3d9d9578bd49f3dfb8c by Serhiy Storchaka in branch 'master': bpo-43655: Tkinter and IDLE dialog windows are now recognized as dialogs by window managers on macOS and X Window (#25187)

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-04-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +24306 pull_request: https://github.com/python/cpython/pull/25587 ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-25 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: The more I read about these issues, the more I feel reluctant to apply PR 25520. Why change the behaviour/traits of heap types without a proper discussion (or PEP)? Applying this PR feels like an arbitrary change. All the related issues and mailing

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: PR against the main repo is now up: https://github.com/python/cpython/pull/25585 A couple of things in the unparser tripped me up (ast_unparse.c only handles annotation expressions, the way ast._Unparser.visit() is defined means NodeVisitor.generic_visit

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +24305 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25585 ___ Python tracker ___

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: Working on the unparser picked up an inconsistency I had previously missed: aside from named expressions, "target" attributes in the AST are generally full expression subnodes, rather than identifier attributes. Identifier attributes on nodes are typically

[issue11354] argparse: nargs could accept range of options count

2021-04-25 Thread paul j3
paul j3 added the comment: Post parsing testing for the correct number of strings is the easy part. It's the auto-generate usage that's harder to do right, especially if we wanted to enable the metavar tuple option. Clean usage for '+' is messy enough. --

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: Interesting idea - I had missed that you were suggested "identifier*" for the cls node. It's simple enough to check for Name-or-Attribute in the AST validator though, and sticking with a standard expr_ty node means getting a lot of standard handling in the

[issue43876] argparse documentation contrasting nargs '*' vs. '+' is misleading

2021-04-25 Thread paul j3
paul j3 added the comment: Let's see if I can clarify somethings. But first, I should say that I've worked with this code for so long, that I may miss things that could confuse a beginner. A basic distinction is between "optionals" and "positionals". I put those in quotes because that's

[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-04-25 Thread Ma Lin
Ma Lin added the comment: > The defines of BOB_BUFFER_TYPE/BOB_SIZE_TYPE/BOB_SIZE_MAX are ugly. If put > the core code together, these defines can be put in a thin wrapper in > _bz2module.c/_lzmamodule.c/zlibmodule.c files. I tried, it looks well. I will updated the PR within one or two