[issue43098] tarfile list() method does not show file type

2021-02-01 Thread Val Shkolnikov
New submission from Val Shkolnikov : The list() method of TarFile tarfile object shows question mark in place of file type in verbose mode. For instance python3 -m tarfile -v -l my.tar ?rwxr-xr-x vals/users 0 2021-01-16 18:28:30 bin/ ?rwxr-x--- vals/users266 2021-01-16

[issue43097] IndexError msg of random.choice() not helpful

2021-02-01 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43097] IndexError msg of random.choice() not helpful

2021-02-01 Thread wyz23x2
New submission from wyz23x2 : When you apply `random.choice` on empty sequences: >>> import random >>> random.choice([]) Traceback (most recent call last): File "", line 2, in return seq[self._randbelow(len(seq))] IndexError: list index out of range This message doesn't clearly state the

[issue43048] Printing RecursionError results in RecursionError

2021-02-01 Thread Vladimir Feinberg
Vladimir Feinberg added the comment: Oh, yes, I suppose, that'll truncate to just the first TracebackException. On Mon, Feb 1, 2021 at 4:38 PM Irit Katriel wrote: > > Irit Katriel added the comment: > > I meant to catch the exception in the constructor’s recursive call, and if > necessary

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: I still favor (3) -- I don't want to renege on the promise we made when we allowed overloading comparisons to return something other than a bool. -- ___ Python tracker

[issue43048] Printing RecursionError results in RecursionError

2021-02-01 Thread Irit Katriel
Irit Katriel added the comment: I meant to catch the exception in the constructor’s recursive call, and if necessary then the same again in format (if there are more function calls per exception in format, it will be necessary. The unit test from the 3.10 patch will tell). Would that not

[issue38302] [3.10] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **=

2021-02-01 Thread Brett Cannon
Brett Cannon added the comment: I'm totally fine with pushing this until b1 since this has been broken for ages. -- ___ Python tracker ___

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-01 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-01 Thread Mark Shannon
Mark Shannon added the comment: The differences between allowing the optimiser to remove truly redundant (in terms of control flow) boolean tests, or not, is slight. It only matters for __bool__() calls that have side effects. Like __hash__(), __bool__() should not produce side effects.

[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3
twoone3 <3197653...@qq.com> added the comment: Thank you for solving my problem -- ___ Python tracker ___ ___ Python-bugs-list

[issue42634] Incorrect line number in bytecode for try-except-finally

2021-02-01 Thread Mark Shannon
Mark Shannon added the comment: Sorry. I forgot the close the issue when it was fixed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-01 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-01 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: There's also a discrepancy between the docs and the signature for create_aggregate(): https://docs.python.org/3.9/library/sqlite3.html#sqlite3.Connection.create_aggregate create_aggregate(name, num_params, aggregate_class) The second parameter is

[issue38078] IDLE: Don't run internal code in user namespace.

2021-02-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Zachery, thank you for the PR to test. It turns out that the proposed change is more dangerous the the possible error it prevent. I could have easily missed the problem (not setting __file__, see PR). Before considering this again, I need to list ways to

[issue42464] Pathlib resolve() resolves non-existent ".." components with strict=False

2021-02-01 Thread Eryk Sun
Eryk Sun added the comment: I'd prefer to leave ".." in the path, at least with PosixPath. (It doesn't matter with WindowsPath.) The "there" component may be a symlink that's currently inaccessible. That said, Python's os.path.realpath() has a long history of naively resolving ".."

[issue43095] Windows does not raise IsADirectoryError

2021-02-01 Thread Eryk Sun
Eryk Sun added the comment: When an open attempts to access a directory as data, the error code from WinAPI CreateFileW is ERROR_ACCESS_DENIED (5), which maps to C EACCES and thus raises Python PermissionError. Python's io.FileIO() type could handle an EACCES error in Windows by checking

[issue42634] Incorrect line number in bytecode for try-except-finally

2021-02-01 Thread Ned Batchelder
Ned Batchelder added the comment: This problem no longer appears with master (commit 9eb11a139f). -- ___ Python tracker ___ ___

[issue41748] HTMLParser: comma in attribute values with/without space

2021-02-01 Thread Ezio Melotti
Ezio Melotti added the comment: Merged! Thanks for the report and the PR! -- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue43096] Adding `read_into` method to `asyncio.StreamReader`

