[issue44681] time.sleep(0.001) not working properly

2021-07-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: Jack, Thereisfood is using Windows, which I understand has a clock with millisecond accuracy. So a sleep of a millisecond should, I think, work on Windows even if it doesn't work on Linux. Could a Windows expert clarify please? -- nosy: +steven.da

[issue44340] Add support for building cpython with clang thin lto

2021-07-19 Thread Dong-hee Na
Dong-hee Na added the comment: @ned.deily Can we use the thin-lto option for next macOS Python distribution? In my local environment, it passes all tests :) https://github.com/python/cpython/blob/366fcbac18e3adc41e3901580dbedb6a91e41a10/Mac/BuildScript/build-installer.py#L1199 FYI, Gentoo al

[issue44549] BZip 1.0.6 Critical Vulnerability

2021-07-19 Thread Dong-hee Na
Dong-hee Na added the comment: > current macOS python.org installers dynamically link to the system-provided > copies of Bzip2 Okay, so this issue looks out of scope to the CPython team if the Windows distribution follows the same policy. @steve.dowe Can you check about this issue? --

[issue44549] BZip 1.0.6 Critical Vulnerability

2021-07-19 Thread Ned Deily
Ned Deily added the comment: > Is it possible to update bz2 to 1.0.8 on macOS distribution? Thanks for looking into this. As I commented on PR 27241, this change is not needed because current macOS python.org installers dynamically link to the system-provided copies of Bzip2; the code to bui

[issue44682] Pdb commands allows to add commands to invalid breakpoint

2021-07-19 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch pull_requests: +25799 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27252 ___ Python tracker ___ _

[issue44682] Pdb commands allows to add commands to invalid breakpoint

2021-07-19 Thread Andrei Kulakov
New submission from Andrei Kulakov : breakpoint 5 does not exist: (Pdb) commands 5 (com) p x (com) (com) end -- components: Library (Lib) messages: 397852 nosy: andrei.avk priority: normal severity: normal status: open title: Pdb commands allows to add commands to invalid breakpoint ve

[issue44681] time.sleep(0.001) not working properly

2021-07-19 Thread Thereisfood
Change by Thereisfood : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue44681] time.sleep(0.001) not working properly

2021-07-19 Thread Jack DeVries
Jack DeVries added the comment: This is not a bug. See the docs: The precision of the various real-time functions may be less than suggested by the units in which their value or argument is expressed. E.g. on most Unix systems, the clock “ticks” only 50 or 100 times a second. On the other ha

[issue44681] time.sleep(0.001) not working properly

2021-07-19 Thread Thereisfood
Change by Thereisfood : Added file: https://bugs.python.org/file50162/Capture.PNG ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue44681] time.sleep(0.001) not working properly

2021-07-19 Thread Thereisfood
Change by Thereisfood : Removed file: https://bugs.python.org/file50161/Capture.PNG ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44681] time.sleep(0.001) not working properly

2021-07-19 Thread Thereisfood
New submission from Thereisfood : time.sleep(0.001) sleeps for 0.014 - 0.016 instead of 0.001. -- components: Windows files: Capture.PNG messages: 397850 nosy: paul.moore, steve.dower, therenoisfood, tim.golden, zach.ware priority: normal severity: normal status: open title: time.sleep(

[issue44353] PEP 604 NewType

2021-07-19 Thread Ken Jin
Ken Jin added the comment: > Does that work if you try to union two NewTypes? Oh woops I was too eager in closing this issue -- it doesn't work. Sorry, please disregard my previous message. I'm reopening this. Thanks for the reminder Jelle. -- resolution: out of date -> status: clo

[issue44353] PEP 604 NewType

2021-07-19 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Does that work if you try to union two NewTypes? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue44353] PEP 604 NewType

2021-07-19 Thread Ken Jin
Ken Jin added the comment: This issue is now out of date on. After Serhiy's refactoring, any function types can be unioned. >>> NewType('x', int) >>> int | NewType('x', int) int | typing.NewType..new_type The only problem now is that the repr is weird, but Serhiy also has a fix for that in

