[issue38854] Decorator with paren tokens in arguments breaks inspect.getsource

2022-02-28 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +yselivanov versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue46877] [doc] unittest.doModuleCleanups() does not exist

2022-02-28 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: +kumaraditya303 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2022-02-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7496f9587306772b56ed074092c020f3ef16bf95 by Victor Stinner in branch 'main': bpo-45431: Rename CFrame to _PyCFrame in the C API (GH-31584) https://github.com/python/cpython/commit/7496f9587306772b56ed074092c020f3ef16bf95 --

[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean

2022-02-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: See #46883 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46878] [sqlite3] remove "non-standard" from docstrings

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: As one of the people confused by this wording, I agree with dropping it. There is no documentation that I can find that explains what "non-standard" means. I'll leave the PR for some time though in case others have objections. --

[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2022-02-28 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46883] Add glossary entries to clarify the true/True and false/False distinction

2022-02-28 Thread Steven D'Aprano
New submission from Steven D'Aprano : There is a long-standing tradition, going back to Python 1.x days before we had dedicated True and False values, to use the lowercase "true" and "false" to mean *any value that duck-types as True* and *any value that duck-types as False* in a boolean

[issue46883] Add glossary entries to clarify the true/True and false/False distinction

2022-02-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: Note also that this is mentioned here: https://docs.python.org/3/library/stdtypes.html#boolean-values "[True and False] are used to represent truth values (although other values can also be considered false or true)." although it is perhaps not as clear

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

2022-02-28 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> third party stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46881] Statically allocate and initialize the latin1 characters.

2022-02-28 Thread Kumar Aditya
New submission from Kumar Aditya : Statically allocate and initialize the latin1 characters. This *should* make iterating over a ascii strings faster as it avoids an atomic read in PyInterpreterState_GET() to get unicode state in get_latin1_char, makes get_latin1_char branchless and can be

[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean

2022-02-28 Thread Rotzbua
Change by Rotzbua : -- keywords: +patch pull_requests: +29742 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31617 ___ Python tracker ___

[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2022-02-28 Thread STINNER Victor
STINNER Victor added the comment: Ok, CFrame has been renamed. > We should either make the whole PyThreadState structure private (move it to > the internal C API) This idea is tracked by bpo-39947. -- ___ Python tracker

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

2022-02-28 Thread Vidhya
Vidhya added the comment: Thanks Alex. I will look into @slateny's patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46841] Inline bytecode caches

2022-02-28 Thread Mark Shannon
Mark Shannon added the comment: New changeset 4558af5a8f8e56a9b0dc11f6e834c47e0fd05f9e by Mark Shannon in branch 'main': bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575) https://github.com/python/cpython/commit/4558af5a8f8e56a9b0dc11f6e834c47e0fd05f9e --

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

2022-02-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: The default start method for multirprocessing was changed from "fork" to "spawn" on macOS. This was done because the "fork" method can easily be triggered into causing hard crashes (on macOS), in particular when the parent proces has called higher-level

[issue46881] Statically allocate and initialize the latin1 characters.

2022-02-28 Thread Kumar Aditya
Change by Kumar Aditya : -- keywords: +patch pull_requests: +29741 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31616 ___ Python tracker ___

[issue46814] Documentation for constructing abstract base classes is misleading

2022-02-28 Thread Guido van Rossum
Guido van Rossum added the comment: Raymond, I agree that this is going too far. I believe the OP has taken the position that "abstract" has only one meaning and it is defined by inspect.isabstract(). I disagree with this. An ABC is an ABC is an ABC, and it provides certain functionality

[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean

2022-02-28 Thread Rotzbua
New submission from Rotzbua : Problem: Both arguments `aliased` and `terse` should be boolean instead of integer. Description: The function is as `platform.platform(aliased=0, terse=0)` so both arguments `aliased` and `terse` seems to be numbers. The documentation says: "If aliased is

[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean

2022-02-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Both arguments `aliased` and `terse` should be boolean instead of integer. Why should they be strictly True/False booleans? I disagree strongly that they should be. Any object that duck-types as a true or false value is sufficient. Treated as a

[issue46748] Python.h includes stdbool.h

2022-02-28 Thread STINNER Victor
STINNER Victor added the comment: > Thank you, Kumar & Victor, for fixing up the issue! You're welcome. I'm happy to see that you reduced the number of #include in the C API ;-) I made similar changes in bpo-45434. -- ___ Python tracker

[issue46849] Memory problems detected using Valgrind

2022-02-28 Thread tongxiaoge
tongxiaoge added the comment: Ok, thanks. There is no memory problem exposed when I add --suppressions=Misc/valgrind-python.supp. I will close this issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue46841] Inline bytecode caches

2022-02-28 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29743 pull_request: https://github.com/python/cpython/pull/31618 ___ Python tracker ___

[issue36484] Can't reorder TLS 1.3 ciphersuites

2022-02-28 Thread Sanchayan Ghosh
Change by Sanchayan Ghosh : Added file: https://bugs.python.org/file50652/0001-Add-TLS-v1.3-cipher-suite-set-function.patch ___ Python tracker ___

[issue36484] Can't reorder TLS 1.3 ciphersuites

2022-02-28 Thread Sanchayan Ghosh
Change by Sanchayan Ghosh : Removed file: https://bugs.python.org/file50650/0001-Add-TLS-v1.3-cipher-suite-set-function.patch ___ Python tracker ___

[issue43884] Cannot cleanly kill a subprocess using high-level asyncio APIs

2022-02-28 Thread Kumar Aditya
Change by Kumar Aditya : -- keywords: +patch nosy: +kumaraditya303 nosy_count: 5.0 -> 6.0 pull_requests: +29734 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31611 ___ Python tracker

[issue43884] Cannot cleanly kill a subprocess using high-level asyncio APIs

2022-02-28 Thread Kumar Aditya
Change by Kumar Aditya : -- versions: +Python 3.11 -Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38854] Decorator with paren tokens in arguments breaks inspect.getsource

2022-02-28 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46841] Inline bytecode caches

