[issue1230540] sys.excepthook doesn't work in threads

2019-05-22 Thread Christoph Reiter
Christoph Reiter added the comment: > Let's say that in Python 3.8 threading.Thread now calls sys.execpthook() to > handle uncaught run() exception. All applications which override > sys.excepthook() on purpose will behave differently: start to log exceptions > from threads. But existing

[issue37018] put http.server on a diet

2019-05-22 Thread Glenn Linderman
New submission from Glenn Linderman : The idea inspired by the email exchange below is basically in three parts: 1. investigate the various popular web server frameworks, to determine what parts of http.server they depend on. For example, bottle.py depends only on BaseHTTPRequestHandler and

[issue33164] Blake 2 module update

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

[issue33164] Blake 2 module update

2019-05-22 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: -7043 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33164] Blake 2 module update

2019-05-22 Thread Inada Naoki
New submission from Inada Naoki : New changeset 51aa35e9e17eef60d04add9619fe2a7eb938358c by Inada Naoki (David Carlier) in branch 'master': bpo-33164: update blake2 implementation (GH-6286) https://github.com/python/cpython/commit/51aa35e9e17eef60d04add9619fe2a7eb938358c -- nosy:

[issue36763] Implementation of the PEP 587

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 20e1e2582e5e69e43af88ff58699c8883d146acb by Victor Stinner in branch 'master': bpo-36763: Fix _PyPreConfig_InitCompatConfig() utf8_mode (GH-13518) https://github.com/python/cpython/commit/20e1e2582e5e69e43af88ff58699c8883d146acb --

[issue21315] email._header_value_parser does not recognise in-line encoding changes

2019-05-22 Thread Abhilash Raj
Abhilash Raj added the comment: I have made the requested changes on PR. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not

2019-05-22 Thread Abhilash Raj
Abhilash Raj added the comment: I have made the requested changes on PR. David, can you please review again? -- ___ Python tracker ___

[issue18748] io.IOBase destructor silence I/O error on close() by default

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset bc2aa816620c5e02ad8e94d8514b7e8f3f551ca1 by Victor Stinner in branch 'master': bpo-18748: _pyio.IOBase emits unraisable exception (GH-13512) https://github.com/python/cpython/commit/bc2aa816620c5e02ad8e94d8514b7e8f3f551ca1 --

[issue27737] email.header.Header.encode() crashes with IndexError on spaces only value