2021-02-01 Thread jakirkham
New submission from jakirkham : To allow reading into a provided buffer without copying, it would be useful to have a `read_into` method on `asyncio.StreamReader`, which takes a buffer supporting the buffer protocol and fills it. -- components: asyncio messages: 386114 nosy:

[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2021-02-01 Thread Paul Moore
Paul Moore added the comment: I'm not sure why, but the PR to update the bundled pip to 21.0.1 (and setuptools to 52.0.0) merged cleanly, so this may be obsolete now. -- ___ Python tracker

[issue43064] Cannot clear signal handler set with loop.add_signal_handler in forked process with signal.signal

2021-02-01 Thread Selim Belhaouane
Selim Belhaouane added the comment: Playing with this a bit more, I found a weird workaround. By adding the following to the top of worker_sync(), Experiment 1 produces the expected result. def worker_sync(): async def clear_asyncio_signal_handlers(): loop =

[issue41748] HTMLParser: comma in attribute values with/without space

2021-02-01 Thread miss-islington
miss-islington added the comment: New changeset 0874491bcc392f7bd9c394ec2fdab183e3f320dd by Miss Islington (bot) in branch '3.9': bpo-41748: Handles unquoted attributes with commas (GH-24072) https://github.com/python/cpython/commit/0874491bcc392f7bd9c394ec2fdab183e3f320dd --

[issue41748] HTMLParser: comma in attribute values with/without space

2021-02-01 Thread miss-islington
miss-islington added the comment: New changeset 0869a713f21f4b2fe021d802cf18f1b1af53695f by Miss Islington (bot) in branch '3.8': bpo-41748: Handles unquoted attributes with commas (GH-24072) https://github.com/python/cpython/commit/0869a713f21f4b2fe021d802cf18f1b1af53695f --

[issue26455] Inconsistent behavior with KeyboardInterrupt and asyncio futures

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

[issue41748] HTMLParser: comma in attribute values with/without space

2021-02-01 Thread STINNER Victor
STINNER Victor added the comment: Oh, thank you Karl Dubost for the fix! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38302] [3.10] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **=

2021-02-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Friendly reminder that this issue is currently blocking the 3.10a5 release. If you are ok with waiting for the next release to include the fix, please say so here or drop me an email/ -- nosy: +pablogsal

[issue42634] Incorrect line number in bytecode for try-except-finally

2021-02-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Friendly reminder that this issue is currently blocking the 3.10a5 release. If you are ok with waiting for the next release to include the fix, please say so here or drop me an email/ -- nosy: +pablogsal