[issue44621] Python 3.9 traces async for/else incorrectly

2021-07-19 Thread Ned Batchelder
Ned Batchelder added the comment: @lukasz.langa, I guess this 3.9 tracing bug should also be closed as wont-fix? -- ___ Python tracker ___

[issue44680] Reference cycles from a WeakKeyDictionary value to its key aren’t collected

2021-07-19 Thread Anders Kaseorg
Anders Kaseorg added the comment: > extra_states[o] = ExtraState(obj) (Typo for extra_states[obj] = ExtraState(obj), obviously.) -- ___ Python tracker ___ ___

[issue43950] Include column offsets for bytecode instructions

2021-07-19 Thread Ammar Askar
Ammar Askar added the comment: I think this is the previous issue you are talking about Terry. https://bugs.python.org/issue24665 The correct algorithm is a little more complex than just using east_asian_widths. Ideally we would like to use the wcwidth function (https://man7.org/linux/man-p

[issue44678] Seperate error message for discontinuous padding in binascii.a2b_base64 strict mode

2021-07-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 366fcbac18e3adc41e3901580dbedb6a91e41a10 by Idan Moral in branch 'main': bpo-44678: Separate error message for discontinuous padding in binascii.a2b_base64 strict mode (GH-27249) https://github.com/python/cpython/commit/366fcbac18e3adc41e3901

[issue44353] PEP 604 NewType

2021-07-19 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, 20% isn't so bad, but one of the arguments for NewType was that it "disappears" at runtime -- which the current version does, but the class-based version doesn't quite. Right now I don't have the cycles to think about this deeply. Maybe a few weeks af

[issue44680] Reference cycles from a WeakKeyDictionary value to its key aren’t collected

2021-07-19 Thread Anders Kaseorg
New submission from Anders Kaseorg : Because WeakKeyDictionary unconditionally maintains strong references to its values, the garbage collector fails to collect a reference cycle from a WeakKeyDictionary value to its key. For example, the following program unexpectedly leaks memory: from wea

[issue44554] pdb.main is unnecessarily complicated

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

[issue44353] PEP 604 NewType

2021-07-19 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This is what I got last year (copied from the typing issues): In [83]: from typing import NewType In [84]: nt = NewType("nt", int) In [85]: class NewTypeClass: ...: def __init__(self, name, supertype): ...: self.name = name ...:

[issue44679] unittest.mock.sentinel documentation typo

2021-07-19 Thread Andrii Haidai
New submission from Andrii Haidai : here: https://docs.python.org/3.3/library/unittest.mock.html#sentinel in code example block in last command line >>> sentinel.some_object according to the above 26.4.5.1 article context it looks like the other commad is expected: >>> result To en

[issue44353] PEP 604 NewType

2021-07-19 Thread Guido van Rossum
Guido van Rossum added the comment: Jelle, can you post more details about your benchmark? -- ___ Python tracker ___ ___ Python-bug

[issue43950] Include column offsets for bytecode instructions

