[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-19 Thread Tim Peters
Tim Peters added the comment: Sorry, but there was nothing wrong with the CHECK_SMALL_INT macro, to my eyes, to begin with - except that it was burdened with an over-elaborate "do ... while(0)" wrapper. Not all macros are _intended_ to be "cheap functions". Like this one, some are intended

[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-19 Thread Ma Lin
Ma Lin added the comment: Recent commits for longobject.c Revision: 5e63ab05f114987478a21612d918a1c0276fe9d2 Author: Greg Price Date: 19-8-25 1:19:37 Message: bpo-37812: Convert CHECK_SMALL_INT macro to a function so the return is explicit. (GH-15216) The concern for this

[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm unassigning this. It has been blown profoundly out of proportion. The recommendation of the senior most developer is being ignored, and now two developers are speaking in terms of strong belief systems and labeling long-stable code as "evil". This

[issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8

2019-09-19 Thread Kyle Stanley
Kyle Stanley added the comment: Is there a currently reliable way of accessing the GIL functions within the sub-interpreters, without causing deadlock issues? I was trying to follow the advice in the documentation (https://docs.python.org/3/c-api/init.html?highlight=global%20interpreter%20loc

[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-19 Thread Greg Price
Greg Price added the comment: I hesitate to come back to this thread, because as Raymond says it's consumed a lot of time already. But I think this point is of broader interest than the specific few lines we've been discussing: > When small integer are disabled at compilation time (NSMALLPO

[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-19 Thread Kyle Stanley
Kyle Stanley added the comment: > I'm one of the first to advocate to replace ugly macros with clean static > inline functions. Macros are evil and can be too easily misused. As someone who has only more recently started learning the C-API (and C in general), I'm certainly in favor of replac

[issue38216] Fix for issue30458 prevents crafting invalid requests

2019-09-19 Thread Ammar Askar
Ammar Askar added the comment: > What bothers me here is that we apparently changed de facto behavior between > maintenance releases, in the middle of 3.7's lifecycle, without warning, no > doubt because we didn't realize it would break third-party packages. Arguably, I think the programs th

[issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async?

2019-09-19 Thread Stefan Behnel
Stefan Behnel added the comment: My usual first reaction is: "if you need to find out whether the return value of a callable will be an Awaitable or not, without calling it, then you're probably doing something wrong in your design". However, a) there is code that tries this already (and it f

[issue38216] Fix for issue30458 prevents crafting invalid requests

2019-09-19 Thread Ned Deily
Ned Deily added the comment: Thanks for your comments, Greg. Here's my take as release manager for 3.7 (and for 3.6). What bothers me here is that we apparently changed de facto behavior between maintenance releases, in the middle of 3.7's lifecycle, without warning, no doubt because we did

[issue38093] Update MagicMock __aenter__ and __aexit__ to return AsyncMock's

2019-09-19 Thread Lisa Roach
Lisa Roach added the comment: New changeset 8b03f943c37e07fb2394acdcfacd066647f9b1fd by Lisa Roach in branch 'master': bpo-38093: Correctly returns AsyncMock for async subclasses. (GH-15947) https://github.com/python/cpython/commit/8b03f943c37e07fb2394acdcfacd066647f9b1fd -- __

[issue38161] AsyncMock add `.awaited` like `.called`

2019-09-19 Thread Lisa Roach
Lisa Roach added the comment: Yeah I think the current `awaited` ought to at least be a private variable, since people will assume it works like a boolean to match `.called`. Then we could add a new, proper, `awaited` that would function like: >>> mock = AsyncMock() >>> cr_mock = mock() >>>

[issue38216] Fix for issue30458 prevents crafting invalid requests

2019-09-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: What's needed here is a Decision. (release managers and steering councils make those) IMNSHO, this regression is intentional and does not feel like a bug. The Python HTTP APIs were never designed with an explicit intent to allow violations of the protoco

[issue34002] minor efficiency and clarity improvements in email package

2019-09-19 Thread Abhilash Raj
Abhilash Raj added the comment: PR is now merged. -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34002] minor efficiency and clarity improvements in email package

2019-09-19 Thread Abhilash Raj
Abhilash Raj added the comment: New changeset 2702638eabe5f7b25f36d295f0ad78cb8d4eda05 by Abhilash Raj (Michael Selik) in branch 'master': bpo-34002: Minor efficiency and clarity improvements in email package. (GH-7999) https://github.com/python/cpython/commit/2702638eabe5f7b25f36d295f0ad78cb

[issue38228] Missing documentation on strftime modifier O

2019-09-19 Thread Eryk Sun
Eryk Sun added the comment: > Have you tried this on Windows or macOS? 3.5+ in Windows uses ucrt, which quietly ignores 'E' and 'O' strftime modifiers. From ucrt\time\wcsftime.cpp: // Skip ISO E and O alternative representation format modifiers. We // do not support

[issue38229] ClientConnectionError exception doesn't serialize property

2019-09-19 Thread David Parks
David Parks added the comment: Oh yes, this belongs to aiohttp. I thought that was handled here. I'll move this to a git issue on that page, and I'm closing this. https://github.com/aio-libs/aiohttp/issues/4077 -- resolution: -> rejected stage: -> resolved status: open -> closed ti

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2019-09-19 Thread Kyle Stanley
Kyle Stanley added the comment: > Thanks, Kyle! No problem, and thanks for all of the help from Andrew, Yury, and Victor! > IMHO it will make asyncio more reliable, especially for tests on the CI. Awesome, that was my primary intention. (: > If it becomes an issue in Python 3.9 (executor ha

[issue38229] ClientConnectionError exception doesn't serialize propertly

2019-09-19 Thread ppperry
ppperry added the comment: This seems more likely to be a bug in aiohttp than in python. -- nosy: +ppperry type: crash -> behavior ___ Python tracker ___ _

[issue38228] Missing documentation on strftime modifier O

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: Have you tried this on Windows or macOS? -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bu

[issue38229] ClientConnectionError exception doesn't serialize propertly

2019-09-19 Thread David Parks
David Parks added the comment: Minor correction to the minimal reproducible test case: ``` import multiprocessing import aiohttp connection_key = aiohttp.client_reqrep.ConnectionKey ose = OSError('test') e = aiohttp.client_exceptions.ClientConnectorError(connection_key, ose) q = multiproces

[issue38229] ClientConnectionError exception doesn't serialize propertly

2019-09-19 Thread David Parks
New submission from David Parks : Original question posted here: https://stackoverflow.com/questions/58019939/attributeerror-str-object-has-no-attribute-errno?noredirect=1#comment102443264_58019939 The following exception is encountered when placing an `aiohttp.client_exceptions.ClientConnect

[issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async?

2019-09-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think we need better name than just `_is_coroutine`. All async function properties as dunder named, the new *official* name should follow this convention as well -- ___ Python tracker

[issue38228] Missing documentation on strftime modifier O

2019-09-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue38228] Missing documentation on strftime modifier O

2019-09-19 Thread Joan
New submission from Joan : In the documentation at https://docs.python.org/3.9/library/datetime.html#strftime-strptime-behavior there's an omission of one of the modifiers that can be add to the strftime parameters (O and E) Quoting from http://man7.org/linux/man-pages/man3/strftime.3.html

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2019-09-19 Thread Ionel Cristian Mărieș
New submission from Ionel Cristian Mărieș : Running `python3.8 mp-bug-python2.8.py` usually gets stuck after a dozen iterations or so. It appears that if I stop setting that signal handler it doesn't get stuck. Unfortunately I need it to perform critical cleanup. This is what I got from gdb:

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Brett Cannon
Brett Cannon added the comment: I'm -1 as PEP 519 created __fspath__ specifically so that pathlib.Path wouldn't be confused as a string by accident. You can also use os.fspath() to get a string representation of the path itself. I also don't know if Antoine wants to make this sort of call fo

[issue38226] pickle.dump and load error message when file isn't opened in binary mode are not useful

2019-09-19 Thread Борис Верховский
New submission from Борис Верховский : pickle.load() and pickle.dump() take a file object as an argument. That file object must be opened in binary mode ("rb" or "wb"). If it's not, pickle raises a confusing error message. When pickle.dump()'ing to a file opened in "w" mode instead of "wb" mod

[issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async?

2019-09-19 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +scoder versions: -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue15363] Idle/tkinter ~x.py 'save as' fails. closes idle

2019-09-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list

[issue21937] IDLE interactive window doesn't display unsaved-indicator

2019-09-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___ ___ Pytho

[issue23544] IDLE hangs when selecting Stack View with debug active

2019-09-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -kbk, roger.serwy versions: +Python 3.9 -Python 2.7, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___

[issue21674] Idle: Add 'find all' in current file

2019-09-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list

[issue24812] All standard keystrokes not recognized in IDLE dialogs on Mac

2019-09-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -kbk, roger.serwy versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___

[issue29926] IDLE: in shell, time.sleep ignores _thread.interrupt_main()

2019-09-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.9 -Python 2.7, Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list

[issue11820] idle3 shell os.system swallows shell command output

2019-09-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list

[issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async?

2019-09-19 Thread David Hilton
Change by David Hilton : -- keywords: +patch pull_requests: +15877 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16292 ___ Python tracker ___ ___

[issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async?

2019-09-19 Thread David Hilton
New submission from David Hilton : If a python piece of code imports cython code with async defs, `asyncio.iscoroutinefunction` cannot determine that the code is async. https://github.com/cython/cython/issues/2273#issuecomment-531537624 scoder is open to marking async defs so that they can be

[issue22083] IDLE: Refactor breakpoint related methods

2019-09-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Refactor PyShell's breakpoint related methods -> IDLE: Refactor breakpoint related methods versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker __

[issue31930] IDLE: Pressing "Home" on Windows places cursor before ">>>"

2019-09-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.9 -Python 2.7, Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list

[issue21359] IDLE macOS: Some Command shortcuts do not work correctly

2019-09-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Still an issue. Several shortcuts do not work right, so I am generalizing the issue. 1. Redo command accelerator acts as Undo. 2. Cmd-M minimizes instead of open module (#35104 has long discussion). I at least one other issue mentions a similar problem.

[issue35104] IDLE: On macOS, Command-M minimizes & opens "Open Module..."

2019-09-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am closing this as a duplicate of #21359 as I believe there is at least one more non-working shortcut and because I believe the solution is to test all and patch the default mac keyset all at once. -- resolution: -> duplicate stage: needs patch ->

[issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API

2019-09-19 Thread Dino Viehland
Change by Dino Viehland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38045] enum.Flag instance creation is slow

2019-09-19 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +15876 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16291 ___ Python tracker ___ __

[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.

2019-09-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: The input glitch mentioned above no longer exists, so closing. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue15347] IDLE - remove debugger 'interacting'

2019-09-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: fix-nested-mainloop.patch was superceded by fix-nested2.patch for #24455. I verified that the initial test now passes. When I click 'yes' in that box popped up by step 4, both Shell and debugger windows disappear and IDLE exists. The only question left is wh

[issue38224] Windows embeddable distribution doesn't ship headers

2019-09-19 Thread Steve Dower
Steve Dower added the comment: The embeddable distro is meant to be a "redistributable" for end-user machines, rather than a development kit. "Build" and "distribution" are two clearly separated tasks (at least on Windows), and so they have different dependencies. We won't be adding headers

[issue38208] Simplify string.Template by using __init_subclass__()

2019-09-19 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5e1400a6bcbb3350a6665176980a2b8343075c63 by Victor Stinner in branch '3.7': bpo-37531: sync regrtest with master branch (GH-16285) (GH-16289) https://github.com/python/cpython/commit/5e1400a6bcbb3350a6665176980a2b8343075c63 -- ___

[issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API

2019-09-19 Thread Dino Viehland
Dino Viehland added the comment: New changeset 3368f3c6ae4140a0883e19350e672fd09c9db616 by Dino Viehland (Eddie Elizondo) in branch 'master': bpo-38140: Make dict and weakref offsets opaque for C heap types (#16076) https://github.com/python/cpython/commit/3368f3c6ae4140a0883e19350e672fd09c9d

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15875 pull_request: https://github.com/python/cpython/pull/16290 ___ Python tracker ___ __

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15874 pull_request: https://github.com/python/cpython/pull/16289 ___ Python tracker ___ __

[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15873 pull_request: https://github.com/python/cpython/pull/16288 ___ Python tracker ___ __

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset fb7746d5d10ec4a34198da672018ba15f5667079 by Victor Stinner in branch '3.8': bpo-37531: sync regrtest with master branch (GH-16285) https://github.com/python/cpython/commit/fb7746d5d10ec4a34198da672018ba15f5667079 -- __

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +15872 pull_request: https://github.com/python/cpython/pull/16287 ___ Python tracker ___ ___

[issue38147] add Py_ASSUME() macro for __builtin_unreachable()

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- title: add macro for __builtin_unreachable -> add Py_ASSUME() macro for __builtin_unreachable() ___ Python tracker ___ __

[issue38147] add macro for __builtin_unreachable

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: > Here's example: > https://github.com/sir-sigurd/cpython/commit/c8699d0c614a18d558216ae7d432107147c95c28. "_Py_ASSUME((size_t)size <= MAX_LONG_DIGITS);" Typically, such code use assert() and is removed for release build. assert() is more for contract base

[issue38216] Fix for issue30458 prevents crafting invalid requests

2019-09-19 Thread Larry Hastings
Larry Hastings added the comment: FWIW I planned to tag and release 3.5.8 final early next week. I don't have the domain knowledge to assess the severity of this bug--much less pitch in and help fix it--so I suspect this will simply hold up 3.5.8 final. Depending on the complexity of the fi

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +15871 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16286 ___ Python tracker ___ __

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Miki Tebeka
Miki Tebeka added the comment: I don't think it violates " Explicit is better than implicit." There's a lot of work done to make pathlib.Path objects work in places where str or bytes is expected (e.g PEP 519), IMO this is another case. -- ___ Pyth

[issue38147] add macro for __builtin_unreachable

2019-09-19 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: > If you care of _PyLong_Copy() performance, you should somehow manually inline > _PyLong_New() inside _PyLong_Copy(). It doesn't solve this: > We could add a function that bypass that check, but in LTO build > PyObject_MALLOC() is inlined into _PyLong_New

[issue25130] Make tests more PyPy compatible

2019-09-19 Thread Ronan Lamy
Change by Ronan Lamy : -- nosy: +Ronan.Lamy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _Py_NO_RETURN is a promise that the code past the function is unreachable, not that the function call is unreachable. > I'm not sure how __builtin_unreachable could be used with Py_UNREACHABLE() > macro. In the release mode Py_UNREACHABLE() can be replace

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: asyncio.run() now shutdowns the default executor: nice, thanks! That was my request. IMHO it will make asyncio more reliable, especially for tests on the CI. If it becomes an issue in Python 3.9 (executor hangs forever), we can add new parameters (to run()?

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 079931d12223ec98cbf53185b90db48efa61f93f by Victor Stinner in branch 'master': bpo-34037: test_asyncio uses shutdown_default_executor() (GH-16284) https://github.com/python/cpython/commit/079931d12223ec98cbf53185b90db48efa61f93f -- __

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15870 pull_request: https://github.com/python/cpython/pull/16285 ___ Python tracker ___ __

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset b2dd2dd6e9212ba6b03885b998736a180ef283d6 by Victor Stinner in branch 'master': bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on all platforms (GH-16282) https://github.com/python/cpython/commit/b2dd2dd6e9212ba6b03885b998736a180ef

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: I'm also -0 on it. It's up to Antoine. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am -0 on this. It is a can of worms. Once we add a trivial __format__ in Path, we will need to handle numerous requests for adding a trivial __format__ in many other classes. It is better to teach users to use !s (and this works also on older Python vers

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15869 pull_request: https://github.com/python/cpython/pull/16284 ___ Python tracker ___ __

[issue38147] add macro for __builtin_unreachable

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: > This check is redundant when _PyLong_New() is called from _PyLong_Copy(). If you care of _PyLong_Copy() performance, you should somehow manually inline _PyLong_New() inside _PyLong_Copy(). -- ___ Python tracker

[issue38147] add macro for __builtin_unreachable

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: > Real world example. _PyLong_Copy() [1] calls _PyLong_New() [2]. _PyLong_New() > checks the size, so that overflow does not occur. This check is redundant > when _PyLong_New() is called from _PyLong_Copy(). We could add a function > that bypass that check,

[issue38155] Add __all__ to the datetime module

2019-09-19 Thread Paul Ganssle
Paul Ganssle added the comment: Closing this as resolved. I don't think we should backport this, as it's more of an enhancement than a bug fix (and since no one has ever complained about it to my knowledge, I don't think there's any big rush to see this released). Thanks Tahia and all the re

[issue38155] Add __all__ to the datetime module

2019-09-19 Thread Paul Ganssle
Paul Ganssle added the comment: New changeset 96b1c59c71534db3f0f3799cd84e2006923a5098 by Paul Ganssle (t k) in branch 'master': bpo-38155: Add __all__ to datetime module (GH-16203) https://github.com/python/cpython/commit/96b1c59c71534db3f0f3799cd84e2006923a5098 -- ___

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2019-09-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 9fdc64cf1266b6d5bf0503847b5c38e5edc53a14 by Andrew Svetlov (Kyle Stanley) in branch 'master': bpo-34037: Fix test_asyncio failure and add loop.shutdown_default_executor() (GH-15735) https://github.com/python/cpython/commit/9fdc64cf1266b6d5bf050

[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads

2019-09-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thnks, Kyle! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think anyone is suggesting reverting the decision on object.__format__. That decision should stay. I think the suggestion is to add Path.__format__, which just converts to a string and formats with the given spec. Unless someone can think of a reason

[issue13743] xml.dom.minidom.Document class is not documented

2019-09-19 Thread Henry Harutyunyan
Change by Henry Harutyunyan : -- nosy: +hharutyunyan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: FWIW I proposed to add Py_ASSUME() macro that uses __builtin_unreachable() in bpo-38147. -- ___ Python tracker ___

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Or use !s or !r. In some cases it may be even better to use both convertions: f'{str(path)!r:>50}'. This is all application specific, so I do not think we should rethink our old decision. Explicit is better than implicit. --

[issue6559] add pass_fds paramter to subprocess.Popen()

2019-09-19 Thread Orivej Desh
Change by Orivej Desh : -- pull_requests: +15868 pull_request: https://github.com/python/cpython/pull/16283 ___ Python tracker ___ __

[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15867 pull_request: https://github.com/python/cpython/pull/16282 ___ Python tracker ___ __

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: Correct: this change was made specifically so that objects could add their own format specifiers at a later time. If I recall correctly, This change was precipitated by wanting to add datetime.__format__: this change broke existing uses for format() that form

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: > While it is a macro, it can be made a no-op, or even with compiler-specific > instructions like __builtin_unreachable. My PR 16280 uses _Py_NO_RETURN which uses __attribute__((__noreturn__)) with GCC and clang. I'm not sure how __builtin_unreachable could

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I prefer to keep it a macro. The compiler does not know that it is never executed, so it can generate a suboptimal code. While it is a macro, it can be made a no-op, or even with compiler-specific instructions like __builtin_unreachable. This can help the

[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: When small integer are disabled at compilation time (NSMALLPOSINTS=0 and a NSMALLNEGINTS=0), I suggest to remove code related to small integers. IMHO CHECK_SMALL_INT() macro is a good practical solution for that. So I suggest to restore this macro. ---

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: I propose to restrict this issue to Py_UNREACHABLE() macro/function. Please use bpo-37812 to discuss longobject.c. -- ___ Python tracker ___

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- title: Python no longer compiles without small integer singletons -> Py_UNREACHABLE() no longer behaves as a function call ___ Python tracker ___

[issue38019] asyncio subprocess AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader'

2019-09-19 Thread Marat Sharafutdinov
Marat Sharafutdinov added the comment: Andrew, it would be nice to have it fixed within 3.8. Hope you'll find time for this. -- ___ Python tracker ___ ___

[issue38224] Windows embeddable distribution doesn't ship headers

2019-09-19 Thread Leblond Emmanuel
New submission from Leblond Emmanuel : I don't understand why the headers are not provided as part of the distribution. It would be really easy to rm them once the distribution extracted for usecases that don't need them. On the other hand, usecases that need them cannot just download the Inc

[issue38223] Reorganize test_shutil

2019-09-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +15866 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16281 ___ Python tracker ___

[issue38223] Reorganize test_shutil

2019-09-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently most shutil tests are in a single class. Tests for the same function are partially grouped together and partially intermixed with other tests. This makes hard to find an appropriate place for adding new tests and increase risk of hiding test by

[issue38205] Python no longer compiles without small integer singletons

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 16280: "Convert Py_UNREACHABLE() macro to a function". This change fix this issue but also enhance Py_UNREACHABLE() which now dumps the Python traceback where the bug occurs. See my example: https://github.com/python/cpython/pull/16280#issuecomment

[issue38205] Python no longer compiles without small integer singletons

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15865 pull_request: https://github.com/python/cpython/pull/16280 ___ Python tracker ___ __

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Initially, the default __format__ converted the object to str and passed format specifier to str.__format__. This is defined in PEP 3101: class object: def __format__(self, format_spec): return format(str(self), format_spec) But later we change

[issue38205] Python no longer compiles without small integer singletons

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: I like the idea of implementing Py_UNREACHABLE() as a function. Would it make sense to even declare it as a regular function rather than a static inline function? What is the benefit of inlining here? Inlining can make the code larger, rather than a function

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Serhiy that !s solves the problem. But as a convenience it might be nice to add __format__. This issue pops up from time to time on Path and other types, and I don't think !s is very discoverable. Especially because formatting works with a specif

[issue38219] Optimize dict.__init__ and dict.update for dict argument

2019-09-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Convert it to string first: print(f'path is: {path!s:>50}') -- nosy: +serhiy.storchaka ___ Python tracker ___