[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2020-03-02 Thread miss-islington
miss-islington added the comment: New changeset f4d709f4a3c69bd940bd6968a70241277132bed7 by Miss Islington (bot) in branch '3.7': bpo-38971: Open file in codecs.open() closes if exception raised. (GH-17666) https://github.com/python/cpython/commit/f4d709f4a3c69bd940bd6968a70241277132bed7 --

[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2020-03-02 Thread miss-islington
miss-islington added the comment: New changeset f28b0c74e54a133cb0287b4297af67d0d7c14d6e by Miss Islington (bot) in branch '3.8': bpo-38971: Open file in codecs.open() closes if exception raised. (GH-17666) https://github.com/python/cpython/commit/f28b0c74e54a133cb0287b4297af67d0d7c14d6e --

[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2020-03-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is too later for 2.7. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker

[issue39820] Bracketed paste mode for REPL

2020-03-02 Thread Mark Dickinson
Mark Dickinson added the comment: Is this even possible in a plain text console (or plain text console + GNU readline-equivalent)? > Bracketed paste mode is implemented in many text editors, as vi. Sure, but the REPL is not a text editor, and knows very little about the context it's being r

[issue39823] Disassembly - improve documentation for bytecode instruction class and set source line no. attribute for every instruction

2020-03-02 Thread S Murthy
New submission from S Murthy : I note that on disassembling a piece of source code (via source strings or code objects) the corresponding sequence of bytecode instruction objects (https://docs.python.org/3/library/dis.html#dis.Instruction) do not always have the `starts_line` attribute set -

[issue39823] Disassembly - improve documentation for bytecode instruction class and set source line no. attribute for every instruction

2020-03-02 Thread S Murthy
S Murthy added the comment: Docstring for `Instruction` should be more precise. ATM the description of `starts_line` is line started by this opcode (if any), otherwise None I think "source line started ..." would be a bit more precise and accurate. -- __

[issue39807] Python38 installed in wrong directory on Windows

2020-03-02 Thread Steve Dower
Steve Dower added the comment: Yep, that seems like the reason. All of that redirection is handled by the OS and I don't think we'd want to override it. However, I suspect we're close to having another discussion about making the 64 bit download the default. There are fewer actual 32-bit OS

[issue38826] Regular Expression Denial of Service in urllib.request.AbstractBasicAuthHandler

2020-03-02 Thread Michał Górny
Change by Michał Górny : -- nosy: +mgorny ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler

2020-03-02 Thread Michał Górny
Change by Michał Górny : -- nosy: +mgorny ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2020-03-02 Thread Steve Dower
Steve Dower added the comment: It'll have to be a program that cannot inherit the active console. Ffmpeg normally can, but running the first script with pythonw will make sure there is no console to inherit, and a new one will pop up for a regular Python process. --

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Would you prefer that I close GH_18678 and split it up in separate RPs for macOS and Windows? -- ___ Python tracker ___

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free if md_state is NULL

2020-03-02 Thread STINNER Victor
New submission from STINNER Victor : Currently, when a module implements m_traverse(), m_clear() or m_free(), these methods can be called with md_state=NULL even if the module implements the "Multi-phase extension module initialization" API (PEP 489). I'm talking about these module methods:

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free if md_state is NULL

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: The question came up while I reviewed PR 18608 which ports the audioop extension module to multiphase initialization (PEP 489): https://github.com/python/cpython/pull/18608/files#r386061746 Petr Viktorin referred to m_clear() documentation which says that md_

[issue39775] inspect.Signature.parameters should be an OrderedDict, not a plain dict

2020-03-02 Thread Inada Naoki
Inada Naoki added the comment: New changeset 211055176157545ce98e6c02b09d624719e6dd30 by Inada Naoki in branch 'master': bpo-39775: inspect: Change Signature.parameters back to OrderedDict. (GH-18684) https://github.com/python/cpython/commit/211055176157545ce98e6c02b09d624719e6dd30

[issue39775] inspect.Signature.parameters should be an OrderedDict, not a plain dict

2020-03-02 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue39050] The "Help" button in IDLE's config dialog does not work

2020-03-02 Thread Zackery Spytz
Zackery Spytz added the comment: Terry, should this issue remain open? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37266] Daemon threads must be forbidden in subinterpreters

2020-03-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I opened issue39812 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39794] Add --without-decimal-contextvar option to use just threads in decimal

2020-03-02 Thread Stefan Krah
Stefan Krah added the comment: For the people who find this issue via a search engine: 1) The defaults in 3.7, 3.8 and 3.9 are unchanged (you get the ContextVar). 2) ./configure --without-decimal-contextvar enables the exact TLS context code from 3.3-3.6. There is no new code.

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free if md_state is NULL

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: There are different kinds of extension modules: (1) no module state (m_size <= 0): **not affected** by this change. Example: _asyncio which implements m_free() to clear global variables and free lists. (2) Have a module state but PyInit_xxx() calls PyModule_

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free if md_state is NULL

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +18093 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18738 ___ Python tracker ___ _

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free if md_state is NULL

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 18738 to implement this change. -- nosy: +Dormouse759, ncoghlan, pablogsal, petr.viktorin, shihai1991 ___ Python tracker ___ _

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- title: Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free if md_state is NULL -> Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated ___

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: > I propose to change module_traverse(), module_clear() and module_dealloc() to > not call m_traverse(), m_clear() and m_free() if md_state is NULL and m_size > > 0. Note: This change also means that m_traverse, m_clear and m_free are no longer called if md