2021-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: The effort to match caret lines to general unicode is similar to a previous issue that was closed as futile. (But I could not find it.) It has a downside that should be considered. The fundamental problem is that there is no fixed pitch font for unicode. (L

[issue31162] urllib.request.urlopen CERTIFICATE_VERIFY_FAILED error

2021-07-19 Thread Jacob Walls
Jacob Walls added the comment: Third voice chiming in to say not a bug, also. I think the last two messages inadvertently moved to pending and then back to open. I suggest closing. -- nosy: +jacobtylerwalls ___ Python tracker

[issue44353] PEP 604 NewType

2021-07-19 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: I opened PR with refactored `typing.NewType` into callable class. Also I have added `__module__` attr to typing.NewType so it will become pickable. -- ___ Python tracker

[issue44353] PEP 604 NewType

2021-07-19 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch pull_requests: +25798 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27250 ___ Python tracker

[issue44353] PEP 604 NewType

2021-07-19 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: > Using `from __future__ import annotations` it should work Not in type aliases or generic bases. (And if Larry's co_annotations PEP is accepted, it would break in normal annotations too.) I'd prefer to get rid of this sort of subtle difference where the obv

[issue44678] Seperate error message for discontinuous padding in binascii.a2b_base64 strict mode

2021-07-19 Thread Idan Moral
Change by Idan Moral : -- keywords: +patch pull_requests: +25797 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27249 ___ Python tracker ___ _

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-07-19 Thread Filipe Laíns
Filipe Laíns added the comment: https://twitter.com/geofft/status/1417167982665551877 -- nosy: +FFY00 resolution: fixed -> status: closed -> open ___ Python tracker ___ __

[issue43086] Excess data in not handled properly in binascii.a2b_base64()

2021-07-19 Thread Idan Moral
Change by Idan Moral : -- pull_requests: +25796 pull_request: https://github.com/python/cpython/pull/27249 ___ Python tracker ___ __

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-07-19 Thread Geoffrey Thomas
Geoffrey Thomas added the comment: Christian mentioned on Twitter that this is probably due to a missing argument clinic change from "int" to "Py_ssize_t". I can confirm that fixing that and rerunning argument clinic makes things start to work. I don't have the ability to reopen this bug (I

[issue44678] Seperate error message for discontinuous padding in binascii.a2b_base64 strict mode

2021-07-19 Thread Idan Moral
Change by Idan Moral : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue44678] Seperate error message for discontinuous padding in binascii.a2b_base64 strict mode

2021-07-19 Thread Idan Moral
New submission from Idan Moral : This is a follow-up PR to #24402. It should address @gpshead's last comment on the subject: https://github.com/python/cpython/pull/24402#issuecomment-882699002 Original issue: https://bugs.python.org/issue43086 Original PR: https://github.com/python/cpython/pul

[issue44672] Final "pass" is traced incorrectly in 3.9 (and before)

2021-07-19 Thread Ned Batchelder
Ned Batchelder added the comment: This is the right call. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue43950] Include column offsets for bytecode instructions

2021-07-19 Thread Ammar Askar
Ammar Askar added the comment: Had some time to look into this. Just to summarize this problem, it deals with unicode points that are single characters but take up more than the width of a single character, even with a monospace font [1]. In the examples from above, the Chinese character itse

[issue44653] Parameter substitution in the union type does not work with typing.Union

2021-07-19 Thread Guido van Rossum
Guido van Rossum added the comment: I need someone else to own this, sorry. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44653] Parameter substitution in the union type does not work with typing.Union

