[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry, I misread the traceback itself as if it's from pip. It's from html5lib being incompatible with 3.9 as per the latest release on 1.0.1 (Dec 7, 2017) . There is an issue to request new release with the fix at

[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: If I understand this correctly, when an autospec of a class is created the attributes themselves of the given class are autospecced. During autospec of attributes it's modelled upon __call__'s signature for the given attributes [0]. Here you are

[issue38741] Definition of multiple ']' in header configparser

2019-11-07 Thread Mark
New submission from Mark : in example header is "[i love [python] lang]" parse as "i love [python", only up to the first character ']'. now saving works correctly, but reading does not -- messages: 356225 nosy: @mark99i priority: normal severity: normal status: open title: Definition

[issue38740] Line count mis match between open() vs sys.stdin api calls

2019-11-07 Thread Thamme Gowda
Change by Thamme Gowda : Added file: https://bugs.python.org/file48702/line_break_err.txt ___ Python tracker ___ ___ Python-bugs-list

[issue38740] Line count mis match between open() vs sys.stdin api calls

2019-11-07 Thread Thamme Gowda
New submission from Thamme Gowda : I ran into a line count mismatch bug and I narrowed it down to 9 lines where the line break handling is causing an issue. Please find the attachment named line_break_err.txt to reproduce the below. $ md5sum line_break_err.txt

[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-11-07 Thread Gustavo
Gustavo added the comment: I was able to fix this problem quickly following these easy guide: First, you need to press the keys Win + R to open the Run dialog, there type the command msiexec /unreg and hit Enter Now, open the Run dialog again and this time, type the command msiexec

[issue38736] argparse: wrong type from get_default when type is set

2019-11-07 Thread paul j3
paul j3 added the comment: get_default just returns the default attribute as it is stored in the Action. Defaults are stored as given. During parsing the Action's default is placed in the args namespace at the start. At the end, it checks if the value in the namespace is a string that

[issue38730] 2.7 modern compiler warnings

2019-11-07 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: collections removed ABC access in 3.9. It seems you are using an older version of pip. Please update to the latest version which has the vendored html5lib package fixed. -- nosy: +xtreak ___ Python

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Travis Lazar
Travis Lazar added the comment: Forgot to include that this was built on an aarch64 (Ampere eMAG) system. -- ___ Python tracker ___

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Travis Lazar
New submission from Travis Lazar : When running pyperformance html5lib test, the application crashes with "ImportError: cannot import name 'Mapping' from 'collections' (/py3buildpath/lib/python3.9/collections/__init__.py)" To reproduce: 1 - Build Python from source. I produced with git

[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-07 Thread Jake Tesler
Jake Tesler added the comment: @vstinner PR created :) https://github.com/python/cpython/pull/17088 -- ___ Python tracker ___ ___

[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-07 Thread Jake Tesler
Change by Jake Tesler : -- keywords: +patch pull_requests: +16596 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17088 ___ Python tracker ___

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: I heard that for debuggers, the PEP 523 is really useful. I recall a huge speedup thanks to this PEP in Jetbrain: https://blog.jetbrains.com/pycharm/2017/03/inside-the-debugger-interview-with-elizaveta-shashkova/ --

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread Brett Cannon
Brett Cannon added the comment: PEP 523 was to give user code the ability to change the eval function. While the work was motivated by our JIT work, supporting debugging was another motivating factor: https://www.python.org/dev/peps/pep-0523/#debugging. There's no C API because at the time

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Yes, that's likely where the change should be made. I think if the *first* token encountered is either NL or COMMENT the parse should be abandoned by the tokenizer. -- ___ Python tracker

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Slower by percents, not in the factor of times. I guess for tests it is satisfactory. -- ___ Python tracker ___

[issue16576] ctypes: structure with bitfields as argument

2019-11-07 Thread Vinay Sajip
Change by Vinay Sajip : -- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 2.7, Python 3.2 ___ Python tracker ___ ___

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +16594 pull_request: https://github.com/python/cpython/pull/17084 ___ Python tracker ___

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +16595 pull_request: https://github.com/python/cpython/pull/17085 ___ Python tracker ___

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset befa032d8869e0fab4732d910f3887642879d644 by Serhiy Storchaka (Dong-hee Na) in branch 'master': bpo-22367: Add tests for fcntl.lockf(). (GH-17010) https://github.com/python/cpython/commit/befa032d8869e0fab4732d910f3887642879d644 --

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue38738. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38738] Fix formatting of True and False

2019-11-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16593 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17083 ___ Python tracker

[issue38738] Fix formatting of True and False

2019-11-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR fixes some issues with True and False in the documentation: * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in

[issue38737] StreamReaderProtocol.eof_received() should return True only for _SSLProtocolTransport

2019-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: StreamReaderProtocol is tightly coupled with builtin asyncio transports. Even worse, it is an internal class actually. If you want a code to operate with custom transports -- perhaps you need to reimplement streams for them as well. -- resolution:

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In some cases "a true value" and "a false value" are used in the documentation. But in most cases it is just "true" and "false". -- ___ Python tracker

[issue38737] StreamReaderProtocol.eof_received() should return True only for _SSLProtocolTransport

2019-11-07 Thread Anthony Baire
New submission from Anthony Baire : We developed an alternate asyncio TLS transport based on GnuTLS (https://pypi.org/project/aio-gnutls-transport/). In this project we want to support half-closed TLS connections (WriteTransport.write_eof()). Unfortunately StreamReaderProtocol won't

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Mark Dickinson
Mark Dickinson added the comment: [Terry] > A correct failure message, correct both as English and Python, should be > something like 'bool(x) is not True'. I see 'x is not true' as an informal > English equivalent of the full claim. I'm not clear whether you're suggesting having

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-11-07 Thread Anders Lorentsen
Anders Lorentsen added the comment: As a person without much experience, it sounded like a simple enough task, but having dug a bit, I found it quite complicated. It seems to me that the interpreter loop (in the standard REPL, that you get when you start ./python, blocks for input somewhere

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Marco Sulla
Marco Sulla added the comment: When Python started to emulate the other languages? Who cares about what other languages do? Python uses `raise` instead of `throw`, even if `throw` is much more popular in the most used languages, only because `raise` in English has more sense. And IMHO a

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Julia syntax looks well thought out, so I suggest to borrow it. -- ___ Python tracker ___ ___

[issue30587] Mock with spec object does not ensure method call signatures

2019-11-07 Thread Ben Reilly
Change by Ben Reilly : -- nosy: +breilly_box ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: > See the branch here: > https://github.com/jaketesler/cpython/tree/fix-mp-native-id Can you please create a PR? -- ___ Python tracker ___

[issue36084] Threading: add builtin TID attribute to Thread objects

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: Jake created bpo-38707. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: By the way, it's still possible to access directly ts->interp if you include "pycore_pystate.h" header, which requires to define Py_BUILD_CORE_MODULE. This header is an internal header. -- ___ Python tracker

[issue31842] pathlib: "Incorrect function" during resolve()

2019-11-07 Thread maciozo
maciozo added the comment: Same error occurs when attempting to resolve a path on an ImDisk RAM disk: >>> pathlib.Path("T:\\").resolve() Traceback (most recent call last): File "", line 1, in File "C:\Users\maciozo\AppData\Local\Continuum\miniconda3\envs\brainboxes\lib\pathlib.py",

[issue2986] difflib.SequenceMatcher not matching long sequences

2019-11-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +16592 pull_request: https://github.com/python/cpython/pull/17082 ___ Python tracker ___

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The user expects what they read in the documentation of what they learn in other programming languages. If we update the documentation their expectation will change. As for other programming languages, Bash has an option for stripping all leading tab

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread Fabio Zadrozny
Fabio Zadrozny added the comment: @Mark I don't want to change the original function code, I just want to change the code to be executed in the frame (i.e.: as breakpoints change things may be different). Changing the actual function code is a no-go since changing the real function code

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread Mark Shannon
Mark Shannon added the comment: Victor, I don't think this is a regression. `PyThreadState` is an internal opaque data structure, which means we are free to change it. That the `eval_frame` is hard to access is a feature not a bug, as it discourages misuse and enables us to remove it easily,

[issue36876] Global C variables are a problem.

2019-11-07 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: -yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38613] Optimize some set operations in dictkeys object

2019-11-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset 6cbc84fb99acb33dd659d7adb29a20adbe62b74a by Inada Naoki in branch 'master': bpo-38613: Optimize set operations of dict keys. (GH-16961) https://github.com/python/cpython/commit/6cbc84fb99acb33dd659d7adb29a20adbe62b74a --

[issue38613] Optimize some set operations in dictkeys object

2019-11-07 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38736] argparse: wrong type from get_default when type is set

2019-11-07 Thread Erik Ahlén
New submission from Erik Ahlén : The type of the object returned by get_default isn't converted to the specified type supplied to add_argument. I would expect the type to be the same. -- components: Library (Lib) files: test.py messages: 356194 nosy: Erik Ahlén priority: normal

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Marco Sulla
Marco Sulla added the comment: Excuse me for the spam, but against make it the default behavior I have a simple consideration: what will expect a person that reads the code, that doesn't know Python? IMHO it expects that the string is *exactly* like it's written. The fact that it will be

[issue38730] 2.7 modern compiler warnings

2019-11-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 9f94e52e8d38092520a3bfb1bf1ef9cbb0836584 by Benjamin Peterson in branch '2.7': bpo-38730: Remove usage of stpncpy as it's not supported on MSVC 2008. (GH-17081)

[issue38730] 2.7 modern compiler warnings

2019-11-07 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +16591 pull_request: https://github.com/python/cpython/pull/17081 ___ Python tracker ___

[issue38730] 2.7 modern compiler warnings

2019-11-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset f32bcf8c27f3681407707bbb029323eb340d3c4b by Benjamin Peterson in branch '2.7': [2.7] bpo-38730: Fix -Wstringop-truncation warnings. (GH-17075) https://github.com/python/cpython/commit/f32bcf8c27f3681407707bbb029323eb340d3c4b --

[issue38661] Changes to tkinter result in (unexpected) widget map call return changes wrt. 3.7

2019-11-07 Thread Juliette Monsel
Change by Juliette Monsel : -- nosy: +j-4321-i ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38732] Adding relp support as a new logging handler

2019-11-07 Thread Vinay Sajip
Vinay Sajip added the comment: Why does this need to be in the stdlib, useful though it may be for some use cases? As I understand it, RELP is mainly for communication between rsyslog servers, not specifically/especially for client-rsyslog communication. From the PyRELP link you posted,

[issue38716] logging: rotating handlers set namer and rotator null

2019-11-07 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38735] PYTHONPYCACHEPREFIX fails when importing a module from the root ("/")

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: The bug occurs on this line: if sys.pycache_prefix is not None: if not _path_isabs(head): head = _path_join(_os.getcwd(), head) if head[1] == ':' and head[0] not in path_separators: # < HERE head = head[2:]

[issue38735] PYTHONPYCACHEPREFIX fails when importing a module from the root ("/")

2019-11-07 Thread Ned Batchelder
New submission from Ned Batchelder : On the manylinux docker images, the current directory is "/". If I create a file there and try to import it with PYTHONPYCACHEPREFIX set, I get a stack trace: $ docker run -it --init --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 bash [root@29d75403d7d1

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: I merged my change, I close the issue. The change is a little bit backward incompatible, so I prefer to not backport it. PyErr_Occurred() checks tstate==NULL for 9 years, there is no urgency to change it :-) It can wait for Python 3.9. --

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: In 2018 with bpo-26558, I fixed Py_FatalError() to no longer access the current exception of the current Python thread state, if the current thread doesn't not hold the GIL: commit 3a228ab17c2a9cffd1a2f15f30d6209768de20a6 Author: Victor Stinner Date: Thu

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset d12d0e7c0fe2b49c40ac4d66365147c619d6c475 by Victor Stinner in branch 'master': bpo-38733: PyErr_Occurred() caller must hold the GIL (GH-17080) https://github.com/python/cpython/commit/d12d0e7c0fe2b49c40ac4d66365147c619d6c475 --

[issue3605] Py_FatalError causes infinite loop

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset d12d0e7c0fe2b49c40ac4d66365147c619d6c475 by Victor Stinner in branch 'master': bpo-38733: PyErr_Occurred() caller must hold the GIL (GH-17080) https://github.com/python/cpython/commit/d12d0e7c0fe2b49c40ac4d66365147c619d6c475 --

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +16589 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17080 ___ Python tracker ___

[issue3605] Py_FatalError causes infinite loop

2019-11-07 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16590 pull_request: https://github.com/python/cpython/pull/17080 ___ Python tracker ___

[issue38734] Python 3.7 and 3.8 in Windows Store do not start under git bash

2019-11-07 Thread Paul Anton Letnes
New submission from Paul Anton Letnes : Python 3.7 and 3.8 installed from the Windows Store do not start under git bash. Rather, they give some variation of this error message: bash: /c/Users/pa/AppData/Local/Microsoft/WindowsApps/python: Permission denied However, the permissions are

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Marco Sulla
Marco Sulla added the comment: Anyway there's something strange in string escaping and `inspect.cleandoc()`: >>> a = """ ... \nciao ... bello ... \ ciao ... """ >>> print(inspect.cleandoc(a)) ciao bello \ ciao >>> print("\ ciao") \ ciao I expected: >>> print(inspect.cleandoc(a))

[issue36876] Global C variables are a problem.

2019-11-07 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 9def81aa52adc3cc89554156e40742cf17312825 by Vinay Sajip in branch 'master': bpo-36876: Moved Parser/listnode.c statics to interpreter state. (GH-16328) https://github.com/python/cpython/commit/9def81aa52adc3cc89554156e40742cf17312825 --

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
New submission from STINNER Victor : bpo-3605 modified PyErr_Occurred() to return NULL if the current Python thread state ("tstate") is NULL: commit 8e0bdfd1d473ddffaf3501768678f8a970019da8 Author: Jeffrey Yasskin Date: Thu May 13 18:31:05 2010 + Make PyErr_Occurred return NULL if

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Petr Viktorin
Petr Viktorin added the comment: Generally, „true“ and „false“ refer to „truthiness“, while the actual ``True`` and ``False`` literals should be capitalized. And in monospace font if possible. I think this is a good convention, but it's quite subtle, and I don't think it's explicitly

[issue38731] bad input crashes py_compile library

2019-11-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38732] Adding relp support as a new logging handler

2019-11-07 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38732] Adding relp support as a new logging handler

2019-11-07 Thread Marco
New submission from Marco : Hello, a pyrelp module was released to send messages over RELP to a RELP server, such as rsylog: https://github.com/mathias-nyman/pyrelp https://github.com/rsyslog/librelp It should be very useful the possibility to add this feature as a logging handler. A

[issue38731] bad input crashes py_compile library

2019-11-07 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +berker.peksag stage: -> needs patch type: crash -> behavior versions: +Python 3.9 ___ Python tracker ___