[issue39794] Add --without-decimal-contextvar option to use just threads in decimal

2020-03-02 Thread Stefan Krah
Stefan Krah added the comment: > If someone builds an interpreter with this configure flag, does it break > compatibility with anything that code may have started to expect as of 3.7? Yes, anything that relies on the implicit context being coroutine-safe does not work. The only test that expe

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: Proposed PR checking if the module state is NULL: * PR 18358: _locale module * PR 18608: audioop module * PR 18613: binascii -- ___ Python tracker _

[issue39775] inspect.Signature.parameters should be an OrderedDict, not a plain dict

2020-03-02 Thread Antony Lee
Change by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue23080] BoundArguments.arguments should be unordered

2020-03-02 Thread Antony Lee
Change by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread Steve Dower
Steve Dower added the comment: No, that one is fine. I just need someone else to jump in and tag the commit in cpython-source-deps for me (because I can't clone it successfully on my current internet connection). -- ___ Python tracker

[issue38597] C Extension import limit

2020-03-02 Thread Steve Dower
Steve Dower added the comment: > don't know if you still need it but here is what you requested. Thanks. That basically confirms that something is interfering with distutils. Skipping the check entirely should avoid it. -- versions: +Python 3.8, Python 3.9 __

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ah, but you're all set @steve.dower, someone at cpython-source-deps already pulled my tags: https://github.com/python/cpython-source-deps/tags :) But I guess that if I were to do the same maneouver again, it would probably be preferable if I made one

[issue39610] memoryview.__len__ should raise an exception for 0d buffers

2020-03-02 Thread Eric Wieser
Eric Wieser added the comment: Thanks for pointing out the docs reference, I updated the patch to reword that section. There's a sentence right before the one you draw attention to which to me reads as another argument to change this: > ``len(view)`` is equal to the length of :class:`~memor

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread Steve Dower
Steve Dower added the comment: Nope, same PR and bug is totally fine. Putting the NEWS items in their platform-specific sections is how we normally do it (though to be fair, I had to go look it up). -- ___ Python tracker

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ok, thanks for your patience and time. I'll fix the NEWS entries right away. -- ___ Python tracker ___ __

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread Steve Dower
Steve Dower added the comment: I marked the PR to backport to 3.7 and 3.8. Up to Benjamin whether 2.7 gets it, but unless there's a specific and impactful CVE that's been fixed, I doubt it (the one linked at the start of this issue seems to require direct modification of the SQL statement, w

[issue39794] Add --without-decimal-contextvar option to use just threads in decimal

2020-03-02 Thread Stefan Krah
Stefan Krah added the comment: To make things more clear (it is good that Gregory asked): ONLY use this flag if you don't use coroutines at all OR control ALL async libraries in your application. Random async libraries from PyPI may rely on the ContextVar and silently give incorrect results.

[issue39796] warning extension module inited twice in python3.9

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: _PyWarnings_Init() initializes tstate->interp->warnings which is the module state of the warnings module: WarningsState *st = _Warnings_GetState(); if (st == NULL) { goto error; } if (_Warnings_InitState(st) < 0) { goto error;

[issue39796] warning extension module inited twice in python3.9

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18094 pull_request: https://github.com/python/cpython/pull/18739 ___ Python tracker ___ __

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: > And setup.py does use use multiple processes via a thread pool, where each > thread calls fork(), if it detects that "make" was invoked with the parallel > (-j) option. Oh ok, now I get it :-) setup.py uses distutils to build extensions and distutils.comm

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +18095 pull_request: https://github.com/python/cpython/pull/18740 ___ Python tracker ___ __

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread miss-islington
miss-islington added the comment: New changeset 1382c3289bcfd34ac6811fdf9aa5bc09ca8c320e by Erlend Egeberg Aasland in branch 'master': bpo-38380: Update macOS & Windows builds to SQLite v3.31.1 (GH-18678) https://github.com/python/cpython/commit/1382c3289bcfd34ac6811fdf9aa5bc09ca8c320e

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +18096 pull_request: https://github.com/python/cpython/pull/18741 ___ Python tracker ___ __

[issue39050] The "Help" button in IDLE's config dialog does not work

2020-03-02 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue38913] Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised

2020-03-02 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: After this change, the arm64 buildbots are reporting reference leaks: 1:03:24 load avg: 0.95 Re-running failed tests in verbose mode 1:03:24 load avg: 0.95 Re-running test_capi in verbose mode test_capi leaked [4, 4, 4] references, sum=12 e.g. https://

[issue39764] PyAsyncGenObject causes task.get_stack() raising AttributeError

2020-03-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 4482337decdbd0c6e2150346a68b3616bda664aa by Lidi Zheng in branch 'master': bpo-39764: Make Task.get_stack accept ag_frame (#18669) https://github.com/python/cpython/commit/4482337decdbd0c6e2150346a68b3616bda664aa -- __

[issue39764] PyAsyncGenObject causes task.get_stack() raising AttributeError

2020-03-02 Thread miss-islington
Change by miss-islington : -- keywords: +patch nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +18097 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18742 ___ Python tracker

[issue39796] warning extension module inited twice in python3.9

2020-03-02 Thread hai shi
hai shi added the comment: Wow, Thanks, victor, much useful infos. >In Python 3, _PyWarnings_Init() calls PyModule_Create() which creates a module >but doesn't add it to sys.modules. this operation will be executed in _bootstrap_external. > We want the _warnings module to be ready as early

[issue38913] Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised

2020-03-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue39764] PyAsyncGenObject causes task.get_stack() raising AttributeError

2020-03-02 Thread miss-islington
miss-islington added the comment: New changeset 43932dc1eaf36d75b2ee0420d8be747001315c26 by Miss Islington (bot) in branch '3.8': bpo-39764: Make Task.get_stack accept ag_frame (GH-18669) https://github.com/python/cpython/commit/43932dc1eaf36d75b2ee0420d8be747001315c26 -- _

[issue39764] PyAsyncGenObject causes task.get_stack() raising AttributeError

2020-03-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue38913] Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- resolution: fixed -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-03-02 Thread Antoine Pitrou
New submission from Antoine Pitrou : On Windows, Python 3.7.6 and 3.8.1: ``` >>> import sysconfig >>> sysconfig.get_config_var('EXT_SUFFIX') '.pyd' >>> from distutils import sysconfig >>> sysconfig.get_config_var('EXT_SUFFIX') '.cp38-win_amd64.pyd' ``` The sysconfig answer is probably wrong (th

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +18098 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18743 ___ Python tracker ___ _

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 18743 to reimplement distutils.spawn.spawn() function with the subprocess module. It also changes setup.py to use a basic implementation of the subprocess module if the subprocess module is not available: before required C extension modules are b

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: Attached fork_mt.py example uses exec_fn() function... which is not defined. Is it on purpose? -- ___ Python tracker ___ ___

[issue39796] warning extension module inited twice in python3.9

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: New changeset 66b7973c1b2e6aa6a2462c6b13971a08cd665af2 by Victor Stinner in branch 'master': bpo-39796: Fix _warnings module initialization (GH-18739) https://github.com/python/cpython/commit/66b7973c1b2e6aa6a2462c6b13971a08cd665af2 --

[issue39796] warning extension module inited twice in python3.9

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: > if we don't load _warnings module as soon as possible, what possible risks > will be raise? There are different risks: * Worst case: using the _warnings module state before it's initialized may lead to crash. * Best case: some warnings are not emitted. A

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-02 Thread Elad Lahav
Elad Lahav added the comment: "Attached fork_mt.py example uses exec_fn() function... which is not defined. Is it on purpose?" That was my mistake - a copy/paste of existing code from distutils. Since the example hangs before the script gets to exec_fn() I didn't notice the problem. Just ch

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2020-03-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, I don't think other weakref-supporting objects traverse the weakreflist in their tp_traverse. -- nosy: +pitrou ___ Python tracker ___ _

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread miss-islington
miss-islington added the comment: New changeset 7ad99821d8ae75222c50e69194a39f535bb058f5 by Miss Islington (bot) in branch '3.8': bpo-38380: Update macOS & Windows builds to SQLite v3.31.1 (GH-18678) https://github.com/python/cpython/commit/7ad99821d8ae75222c50e69194a39f535bb058f5 -

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread miss-islington
miss-islington added the comment: New changeset 7ca251bd85f1182b9734579975c17fbd0488e2a4 by Miss Islington (bot) in branch '3.7': bpo-38380: Update macOS & Windows builds to SQLite v3.31.1 (GH-18678) https://github.com/python/cpython/commit/7ca251bd85f1182b9734579975c17fbd0488e2a4 -

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread Steve Dower
Steve Dower added the comment: Leaving open until someone (*cough* Benjamin) confirms whether this has to go into 2.7 or not. -- nosy: +benjamin.peterson stage: patch review -> backport needed ___ Python tracker

[issue39826] logging HTTPHandler does not support proxy

2020-03-02 Thread lorb
New submission from lorb : The HTTPHandler does not support using a proxy. It would be necessary to subclass it and reimplement `emit` to enable passing in proxy settings. Adding a hook to make it easy to customize the connection used would solve this. -- components: Library (Lib) mess

[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-02 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Cool. Should I remove Python-3.* from the Versions label, so it doesn't show up in searches for 3.* issues? -- ___ Python tracker __

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue39796] warning extension module inited twice in python3.9

2020-03-02 Thread hai shi
hai shi added the comment: copy that, thanks for your explanation, victor. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue39827] setting a locale that uses comma as decimal separator breaks tkinter.DoubleVar