2021-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is also problem with other typing types: >>> (int | T)[typing.List] Traceback (most recent call last): File "", line 1, in TypeError: Each union argument must be a type, got typing.List >>> (int | T)[typing.List[int]] Traceback (most recent call las

[issue44353] PEP 604 NewType

2021-07-19 Thread Guido van Rossum
Guido van Rossum added the comment: Do we have to solve it? Using `from __future__ import annotations` it should work, at least when used as an annotation. Or is that too inconvenient or inconsistent? -- ___ Python tracker

[issue44353] PEP 604 NewType

2021-07-19 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: @Ken thanks for pointing this out. The only solution which I see is to convert NewType into callable class but it will lead to performance degradation. @Ken what do you think about that? -- _

[issue44524] __name__ attribute in typing module

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c895f2bc4f270efce30fe3687ce85095418175f4 by Miss Islington (bot) in branch '3.10': bpo-44524: Add missed __name__ and __qualname__ to typing module objects (GH-27237) (#27246) https://github.com/python/cpython/commit/c895f2bc4f270efce30fe3687ce850

[issue44668] More differences in instance and subclass checks between typing.Union and types.Union

2021-07-19 Thread Guido van Rossum
Guido van Rossum added the comment: Sure. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-07-19 Thread Geoffrey Thomas
Geoffrey Thomas added the comment: I am still seeing failures to read responses over 2 GB in Python 3.10b1. I'm working on a reproducer, but I'm getting the same "OverflowError: signed integer is greater than maximum" that I get in 3.9. -- nosy: +geofft _

[issue44653] Parameter substitution in the union type does not work with typing.Union

2021-07-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +25795 pull_request: https://github.com/python/cpython/pull/27247 ___ Python tracker ___

[issue44677] CSV sniffing falsely detects space as a delimiter

2021-07-19 Thread Piotr Tokarski
New submission from Piotr Tokarski : Let's consider the following CSV content: "a|b\nc| 'd\ne|' f". The real delimiter in this case is '|' character while ' ' is sniffed. Find verbose example attached. Problem lays in csv.py file in the following code: ``` matches = [] for re

[issue27513] email.utils.getaddresses does not handle Header objects

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 9ee12cf325d4da2c07919e5e56545feb7e005e08 by Miss Islington (bot) in branch '3.9': bpo-27513: email.utils.getaddresses() now handles Header objects (GH-13797) (#27245) https://github.com/python/cpython/commit/9ee12cf325d4da2c07919e5e56545feb7e005e0

[issue44524] __name__ attribute in typing module

2021-07-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +25794 pull_request: https://github.com/python/cpython/pull/27246 ___ Python tracker _

[issue44524] __name__ attribute in typing module

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

[issue44524] __name__ attribute in typing module

2021-07-19 Thread Łukasz Langa
Change by Łukasz Langa : -- versions: +Python 3.10, Python 3.11 -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44524] __name__ attribute in typing module

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset bce1418541a64a793960182772f985f64afbfa1a by Yurii Karabas in branch 'main': bpo-44524: Add missed __name__ and __qualname__ to typing module objects (#27237) https://github.com/python/cpython/commit/bce1418541a64a793960182772f985f64afbfa1a -

[issue44672] Final "pass" is traced incorrectly in 3.9 (and before)

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for reporting, Ned. I agree with Mark though. We've done 7 releases of Python 3.9 already. The later in the release cycle for a given Python version, the less it's clear if it's "worth" performing complex fixes. Most importantly because introducing a lar

[issue44662] Add ability to annotate types.Union

2021-07-19 Thread Ken Jin
Ken Jin added the comment: Nosied over people from issue44490. This issue addresses msg396895: Thanks to Ruben for the catch. (message copied over): ``` It also lacks the __module__ attribute, causing it to be unusable in PEP 593 typing.Annotated types: from typing import Annotated x: Annota

[issue27513] email.utils.getaddresses does not handle Header objects

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

[issue44676] Add ability to serialise types.Union

2021-07-19 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch pull_requests: +25792 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27244 ___ Python tracker

[issue27513] email.utils.getaddresses does not handle Header objects

2021-07-19 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker _

[issue27513] email.utils.getaddresses does not handle Header objects

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 8c43bf1a923754fa6d97772151c6ac23c48759d3 by Miss Islington (bot) in branch '3.10': bpo-27513: email.utils.getaddresses() now handles Header objects (GH-13797) (GH-27242) https://github.com/python/cpython/commit/8c43bf1a923754fa6d97772151c6ac23c487

[issue44676] Add ability to serialise types.Union

2021-07-19 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue44662] Add ability to annotate types.Union

2021-07-19 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- title: Add ability to serialise and annotate types.Union -> Add ability to annotate types.Union ___ Python tracker ___ _

[issue44676] Add ability to serialise types.Union

2021-07-19 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue44676] Add ability to serialise types.Union

2021-07-19 Thread Yurii Karabas
New submission from Yurii Karabas <1998uri...@gmail.com>: It was discussed at https://bugs.python.org/issue44490 -- messages: 397814 nosy: uriyyo priority: normal severity: normal status: open title: Add ability to serialise types.Union ___ Python tr

[issue44549] BZip 1.0.6 Critical Vulnerability

2021-07-19 Thread Dong-hee Na
Dong-hee Na added the comment: Hmm since I am not a distribution expert, I would like to follow other core devs opinions. Almost Linux distributions use bzip2 1.0.6 by default. -- ___ Python tracker __

[issue27513] email.utils.getaddresses does not handle Header objects

2021-07-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +25791 pull_request: https://github.com/python/cpython/pull/27242 ___ Python tracker _

[issue27513] email.utils.getaddresses does not handle Header objects

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 89f4c34797de2f0e5045da2b97c1c8cbbb42fbb2 by Zackery Spytz in branch 'main': bpo-27513: email.utils.getaddresses() now handles Header objects (#13797) https://github.com/python/cpython/commit/89f4c34797de2f0e5045da2b97c1c8cbbb42fbb2 -- nos

[issue44549] BZip 1.0.6 Critical Vulnerability

2021-07-19 Thread Dong-hee Na
Change by Dong-hee Na : -- components: +macOS nosy: +ronaldoussoren type: crash -> security ___ Python tracker ___ ___ Python-bugs-l

[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2021-07-19 Thread hai shi
Change by hai shi : -- pull_requests: +25789 pull_request: https://github.com/python/cpython/pull/27240 ___ Python tracker ___ ___ P

[issue44549] BZip 1.0.6 Critical Vulnerability

2021-07-19 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +25790 pull_request: https://github.com/python/cpython/pull/27241 ___ Python tracker ___ _

[issue44549] BZip 1.0.6 Critical Vulnerability

2021-07-19 Thread Dong-hee Na
Dong-hee Na added the comment: @ned.deily Is it possible to update bz2 to 1.0.8 on macOS distribution? I found the guide to update the library on Windows but for the macOS version, I can not find. -- nosy: +ned.deily ___ Python tracker

[issue44675] Cross-platform issues with private methods and multiprocessing

2021-07-19 Thread Jeremy
New submission from Jeremy : While writing a program using the multiprocessing library I stumbled upon what appears to be a bug with how different platforms deal with private methods. When a class has a private method which is the target for a multiprocessing process, this name is correctly r

[issue44549] BZip 1.0.6 Critical Vulnerability

2021-07-19 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +25788 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27239 ___ Python tracker ___

[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2021-07-19 Thread hai shi
hai shi added the comment: I use this add_printf_to_get_details_from_race_condition.patch to get some details of the running subinterpreter. The successful output of test_already_running: test_already_running (test.test__xxsubinterpreters.RunStringTests) ... In interp_create, the current sta

[issue44610] Format issue with strftime and %Y

2021-07-19 Thread Bartosz Kaznowski
Bartosz Kaznowski added the comment: Ok, thanks @iritkatriel. I have closed it as a duplicate. I did notice after posting this that in the cpython source code people work around this issue. Now I can see why. I guess I will just have to work around this issue too. Luckily it doesn't cause t

[issue44524] __name__ attribute in typing module

2021-07-19 Thread Guido van Rossum
Guido van Rossum added the comment: I see this as part of a trend to improve runtime introspection of complex type expressions. That seems to be going ahead regardless of whether we like it or not, so let's do this. -- ___ Python tracker

[issue43124] [security] smtplib multiple CRLF injection

2021-07-19 Thread R. David Murray
R. David Murray added the comment: My apologies, I did not think about the possibility of an English issue. I was reacting to the "security report speak", which I find often makes a security issue sound worse than it is :) Thank you for reporting this problem, and I do think we should fix

[issue41972] bytes.find consistently hangs in a particular scenario

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: Looks like this can be closed now, the original issue is fixed, the original patch is merged for 3.10, and the improved patch is merged for 3.11. Thanks! ✨ 🍰 ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue44524] __name__ attribute in typing module

2021-07-19 Thread Ken Jin
Ken Jin added the comment: Yurii has a working PR for __name__ in _BaseGenericAlias, but not for _SpecialForm yet. Guido and/or Lukasz, do y'all think we should support __name__ and __qualname__ for special forms too? Personally I don't see how it'd hurt and I'm +1 for this. -- ___

[issue44653] Parameter substitution in the union type does not work with typing.Union

2021-07-19 Thread Ken Jin
Ken Jin added the comment: @Serhiy, this doesn't just affect typing.Union, it seems that the rest of the typing types don't substitute: >>> (int | T)[typing.List[str]] Traceback (most recent call last): File "", line 1, in TypeError: Each union arg must be a type, got typing.List[str] We

[issue42238] Deprecate suspicious.py?

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset fbf10080bb369cfef1f230c2cd5135a558b242d5 by Julien Palard in branch 'main': bpo-42238: Fix small rst issue in NEWS.d/. (#27238) https://github.com/python/cpython/commit/fbf10080bb369cfef1f230c2cd5135a558b242d5 -- nosy: +lukasz.langa

[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-07-19 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset a2721649598eb715304a1ac8678a409585f73b27 by Ken Jin in branch '3.10': bpo-44490: Improve typing module compatibility with types.Union (GH-27048) (#27222) https://github.com/python/cpython/commit/a2721649598eb715304a1ac8678a409585f73b27

[issue44674] dataclasses should allow frozendict default value

2021-07-19 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that would be an improvement. -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-

[issue44674] dataclasses should allow frozendict default value

2021-07-19 Thread Gianni Mariani
New submission from Gianni Mariani : Using a frozendict as a default value should not cause an error in dataclasses. The check for mutability is: isinstance(f.default, (list, dict, set)) It appears frozendict has been changed to have a dict base class and it now raises an exception. Ther

[issue44672] Final "pass" is traced incorrectly in 3.9 (and before)

2021-07-19 Thread Mark Shannon
Mark Shannon added the comment: I say no, for a couple of reasons. 1. PEP 626 only applies to 3.10 onwards 2. The bytecode optimizer in 3.9 doesn't understand line numbers. Changing it would be a lot of effort and likely to introduce more bugs than it fixes. Ultimately it is Łukasz's decision

[issue44673] Embedded Python - local directories in pythonXX._pth

2021-07-19 Thread emve
New submission from emve : When I add mylib to python39._pth, Python treats it relatively to c:\Python3 (where my embedded python resides). >>> import sys >>> print('\n'.join(sys.path)) c:\python3\python39.zip c:\python3 c:\python3\lib c:\python3\mylib c:\python3\lib\site-packages >>> However,

[issue44624] Script name for venv PowerShell activate

2021-07-19 Thread Vinay Sajip
Vinay Sajip added the comment: In this case, there are two reasons IMO for not doing this: 1. Backward compatibility might be affected. 2. It may be more important to conform to venv conventions than Powershell conventions in this specific case. I wasn't aware that PowerShell scripts out in

[issue44524] __name__ attribute in typing module

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: > I think __module__ should be set to ‘typing’, and __qualname__ to > ‘typing.WhatEver’. PEP 3155 specifies that `__qualname__` does not include the module name: https://www.python.org/dev/peps/pep-3155/#excluding-the-module-name Rather, it's for nested classes

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2021-07-19 Thread Stefan Behnel
Stefan Behnel added the comment: The obvious work-around is to not use a default namespace. The result is just a visual difference, not a semantic one. If someone wants to continue with the existing PR, I'll try to free some time to review any improvements. -- versions: +Python 3.10

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2021-07-19 Thread Daan Luttik
Daan Luttik added the comment: Is there any workaround for this? this bug still seems to be present in python 3.9.6. -- nosy: +dtluttik versions: +Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue42238] Deprecate suspicious.py?

2021-07-19 Thread Julien Palard
Julien Palard added the comment: Another one \o/ Fix in: https://github.com/python/cpython/pull/27238 It is: :func:pdb.main Detected by make suspicious as: WARNING: [whatsnew/changelog:320] ":func" found in ": Refactor argument processing in :func:pdb.main to simplify" WARNING

[issue42238] Deprecate suspicious.py?

2021-07-19 Thread Julien Palard
Change by Julien Palard : -- pull_requests: +25787 pull_request: https://github.com/python/cpython/pull/27238 ___ Python tracker ___ ___

[issue44672] Final "pass" is traced incorrectly in 3.9 (and before)

2021-07-19 Thread Ned Batchelder
New submission from Ned Batchelder : A simple function with a last "pass" statement gets traced incorrectly, attributing the return to the pass instead of the actual last statement executed: --- 8< -- import linecache, sys def trace(frame, event, arg): # The weird

[issue44524] __name__ attribute in typing module

2021-07-19 Thread Lars
Lars added the comment: Happy to see progress on this issue and I can see that adding these attributes to the ABC's in typing makes the most sense. However for my direct use-case (simplified: using Any in a type checking descriptor) it would be really practical to have the __name__ (and perh

[issue44645] Python 3.10: Under some trivial circunstances, GIL not released

2021-07-19 Thread Mark Shannon
Mark Shannon added the comment: New changeset 37bdd2221ce3607a81d5d7fafc4603d95ca3e8cb by Miss Islington (bot) in branch '3.10': bpo-44645: Check for interrupts on any potentially backwards edge (GH-27216) (GH-27235) https://github.com/python/cpython/commit/37bdd2221ce3607a81d5d7fafc4603d95c

[issue44524] __name__ attribute in typing module

2021-07-19 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch nosy: +uriyyo nosy_count: 5.0 -> 6.0 pull_requests: +25786 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27237 ___ Python tracker

[issue41972] bytes.find consistently hangs in a particular scenario

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset d01dceb88b2ca6def8a2284e4c90f89a4a27823f by Dennis Sweeney in branch 'main': bpo-41972: Tweak fastsearch.h string search algorithms (GH-27091) https://github.com/python/cpython/commit/d01dceb88b2ca6def8a2284e4c90f89a4a27823f -- _

[issue41972] bytes.find consistently hangs in a particular scenario

2021-07-19 Thread Łukasz Langa
Łukasz Langa added the comment: I checked the original example in this issue and the newest change in GH-27091 makes the `data.find(base)` case 8.2% faster compared to `main` while the `data.find(longer)` case is 10.8% faster. -- nosy: +lukasz.langa __

[issue44340] Add support for building cpython with clang thin lto

2021-07-19 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue44340] Add support for building cpython with clang thin lto

2021-07-19 Thread Dong-hee Na
Dong-hee Na added the comment: Now CPython 3.11 supports the Thin LTO, Thank you for the report and contribution, Brett! And also thank you Pablo and Gregory for the reviews! -- ___ Python tracker _

[issue44666] compileall.compile_file fails when sys.stdout is redirected to StringIO

2021-07-19 Thread Stefan Hölzl
Change by Stefan Hölzl : -- keywords: +patch pull_requests: +25784 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27236 ___ Python tracker ___

[issue44340] Add support for building cpython with clang thin lto

2021-07-19 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset b2cf2513f9184c850a69fab718532b4f7c6a003d by Dong-hee Na in branch 'main': bpo-44340: Add support for building with clang full/thin lto (GH-27231) https://github.com/python/cpython/commit/b2cf2513f9184c850a69fab718532b4f7c6a003d -- __

[issue44661] Update property_descr_set to use vectorcall if possible.

2021-07-19 Thread Dong-hee Na
Dong-hee Na added the comment: class Person: def __init__(self): self.__age = 0 @property def age(self): return self.__age @age.setter def age(self, value): self.__age = value p = Person() p.age = 10 # Now become faster -- resolution: ->

  1   2   >