2022-02-28 Thread Mark Shannon
Mark Shannon added the comment: New changeset 424ecab494d538650ba34937cdd710094ccb2275 by Brandt Bucher in branch 'main': bpo-46841: Use inline caching for `UNPACK_SEQUENCE` (GH-31591) https://github.com/python/cpython/commit/424ecab494d538650ba34937cdd710094ccb2275 --

[issue23453] [doc] Clarify bytes vs text with non-seeking tarfile stream

2022-02-28 Thread Stanley
Change by Stanley : -- keywords: +patch nosy: +slateny nosy_count: 3.0 -> 4.0 pull_requests: +29733 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31610 ___ Python tracker

[issue46567] Add Tcl/Tk builds for ARM64

2022-02-28 Thread Steve Dower
Steve Dower added the comment: Build and tests were fine, and a test release build was too, so merging and closing this. Any new Tcl/Tk issues should get a new bug. If they only affect ARM64, just mention that in the issue. -- resolution: -> fixed stage: patch review -> resolved

[issue46567] Add Tcl/Tk builds for ARM64

2022-02-28 Thread Steve Dower
Steve Dower added the comment: New changeset da7d99a4de72aac8d436cecedf16ab2676f9b785 by Steve Dower in branch 'main': bpo-46567: Add Tcl/Tk build for Windows ARM64 (GH-31574) https://github.com/python/cpython/commit/da7d99a4de72aac8d436cecedf16ab2676f9b785 --

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

2022-02-28 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +29732 pull_request: https://github.com/python/cpython/pull/31609 ___ Python tracker ___

[issue46567] Add Tcl/Tk builds for ARM64

2022-02-28 Thread Steve Dower
Steve Dower added the comment: I updated the builds in cpython-bin-deps and retriggered the PR tests. -- ___ Python tracker ___

[issue46877] [doc] unittest.doModuleCleanups() does not exist

2022-02-28 Thread Kumar Aditya
Change by Kumar Aditya : -- keywords: +patch pull_requests: +29737 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31611 ___ Python tracker ___

[issue46879] [doc] incorrect sphinx object names

