[issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown()

2020-01-16 Thread Kyle Stanley
Kyle Stanley added the comment: > It was a bit more involved than I originally anticipated, as I had to make a > minor change in the _worker() function to allow the new parameter to be > compatible with wait (which is important, as it prevents dangling threads). Never mind, I just realized

[issue27540] msvcrt.ungetwch() calls _ungetch()

2020-01-16 Thread Zackery Spytz
Zackery Spytz added the comment: Python 2 is EOL, so I think this issue should be closed. -- nosy: +ZackerySpytz ___ Python tracker ___

[issue38840] incorrect __all__ list in multiprocessing.managers module

2020-01-16 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz versions: +Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue38840] incorrect __all__ list in multiprocessing.managers module

2020-01-16 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +17430 pull_request: https://github.com/python/cpython/pull/18034 ___ Python tracker ___

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Inada Naoki
Change by Inada Naoki : -- superseder: -> Allow mappings as globals (was: Fix dictionary subclass ...) ___ Python tracker ___ ___

[issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown()

2020-01-16 Thread Kyle Stanley
Kyle Stanley added the comment: As of now, I have the implementation for ThreadPoolExecutor working correctly, and a unit test added to ensure its behavior. It was a bit more involved than I originally anticipated, as I had to make a minor change in the _worker() function to allow the new

[issue39354] collections.UserString format and format_map return a string

2020-01-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: It is too late is the life of UserString for a design change, so I'm going to have to close this as more likely to harm existing code than to benefit future code. Also, despite you expectations, this isn't atypical for Python classes. For example, the

[issue39365] Support (SEEK_END/SEEK_CUR) relative seeking in StringIO

2020-01-16 Thread random832
New submission from random832 : Currently this fails with a (misleading in the case of SEEK_END) "Can't do nonzero cur-relative seeks" error, but there's no conceptual reason it shouldn't be possible. The offset should simply be taken as a character offset, without any pretense that the

[issue17005] Add a topological sort algorithm

2020-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I have been playing with the API for a while and I have to say that I have fallen in love with it: I tried to reimplement many snippets of parallel and non-parallel topological-order processing of a graph with this and it always fits very nicely. I

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > exec() function is currently quite clear A recent case: https://bugs.python.org/issue38316, co_stacksize was quite clear what it is. Turned out, a bug in the documentation (likely, just someone forgot to update it to the actual code). That's just one

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > Namespace performances are really critical for overall Python performances. Yeah, that's why I'd like for myself and other people to make it easy to explore the behavior of namespace lookups, to see how to optimize them. > You're free to fork Python and

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > Paul: you're are in front of 3 core developers who are rejecting your feature > request. But no, it's not my feature request. There were 2 tickets by at least 2 people. I just saw my case to be similar to cases of those people, so instead of creating

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > you ask to modify Python so you can pass dict subclasses as namespaces and > expect CPython to respect the mapping protocol But no, per your own account, you made noticeable, though not complete, code changes in that direction. The only thing I'm saying

[issue39298] add BLAKE3 to hashlib

2020-01-16 Thread Jack O'Connor
Jack O'Connor added the comment: Ok, I've added Rust bindings to the BLAKE3 C implementation, so that I can benchmark it in a vaguely consistent way. My laptop is an i5-8250U, which should be very similar to yours. (Both are "Kaby Lake Refresh".) My end result do look similar to yours with

[issue39308] Literal[True] prints as Literal[1] in some cases

2020-01-16 Thread Guido van Rossum
Guido van Rossum added the comment: In the PR (https://github.com/python/cpython/pull/17974) we found that there's no great solution for this. This issue will probably linger for a while, but maybe we should just set an example and close it, since we're unlikely to take any action?

[issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata'

2020-01-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: Given that this issue only affects those who upgraded from beta versions, I'm inclined to say it shouldn't be part of the installer, and that the long tail of users affected probably can track it down here. I don't feel strongly about it though.

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: exec() function is currently quite clear on which types are accepted or not: exact dict for globals, mapping for locals. * "If only globals is provided, it must be a dictionary (and not a subclass of dictionary), which will be used for both the global and

[issue39364] Automatically tabulate module contents in the docs

2020-01-16 Thread alex c
New submission from alex c : By default, the docs.python.org page for a module does not list or tabulate the contents of that module. This makes it difficult to browse a module's functions or get a bird's-eye view. For example, the logging module

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: More detail about the implementation. Currently, namespaces are accessed directly with C functions which expect to get an exact dict type: these functions are designed for performance, not to handle dict subclasses, on purpose. Supporting dict subclasses

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: > Depends on the definition of "sandbox". In bpo-36220, it clearly means "execute untrusted code": hide access to the filesystem for example. > I for example interested in study of some properties of corpus of Python code. This issue is a feature request:

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2020-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, given that the code did not match the docstring and that we are changing the code to match the clarified docstring, should we consider this a bugfix, and, should we backport it? -- ___ Python tracker

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > IMHO we should reject dict subclasses to make Python (especially ceval.c) > more efficient. The global type must be checked at every place where it's > possible to specify or override globals. Like the exec() function. I agree with Victor in that

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: Ok, so the patch for my usecase (STORE_GLOBAL) is vividly trivial, so to go thru the full circle, I posted it: https://github.com/python/cpython/pull/18033 . -- ___ Python tracker

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2020-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, if I understand your last message (msg302299), the docstring should read: Unbind for this widget the event SEQUENCE. If FUNCID is given, only unbind the function identified with FUNCID and also delete that command. The main doc

[issue36220] LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently

2020-01-16 Thread Paul Sokolovsky
Change by Paul Sokolovsky : -- pull_requests: +17429 pull_request: https://github.com/python/cpython/pull/18033 ___ Python tracker ___

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread ppperry
ppperry added the comment: I was not attempting to run untrusted Python code when I filed this bug report. -- ___ Python tracker ___

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: s/only our own usecase/only your own usecase/ (missing "y" typo) -- ___ Python tracker ___ ___

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > Later, I closed my pysandbox beause it was "broken by design": https://lwn.net/Articles/574215/ Thanks for the link, insightful. Still unclear, by design of what it's broken ;-). > Paul Sokolovsky wrote in bpo-36220 than his idea is also to implement a

[issue38076] Make struct module PEP-384 compatible

2020-01-16 Thread Dino Viehland
Dino Viehland added the comment: And here's a variation which doesn't involve any instances from the module: import _struct class C: def __init__(self): self.pack = _struct.pack def __del__(self): self.pack('I', -42) _struct.x = C() --

[issue38076] Make struct module PEP-384 compatible

2020-01-16 Thread Dino Viehland
Dino Viehland added the comment: This is a relatively simple repro of the underlying problem: import _struct s = _struct.Struct('i') class C: def __del__(self): s.pack(42, 100) _struct.x = C() It's a little bit different in that it is actually causing the module to attempt to

[issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata'

2020-01-16 Thread Mariatta
Mariatta added the comment: Just wanted to add that I got the same error in Python 3.8.1. I ran the script that @Jaraco wrote above: python -c "import importlib.metadata, shutil, pathlib; file = pathlib.Path(importlib.metadata.__file__); str(file).endswith('__init__.py') and

[issue39363] zipfile with multiprocessing: zipfile.BadZipFile

2020-01-16 Thread maxime-lemonnier
maxime-lemonnier added the comment: Here's my console output: python3 test_filesource.py lock file access_mode = file, nb processes = 1, res = 110289, 0.08039402961730957 ms/frame file access_mode = file, nb processes = 4, res = 110289, 0.32297492027282715 ms/frame lock access_mode = lock, nb

[issue39363] zipfile with multiprocessing: zipfile.BadZipFile

2020-01-16 Thread maxime-lemonnier
New submission from maxime-lemonnier : zipfile sometimes throws zipfile.BadZipFile when opening the same zip file from multiple processes see attached file to reproduce the error. You'll need a zipfile with multiple files in it to reproduce. -- components: Library (Lib) files:

[issue39363] zipfile with multiprocessing: zipfile.BadZipFile

2020-01-16 Thread maxime-lemonnier
Change by maxime-lemonnier : Added file: https://bugs.python.org/file48848/foo_bar_small.zip ___ Python tracker ___ ___ Python-bugs-list

[issue39362] add option to make chunksize adaptive for multiprocessing.pool methods

2020-01-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39362] add option to make chunksize adaptive for multiprocessing.pool methods

2020-01-16 Thread Ned Deily
Change by Ned Deily : -- nosy: +davin, pitrou -ned.deily, ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

2020-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is not a regression: the code only worked on 3.7 because there is a sleep in the pool maintainance loop that makes the pool more likely being more consistent, but is the same problem as there is a race condition. For example, reducing the sleep

[issue38076] Make struct module PEP-384 compatible

2020-01-16 Thread Dino Viehland
Dino Viehland added the comment: It seems problematic that_PyInterpreterState_ClearModules runs before all instances from a module have been cleared. If PyState_FindModule is no longer able to return module state then there's no way for a module to reliably work at shutdown other than

[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

2020-01-16 Thread gaborbernat
gaborbernat added the comment: Reported the issue downstream too under https://github.com/swagger-api/swagger-codegen/issues/9991 -- ___ Python tracker ___

[issue38076] Make struct module PEP-384 compatible

2020-01-16 Thread Dino Viehland
Change by Dino Viehland : -- nosy: +eelizondo -dino.viehland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: This code snippet seems to trigger a crash in the _struct module: https://bugs.python.org/issue38076#msg360127 -- nosy: +vstinner ___ Python tracker

[issue38076] Make struct module PEP-384 compatible

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: I can reproduce the crash on Linux. I interrupt the problem with CTRL+c (why is it blocked? I don't know). Then it does crash. First, _PyImport_Cleanup() does clear all modules including _struct. Then, _PyImport_Cleanup() calls gc.collect() which

[issue31862] Port the standard library to PEP 489 multiphase initialization

2020-01-16 Thread Mariatta
Change by Mariatta : -- pull_requests: -13420 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

2020-01-16 Thread gaborbernat
gaborbernat added the comment: An FYI update, the code is used by swagger-codegen to generate HTTP clients (https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/python/api_client.mustache#L73). The example below basically replicates creating

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

2020-01-16 Thread hai shi
Change by hai shi : -- pull_requests: +17428 pull_request: https://github.com/python/cpython/pull/18032 ___ Python tracker ___

[issue38076] Make struct module PEP-384 compatible

2020-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Executing this simple code after this commit segfaults: from multiprocessing.pool import Pool class A(object): def __init__(self): self.pool = Pool() def __del__(self): self.pool.close() self.pool.join() a = A() [1]

[issue39362] add option to make chunksize adaptive for multiprocessing.pool methods

2020-01-16 Thread Forest
Change by Forest : -- components: +Library (Lib) -macOS type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39362] add option to make chunksize adaptive for multiprocessing.pool methods

2020-01-16 Thread Forest
New submission from Forest : In the multiprocessing Pool methods like map, chunksize determines the trade-off between computation per task and inter-process communication. Setting chunksize appropriately has a large effect on efficiency. However, for users directly interacting with the map

[issue39357] bz2: Remove deprecated buffering parameter of bz2.BZ2File

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9baf242fc733ab8a52a0b6201d95c6fdb8251745 by Victor Stinner in branch 'master': bpo-39357: Remove buffering parameter of bz2.BZ2File (GH-18028) https://github.com/python/cpython/commit/9baf242fc733ab8a52a0b6201d95c6fdb8251745 --

[issue39357] bz2: Remove deprecated buffering parameter of bz2.BZ2File

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

[issue31031] Unify duplicate bits_in_digit and bit_length

2020-01-16 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue31031] Unify duplicate bits_in_digit and bit_length

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: "On BSD, there's a library function called fls() that we could use, and GCC provides __builtin_clz()." See also rejected bpo-29782 and GH-594. If someone wants to experiment that, I suggest to add Include/internal/pycore_pymath.h, move _Py_bit_length()

[issue31031] Unify duplicate bits_in_digit and bit_length

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: Thanks Niklas Fiekas for merging duplicated code ;-) It should make factorial_partial_product() a little bit more efficient! -- ___ Python tracker

[issue31031] Unify duplicate bits_in_digit and bit_length

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset c5b79003f5fe6aa28a2a028680367839ba8677db by Victor Stinner (Niklas Fiekas) in branch 'master': bpo-31031: Unify duplicate bits_in_digit and bit_length (GH-2866) https://github.com/python/cpython/commit/c5b79003f5fe6aa28a2a028680367839ba8677db

[issue36974] Implement PEP 590

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-39361: [C API] Document PyTypeObject.tp_print removal in What's New In Python 3.9. -- ___ Python tracker ___

[issue39361] [C API] Document PyTypeObject.tp_print removal in What's New In Python 3.9

2020-01-16 Thread STINNER Victor
New submission from STINNER Victor : commit aacc77fbd77640a8f03638216fa09372cc21673d Author: Jeroen Demeyer Date: Wed May 29 20:31:52 2019 +0200 bpo-36974: implement PEP 590 (GH-13185) Co-authored-by: Jeroen Demeyer Co-authored-by: Mark Shannon removed

[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2020-01-16 Thread Daniel Hillier
Change by Daniel Hillier : -- keywords: +patch pull_requests: +17427 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18031 ___ Python tracker ___

[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

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

[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

2020-01-16 Thread gaborbernat
Change by gaborbernat : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

2020-01-16 Thread gaborbernat
New submission from gaborbernat : Assume the following code: ```python from multiprocessing.pool import ThreadPool class A(object): def __init__(self): self.pool = ThreadPool() def __del__(self): self.pool.close() self.pool.join() a = A() print(a) ``` The code

[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2020-01-16 Thread Daniel Hillier
New submission from Daniel Hillier : Setting the ZipFile.pwd attribute directly skips the check to ensure the password is a bytes object and, if not, return a user friendly TypeError("pwd: expected bytes, got ") informing them of that. -- components: Library (Lib) messages: 360118

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2020-01-16 Thread Maor Kleinberger
Change by Maor Kleinberger : -- pull_requests: +17426 pull_request: https://github.com/python/cpython/pull/12361 ___ Python tracker ___

[issue39358] test_code.CoExtra leads to double-free when ce_size >1

2020-01-16 Thread Sergei Lebedev
Change by Sergei Lebedev : -- nosy: +dino.viehland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39358] test_code.CoExtra leads to double-free when ce_size >1

2020-01-16 Thread Sergei Lebedev
New submission from Sergei Lebedev : tl;dr Passing a Python function as a freefunc to _PyEval_RequestCodeExtraIndex leads to double-free. In general, I think that freefunc should not be allowed to call other Python functions. --- test_code.CoExtra registers a new co_extra slot with a

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

2020-01-16 Thread hai shi
Change by hai shi : -- pull_requests: +17425 pull_request: https://github.com/python/cpython/pull/18030 ___ Python tracker ___

[issue35247] test.test_socket.RDSTest.testPeek hangs indefinitely

2020-01-16 Thread Kresimir Kumericki
Kresimir Kumericki added the comment: Sorry if this necrobumping is inappropriate, but I just experienced the same issue of test.test_socket.RDSTest.testPeek() hanging indefinitely, while trying to recompile Python 3.8.1 on Arch Linux. -- nosy: +kkumer versions: +Python 3.8 -Python

[issue39357] bz2: Remove deprecated buffering parameter of bz2.BZ2File

2020-01-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17424 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18028 ___ Python tracker ___

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2020-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Qt has different issue. "slots" is not a keyword, and the issue can be avoided by including Python.h before Qt.h or undefining the "slots" macro. It could be a harder issue if "module" would be a field name of a public structure. But names of arguments

[issue39357] bz2: Remove deprecated buffering parameter of bz2.BZ2File

2020-01-16 Thread STINNER Victor
New submission from STINNER Victor : The "buffering" parameter of bz2.BZ2File is deprecated for 12 years. Using it was emitting a DeprecationWarning since Python 3.0. Attached PR removes it. -- components: Library (Lib) messages: 360114 nosy: vstinner priority: normal severity:

[issue39353] Deprecate the binhex module

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: > I also found an answer suggesting to use binascii.a2b_hex() to decode a > string the hexadecimal string "2020202020202020202020205635514d385a5856":

[issue39354] collections.UserString format and format_map return a string

2020-01-16 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39350] Remove deprecated fractions.gcd()

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

[issue39350] Remove deprecated fractions.gcd()

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4691a2f2a2b8174a6c958ce6976ed5f3354c9504 by Victor Stinner in branch 'master': bpo-39350: Remove deprecated fractions.gcd() (GH-18021) https://github.com/python/cpython/commit/4691a2f2a2b8174a6c958ce6976ed5f3354c9504 --

[issue22486] Add math.gcd()

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4691a2f2a2b8174a6c958ce6976ed5f3354c9504 by Victor Stinner in branch 'master': bpo-39350: Remove deprecated fractions.gcd() (GH-18021) https://github.com/python/cpython/commit/4691a2f2a2b8174a6c958ce6976ed5f3354c9504 --

[issue36051] Drop the GIL during large bytes.join operations?

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

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: Qt has a similar issue with "slots": bpo-1086854 and bpo-38007. -- ___ Python tracker ___ ___

[issue39353] Deprecate the binhex module

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: > But it would be nice to create a separate package on PyPI that provides such > functionality before removing it from the stdlib. This issue is *not* about removing the module :-) Only to mark it as deprecated. > If deprecate the binhex module, we perhaps

[issue39356] zipfile suprising "except DeprecationWarning:" block

2020-01-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17423 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18027 ___ Python tracker ___

[issue39356] zipfile suprising "except DeprecationWarning:" block

2020-01-16 Thread STINNER Victor
New submission from STINNER Victor : Lib/zipfile.py contains the following code: try: filename, flag_bits = zinfo._encodeFilenameFlags() centdir = struct.pack(structCentralDir, stringCentralDir, create_version, zinfo.create_system,

[issue36051] Drop the GIL during large bytes.join operations?

2020-01-16 Thread Bruce Merry
Bruce Merry added the comment: I think I've addressed the concerns that were raised in this bug, but let me know if I've missed any. -- ___ Python tracker ___

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2020-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Names of arguments can be just removed from function declarations in header files. -- keywords: +easy (C) nosy: +serhiy.storchaka stage: -> needs patch type: -> enhancement versions: -Python 2.7, Python 3.5, Python 3.6

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2020-01-16 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39353] Deprecate the binhex module

2020-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: binhex provides an encoding different from binascii.a2b_hex() and binascii.unhexlify(). If deprecate the binhex module, we perhaps should deprecate also binascii.b2a_hqx(), binascii.a2b_hqx(), binascii.rlecode_hqx(), binascii.rledecode_hqx() and

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-16 Thread Paul Ollis
Paul Ollis added the comment: > I thought that if this raises a (normal) exception, it always means that it > did not have overtaken the `fd`, i.e. never results in an unreferenced file > object which has taken ownership of `fd`. The current CPython implementation does not guard against this

[issue39354] collections.UserString format and format_map return a string

2020-01-16 Thread bizywizy
Change by bizywizy : -- keywords: +patch pull_requests: +17421 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18026 ___ Python tracker ___

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2020-01-16 Thread Keith
New submission from Keith : The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword For example, in warnings.h, we have the following code: #ifndef Py_LIMITED_API PyAPI_FUNC(int) PyErr_WarnExplicitObject( PyObject *category,

[issue39351] Remove base64.encodestring() and base64.decodestring() aliases, deprecated since Python 3.1

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

[issue39351] Remove base64.encodestring() and base64.decodestring() aliases, deprecated since Python 3.1

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 210c19e3c5b86535a73487fa737752de8eb1d866 by Victor Stinner in branch 'master': bpo-39351: Remove base64.encodestring() (GH-18022) https://github.com/python/cpython/commit/210c19e3c5b86535a73487fa737752de8eb1d866 --

[issue39353] Deprecate the binhex module

2020-01-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17420 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18025 ___ Python tracker ___

[issue39354] collections.UserString format and format_map return a string

2020-01-16 Thread bizywizy
New submission from bizywizy : collections.UserString.format and collections.UserString.format_map return a string instaed of UserString. This is quite weird because I expect that the %-syntax and `format` method have to produce the same result. ``` >>> isinstance(UserString('Hello %s') %

[issue39349] Add "cancel" parameter to concurrent.futures.Executor.shutdown()

2020-01-16 Thread Kyle Stanley
Change by Kyle Stanley : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39353] Deprecate the binhex module

2020-01-16 Thread STINNER Victor
New submission from STINNER Victor : The binhex module encodes and decodes Apple Macintosh binhex4 data. It was originally developed for TRS-80. In the 1980s and early 1990s it was used on classic Mac OS 9 to encode binary email attachments. Mac OS 9 is now heavily outdated, replaced by

[issue39352] Remove the formatter module, deprecated since Python 3.4

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: I did a quick & dirty code search in GitHub to check for "import formatter". There is no "import formatter" in the 5 first pages of code search in the Python programming language. IMHO it seems that this module is basically unused. To be honest, I even

[issue39352] Remove the formatter module, deprecated since Python 3.4

2020-01-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17419 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18023 ___ Python tracker ___

[issue39352] Remove the formatter module, deprecated since Python 3.4

2020-01-16 Thread STINNER Victor
New submission from STINNER Victor : The formatter module has been deprecated in Python 3.4 by bpo-18716: commit 1448ecf470013cee63c0682f615c5256928dc6b0. In 2014, its removal was scheduled in Python 3.6: commit 29636aeaccaf6a1412e0dc7c230db29cccf68381. But bpo-25407 cancelled the removal

[issue39351] Remove base64.encodestring() and base64.decodestring() aliases, deprecated since Python 3.1

2020-01-16 Thread STINNER Victor
STINNER Victor added the comment: The deprecation was introduced 11 years ago in bpo-3613 by this change: commit b54d801280e3f510782e2855504710947d10f053 Author: Georg Brandl Date: Thu Jun 4 09:11:51 2009 + #3613: add base64.encodebytes and decodebytes as the new spelling of

[issue39351] Remove base64.encodestring() and base64.decodestring() aliases, deprecated since Python 3.1

2020-01-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17418 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18022 ___ Python tracker ___

[issue39351] Remove base64.encodestring() and base64.decodestring() aliases, deprecated since Python 3.1

2020-01-16 Thread STINNER Victor
New submission from STINNER Victor : base64.encodestring() and base64.decodestring() are aliases deprecated since Python 3.1: encodebytes() and decodebytes() should be used instead. In Python 3, "string" means Unicode, whereas these functions really work at the bytes level: >>>

[issue39350] Remove deprecated fractions.gcd()

2020-01-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17416 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18021 ___ Python tracker ___

  1   2   >