2020-03-02 Thread Till Korten
New submission from Till Korten : This issue occurs when a locale is set that uses comma as decimal separator (e.g. locale.setlocale(locale.LC_NUMERIC, 'de_DE.utf8')). I have a tkinter.Spinbox with increment=0.1 connected to a tkinter.DoubleVar. When I change the value of the Spinbox using the

[issue39826] logging HTTPHandler does not support proxy

2020-03-02 Thread lorb
Change by lorb : -- keywords: +patch pull_requests: +18099 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18745 ___ Python tracker ___ ___

[issue37636] Deprecate slicing and ordering operations on sys.version

2020-03-02 Thread Ruairidh MacLeod
Change by Ruairidh MacLeod : -- nosy: +rkm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue39828] json.tool should catch BrokenPipeError

2020-03-02 Thread STINNER Victor
New submission from STINNER Victor : The json.tool module doesn't catch BrokenPipeError: --- $ echo "{}" | python3 -m json.tool | true BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exception occurred: Traceback (most recent call las

[issue39829] __len__ called twice in the list() constructor

2020-03-02 Thread Kim-Adeline Miguel
New submission from Kim-Adeline Miguel : (See #33234) Recently we added Python 3.8 to our CI test matrix, and we noticed a possible backward incompatibility with the list() constructor. We found that __len__ is getting called twice, while before 3.8 it was only called once. Here's an exampl

[issue33234] Improve list() pre-sizing for inputs with known lengths

2020-03-02 Thread Eric Snow
Eric Snow added the comment: Possible backward incompatibility caused by this issue: issue39829 -- nosy: +eric.snow ___ Python tracker ___

[issue39829] __len__ called twice in the list() constructor

2020-03-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Why should that be backwards incompatible? The number of times we can `__len__` on the constructor is an implementation detail. The reason is called now twice is because there is an extra check for the preallocation logic, which is detached from the l

[issue39828] json.tool should catch BrokenPipeError

2020-03-02 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2020-03-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- assignee: -> pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2020-03-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I concur with Antoine and Tim. The GC already has the machinery to deal with weak references in the correct way (even more after recent bugfixes regarding callbacks). Traversing the weak reference list in incorrect because the object does not "own" th

[issue39828] json.tool should catch BrokenPipeError

2020-03-02 Thread Hakan
Hakan added the comment: I'd like to work on this issue but what should it do when it captures that error. -- nosy: +hakancelik ___ Python tracker ___ ___

[issue39704] Disable code coverage

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue39704] Disable code coverage