[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2021-02-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Friendly reminder that this issue is currently blocking the 3.10a5 release. If you are ok with waiting for the next release to include the fix, please say so here or drop me an email/ -- ___ Python tracker

[issue43091] console encode is not utf-8!!

2021-02-01 Thread Eryk Sun
Eryk Sun added the comment: I assume you're linking to the CRT dynamically, which is shared with "python39.dll", which means you're sharing the configured locale with Python. Since you're not using an isolated configuration, the LC_CTYPE locale will be set to the current user's default

[issue41748] HTMLParser: comma in attribute values with/without space

2021-02-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +23231 pull_request: https://github.com/python/cpython/pull/24416 ___ Python tracker ___

[issue41748] HTMLParser: comma in attribute values with/without space

2021-02-01 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +23230 pull_request: https://github.com/python/cpython/pull/24415 ___ Python tracker

[issue41748] HTMLParser: comma in attribute values with/without space

2021-02-01 Thread Ezio Melotti
Ezio Melotti added the comment: New changeset 9eb11a139fac5514d8456626806a68b3e3b7eafb by Karl Dubost in branch 'master': bpo-41748: Handles unquoted attributes with commas (#24072) https://github.com/python/cpython/commit/9eb11a139fac5514d8456626806a68b3e3b7eafb --

[issue43095] Windows does not raise IsADirectoryError

2021-02-01 Thread Jairo Llopis
New submission from Jairo Llopis : Trying to read a directory on Linux raises the expected exception: Python 3.9.1 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pathlib >>>

[issue43088] Regression in math.hypot

2021-02-01 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40042] Enum Flag: psuedo-members have None for name attribute

2021-02-01 Thread Ethan Furman
Ethan Furman added the comment: This issue is fixed in #38250. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed superseder: -> enum.Flag should be more set-like ___ Python tracker

[issue42727] [Enum] EnumMeta.__prepare__ needs to accept **kwds

2021-02-01 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC

2021-02-01 Thread Ethan Furman
Ethan Furman added the comment: That patch was rejected in favor of updating Enum to use `__set_name__` to do the final creation of enum members. The same thing could be done for ABC, but I lack the C skills to make it happen. -- ___ Python

[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC

2021-02-01 Thread Ethan Furman
Change by Ethan Furman : -- Removed message: https://bugs.python.org/msg386099 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-01 Thread Nicholas Chammas
New submission from Nicholas Chammas : The doc for sqlite3.create_function shows the signature as follows: https://docs.python.org/3.9/library/sqlite3.html#sqlite3.Connection.create_function ``` create_function(name, num_params, func, *, deterministic=False) ``` But it appears that the

[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC

2021-02-01 Thread Ethan Furman
Ethan Furman added the comment: That patch was reject in favor of updating Enum to use `__set_name__` to do the final creation of enum members. The same thing could be done for ABC, but I lack the C skills to make it happen. -- assignee: ethan.furman -> superseder:

[issue42911] Addition chains for pow saves 5-20% time for pow(int, int)

2021-02-01 Thread Mark Dickinson
Mark Dickinson added the comment: Looks like Tim isn't taking the bait. :-) @Jurjen: Thank you for the suggestion and PR, but I'm going to close here; for me this ends up on the wrong side of the performance / complexity trade-off. -- resolution: -> rejected stage: patch review ->

[issue43063] zipfile.Path / importlib.resources raises KeyError if a file wasn't found

2021-02-01 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-02-01 Thread Steve Dower
Steve Dower added the comment: On Windows it should only affect non-exported functions. Comparing "dumpbin /exports" output will tell you whether anything has changed there. The bigger concern is if it merges identical functions that are compared by function pointer. I know we've had issues

[issue43093] Make modules picklable

2021-02-01 Thread Arusekk
Arusekk added the comment: Sorry, I forgot to state what is my actual goal: for the module objects to be pickleable in native CPython (possibly from C layer) without the need to add this to every code that wants to pickle module objects. The point is that they can already be unpickled from

[issue42464] Pathlib resolve() resolves non-existent ".." components with strict=False

2021-02-01 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hi, I don't understand the point here. If you go back on a folder '..', IMO has more sense remove the '..', that is a way to resolve it -- nosy: +eamanu ___ Python tracker

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Mark, what is the status of this issue? This is marked as a release blocker so I would prefer not to release the next alpha with this being unfixed. -- ___ Python tracker

[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-02-01 Thread Austin Lamb
Austin Lamb added the comment: Ping - can anyone suggest either how ctypes does its exporting, or suggest tests I could run to confirm if this change affects python code? The entire test suite in the repo passes. -- ___ Python tracker

[issue43053] Speed up math.isqrt, again

2021-02-01 Thread Mark Dickinson
Mark Dickinson added the comment: > Java's implementation of BigInteger.sqrt can't do that. :-) Well, okay, depending on your definition of "a few", actually it can, but Python is still faster. -- ___ Python tracker

[issue43074] Unable to use system proxy with HTTPS connection on Windows

2021-02-01 Thread Steve Dower
Steve Dower added the comment: requests is a third-party library that has no obligation to use urllib's functionality. If you can show the same behaviour with urllib alone, we can treat it as an issue here. Otherwise, you'll need to report it to requests. --

[issue43093] Make modules picklable

2021-02-01 Thread Arusekk
New submission from Arusekk : Currently pickling functions and types stores modules by their name. So I believe it is possible to support pickling module objects with the following code (based on the logic in PyPy, which supports pickling modules): import copyreg import types import pickle

[issue43053] Speed up math.isqrt, again

2021-02-01 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +23229 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24414 ___ Python tracker ___

[issue43053] Speed up math.isqrt, again

2021-02-01 Thread Mark Dickinson
Mark Dickinson added the comment: > the complication probably amounts to no more than 10-20 extra lines of C code A net difference of 16 lines of code, as it turns out. The branch is here: https://github.com/mdickinson/cpython/tree/isqrt-performance Informal not-very-scientific timings

[issue26455] Inconsistent behavior with KeyboardInterrupt and asyncio futures

2021-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: If you just need help, I recommend https://discuss.python.org/c/users/7 If you still have an issue with ^C, open a new issue. -- ___ Python tracker

[issue26455] Inconsistent behavior with KeyboardInterrupt and asyncio futures

2021-02-01 Thread Matej Volf
Matej Volf added the comment: python/asyncio is archived now and there is no definitive resolution, nor a concrete workaround in that thread. has this progressed elsewhere? or is it still unresolved? could anyone please show sample workaround code? (i need to call some cleanup code which

[issue43085] Loosening | and |= operator type checking restriction

2021-02-01 Thread Brandt Bucher
Brandt Bucher added the comment: Any class that registers itself as a Mapping/MutableMapping using their "register" methods (*not* through inheritance) will be lacking the new methods. This includes all C extensions. Further, binary "|" would require subclasses of these ABCs to have a

[issue38307] Add .end_lineno attribute to pyclbr _Objects

2021-02-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 000cde59847beaf5fa7b73633e1f3c898fe5bf90 by Aviral Srivastava in branch 'master': bpo-38307: Add end_lineno attribute to pyclbr Objects (GH-24348) https://github.com/python/cpython/commit/000cde59847beaf5fa7b73633e1f3c898fe5bf90 --

[issue43085] Loosening | and |= operator type checking restriction

2021-02-01 Thread Vedran Čačić
Vedran Čačić added the comment: @Raymond: why can't ABCs have _default_ implementation of | and |=, in terms of other supported methods (such as update)? It seems to me this would be the best of both worlds. -- nosy: +veky ___ Python tracker

[issue43085] Loosening | and |= operator type checking restriction

2021-02-01 Thread Brandt Bucher
Brandt Bucher added the comment: Yurii, I agree with Raymond that it's probably not worth adding new ABCs for this. I'm happy to consider patches that add these operators to concrete stdlib mappings on a case-by-case basis. However, please be aware that we already went through a fairly

[issue43048] Printing RecursionError results in RecursionError

2021-02-01 Thread Vladimir Feinberg
Vladimir Feinberg added the comment: A simple catch may not work (the very first TracebackException is the one that gets the RecursionError during initialization of its __context__), but one thing I was thinking about was walking the __context__ pointers and nulling out anything past the

[issue42834] [subinterpreters] Convert "global" static variable caches in _json to heap variables

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

[issue42834] [subinterpreters] Convert "global" static variable caches in _json to heap variables

2021-02-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset b5931f1d9f1f9f907e5cb6e193154672f78c1225 by Ken Jin in branch 'master': bpo-42834: Fix _json internal caches for subinterpreters (GH-24121) https://github.com/python/cpython/commit/b5931f1d9f1f9f907e5cb6e193154672f78c1225 --

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-02-01 Thread hai shi
hai shi added the comment: I found `type.__name__` has the implementation details in https://github.com/python/cpython/blob/master/Objects/typeobject.c#L486. IMHO, keep the consistency in `PyType_GetName()` is OK. Victor, Petr. Do you think it make senses? --

[issue43092] Python installation fails to install pip3 if pip, setuptools in ~/.local

2021-02-01 Thread Daniel Colascione
New submission from Daniel Colascione : The ensurepip module in the Python distribution bootstraps the pip package manager. The Python build system runs this module during installation so that the resulting Python installation is ready to install packages. Right now, the pip command that

[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3
twoone3 <3197653...@qq.com> added the comment: when i use python 3.6.5 There won't be this problem -- ___ Python tracker ___ ___

[issue43091] console encode is not utf-8!!

2021-02-01 Thread Christian Heimes
Christian Heimes added the comment: It's not a Python problem. The Python configuration API only configures Python's input/output API to UTF-8 mode. It does not affect the C++ input/output cout API. -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3
twoone3 <3197653...@qq.com> added the comment: Look it! It's really Python's problem -- Added file: https://bugs.python.org/file49785/389e661314157b8f.jpg ___ Python tracker

[issue43091] console encode is not utf-8!!

2021-02-01 Thread STINNER Victor
STINNER Victor added the comment: PyPreConfig.utf8_mode=1 enables the *Python* UTF-8 Mode: * https://docs.python.org/dev/c-api/init_config.html?highlight=pypreconfig_initpythonconfig#c.PyPreConfig.utf8_mode * https://docs.python.org/dev/library/os.html#utf8-mode > then i 'cout <<

[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3
twoone3 <3197653...@qq.com> added the comment: This is out put -- Added file: https://bugs.python.org/file49784/Screenshot_2021_0201_225300.png ___ Python tracker ___

[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3
twoone3 <3197653...@qq.com> added the comment: After I changed it to 1, the console code remained unchanged. I use' chcp 65001' first. then i use PyPreConfig and Py_initialize then i 'cout << u8"Chinese中文" << endl; It is not utf-8. -- ___ Python

[issue43085] Loosening | and |= operator type checking restriction

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

[issue43091] console encode is not utf-8!!

2021-02-01 Thread Christian Heimes
Christian Heimes added the comment: "utf8_mode = -1" falls back to command line, env vars, locales, and eventually disables UTF-8 mode. Try "cfg.utf8_mode = 1" as documented at https://docs.python.org/3/c-api/init_config.html?highlight=pypreconfig_initpythonconfig#c.Py_PreInitializeFromArgs

[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3
twoone3 <3197653...@qq.com> added the comment: PyPreConfig cfg; PyPreConfig_InitPythonConfig(); cfg.utf8_mode = -1; PyStatus status = Py_PreInitialize(); if (PyStatus_Exception(status)) {

[issue43091] console encode is not utf-8!!

2021-02-01 Thread Christian Heimes
Christian Heimes added the comment: What's the result of the Py_PreInitialize() call? -- nosy: +christian.heimes ___ Python tracker ___

[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3
New submission from twoone3 <3197653...@qq.com>: https://docs.python.org/3/c-api/init_config.html?highlight=pypreconfig_initpythonconfig#c.PyPreConfig When I use this api,The coding of the console has not changed,utf8_mode is 1. This is my code. PyPreConfig_InitPythonConfig(); cfg.utf8_mode =

[issue40601] [C API] Hide static types from the limited C API

2021-02-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +23227 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24146 ___ Python tracker ___

[issue42647] Unable to use concurrent.futures in atexit hook

2021-02-01 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43085] Loosening | and |= operator type checking restriction

2021-02-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Because ABCs set minimum standards for compliance, they can't be extended without breaking existing code that registers to the ABC. Brandt added __or/ior__ support to some of the mapping classes in the standard library, but it is a fact of life that

[issue42647] Unable to use concurrent.futures in atexit hook

2021-02-01 Thread Julien Danjou
Julien Danjou added the comment: > Is there a real-world situation where it's specifically necessary or even > beneficial to utilize ThreadPoolExecutor at this point after thread > finalization rather than earlier in the program? Not that it doesn't exist, > but to me it intuitively seems

[issue43085] Loosening | and |= operator type checking restriction

2021-02-01 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: Hi Raymond, I was trying to add __or__ method for collections.abc.Mapping, __ior__ method for collections.abc.MutableMapping, link to issue - https://bugs.python.org/issue42841. I can extract code and move it to separate classes as you

[issue43090] parseaddr (from email.utils) returns invalid input string instead of ('', '')

2021-02-01 Thread R. David Murray
R. David Murray added the comment: The return value is correct. Interpreted as an email address, 'randomstring' is a local mailbox. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue43056] Use of dicts in 4.2 and 4.7 of Python tutorial a bit confusing

2021-02-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The link to https://docs.python.org/3.9/library/stdtypes.html#typesmapping isn't a forward reference. It is a link to the main docs which is entirely appropriate and likely the only way a beginner would find that section. I concur with Terry that this

[issue43089] The optional argument to random.Random() is called "x" not "seed"

2021-02-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: > It would be better to rename "x" to "seed" but that's > not backwards compatible. As you said, this would be a breaking change, so we can't do it. -- resolution: -> rejected stage: -> resolved status: open -> closed

[issue43090] parseaddr (from email.utils) returns invalid input string instead of ('', '')

2021-02-01 Thread Livio Bencik
New submission from Livio Bencik : ``` from email.utils import parseaddr parseaddr('randomstring') ``` returns ('', 'randomstring'), instead of ('', '') as the documentation says. -- components: email messages: 386062 nosy: barry, lbenc135, r.david.murray priority: normal severity:

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-01 Thread Mark Shannon
Mark Shannon added the comment: New changeset 0332e569c12d3dc97171546c6dc10e42c27de34b by Mark Shannon in branch 'master': bpo-42990: Further refactoring of PyEval_ functions. (GH-24368) https://github.com/python/cpython/commit/0332e569c12d3dc97171546c6dc10e42c27de34b --

[issue43089] The optional argument to random.Random() is called "x" not "seed"

2021-02-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-02-01 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23226 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23428 ___ Python tracker

[issue43016] Improve tests for curses

2021-02-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list