[issue46326] 'virtualenv --clear' should prompt user before nuking entire directory

2022-01-10 Thread Ali Mohammad Pur
New submission from Ali Mohammad Pur : `virtualenv --clear` is extremely eager to delete the passed directory without any sort of confirmation, leading to possible data-loss (e.g. with a mistyped command, or a misunderstanding of what it actually does). Simply deleting an entire directory tree

[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Nikita Sobolev
Nikita Sobolev added the comment: On the other hand second test ```python @unittest.skipUnless(python_version >= (3, 9), '_convert was removed in 3.9') def test_convert_raise(self): with self.assertRaises(AttributeError):

[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28715 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30512 ___ Python tracker ___

[issue46318] asyncio and ssl: ResourceWarning: unclosed transport

2022-01-10 Thread Julien Palard
Julien Palard added the comment: Related to: https://bugs.python.org/issue23243 -- ___ Python tracker ___ ___ Python-bugs-list

[issue46283] [subinterpreters] Unicode interned strings must not be shared between interpreters

2022-01-10 Thread Petr Viktorin
Petr Viktorin added the comment: Another proposed alternative is to make these immortal, and share them. There were some discussions about this, but no PEP to capture the pros/cons of the alternatives and the decision. -- nosy: +petr.viktorin ___

[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Nikita Sobolev
New submission from Nikita Sobolev : Here's the problem: https://github.com/python/cpython/blob/main/Lib/test/test_enum.py#L4515-L4531 Why it is a problem? 1. First test is marked as `@unittest.skipUnless(python_version == (3, 8)`. Which means it is only executed on `3.8`. I think it should

[issue46322] Invalid file path of SSLKEYLOGFILE throw FileNotFoundError

2022-01-10 Thread Christian Heimes
Christian Heimes added the comment: The code works as intended and design. The keylog file is created in append-only mode when the file does not exist yet. A missing, inaccessible, or read-only directory or an invalid path raise an exception by design. Errors should not pass silently. The

[issue46315] Add support for WebAssembly System Interface (wasm32-wasi)

2022-01-10 Thread Christian Heimes
Christian Heimes added the comment: dup() is required by _PyTokenizer_FindEncodingFilename(). I came up with this hack: // from wasi-libc libc-top-half/musl/src/internal/stdio_impl.h struct _IO_FILE { unsigned flags; unsigned char *rpos, *rend; int (*close)(FILE *); unsigned

[issue46301] Enum tests: One branch is not covered in `Enum._convert_`

2022-01-10 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +28714 pull_request: https://github.com/python/cpython/pull/30510 ___ Python tracker ___

[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Alex Waygood
Change by Alex Waygood : -- assignee: -> ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46313] SSLObject does not raise SSLEOFError on OpenSSL 3

2022-01-10 Thread Alex Grönholm
Alex Grönholm added the comment: I just noticed that Ubuntu 22.04 LTS also uses OpenSSL 3 with their Python builds. I hope somebody has told them too about the state of affairs. -- ___ Python tracker

[issue46313] SSLObject does not raise SSLEOFError on OpenSSL 3

2022-01-10 Thread Christian Heimes
Change by Christian Heimes : -- nosy: -christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46313] SSLObject does not raise SSLEOFError on OpenSSL 3

2022-01-10 Thread Christian Heimes
Christian Heimes added the comment: That's not how OSS work. Python core development does not have resources to provide proactive support for all Linux distros in the world. We provide documentation and guidance. I assume that paid package maintainers of a commercial Linux vendor perform

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-01-10 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2022-01-10 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46328] add sys.exception()

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +28717 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30514 ___ Python tracker ___

[issue46142] python --help output is too long

2022-01-10 Thread Eryk Sun
Eryk Sun added the comment: > Do you know other projects which dump the full help into stdout > when asking for the "full help"? `ps --help` lists sections "". The "--help all" output is all sections, but truly all help is only available via `man ps`. > For me, the best CLI is "git help",

[issue46322] Invalid file path of SSLKEYLOGFILE throw FileNotFoundError

2022-01-10 Thread SinaGhaaf
Change by SinaGhaaf : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46314] Stray RESUME opcode for unused lambda

2022-01-10 Thread Mark Shannon
Mark Shannon added the comment: New changeset ec0c392f34ee2474ceacf66881f05546b540e2d1 by Mark Shannon in branch 'main': bpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513) https://github.com/python/cpython/commit/ec0c392f34ee2474ceacf66881f05546b540e2d1 --

[issue46330] Simplify the signature of __exit__

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: I've outlined a different approach here: https://gist.github.com/iritkatriel/3927147548b10a7929cb0b680e3adc52 Basically, to add introspection capabilities in the C API so that the interpreter can find out whether __exit__ expects one or three args. --

[issue46330] Simplify the signature of __exit__

2022-01-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks, that would work in normal cases but can cause issues if __exit__ takes *args. Still, that may be enough of an edge case that we can get it to work. -- ___ Python tracker

[issue46314] Stray RESUME opcode for unused lambda

2022-01-10 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +28716 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30513 ___ Python tracker ___

[issue46314] Stray RESUME opcode for unused lambda

2022-01-10 Thread Mark Shannon
Mark Shannon added the comment: Pablo, I've marked this as a release blocker so this bug doesn't get into 3.11a4. -- keywords: -patch nosy: +pablogsal stage: patch review -> ___ Python tracker

[issue46314] Stray RESUME opcode for unused lambda

2022-01-10 Thread Mark Shannon
Mark Shannon added the comment: Ok, I'll add a news item in that case. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-10 Thread Mark Shannon
New submission from Mark Shannon : Most calls (not those with *args and/or **kwargs) are compiled to the `CALL_NO_KW` and `CALL_KW` instructions, possibly with a `PRECALL_METHOD` prefix. We want to unify the `CALL_NO_KW` and `CALL_KW` instructions into a single `CALL` instruction and add

[issue46328] add sys.exception()

2022-01-10 Thread Irit Katriel
New submission from Irit Katriel : Following to changes in issue45711, the interpreter's internal representation of the active exception is just the exception instance (the exc_type and exc_traceback fields were removed). For backwards compatibility, sys.exc_info() constructs the (typ, val,

[issue46318] asyncio and ssl: ResourceWarning: unclosed transport

2022-01-10 Thread Julien Palard
Julien Palard added the comment: Feel like SSLProtocol's connection_lost should "bubble up" the info by calling SSLProtocolTransport's close. But I'm no familiar with this stack. -- ___ Python tracker

[issue46330] Simplify the signature of __exit__

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: If it takes *args we should assume that it expects the triplet rather than a single exception. It's not an edge case, it's very common to write __exit__ like that. -- ___ Python tracker

[issue46314] Stray RESUME opcode for unused lambda

2022-01-10 Thread Mark Shannon
Mark Shannon added the comment: Thanks, Ned. -- assignee: -> Mark.Shannon priority: normal -> release blocker type: -> behavior ___ Python tracker ___

[issue46142] python --help output is too long

2022-01-10 Thread STINNER Victor
STINNER Victor added the comment: > Serhiy: What do you think about -hh (and maybe —help-full) printing full help? Do you know other projects which dump the full help into stdout when asking for the "full help"? For me, the best CLI is "git help", "git help init", etc. "git help init" opens

[issue46314] Stray RESUME opcode for unused lambda

2022-01-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Unfortunately the release of 3.11.0a4 is already underway and we are waiting for Steve's windows binaries, so this will need to wait for alpha 5 -- ___ Python tracker

[issue46314] Stray RESUME opcode for unused lambda

2022-01-10 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +28718 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30515 ___ Python tracker ___

[issue46330] Simplify the signature of __exit__

2022-01-10 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : With Irit's recent changes (bpo-45711), the (typ, exc, tb) tuple is now always redundant with just exc. As a result, `__exit__` methods now should only need to accept a single argument. If we were designing the context manager protocol from scratch, we

[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-01-10 Thread Lincoln Auster
Change by Lincoln Auster : -- keywords: +patch pull_requests: +28721 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30520 ___ Python tracker ___

[issue7238] frame.f_lineno doesn't get updated after local trace function assigned to it

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: I am unable to reproduce this on 3.11, I get this: iritkatriel@Irits-MBP cpython % ./python.exe tracer_testcase.py 14 15 16 14 15 16 I am also unable to reproduce the problem in the related issue 16482. -- nosy: +iritkatriel status: open -> pending

[issue46205] test.libregrtest: Race condition in runtest_mp leads to hangs (never exits)

2022-01-10 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset e13cdca0f5224ec4e23bdd04bb3120506964bc8b by Sam Gross in branch 'main': bpo-46205: exit if no workers are alive in runtest_mp (GH-30470) https://github.com/python/cpython/commit/e13cdca0f5224ec4e23bdd04bb3120506964bc8b --

[issue46205] test.libregrtest: Race condition in runtest_mp leads to hangs (never exits)

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

[issue46205] test.libregrtest: Race condition in runtest_mp leads to hangs (never exits)

2022-01-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +28725 pull_request: https://github.com/python/cpython/pull/30524 ___ Python tracker ___

[issue46336] Sixth element of tuple from __reduce__(), inconsistency between pickle and copy

2022-01-10 Thread Lev Bishop
New submission from Lev Bishop : As discussed in discord thread https://discuss.python.org/t/sixth-element-of-tuple-from-reduce-inconsistency-between-pickle-and-copy/12902 where guido suggested to open this issue. Both the pickle and copy modules of the standard library make use of a class’s

[issue46244] typing._TypeVarLike missing __slots__

2022-01-10 Thread Ken Jin
Ken Jin added the comment: New changeset 081a2140083680ffc309e53699aea29e71760d70 by Arie Bovenberg in branch 'main': bpo-46244: Remove __slots__ from typing.TypeVar, .ParamSpec (#30444) https://github.com/python/cpython/commit/081a2140083680ffc309e53699aea29e71760d70 --

[issue6942] email.generator.Generator memory consumption

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46339] PEG parser segfault from ast.literal_eval

2022-01-10 Thread Gregory P. Smith
New submission from Gregory P. Smith : cpython/b$ ./python Python 3.11.0a3+ (heads/main-dirty:081a214008, Jan 11 2022, 02:48:22) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> ast.literal_eval('''F""" ... ... ... {6 ...

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2022-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for the bisection. It's not surprising that that's the culprit, and in other situations that's the right thing to do. I'm not sure how to address this without breaking other stuff -- maybe leave the ForwardRef if evaluating it doesn't work? But

[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-01-10 Thread Lincoln Auster
New submission from Lincoln Auster : It looks like this was discussed in 2013-2015 here: https://bugs.python.org/issue18828 Basically, with all the URL schemes that exist in the world (and the possibility of a custom scheme), the current strategy of enumerating what do what in a hard-coded

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-10 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46328] add sys.exception()

2022-01-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: sys.exception() seems like a decent enough trade-off. I've always disliked the abbreviations in "exc_info". It doesn't feel big enough for a PEP to me. -- ___ Python tracker

[issue46328] add sys.exception()

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

[issue46330] Simplify the signature of __exit__

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

[issue46333] ForwardRef.__eq__ does not respect module parameter

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

[issue46336] Sixth element of tuple from __reduce__(), inconsistency between pickle and copy

2022-01-10 Thread Éric Araujo
Change by Éric Araujo : -- nosy: +pitrou, rhettinger versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker ___ ___

[issue46328] add sys.exception()

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: I thought of something like sys.active_exception() but it seems like a lot to type. sys.exception() was suggested in pep3134. Does this change need a pep? -- ___ Python tracker

[issue46338] libc_ver() runtime error when sys.executable is empty

2022-01-10 Thread Allie Hammond
New submission from Allie Hammond : libc_ver() in platform.py (called from platform()) causes a runtime error if sys.executable returns null. In my case, FreeRADIUS offers a module rlm_python3 which allows you to run python code from the C based FreeRADIUS server - since this module doesn't

[issue46336] Sixth element of tuple from __reduce__(), inconsistency between pickle and copy

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43681] doctest forgets previous imports

2022-01-10 Thread Nikita Sobolev
Nikita Sobolev added the comment: Ethan, I've tried to reproduce this, but it seems that example you attached is not valid. `Flag` is never imported at all. The same with `auto`. Should it be: ``` >>> from enum import auto, Flag, STRICT ``` the first time? As you said, it only happens in

[issue46162] Make `builtins.property` generic

2022-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: Since the conclusion is that we can't do this without breaking backwards compatibility, should we just close this? Or is there still a compromise possible? -- ___ Python tracker

[issue46336] Sixth element of tuple from __reduce__(), inconsistency between pickle and copy

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: I added Serhiy as the author of the deepcopy optimization. Although it was the first to use the 6th item, it is not documented so I wonder if it's the easier of the two to change. -- nosy: +iritkatriel ___ Python

[issue23902] let exception react to being raised or the setting of magic properties (like __cause__) within Python

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-10 Thread Andreas H.
Andreas H. added the comment: I will give it a try. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46328] add sys.exception()

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: Cool. I just removed the do-not-merge label from the PR and I guess it's ready to be reviewed. -- ___ Python tracker ___

[issue27257] get_addresses results in traceback with an addrspec with an empty local part.

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> works for me stage: patch review -> resolved status: pending -> closed ___ Python tracker ___

[issue45331] Can create enum of ranges, cannot create range enum. Range should be subclassable... or EnumMeta.__new__ should be smarter.

2022-01-10 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 2.0 -> 3.0 pull_requests: +28722 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30521 ___ Python tracker

[issue16482] pdb.set_trace() clobbering traceback on error

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: iritkatriel@Irits-MBP cpython % cat pdb_traceback.py import pdb x = 0 while True: pdb.set_trace() y = "line of code not triggering an error" x += 1 assert x != 3 iritkatriel@Irits-MBP cpython % cat pdb_traceback.py import pdb

[issue45331] Can create enum of ranges, cannot create range enum. Range should be subclassable... or EnumMeta.__new__ should be smarter.

2022-01-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 6223cbf86ad7d5e6d12f9747e5a9cf1d8c72bdc8 by Nikita Sobolev in branch 'main': bpo-45331: [Enum] add rule to docs that mixin type must be subclassable (GH-30521) https://github.com/python/cpython/commit/6223cbf86ad7d5e6d12f9747e5a9cf1d8c72bdc8

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2022-01-10 Thread Yu Zhao
Change by Yu Zhao : -- nosy: +CharlieZhao nosy_count: 24.0 -> 25.0 pull_requests: +28723 pull_request: https://github.com/python/cpython/pull/30522 ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2022-01-10 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: +kumaraditya303 nosy_count: 25.0 -> 26.0 pull_requests: +28726 pull_request: https://github.com/python/cpython/pull/30525 ___ Python tracker

[issue46205] test.libregrtest: Race condition in runtest_mp leads to hangs (never exits)

2022-01-10 Thread miss-islington
miss-islington added the comment: New changeset e0ec08dc49f8e6f94a735bc9946ef7a3fd898a44 by Miss Islington (bot) in branch '3.10': bpo-46205: exit if no workers are alive in runtest_mp (GH-30470) https://github.com/python/cpython/commit/e0ec08dc49f8e6f94a735bc9946ef7a3fd898a44 --

[issue46205] test.libregrtest: Race condition in runtest_mp leads to hangs (never exits)

2022-01-10 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46205] test.libregrtest: Race condition in runtest_mp leads to hangs (never exits)

2022-01-10 Thread Dong-hee Na
Change by Dong-hee Na : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue46340] DeprecationWarning emitted when running asyncio tests

2022-01-10 Thread Kumar Aditya
Change by Kumar Aditya : -- components: asyncio nosy: asvetlov, kumaraditya303, yselivanov priority: normal pull_requests: 28727 severity: normal status: open title: DeprecationWarning emitted when running asyncio tests versions: Python 3.11 ___

[issue46339] PEG parser segfault from ast.literal_eval

2022-01-10 Thread Kumar Aditya
Kumar Aditya added the comment: I tested it on 3.10.1 and it didn't segfault on Windows 11 so seems like 3.11 regression. -- nosy: +kumaraditya303 ___ Python tracker ___

[issue46334] Glossary URLs with anchor link no longer jump to definitions

2022-01-10 Thread Ned Deily
Change by Ned Deily : -- nosy: +mdk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46244] typing._TypeVarLike missing __slots__

2022-01-10 Thread Kumar Aditya
Kumar Aditya added the comment: Can this be closed now ? -- versions: -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list

[issue39298] add BLAKE3 to hashlib

2022-01-10 Thread Jack O'Connor
Jack O'Connor added the comment: Update: There is now a C version of the `blake3` Python module available at https://github.com/oconnor663/blake3-py/tree/master/c_impl. It's completely API-compatible with the Rust version, and it passes the same test suite. Multithreading (which is

[issue46205] test.libregrtest: Race condition in runtest_mp leads to hangs (never exits)

2022-01-10 Thread miss-islington
miss-islington added the comment: New changeset 690ed889c537c008a2c5f3e6c4f06c5b0c0afbc6 by Miss Islington (bot) in branch '3.9': bpo-46205: exit if no workers are alive in runtest_mp (GH-30470) https://github.com/python/cpython/commit/690ed889c537c008a2c5f3e6c4f06c5b0c0afbc6 --

[issue46333] ForwardRef.__eq__ does not respect module parameter

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

[issue46244] typing._TypeVarLike missing __slots__

2022-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: Yes.-- --Guido (mobile) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46328] add sys.exception()

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: This is part of a larger plan to reduce the footprint of the exc_info footprint on the language. See https://gist.github.com/iritkatriel/3927147548b10a7929cb0b680e3adc52 -- ___ Python tracker

[issue46332] Use raise..from in logging/config instead of assigning __cause__

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12756] datetime.datetime.utcnow should return a UTC timestamp

2022-01-10 Thread Tony Rice
Tony Rice added the comment: This enhancement request should be reconsidered. Yes it is the documented behavior but that doesn't mean it's the right behavior. Functions should work as expected not just in the context of the module they are implemented in but the context of the problem

[issue46332] Use raise..from in logging/config instead of assigning __cause__

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: Lib/logging/config.py has this, which looks like it's partly remnants of old exception handling APIs: except ImportError: e, tb = sys.exc_info()[1:] v = ValueError('Cannot resolve %r: %s' % (s, e)) v.__cause__, v.__traceback__ = e, tb raise v

[issue46332] Use raise..from in logging/config instead of assigning __cause__

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- Removed message: https://bugs.python.org/msg410218 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46328] add sys.exception()

2022-01-10 Thread Dennis Sweeney
Dennis Sweeney added the comment: Would there be any value in spelling this as sys.active_exception() or sys.current_exception() or sys.get_exception() or sys.exception_in_flight() or similar? My only worry is confusion between sys.exception() versus builtins.Exception. -- nosy:

[issue46328] add sys.exception()

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46328] add sys.exception()

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- Removed message: https://bugs.python.org/msg410215 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46328] add sys.exception()

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: This is part of a larger plan to reduce the footprint of the exc_info triplet on the language. See https://gist.github.com/iritkatriel/3927147548b10a7929cb0b680e3adc52 History -- ___ Python tracker

[issue46332] Use raise..from in logging/config instead of assigning __cause__

2022-01-10 Thread Irit Katriel
New submission from Irit Katriel : Lib/logging/config.py has this, which looks like it's partly remnants of old exception handling APIs: except ImportError: e, tb = sys.exc_info()[1:] v.__cause__, v.__traceback__ = e, tb raise v It is clearer if written as: except ImportError

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-10 Thread Andreas H.
New submission from Andreas H. : The __eq__ method of ForwardRef does not take into account the module parameter. However, ForwardRefs with dissimilar module parameters are referring to different types even if they have different name. Thus also the ForwardRef's with same name but

[issue46326] 'virtualenv --clear' should prompt user before nuking entire directory

2022-01-10 Thread Ned Deily
Ned Deily added the comment: It appears you are describing behavior in the third-party virtualenv project; if so, you should report the problem to that project (https://pypi.org/project/virtualenv/). If similar behavior is also an issue with the Python standard library venv module (which is

[issue46328] add sys.exception()

2022-01-10 Thread Eric Snow
Eric Snow added the comment: FWIW, here's an alternative we should *not* pursue: return just the exception from sys.exc_info(). For compatibility, we would implement `__iter__` and `__getitem__` on BaseException, to duplicate the behavior of the current tuple. There are a number of good

[issue46328] add sys.exception()

2022-01-10 Thread Eric Snow
Eric Snow added the comment: So sys.exception() will be equivalent to sys.exc_info()[1] (or rather, sys.exc_info() will be (type(sys.exception()), sys.exception(), sys.exception().__traceback__))? That seems good to me. -- nosy: +eric.snow ___

[issue46331] 3.11: tracing revisits class line after class docstring

2022-01-10 Thread Ned Batchelder
New submission from Ned Batchelder : See the starred line in the trace output for 3.11: $ cat class_def.py class theClass: ''' the docstring. ''' def __init__(self): ''' Another docstring. ''' self.a = 1 $ python3.10 -c "import sys; print(sys.version)" 3.10.1 (main,

[issue46332] Use raise..from in logging/config instead of assigning __cause__

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +28719 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30517 ___ Python tracker ___

[issue41534] argparse : allow_abbrev behavior between 3.7 and 3.8

2022-01-10 Thread Steve Fox
Steve Fox added the comment: Fundamentally the use of allow_abbrev=False is now broken (it is allowing abbreviations when already explicitly told not to) The use of a single - for all options is much older than -- and exists in my unix utilities and many programs have been written to follow

[issue46320] runtime/interp/thread state refactoring leads to segmentation fault

2022-01-10 Thread Eric Snow
Eric Snow added the comment: I'll look into this today. To reproduce, I should run the urllib3 test suite? -- assignee: -> eric.snow stage: -> needs patch ___ Python tracker

[issue46326] 'virtualenv --clear' should prompt user before nuking entire directory

2022-01-10 Thread Eryk Sun
Eryk Sun added the comment: The implementation of `--clear` in virtualenv apparently was changed to align with venv. On the linked virtualenv issue, Bernát Gábor suggested creating a bpo issue for venv to determine how the issue should be resolved for virtualenv. -- nosy:

[issue46331] 3.11: tracing revisits class line after class docstring

2022-01-10 Thread Mark Shannon
Change by Mark Shannon : -- assignee: -> Mark.Shannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46331] 3.11: tracing revisits class line after class docstring

2022-01-10 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +28720 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30518 ___ Python tracker ___

[issue12756] datetime.datetime.utcnow should return a UTC timestamp

2022-01-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Hi Tony, from practical experience, it is a whole lot better to not deal with timezones in data processing code at all, but instead only use naive UTC datetime values everywhere, expect when you have to prepare reports or output which has a requirement to

[issue46326] 'virtualenv --clear' should prompt user before nuking entire directory

2022-01-10 Thread Eryk Sun
Eryk Sun added the comment: Ned, the CLI of venv has a `--clear` option, which invokes EnvBuilder [1] with clear=True. It's implemented by EnvBuilder.clear_directory(). Ali wants this method to prompt for confirmation before deleting the directory contents and also proposes the addition of

[issue46326] 'virtualenv --clear' should prompt user before nuking entire directory

2022-01-10 Thread Ned Deily
Ned Deily added the comment: > Ned, the CLI of venv has a `--clear` option, which invokes EnvBuilder [1] > with clear=True. Thanks, I saw that. However, the issue as written does not mention venv at all, only virtualenv. I wanted the OP to verify that it does apply to venv and, if the

  1   2   >