[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2022-02-27 Thread Kumar Aditya
Kumar Aditya added the comment: Since https://bugs.python.org/issue44011 is fixed now, this can be closed. @asvetlov -- nosy: +kumaraditya303 versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue25743] [doc] Clarify exactly what \w matches in UNICODE mode

2022-02-27 Thread Stanley
Stanley added the comment: Would a change like this be accurate? Matches Unicode word characters; this includes most alphanumeric characters as well as the underscore. In Unicode, alphanumeric characters are defined to be the general categories L + N (see

[issue46567] Add Tcl/Tk builds for ARM64

2022-02-27 Thread Niyas Sait
Niyas Sait added the comment: Based on my investigation so far, I think Tcl/Tk package generated with VS 2022 seems to have some issues when used with Tkinter. I could be wrong. I've created https://github.com/python/cpython/pull/31603 to force the Tcl/Tk package build on the fly with VS

[issue46877] unittest.doModuleCleanups() does not exist

2022-02-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-02-27 Thread Christian Heimes
Christian Heimes added the comment: New changeset 088dd76dba68c2538776d9920607f81e54544cbd by Dong-hee Na in branch 'main': bpo-46541: Remove unnecessary Py_VISIT (GH-31608) https://github.com/python/cpython/commit/088dd76dba68c2538776d9920607f81e54544cbd -- nosy: +christian.heimes

[issue46877] unittest.doModuleCleanups() does not exist

2022-02-27 Thread Martin Fischer
New submission from Martin Fischer : The unittest documentation[1] describes unittest.doModuleCleanups(). That function however doesn't exist since it's only in the unittest.case module and not re-exported in the unittest module (unlike addModuleCleanup). So I think either the documentation

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-02-27 Thread Larry Hastings
Larry Hastings added the comment: I emailed the Pydantic and FastAPI guys and didn't hear back. Given what you found on their issue trackers, I think it's unlikely that they care a lot about this issue (but were too busy to reply). It's far more likely that they don't care. Doing a

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-02-27 Thread Ofey Chan
Ofey Chan added the comment: > Maybe we can loop in someone who works on a popular runtime function > introspection library (FastAPI, Pydantic) to see if they have any take on it. I've checked issues of FastAPI and Pydantic. There is only one issue about `update_wrapper()`, and it's about

[issue46873] inspect.getsource with some lambdas in decorators does not get the full source

2022-02-27 Thread Adam Hopkins
Adam Hopkins added the comment: Duplicate of https://bugs.python.org/issue38854 Sorry I didn't come across our before submitting. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2022-02-27 Thread Adrian Garcia Badaracco
Adrian Garcia Badaracco added the comment: Apologies if that was noise, I filed an issue on the MyPy issue tracker: https://github.com/python/mypy/issues/12261 -- ___ Python tracker

[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2022-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: If the problem is in mypy, it should be filed in the mypy tracker, not here. -- ___ Python tracker ___

[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-02-27 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +29731 pull_request: https://github.com/python/cpython/pull/31608 ___ Python tracker ___

[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2022-02-27 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46870] Improper Input Validation in urlparse

2022-02-27 Thread Karan
Karan added the comment: Here are the results from other languages. Go parses incorrectly at the same time rust does it correctly. Go- https://go.dev/play/p/nNMhyznuGpn {Scheme:"http", Opaque:"@localhost", User:(*url.Userinfo)(nil), Host:"", Path:"", RawPath:"", ForceQuery:false,

[issue45326] Unexpected TypeError with type alias+issubclass+ABC

2022-02-27 Thread Andrei Kulakov
Change by Andrei Kulakov : -- nosy: +kj type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45326] Unexpected TypeError with type alias+issubclass+ABC

2022-02-27 Thread Andrei Kulakov
Andrei Kulakov added the comment: This error was added in https://bugs.python.org/issue33018 . See some discussion on that issue. Note that first arg needs to be a type (i.e. instance of `type`) to avoid this error: [ins] In [41]: class C(ABC):0 [ins] In [42]: issubclass(dict, C) Out[42]:

[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2022-02-27 Thread Adrian Garcia Badaracco
Adrian Garcia Badaracco added the comment: While this is figured out, would it be possible to remove the silent overriding? This seems like something type checkers should be doing, not silent runtime modification of classes. Pyright already (correctly) checks this, so I think it would just

[issue46876] Walrus operator not in help

2022-02-27 Thread Mohammad Mahdi Zojaji Monfared
New submission from Mohammad Mahdi Zojaji Monfared : Walrus oprator := not in help("symbols") and help(":=") does not work. -- components: Interpreter Core files: walrus.png messages: 414168 nosy: mmahdizojajim priority: normal severity: normal status: open title: Walrus operator not

[issue36484] Can't reorder TLS 1.3 ciphersuites

2022-02-27 Thread Sanchayan Ghosh
Sanchayan Ghosh added the comment: Here is the PR as well. While I agree that there is no more a reason to reorder cipher suites and that we should use our certificates to basically ensure a secure connection, the advantage of the OpenSSL API is it provides us the function to influence the

[issue36484] Can't reorder TLS 1.3 ciphersuites

2022-02-27 Thread Sanchayan Ghosh
Sanchayan Ghosh added the comment: I have written a function that will allow us to reorder TLS v1.3. Since I have tried to keep a 1-1 binding, you will have to first remove the cipher suites entirely by giving a blank string, and then add TLS v1.2 and v1.3 cipher suites. --

[issue46748] Python.h includes stdbool.h

2022-02-27 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Can we close this? -- nosy: +erlendaasland status: open -> pending ___ Python tracker ___ ___

[issue46868] Improve performance of math.prod with bignums (and functools.reduce?)

2022-02-27 Thread Tim Peters
Tim Peters added the comment: Hi. "It's pretty good for a lot of things" is precisely what I'm questioning. Name some, and please be specific ;-) Tree reduction is very popular in the parallel processing world, for obvious reasons. But we're talking about a single thread here, and there

[issue46873] inspect.getsource with some lambdas in decorators does not get the full source

2022-02-27 Thread Adam Hopkins
Change by Adam Hopkins : -- keywords: +patch pull_requests: +29728 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31605 ___ Python tracker ___

[issue46871] Lambda can't be pickled with "spawn" and only "fork"

2022-02-27 Thread Kyle Smith
Change by Kyle Smith : -- title: BaseManager.register no longer supports lambda callable 3.8.12+ -> Lambda can't be pickled with "spawn" and only "fork" ___ Python tracker

[issue46875] Missing name in TaskGroup.__repr__()

2022-02-27 Thread Joongi Kim
Joongi Kim added the comment: Ah, I'm confused with aiotools.TaskGroup (originated from EdgeDB's TaskGroup) code while browsing both aiotools and stdlib asyncio.TaskGroup source codes. The naming facility seems to be intentionally removed when ported to the stdlib. So I am closing this and

[issue46875] Missing name in TaskGroup.__repr__()

2022-02-27 Thread Joongi Kim
New submission from Joongi Kim : The __repr__() method in asyncio.TaskGroup does not include self._name. I think this is a simple overlook, because asyncio.Task includes the task name in __repr__(). :wink: https://github.com/python/cpython/blob/345572a1a02/Lib/asyncio/taskgroups.py#L28-L42

[issue46843] PersistentTaskGroup API

2022-02-27 Thread Joongi Kim
Joongi Kim added the comment: I have updated the PersistentTaskGroup implementation referring asyncio.TaskGroup and added more detailed test cases, which works with the latest Python 3.11 GitHub checkout. https://github.com/achimnol/aiotools/pull/36/files Please have a look at the class

[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2022-02-27 Thread Alex Waygood
Alex Waygood added the comment: Hi Vidhya — @slateny submitted a PR for this issue only two days ago (you can see that it's linked to this BPO issue in the "Pull Requests" field). I think it would be good to wait until that has been reviewed before doing any work on a possible PR for this

[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2022-02-27 Thread Vidhya
Vidhya added the comment: If this is still open, I would like to work on this. Please let me know. -- nosy: +vidhya ___ Python tracker ___

[issue46852] Remove the float.__setformat__() method

2022-02-27 Thread Mark Dickinson
Mark Dickinson added the comment: > I reopen the issue for the second part of my plan Hmm. That sounds like it should be a separate issue, or at the least, this issue should be retitled. It's helpful to keep issue titles accurate. -- ___ Python

[issue46849] Memory problems detected using Valgrind

2022-02-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46786] embed, source, track, wbr HTML elements not considered empty

2022-02-27 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46786] embed, source, track, wbr HTML elements not considered empty

2022-02-27 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 345572a1a0263076081020524016eae867677cac by Jannis Vajen in branch 'main': bpo-46786: Make ElementTree write the HTML tags embed, source, track, wbr as empty tags (GH-31406)

[issue46873] inspect.getsource with some lambdas in decorators does not get the full source

2022-02-27 Thread Alex Waygood
Change by Alex Waygood : -- type: -> behavior versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue46873] inspect.getsource with some lambdas in decorators does not get the full source

2022-02-27 Thread Adam Hopkins
Adam Hopkins added the comment: Sorry about that. I am doing some more digging to see if I can find the route of it and a proposal for a non-breaking patch. The problem seems to be in BlockFinder.tokeneater. -- type: behavior -> versions: +Python 3.7, Python 3.8

[issue46871] BaseManager.register no longer supports lambda callable 3.8.12+

2022-02-27 Thread Kyle Smith
Kyle Smith added the comment: Since you were able to help me scope that this is probably an MacOS specific issue, I was able to find this report: https://github.com/pytest-dev/pytest-flask/issues/104 Setting `multiprocessing.set_start_method("fork")` _BEFORE_ the code is called resolves

[issue46873] inspect.getsource with some lambdas in decorators does not get the full source

2022-02-27 Thread Alex Waygood
Alex Waygood added the comment: I'm removing 3.7 and 3.8 from the "versions" field, since they're currently only accepting patches for security-related bugs. But thanks for testing on those versions as well — that's useful information! -- components: +Library (Lib) nosy:

[issue46871] BaseManager.register no longer supports lambda callable 3.8.12+

2022-02-27 Thread Kyle Smith
Kyle Smith added the comment: Interesting. I did try between MacOS (12.2) and Ubuntu since I have servers with older python versions. For scoping then, this appears to be related only to MacOS since you were able to confirm it working correctly on Linux. The code is the same, but here's

[issue46874] [sqlite3] optimise user-defined functions

2022-02-27 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +29727 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31604 ___ Python tracker

[issue46852] Remove the float.__setformat__() method

2022-02-27 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue for the second part of my plan: "Once they will be removed, it will become possible to move the detection of the IEEE 754 format in the build step (./configure script) rather than doing the detection at runtime (slower). It would remove

[issue46874] [sqlite3] optimise user-defined functions

2022-02-27 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- assignee: -> erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46874] [sqlite3] optimise user-defined functions

2022-02-27 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Currently, the `step` method of user-defined functions is looked up using `PyObject_GetAttrString`. Using an interned string and `PyObject_GetAttr`, we can speed up this a little bit. -- components: Library (Lib) messages: 414151 nosy:

[issue46852] Remove the float.__setformat__() method

2022-02-27 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Victor. I think this can be closed now. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46873] inspect.getsource with some lambdas in decorators does not get the full source

2022-02-27 Thread Adam Hopkins
New submission from Adam Hopkins : I believe the following produces an unexpected behavior: from inspect import getsource def bar(*funcs): def decorator(func): return func return decorator @bar(lambda x: bool(True), lambda x: False) async def

[issue46872] Odd handling of signal raised if an illegal syscall is attempted on Android

2022-02-27 Thread Dan Snider
New submission from Dan Snider : On Android, the following calls generate a SIGSYS signal that is neither blocked by pthread_sigmask(SIG_BLOCK, {SIGSYS}) nor ignored after its handler is set to SIG_IGN: (os.chroot(path)) os.setgid(rgid) os.setuid(ruid) (os.setegid(gid))

[issue46849] Memory problems detected using Valgrind

2022-02-27 Thread Christian Heimes
Christian Heimes added the comment: Valgrind does not understand Python's custom obmalloc allocator. You have to run valgrind with our suppression rules Misc/valgrind-python.supp to ignore false errors. -- nosy: +christian.heimes ___ Python

[issue46806] Overlapping PYTHONPATH may cause import already imported module

2022-02-27 Thread aklajnert
aklajnert added the comment: Honestly, it seems to me that the documents that you mentioned are discussing different problems, that may be related, but are not the same as the one I've described here. I'm not arguing - you're clearly more experienced and that's not my area of expertise,

[issue46849] Memory problems detected using Valgrind

2022-02-27 Thread Christian Heimes
Change by Christian Heimes : -- Removed message: https://bugs.python.org/msg414097 ___ Python tracker ___ ___ Python-bugs-list

[issue46799] ShareableList memory bloat and performance improvement

2022-02-27 Thread Ting-Che Lin
Ting-Che Lin added the comment: So I wrote a patch for this issue and published submitted a MR. When I was working on the patch, I realized that there is another issue related to how string and byte array size alignment is calculated. As seen here:

[issue46567] Add Tcl/Tk builds for ARM64

2022-02-27 Thread Niyas Sait
Change by Niyas Sait : -- nosy: +nsait-linaro nosy_count: 5.0 -> 6.0 pull_requests: +29726 pull_request: https://github.com/python/cpython/pull/31603 ___ Python tracker ___

[issue46868] Improve performance of math.prod with bignums (and functools.reduce?)

2022-02-27 Thread benrg
benrg added the comment: My example used ints, but I was being deliberately vague when I said "bignums". Balanced-tree reduction certainly isn't optimal for ints, and may not be optimal for anything, but it's pretty good for a lot of things. It's the comparison-based sorting of reduction