2019-05-22 Thread R. David Murray
R. David Murray added the comment: New changeset 0416d6f05a96e0f1b3751aa97abfffe6d3323976 by R. David Murray (Miss Islington (bot)) in branch '3.7': bpo-27737: Allow whitespace only headers encoding (GH-13478) (#13517)

[issue36520] Email header folded incorrectly

2019-05-22 Thread R. David Murray
R. David Murray added the comment: Nevermind, I was testing with the wrong version of python. This bug was introduced somewhere after 3.4 :( >>> from email.message import EmailMessage >>> m = EmailMessage() >>> m['Subject'] = 'Hello Wörld! Hello Wörld! Hello Wörld! Hello Wörld!Hello >>>

[issue36520] Email header folded incorrectly

2019-05-22 Thread R. David Murray
R. David Murray added the comment: Can you demonstrate the problem with an actual email object? header_store_parse is not meant to be called directly. -- ___ Python tracker

[issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: Even if I'm not confident in my change (add --embed option), I chose to merge it anyway since at least "waf" build system is broken by my other changes (no longer link C extensions to libpython). I would like to get this change into Python 3.8 beta1 to

[issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0a8e57248b913851640c64375600f05157c997df by Victor Stinner in branch 'master': bpo-36721: Add --embed option to python-config (GH-13500) https://github.com/python/cpython/commit/0a8e57248b913851640c64375600f05157c997df --

[issue36763] Implementation of the PEP 587

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13435 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27737] email.header.Header.encode() crashes with IndexError on spaces only value

2019-05-22 Thread R. David Murray
R. David Murray added the comment: Thanks. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue37000] _randbelow_with_getrandbits function inefficient with powers of two

2019-05-22 Thread Tim Peters
Tim Peters added the comment: I believe the thrust of Mark's suggestion was that it would allow using `k = (n-1).bit_length()` even when n == 1, without special-casing n == 1. But you'd still be adding a new "subtract 1" operation, and would still change results in some cases. That said,

[issue27737] email.header.Header.encode() crashes with IndexError on spaces only value

2019-05-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +13434 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27737] email.header.Header.encode() crashes with IndexError on spaces only value

2019-05-22 Thread R. David Murray
R. David Murray added the comment: New changeset ef5bb25e2d6147cd44be9c9b166525fb30485be0 by R. David Murray (Batuhan Taşkaya) in branch 'master': bpo-27737: Allow whitespace only headers encoding (#13478) https://github.com/python/cpython/commit/ef5bb25e2d6147cd44be9c9b166525fb30485be0

[issue1230540] sys.excepthook doesn't work in threads

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: About threading.excepthook() API, maybe we should not reproduce sys.excepthook() API but instead reuse something closer to sys.unraisablehook() API: use a single parameter which has attributes. It would allow to pass more parameters as new attributes in the

[issue1230540] sys.excepthook doesn't work in threads

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: I dislike PR 8610: threading.Thread doesn't call sys.excepthook to handle run() exception by default, it only calls sys.excepthook if it's overridden. Moreover, when sys.excepthook is called, the hook doesn't get access to the thread object :-( --

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-22 Thread Michael J. Sullivan
Change by Michael J. Sullivan : -- nosy: +brett.cannon, serhiy.storchaka, vstinner, yselivanov ___ Python tracker ___ ___

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-22 Thread Michael J. Sullivan
Change by Michael J. Sullivan : -- keywords: +patch pull_requests: +13433 stage: -> patch review ___ Python tracker ___ ___

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-22 Thread Michael J. Sullivan
New submission from Michael J. Sullivan : The different varieties of PyObject_CallMethod* routines all operate by doing a PyObject_GetAttr to fetch an object to call. It seems likely to be worthwhile to take advantage of the LOAD_METHOD optimization that avoids creating a bound method object

[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2019-05-22 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue1230540] sys.excepthook doesn't work in threads

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 13515 which adds threading.excepthook(). I chose to call threading.excepthook() even when run() raises SystemExit. In this case, threading.excepthook() simply does nothing. The idea is to really give the full control when threading.excepthook()

[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2019-05-22 Thread miss-islington
miss-islington added the comment: New changeset 367fe5757a707c4e3602dee807a9315199ed0b5c by Miss Islington (bot) in branch '3.7': bpo-35091: Objects/listobject.c: Replace overflow checks in gallop fu… (GH-10202)

[issue1230540] sys.excepthook doesn't work in threads

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13432 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2019-05-22 Thread miss-islington
miss-islington added the comment: New changeset 6bc5917903b722bdd0e5d3020949f26fec5dfe9a by Miss Islington (bot) (Alexey Izbyshev) in branch 'master': bpo-35091: Objects/listobject.c: Replace overflow checks in gallop fu… (GH-10202)

[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2019-05-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +13431 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset df22c03b93ea4620fdf4a0b3cbbbfa7c645af783 by Victor Stinner in branch 'master': bpo-36829: PyErr_WriteUnraisable() normalizes exception (GH-13507) https://github.com/python/cpython/commit/df22c03b93ea4620fdf4a0b3cbbbfa7c645af783 --

[issue36763] Implementation of the PEP 587

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5edcf263581c70f6a6c2206db679e51e9418bb38 by Victor Stinner in branch 'master': bpo-36763: Rename private Python initialization functions (GH-13511) https://github.com/python/cpython/commit/5edcf263581c70f6a6c2206db679e51e9418bb38 --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-1230540: "sys.excepthook doesn't work in threads". -- ___ Python tracker ___ ___

[issue1230540] sys.excepthook doesn't work in threads

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-36829: I just added sys.unraisablehook(). -- ___ Python tracker ___ ___

[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13430 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36941] Windows build changes for Windows ARM64

2019-05-22 Thread Steve Dower
Steve Dower added the comment: New changeset cfb241bd29a94fd825a317a78322e3cdba0e75a7 by Steve Dower (Paul Monson) in branch 'master': bpo-36941: Project file fixups for Windows ARM64 (GH-13477) https://github.com/python/cpython/commit/cfb241bd29a94fd825a317a78322e3cdba0e75a7 --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 13512 to use support.catch_unraisable_exception() in test_io.test_error_through_destructor(). But this PR is associated to bpo-18748 since the main change is related to the io module, not sys.unraisablehook ;-) --

[issue18748] io.IOBase destructor silence I/O error on close() by default

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13429 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36918] ValueError warning in test_urllib due to io.IOBase destructor

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13428 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2019-05-22 Thread miss-islington
miss-islington added the comment: New changeset b73c21c0be7b42de6a88d67408249c8ec46e28f7 by Miss Islington (bot) in branch '3.7': bpo-33110: Catch errors raised when running add_done_callback on already completed futures (GH-13141)

[issue36763] Implementation of the PEP 587

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13427 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36763] Implementation of the PEP 587

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 022be02dcfdfd9011415804bb4553a33fa7ec8f3 by Victor Stinner in branch 'master': bpo-36763: Add _PyPreConfig._config_init (GH-13481) https://github.com/python/cpython/commit/022be02dcfdfd9011415804bb4553a33fa7ec8f3 --

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: In PR 13490, Thomas Grainger proposed a cool context manager: @contextlib.contextmanager def throw_unraisable_exceptions(): unraisable = None old_hook = sys.unraisablehook def hook(exc): nonlocal unraisable unraisable = exc

[issue37016] Python embedded in C++ cannot open a file

2019-05-22 Thread Soumya Mohanty
New submission from Soumya Mohanty : Hello, I am trying to open a pickled file and load it in my python file. This python file will be called from a c++ program. Please find the C++ program attached. Py_Initialize and Py_Finalize are being done in a separate file called pyhelper.hpp

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset e4d300e07c33a9a77549c62d8687d8fe130c53d5 by Victor Stinner in branch 'master': bpo-36829: Add test.support.catch_unraisable_exception() (GH-13490) https://github.com/python/cpython/commit/e4d300e07c33a9a77549c62d8687d8fe130c53d5 --

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2019-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for your contribution iunknwn! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2019-05-22 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed versions: +Python 3.7, Python 3.8 -Python 3.6 ___ Python tracker ___ ___

[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13426 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2019-05-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +13425 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2019-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 904e34d4e6b6007986dcc585d5c553ee8ae06f95 by Antoine Pitrou (Sean) in branch 'master': bpo-24882: Let ThreadPoolExecutor reuse idle threads before creating new thread (#6375)

[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2019-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 2a3a2ece502c05ea33c95dd0db497189e0354bfd by Antoine Pitrou (Sam Martin) in branch 'master': bpo-33110: Catch errors raised when running add_done_callback on already completed futures (GH-13141)

[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2019-05-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +13424 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 942c31dffbe886ff02e25a319cc3891220b8c641 by Victor Stinner in branch '2.7': bpo-35907: Complete test_urllib.test_local_file_open() (GH-13506) https://github.com/python/cpython/commit/942c31dffbe886ff02e25a319cc3891220b8c641 --

[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 34bab215596671d0dec2066ae7d7450cd73f638b by Victor Stinner in branch '3.7': bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13474) (GH-13505) https://github.com/python/cpython/commit/34bab215596671d0dec2066ae7d7450cd73f638b

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-22 Thread Michael J. Sullivan
Michael J. Sullivan added the comment: I think this is done! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: As a reference, PR from Yuri for an asyncREPL `python -m asyncio` which I believe he want in 3.8: https://github.com/python/cpython/pull/13472 I'm also likely to align IPython behavior on whatever core python decides. --

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-22 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13423 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-22 Thread miss-islington
miss-islington added the comment: New changeset d8a82e2897b735e2b7e9e086f1d709365a2ad72c by Miss Islington (bot) (Michael J. Sullivan) in branch 'master': bpo-36878: Only allow text after `# type: ignore` if first character ASCII (GH-13504)

[issue37000] _randbelow_with_getrandbits function inefficient with powers of two

2019-05-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Some quick notes: * In issue 33144, we achieved a significant speed-up for _randbelow_with_getrandbits() by removing a single test. The code for that method is thin and almost any additional logic will slow it down. * The attached PR (now closed)

[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13422 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13421 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree with Nathaniel. There is no need to rush now. -- ___ Python tracker ___ ___

[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0c2b6a3943aa7b022e8eb4bfd9bffcddebf9a587 by Victor Stinner in branch 'master': bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13474) https://github.com/python/cpython/commit/0c2b6a3943aa7b022e8eb4bfd9bffcddebf9a587

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Nathaniel Smith
Nathaniel Smith added the comment: As far as things like run/run_until_complete/etc go, I think doctests should have the same semantics as async REPLs, whatever those end up being. Given that we don't actually have mature async REPLs, that the core feature to enable them only landed a few

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

2019-05-22 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- pull_requests: +13420 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34616] implement "Async exec"

2019-05-22 Thread miss-islington
miss-islington added the comment: New changeset 2ddbd21aec7f0e2f237a1073d3e0b313e673413f by Miss Islington (bot) (Matthias Bussonnier) in branch 'master': bpo-34616: Document top level async in whatsnew/3.8. (GH-13484)

[issue37015] Fix asyncio mock warnings

2019-05-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I guess cause is at [0] . When there is no new value specified and with spec being None if mock.patch is used on an async object (original = _accept_connection2). Here original is an async object then AsyncMock is returned. Changing this causes

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-22 Thread Michael J. Sullivan
Change by Michael J. Sullivan : -- pull_requests: +13419 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37015] Fix asyncio mock warnings

2019-05-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: patching _accept_connection2 attribute on loop object seems to return an AsyncMock. ➜ cpython git:(master) ✗ cat ../backups/bpo37015.py import asyncio from unittest.mock import patch with patch.object(asyncio.get_event_loop(),

[issue37015] Fix asyncio mock warnings

2019-05-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Not sure if it helps. Set backlog in the below test as 1. Add a print statement print(type(_mock_call)) at [0] . I could see some of _mock_call to be AsyncMock . So instead of calling return _mock_self._mock_call(*args, **kwargs) directly if I

[issue37003] ast unparse does not support f-string new debug format.

2019-05-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Notice that test_tools will fail if f'{x=}' becomes f'x={x!r}' I arrived at the wrong conclusion as Matthias points out. >>> import ast >>> ast.dump(compile("f'{x=}'","","exec",ast.PyCF_ONLY_AST))

[issue37003] ast unparse does not support f-string new debug format.

2019-05-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Actually, it checks if the dump is the same: class ASTTestCase(unittest.TestCase): def assertASTEqual(self, ast1, ast2): self.assertEqual(ast.dump(ast1), ast.dump(ast2)) def check_roundtrip(self, code1, filename="internal"):

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

2019-05-22 Thread Michael Felt
Michael Felt added the comment: On 22/05/2019 18:08, STINNER Victor wrote: > STINNER Victor added the comment: > > Michael Felt: it's annoying when you ignore Antoine's comment and my comment. > * https://github.com/python/cpython/pull/13463#issuecomment-494797084 > *

[issue37015] Fix asyncio mock warnings

2019-05-22 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-05-22 Thread Jake Tesler
Jake Tesler added the comment: Victor – the return value of _start_new_thread is the the `ident` parameter, and its not the same as the native id. See here: https://github.com/python/cpython/pull/11993#issuecomment-491544908 -- ___ Python tracker

[issue37015] Fix asyncio mock warnings

2019-05-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- title: Fix asyncio mock wranings -> Fix asyncio mock warnings ___ Python tracker ___ ___

[issue37015] Fix asyncio mock wranings

2019-05-22 Thread Andrew Svetlov
New submission from Andrew Svetlov : After merging https://github.com/python/cpython/pull/9296 asyncio test suite prints a lot of warnings like Exception ignored in: Traceback (most recent call last): File "/home/andrew/projects/cpython/Lib/warnings.py", line 510, in

[issue37003] ast unparse does not support f-string new debug format.

2019-05-22 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: I thought it was comparing the AST of the file to the AST of the unparsed AST. So it's actually checking if parse(unparse(x)) is indempotent and not wether parse(unparse(x)) is indempotent. So x={x!r} should be fine. On Wed, May 22, 2019, 09:22 Pablo

[issue33482] codecs.StreamRecoder.writelines is broken

2019-05-22 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37014] fileinput module should document that openhook and mode are ignored when reading from stdin

2019-05-22 Thread Grant Wu
New submission from Grant Wu : https://github.com/python/cpython/blob/master/Lib/fileinput.py#L326 shows that the openhook and mode are ignored when reading from stdin. Since part of fileinput's functionality is to abstract over whether one is reading from stdin or over a file, I think this

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-22 Thread daniel hahler
daniel hahler added the comment: Looks great, thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36905] test_typing.GetTypeHintTests.test_get_type_hints_modules_forwardref unexpected success while running whole test suite sequentially

2019-05-22 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Neil, I don't see the point of having this discussion here. -- ___ Python tracker ___ ___

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-22 Thread Neil Schemenauer
Neil Schemenauer added the comment: We now have a concrete use case. ;-) My idea was that we can introduce a new, CPython internal API that aligns on 8-byte boundaries (or takes alignment as a parameter). The API would be a stop-gap measure. We can use the API to reduce the overhead for

[issue35760] test_asyncio: test_async_gen_asyncio_gc_aclose_09() race condition

2019-05-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems to occur rather commonly now such that it fails and then passes on verbose run. Example :

[issue37013] Fatal Python error in socket.if_indextoname()

2019-05-22 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +13418 stage: -> patch review ___ Python tracker ___ ___

[issue33482] codecs.StreamRecoder.writelines is broken

2019-05-22 Thread miss-islington
miss-islington added the comment: New changeset 81c5ec9e417aebfe92945a05771006e4241f4e08 by Miss Islington (bot) (Jelle Zijlstra) in branch '3.7': [3.7] bpo-33482: fix codecs.StreamRecoder.writelines (GH-6779) (GH-13502)

[issue37013] Fatal Python error in socket.if_indextoname()

2019-05-22 Thread Zackery Spytz
New submission from Zackery Spytz : Python 3.8.0a4+ (heads/master:ef9d9b6312, May 22 2019, 08:35:25) [GCC 9.0.1 20190402 (experimental) [trunk revision 270074]] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.if_indextoname(2**64 -

[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2019-05-22 Thread twisteroid ambassador
twisteroid ambassador added the comment: With regards to the failing test, it looks like the test basically boils down to testing whether loop.getaddrinfo('fe80::1%1', 80, type=socket.SOCK_STREAM) returns (, , *, *, ('fe80::1', 80, 0, 1)). This feels like a dangerous assumption to make,

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset a58db9628d0c96cc5b863137fed4e432238f8027 by Victor Stinner in branch '3.7': bpo-36829: Enhance PyErr_WriteUnraisable() (GH-13487) https://github.com/python/cpython/commit/a58db9628d0c96cc5b863137fed4e432238f8027 --

[issue37003] ast unparse does not support f-string new debug format.

2019-05-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Notice that test_tools will fail if f'{x=}' becomes f'x={x!r}' when unparsed as it compares the text of the file and the text of the roundtrip of the ast of the file -- nosy: +pablogsal ___ Python tracker

[issue36817] Add = to f-strings for easier debugging.

2019-05-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Anecdotally, this happened as well when in the implementation of PEP572 -- ___ Python tracker ___

[issue36817] Add = to f-strings for easier debugging.

2019-05-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The reason the main CI did not catch this is that test_tools is only executed on a (random) subset of all the files if I remember correctly because when executed on all files it massively increases the time of the CI. --

[issue37010] Review performance of inspect.getfullargspec

2019-05-22 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36929] Other Python _io implementations may not expose _io in their type names

2019-05-22 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

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

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: Michael Felt: it's annoying when you ignore Antoine's comment and my comment. * https://github.com/python/cpython/pull/13463#issuecomment-494797084 * https://bugs.python.org/issue36084#msg343159 The AIX case is very special and required a separated issue.

[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2019-05-22 Thread twisteroid ambassador
twisteroid ambassador added the comment: AFAIK the reason why scope id is required for IPv6 is that every IPv6 interfaces has its own link-local address, and all these addresses are in the same subnet, so without an additional scope id there’s no way to tell from which interface an address can

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

2019-05-22 Thread Michael Felt
Michael Felt added the comment: On 22/05/2019 15:15, Jake Tesler wrote: > Jake Tesler added the comment: > > I will look into whether adding thread_self() for AIX would be simple enough > for this PR. > > -- > > ___ > Python tracker >

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

2019-05-22 Thread STINNER Victor
STINNER Victor added the comment: glibc 2.30 scheduled in August 2019 will finally provide a gettid() function! * https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD * http://man7.org/linux/man-pages/man2/gettid.2.html Once it will be released, it would be interesting to use

  1   2   >