2020-03-02 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue39704] Disable code coverage

2020-03-02 Thread Ammar Askar
Ammar Askar added the comment: Just a quick update, I think this is a codecov bug as per here: https://community.codecov.io/t/prs-are-commented-even-with-comment-off/941 The yaml configuration doesn't show up here: https://codecov.io/gh/python/cpython/settings/yaml While we wait for a respo

[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-03-02 Thread Stefan Krah
Change by Stefan Krah : -- keywords: +patch pull_requests: +18101 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18746 ___ Python tracker _

[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18102 pull_request: https://github.com/python/cpython/pull/18747 ___ Python tracker ___ __

[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-03-02 Thread Stefan Krah
Stefan Krah added the comment: I think the PR fixes the issue but I have to run longer tests still. Threads created by PyGILState_Ensure() could have a duplicate tstate->id, which confused the ContextVar caching machinery. -- ___ Python tracker

[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18103 pull_request: https://github.com/python/cpython/pull/18748 ___ Python tracker ___ __

[issue39737] Speed up list.__eq__ by about 6%

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: I suggest to use LTO + PGO optimizations when benchmarking Python: https://pyperformance.readthedocs.io/usage.html#how-to-get-stable-benchmarks Benchmarking is hard :-/ -- ___ Python tracker

[issue39694] Incorrect dictionary unpacking when calling str.format

2020-03-02 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: > While we are of course able to patch new versions of Samba, this will make it > harder to bisect back though Samba history. I don't understand the bisect part. Would you mind to elaborate? What do you want to bisect? > It would be really great if this ki

[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-02 Thread STINNER Victor
STINNER Victor added the comment: Andrew Bartlett of the Samba project asked to revert the removal of the "U" mode: https://bugs.python.org/issue37330#msg362362 We should consider to revert the removal, and only remove the "U" mode in Python 3.10. -- ___

[issue38870] Expose ast.unparse in the ast module

2020-03-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 89aa4694fc8c6d190325ef8ed6ce6a6b8efb3e50 by Batuhan Taşkaya in branch 'master': bpo-38870: Add docstring support to ast.unparse (GH-17760) https://github.com/python/cpython/commit/89aa4694fc8c6d190325ef8ed6ce6a6b8efb3e50 --

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2020-03-02 Thread Tim Peters
Tim Peters added the comment: After some thought, I'm sure the diagnosis is correct: the weakref list must be made invisible to gc. That is, simply don't traverse it at all. The crash is exactly what's expected from traversing objects a container doesn't own references to. I agree the tp

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2020-03-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I agree the tp_traverse docs should point out that weakref lists are special > this way, but I think the problem is unique to them - can't think of another > case where a container points to an object it doesn't own a reference to. Agreed, I was thi

[issue39830] zipfile.Path is not included in __all__

2020-03-02 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : Since zipfile.Path is a public API and documented it could be included in __all__ . This might be a problem for code that uses below pattern : from zipfile import * from pathlib import Path If this is accepted this can be a good beginner issue.

[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2020-03-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +18104 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18749 ___ Python tracker ___

[issue38913] Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised

2020-03-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually there is a leak in PyErr_WarnEx(). -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue39820] Bracketed paste mode for REPL

2020-03-02 Thread Marco Sulla
Marco Sulla added the comment: > Is this even possible in a plain text console? Yes. See Jupyter Console (aka IPython). -- ___ Python tracker ___

[issue26460] datetime.strptime without a year fails on Feb 29

2020-03-02 Thread Paul Ganssle
Paul Ganssle added the comment: I don't think adding a default_year parameter is the right solution here. The actual problem is that `time.strptime`, and by extension `datetime.strptime` has a strange and confusing interface. What should happen is either that `year` is set to None or some ot

[issue39831] Reference leak in PyErr_WarnEx()

2020-03-02 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The test added for issue38913 exposed a reference leak in PyErr_WarnEx(). -- components: Interpreter Core messages: 363203 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Reference leak in PyErr_WarnEx() type: resource

[issue39831] Reference leak in PyErr_WarnEx()

2020-03-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +18105 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18750 ___ Python tracker ___

[issue38913] Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised

2020-03-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Opened issue39831. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ P

[issue39645] Expand concurrent.futures.Future's public API

2020-03-02 Thread Brian Quinlan
Brian Quinlan added the comment: I'll try to take a look at this before the end of the week, but I'm currently swamped with other life stuff :-( -- ___ Python tracker ___ ___

[issue39682] pathlib.Path objects can be used as context managers

2020-03-02 Thread Brett Cannon
Brett Cannon added the comment: I guess a question is whether we want immutability guarantees (I for one didn't even know you could hash Path objects until now). I'm personally fine with that idea as it mentally makes sense to not need paths to be mutable. But as I said, someone needs to tak

  1   2   >