2022-02-28 Thread Martin Fischer
Change by Martin Fischer : -- keywords: +patch pull_requests: +29739 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31615 ___ Python tracker ___

[issue46880] zipfile library doesn't extract windows zip files properly on linux

2022-02-28 Thread Nimrod Fiat
New submission from Nimrod Fiat : Created a zip file using Powershell's Compress-Archive method. Moved the file to Debian. Used zipfile's extractall method to extract. The result was a flat directory with long file names such as: "migrated-image952821\\m4a\\runiis.ps". I would expect

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

2022-02-28 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset c32aef48533769161e1247927a5b418322e0860c by Erlend Egeberg Aasland in branch 'main': bpo-46541: Remove unneeded visits from sqlite3 (GH-31609) https://github.com/python/cpython/commit/c32aef48533769161e1247927a5b418322e0860c --

[issue46748] Python.h includes stdbool.h

2022-02-28 Thread Petr Viktorin
Petr Viktorin added the comment: Thank you, Kumar & Victor, for fixing up the issue! I meant to check the buildbots before closing the issue, but got side-tracked. -- stage: patch review -> resolved status: pending -> closed ___ Python tracker

[issue38854] Decorator with paren tokens in arguments breaks inspect.getsource

2022-02-28 Thread Adam Hopkins
Change by Adam Hopkins : -- nosy: +ahopkins nosy_count: 3.0 -> 4.0 pull_requests: +29736 pull_request: https://github.com/python/cpython/pull/31605 ___ Python tracker ___

[issue46672] NameError in asyncio.gather when passing a invalid type as an arg with multiple awaitables

2022-02-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: Correct. 3.8 is in security mode. It doesn't accept regular patches -- ___ Python tracker ___

[issue46567] Add Tcl/Tk builds for ARM64

2022-02-28 Thread Steve Dower
Steve Dower added the comment: Thanks for the analysis. It should be fine to set PlatformToolset=v142 to choose the older compiler, so I'll give that a go. Anything I can do to help the compiler team figure out what's broken? -- ___ Python

[issue46877] [doc] unittest.doModuleCleanups() does not exist

2022-02-28 Thread Martin Fischer
Change by Martin Fischer : -- title: unittest.doModuleCleanups() does not exist -> [doc] unittest.doModuleCleanups() does not exist ___ Python tracker ___

[issue46878] [sqlite3] remove "non-standard" from docstrings

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

[issue46877] [doc] unittest.doModuleCleanups() does not exist

2022-02-28 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +29738 pull_request: https://github.com/python/cpython/pull/31613 ___ Python tracker ___

