[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

[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

[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 ___

[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:

[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:

[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 ___

[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

[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 Dong-hee Na
Change by Dong-hee Na : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[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 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 --

[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
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 : -- pull_requests: +28725 pull_request: https://github.com/python/cpython/pull/30524 ___ 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 : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28724 pull_request: https://github.com/python/cpython/pull/30523 ___ Python tracker

[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

[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

[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 ___

[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 --

[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

[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

[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 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

[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

[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

[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 ___

[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

[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

[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:

[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 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:

[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

[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 ___

[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 ___

[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

[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

[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:

[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:

[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

[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

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

2022-01-10 Thread Quentin Pradet
Quentin Pradet added the comment: We haven't opened an issue for this, but discussed it in Discord, sorry. It also does not always crash on GitHub Actions. Here's an example of a crash: https://github.com/urllib3/urllib3/runs/4740730329?check_suite_focus=true If nox can't find your Python

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

2022-01-10 Thread Eric Snow
Eric Snow added the comment: It looks like the urllib3 CI is passing for 3.11.0a3: https://github.com/urllib3/urllib3/runs/4762856431 (Ubuntu 3.11-dev test-3.11). Is there a urllib3 issue number you could point me at? -- ___ Python tracker

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

2022-01-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2022-01-10 Thread Eric Snow
Eric Snow added the comment: I must be missing something. Here is what I did: ``` $ cd cpython $ git checkout main $ make -j8 $ ./python -v venv ../venv-urllib3 $ cd .. $ git clone https://github.com/urllib3/urllib3 $ cd urllib3 $ ../venv-urllib3/bin/python3 -m pip install nox $

[issue46226] User specific paths added to System PATH environment variable

2022-01-10 Thread Steve Dower
Steve Dower added the comment: Without logs or the ability to reproduce it, there's not much we can do. I ran the install and it put the variables in the right place, so it's not happening all the time. The install logs are usually detailed enough to see why decisions like this are made,

[issue46330] Simplify the signature of __exit__

2022-01-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Implementation and transition issues aside, I like this idea. People can mostly just use isinstance() checks to match one or more exception types. Also, the single argument form would work well with structural pattern matching: def __exit__(self,

[issue46226] User specific paths added to System PATH environment variable

2022-01-10 Thread Aleksandr Krymskiy
Aleksandr Krymskiy added the comment: I installed 3.10, and then removed 3.9 that I had installed previously. Python is installed in "C:\Program Files\Python310". The only thing that exists under %LocalAppData% is an empty directory

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

2022-01-10 Thread Nikita Sobolev
Change by Nikita Sobolev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46057] argparse: embedded groups may prevent options from being in help output

2022-01-10 Thread paul j3
paul j3 added the comment: "I tried to create a group hierarchy in a way that I can pass the responsibility of argument validation to the argument parser." I looked at your example in: https://bugs.python.org/issue46058 The many levels of nesting groups was confusing, but now I realize

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

2022-01-10 Thread Trey Hunner
Trey Hunner added the comment: I just realized those only affects some terms. parameter works: https://docs.python.org/3/glossary.html#term-parameter And LBYL does work but only if LBYL was used: https://docs.python.org/3/glossary.html#term-LBYL The EAFP term does link to #term-LBYL

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

2022-01-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 13e4659276c2af2fa5b0f2b3a31dcd69064868ef by Nikita Sobolev in branch 'main': bpo-46327: [Enum] remove skipped tests (GH-30512) https://github.com/python/cpython/commit/13e4659276c2af2fa5b0f2b3a31dcd69064868ef --

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

2022-01-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 582286d71c7ee61f5376a846a83c7be4a5727636 by Nikita Sobolev in branch 'main': bpo-46301: [Enum] fix refleak tests (GH30510) https://github.com/python/cpython/commit/582286d71c7ee61f5376a846a83c7be4a5727636 --

[issue32679] concurrent.futures should store full sys.exc_info()

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: Following the changes in issue45711, exc_info[2] is exactly the same as exc_info[1].__traceback__, so there is no point in making this change now. -- resolution: -> not a bug stage: -> resolved status: open -> closed

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

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

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

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: New changeset 0d639678d33a0f085851a07259b8fe2782943118 by Irit Katriel in branch 'main': bpo-46332: use raise..from instead of assigning __cause__ and raising (GH-30517) https://github.com/python/cpython/commit/0d639678d33a0f085851a07259b8fe2782943118

[issue46335] asyncio.create_subprocess_exec throws RuntimeError yet still executes subprogram

2022-01-10 Thread Clint Olsen
New submission from Clint Olsen : When stress testing my code in a process-limited environment I found that despite throwing an exception, it appears the process still executes. Attempting to catch/retry results in a duplicate. Attached is a script that I was able to repro the problem on

[issue46101] argparse: using parents & subcommands, options can be ignored

2022-01-10 Thread paul j3
paul j3 added the comment: This patch should be rejected. By using `common_opts_parser` as parent to both the main and subparsers, you have defined the same argument in both. By a long standing patch, the value assigned in the subparser has precedence (whether it's the default or user

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

2022-01-10 Thread Paul Ganssle
Paul Ganssle added the comment: > 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 show

[issue46328] add sys.exception()

2022-01-10 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46142] python --help output is too long

2022-01-10 Thread Éric Araujo
Éric Araujo added the comment: BTW on the PR I am asking for help with string formatting, to print an invalid X option (a wchar_t string) using the PyStatus API (needs char). Help from a proper C programmer would be appreciated :) -- ___ Python

[issue46142] python --help output is too long

2022-01-10 Thread Éric Araujo
Éric Araujo added the comment: > For me, the best CLI is "git help", "git help init", etc. I don’t think that prior art applies here, as python does not have subcommands. `--help` and `--help-env` are straightforward, `-X help` is a bit unusual but at least it’s part of the optional `-X`

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: Good catch. Do you want to submit a PR? I agree that the repr() could also be better (but please only show other values if they differ from the default). -- versions: +Python 3.11 ___ Python tracker

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-10 Thread Guido van Rossum
Change by Guido van Rossum : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

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

2022-01-10 Thread Alex Waygood
Alex Waygood added the comment: Reproduced on safari on my iPad, as well. -- nosy: +AlexWaygood ___ Python tracker ___ ___

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

2022-01-10 Thread Trey Hunner
New submission from Trey Hunner : The glossary page allows for anchor links to jump to specific definitions. For example: https://docs.python.org/3.9/glossary.html#term-lbyl will open the glossary page with the web browser showing the LBYL at the top of the page. This no longer works in

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

2022-01-10 Thread Tony Rice
Tony Rice added the comment: I would argue that PEP20 should win over backward compatibility, in addition to the points I hinted at above, practicality beats purity -- ___ Python tracker

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

2022-01-10 Thread R. David Murray
R. David Murray added the comment: Note also that datetime.now() gives you a naive datetime. From an API consistency standpoint I think it makes sense that datetime.utcnow() gives a naive datetime. It would actually be confusing (IMO) for it to return an aware datetime. I can see why you

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

2022-01-10 Thread Quentin Pradet
Quentin Pradet added the comment: Yes, exactly. `pip install nox && nox -Rs test-3.11`. My reproducer is still too big to be useful, and I failed to reproduce this on Docker. If you can't reproduce, I'll work on the reproducer more. Thanks! --

[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:

[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

[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

[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

[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

[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 ___

[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 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:

[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

[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

[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

[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
Change by Irit Katriel : -- keywords: +patch pull_requests: +28719 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30517 ___ 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:

[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

[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,

[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
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

[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 footprint on the language. See https://gist.github.com/iritkatriel/3927147548b10a7929cb0b680e3adc52 -- ___ 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

[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

[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: 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
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

  1   2   >