[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2022-02-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___

[issue46878] [sqlite3] remove "non-standard" from docstrings

2022-02-28 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Several sqlite3 methods are "marked" as non-standard in their docstrings. This is an historic artefact which (I assume) implies that a method is not a part of the DB-API defined by PEP 249. Questions regarding the "non-standard" strings arise from time

[issue46879] [doc] incorrect sphinx object names

2022-02-28 Thread Martin Fischer
New submission from Martin Fischer : API members documented in sphinx have an object name, which allow the documentation to be linked from other projects. Sphinx calculates the object name by prefixing the current module name to the directive argument, e.g: .. module:: foo .. function::

[issue46885] Ensure PEP 663 changes are reverted from 3.11

2022-02-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > we need to ensure that the changes made in 3.11 (see > https://github.com/python/steering-council/issues/76#issuecomment-970668967) > are rejected. Apologies, I meant "we need to ensure that the changes made in 3.11 are **reverted**. --

[issue46771] Add some form of cancel scopes

2022-02-28 Thread Guido van Rossum
Guido van Rossum added the comment: Everyone, I've sent a PR (which I expect will make it into alpha 6) that restores the old cancel() semantics. This should make Tin happy, but I think we'll still have to have a longer discussion about the downsides.

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2022-02-28 Thread Ned Deily
Change by Ned Deily : -- pull_requests: -29746 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46884] [doc] msilib.rst uses data directive to document modules

2022-02-28 Thread Martin Fischer
New submission from Martin Fischer : As per [1] the py:data directive describes data in a module. It should not be used for submodules, that's what the module directive is for. A side-effect that this is causing is that msilib.schema, msilib.sequence and msilib.text do not show up in the

[issue45991] Improve ambiguous docstrings in pkgutil

2022-02-28 Thread Kevin Hock
Kevin Hock added the comment: > Maybe instead a note could be put in the Pathlib doc noting functions that > accept path arguments might not accept Path objects? My concern with that is that someone using `pkgutil` wouldn't see it. However, I can see the argument that fixing the 'source' is

[issue46753] Statically allocate and initialize the empty tuple.

2022-02-28 Thread Eric Snow
Eric Snow added the comment: New changeset 08deed1af56bec8668c6cb4d5cfd89e393e1fe5e by Eric Snow in branch 'main': bpo-46753: Add the empty tuple to the _PyRuntimeState.global_objects. (gh-31345) https://github.com/python/cpython/commit/08deed1af56bec8668c6cb4d5cfd89e393e1fe5e --

[issue46884] [doc] msilib.rst uses data directive to document modules

2022-02-28 Thread Martin Fischer
Martin Fischer added the comment: ([2] was meant to be an online link: https://docs.python.org/3.9/py-modindex.html#cap-m) -- ___ Python tracker ___

[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean

2022-02-28 Thread Rotzbua
Change by Rotzbua : -- pull_requests: +29745 pull_request: https://github.com/python/cpython/pull/31621 ___ Python tracker ___ ___

[issue46885] Ensure PEP 663 changes are reverted from 3.11

2022-02-28 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : As PEP 663 https://github.com/python/steering-council/issues/76 was rejected, we need to ensure that the changes made in 3.11 (see https://github.com/python/steering-council/issues/76#issuecomment-970668967) are rejected. I am marking this as a

[issue46885] Ensure PEP 663 changes are reverted from 3.11

2022-02-28 Thread Ethan Furman
Ethan Furman added the comment: This has been taken care of in issue40066. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46885] Ensure PEP 663 changes are reverted from 3.11

2022-02-28 Thread Thomas Wouters
Change by Thomas Wouters : -- nosy: +twouters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46841] Inline bytecode caches

2022-02-28 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +29747 pull_request: https://github.com/python/cpython/pull/31622 ___ Python tracker ___

[issue46884] [doc] msilib.rst uses data directive to document modules

2022-02-28 Thread Martin Fischer
Change by Martin Fischer : -- keywords: +patch pull_requests: +29744 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31620 ___ Python tracker ___

[issue46771] Add some form of cancel scopes

2022-02-28 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +29748 pull_request: https://github.com/python/cpython/pull/31623 ___ Python tracker ___

[issue46880] zipfile library doesn't extract windows zip files properly on linux

2022-02-28 Thread Martin Fischer
Martin Fischer added the comment: Can you attach such a .zip file so that others can reproduce the bug? -- nosy: +push-f ___ Python tracker ___

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

2022-02-28 Thread Tim Peters
Tim Peters added the comment: Too abstract for me to find compelling. I suspect the title of this report referenced "math.prod with bignums" because it's the only actual concrete use case you had ;-) Here's another: math.lcm. That can benefit for the same reason as math.prod - provoking

[issue46791] Allow os.remove to defer to rmdir

2022-02-28 Thread benrg
benrg added the comment: The REMOVE_DIR case reduces to return RemoveDirectoryW(path->wide) ? 0 : -1; so I think there's no reason to combine it with the other two. The REMOVE_BOTH case is attrs = GetFileAttributesW(path->wide); if (attrs != INVALID_FILE_ATTRIBUTES && (attrs &

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

2022-02-28 Thread benrg
benrg added the comment: Anything that produces output of O(m+n) size in O(m+n) time. Ordered merging operations. Mergesort is a binary ordered merge with log-depth tree reduction, and insertion sort is the same binary operation with linear-depth tree reduction. Say you're merging sorted

[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile

2022-02-28 Thread Irit Katriel
Irit Katriel added the comment: > Irit, you just patched Temp file doc, can you look at the PR code? I don't consider myself and expert here, but I left a comment on PR29560 just to be a good sport. -- ___ Python tracker

[issue46808] remove NEXT_BLOCK() from compile.c

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

[issue46886] pyexpat occasionally fails to build on the ARM64 Windows Non-Debug 3.x buildbot

2022-02-28 Thread Eric Snow
New submission from Eric Snow : example: https://buildbot.python.org/all/#/builders/730/builds/4081 -- components: Build messages: 414223 nosy: eric.snow, vstinner priority: normal severity: normal stage: needs patch status: open title: pyexpat occasionally fails to build on the ARM64

[issue46848] Use optimized string search function in mmap.find()

2022-02-28 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +Dennis Sweeney nosy_count: 2.0 -> 3.0 pull_requests: +29749 pull_request: https://github.com/python/cpython/pull/31625 ___ Python tracker

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

2022-02-28 Thread Tim Peters
Tim Peters added the comment: About runtime, you're right. I did a ballpark "OK, if there are N incoming values, the inner loop has to go around, for each one, looking for a NULL, across a vector of at most log2(N) entries. So N * log2(N)". But, in fact, it's highly skewed toward getting

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-02-28 Thread Vidhya
Vidhya added the comment: [Entry level contributor seeking guidance] If this is still open, I can update the document. After reading all the above comments, planning to add "The __enter__ method returns the ExitStack instance, and performs no additional operations." at

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

2022-02-28 Thread Tim Peters
Tim Peters added the comment: > the total number of trailing 1 bits in the integers from 1 > through N inclusive is N - N.bit_count() Sorry, that's the total number of trailing 0 bits. The total number of trailing 1 bits is (N+1) - (N+1).bit_count(). --

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

2022-02-28 Thread benrg
benrg added the comment: >That memory frugality adds a log2 factor to the runtime. Your iterative algorithm is exactly the one I had in mind, but it doesn't have the run time that you seem to think. Is that the whole reason for our disagreement? It does only O(1) extra work (not even

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: That sounds good. Feel free to request review from me if you make a PR. -- nosy: +Jelle Zijlstra ___ Python tracker ___

[issue17505] [doc] email.header.Header.__unicode__ does not decode header

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The messages above are very old and seem to be discussing Python 2. There is no `__unicode__` method any more, for example, though there is a `__str__` method which presumably does what `__unicode__` used to do. It is documented now at

[issue46753] Statically allocate and initialize the empty tuple.

2022-02-28 Thread Eric Snow
Change by Eric Snow : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46863] Python 3.10 OpenSSL Configuration Issues

2022-02-28 Thread Adam
Adam added the comment: Update, the Pyenv team confirmed that they do not install OpenSSL in linux, its only installed for MacOS, and it should be built using the system OpenSSL within Linux. We're investigating further to attempt to debug the issue. Interestingly the OpenSSL build flags

[issue46848] Use optimized string search function in mmap.find()

2022-02-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: PR 31625 is an alternative proposal. It uses the Crochemore and Perrin's Two-Way algorithm that @benrg references (see Objects/stringlib/fastsearch.h and Objects/stringlib/stringlib_find_two_way_notes.txt), and is platform-independent. --

[issue46791] Allow os.remove to defer to rmdir

2022-02-28 Thread Eryk Sun
Eryk Sun added the comment: > For REMOVE_BOTH, I don't see the need of calling GetFileAttributes I was thinking that the NtQueryAttributesFile() system call is relatively cheap compared to a full open, especially if the attributes of a remote file are cached locally. However, on second

[issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour

2022-02-28 Thread Vidhya
Vidhya added the comment: [Entry level contributor seeking guidance] If this is still open, I can work on this. I plan to add the following in sys.exit() and add a reference to thread.exit() at https://docs.python.org/3/library/sys.html#sys.exit: When called from a thread other than the

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

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Regardless of mypy's behavior (which isn't impacted by what typing.py does), there's a legitimate complaint here about the runtime behavior: any `__init__` method defined in a Protocol gets silently replaced. >>> from typing import Protocol >>> class

[issue46771] Add some form of cancel scopes

2022-02-28 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 7d611b4cabaf7925f5f94daddf711d54aeae2cf9 by Guido van Rossum in branch 'main': bpo-46771: Remove two controversial lines from Task.cancel() (GH-31623) https://github.com/python/cpython/commit/7d611b4cabaf7925f5f94daddf711d54aeae2cf9

[issue17505] [doc] email.header.Header.__unicode__ does not decode header

2022-02-28 Thread Vidhya
Vidhya added the comment: [Entry level contributor seeking guidance] If this is still open, I like to work on this. Also, planning to add the following(if no PR yet created) at make_header API at https://docs.python.org/3/library/email.header.html : To get unicode strings use the API as

[issue45991] Improve ambiguous docstrings in pkgutil

2022-02-28 Thread Stanley
Stanley added the comment: I feel like there might be some backwards compatibility issues if pkgutil wraps it like that, but similarly I'm not at all familiar with how common the package is used and whether it'd be fine to make that change, so I'll also differ judgement here. --

[issue6778] False positives given through bisect module (binary search)

2022-02-28 Thread Paola Cosio
Change by Paola Cosio : -- assignee: -> docs@python components: +Distutils, Documentation, Installation, Parser, email nosy: +barry, docs@python, dstufft, eric.araujo, lys.nikolaou, pablogsal type: behavior -> security ___ Python tracker

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

2022-02-28 Thread Adrian Garcia Badaracco
Change by Adrian Garcia Badaracco : -- pull_requests: +29750 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/31628 ___ Python tracker

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

2022-02-28 Thread Guido van Rossum
Guido van Rossum added the comment: Would it make sense to enforce the no-instantiation rule in __new__ instead of __init__? -- ___ Python tracker ___

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

2022-02-28 Thread Guido van Rossum
Guido van Rossum added the comment: Oops. So this is an intentional feature -- Protocol replaces __init__ so that you can't (accidentally) instantiate a protocol. And the code to do this has changed a couple of times recently to deal with some edge cases. At least one of the PRs was by

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

2022-02-28 Thread Adrian Garcia Badaracco
Adrian Garcia Badaracco added the comment: Guido, it looks like you replied while I was typing my reply out. Yurii can correct me here but I believe PR #27543 was an attempt to disallow defining `__init__` on a Protocol completely. What I proposed above is the opposite behavior, while still

[issue10149] [doc] Data truncation in expat parser

2022-02-28 Thread Stanley
Change by Stanley : -- keywords: +patch nosy: +slateny nosy_count: 6.0 -> 7.0 pull_requests: +29752 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31629 ___ Python tracker

[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean

2022-02-28 Thread Rotzbua
Rotzbua added the comment: Thanks for pointing out the logical change from "true" to "True". I do not want to start a discussion about principles. Nevertheless I think a change from `platform(aliased=0, terse=0)` to `platform(aliased=False, terse=False)` makes the how-to-use more intuitive.

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2022-02-28 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 17.0 -> 18.0 pull_requests: +29746 pull_request: https://github.com/python/cpython/pull/31606 ___ Python tracker ___

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

2022-02-28 Thread Adrian Garcia Badaracco
Adrian Garcia Badaracco added the comment: Agreed. What if we allow protocols that implement `__init__` but still disallow instantiating a protocol that does not? It's a 1 line change, all existing tests pass and it would still catch what I think was the original intention (trying to

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

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It doesn't make logical sense to instantiate any Protocol, whether it has __init__ or not, because a Protocol is inherently an abstract class. But we can just leave enforcement of that rule to static type checkers, so Adrian's proposed change makes sense to

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

2022-02-28 Thread Adrian Garcia Badaracco
Adrian Garcia Badaracco added the comment: I am not sure if that solves anything (other than the fact that __new__ is much less common to implement than __init__), but I may just be slow to pick up the implications of moving the check to __new__ --

[issue46886] ARM64 Windows Non-Debug 3.x: random build error: failure during conversion to COFF: file invalid or corrupt

2022-02-28 Thread STINNER Victor
STINNER Victor added the comment: example: https://buildbot.python.org/all/#/builders/730/builds/4081 Build FAILED. "C:\Workspace\buildarea\3.x.linaro-win-arm64.nondebug\build\PCbuild\pcbuild.proj" (Build target) (1) ->