[issue30045] Bad parameter name in re.escape()

2017-04-12 Thread Mandeep Bhutani
Mandeep Bhutani added the comment: I agree that pattern seems right. However I think that the parameter in the docs should be changed from string to pattern for consistency purposes. -- nosy: +mandeepb ___ Python tracker

[issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError

2017-04-12 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1244 ___ Python tracker ___ ___

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 72b1d419ac5f7cd9ef82ffd2ffe21aa9b34e21d2 by Xiang Zhang in branch '3.5': bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1100) https://github.com/python/cpython/commit/72b1d419ac5f7cd9ef82ffd2ffe21aa9b34e21d2

[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: Hi, Antoine, after this change, I sometimes see tests fail for 3.5 branch, for example http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.5/builds/194/steps/test/logs/stdio. -- nosy: +xiang.zhang ___

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 14944c62300f741488c2f28cb91ad1e3fef7343b by Xiang Zhang in branch '3.6': bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1099) https://github.com/python/cpython/commit/14944c62300f741488c2f28cb91ad1e3fef7343b

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Backported to 3.6. Closing this now. Thanks all :) -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset f0c416799b33742af36d7c6608b9a422615fb3d2 by Mariatta in branch '3.6': [3.6] bpo-30047: Fix a typo in Doc/library/select.rst (GH-1086) (GH-1098) https://github.com/python/cpython/commit/f0c416799b33742af36d7c6608b9a422615fb3d2 --

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1243 ___ Python tracker ___ ___

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1242 ___ Python tracker ___ ___

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1241 ___ Python tracker ___ ___

[issue30063] DeprecationWarning in json/encoder.py

2017-04-12 Thread Paul Durack
Paul Durack added the comment: I have attempted to quieten these using: In [2]: import warnings ...: warnings.filterwarnings('ignore', category=DeprecationWarning) In [3]: import vcs /home/user/anaconda2/envs/cdatcmornclnco/lib/python2.7/json/encoder.py:207: DeprecationWarning: Interpreting

[issue30063] DeprecationWarning in json/encoder.py

2017-04-12 Thread Paul Durack
New submission from Paul Durack: I have started receiving the following warnings which are starting to prevent an ipython session from functioning: /home/user/anaconda2/envs/cdatcmornclnco/lib/python2.7/json/encoder.py:207: DeprecationWarning: Interpreting naive datetime as local 2017-04-12

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset a6902e662c18dc837d40664eaafe50a44aae6366 by Xiang Zhang in branch 'master': bpo-26985: Add missing info of code object in inspect documentation (GH-1090) https://github.com/python/cpython/commit/a6902e662c18dc837d40664eaafe50a44aae6366 --

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +1240 ___ Python tracker ___ ___

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: > In Evgeny's example the 'task' is 'coro1' (not 'coro2'). It has plenty of > yield points after being cancelled. Since coro1 waiting coro2 when cancelling, Task(coro1).cancel() redirect to Task(coro2).cancel(). But I was wrong about "CancelledError is thrown

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread Yury Selivanov
Yury Selivanov added the comment: In Evgeny's example the 'task' is 'coro1' (not 'coro2'). It has plenty of yield points after being cancelled. -- ___ Python tracker

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: > The problem is that the task doesn't catch CancelledError, yet it disappears. The problem is CancelledError is not raised, even it's thrown. Task can't catch exception not raised. See below example which demonstrates how task works. --- from asyncio import

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread Evgeny Kapun
Evgeny Kapun added the comment: The problem is that the task doesn't catch CancelledError, yet it disappears. -- ___ Python tracker ___

[issue30062] datetime in Python 3.6+ no longer respects 'TZ' environment variable

2017-04-12 Thread Adam Williamson
Adam Williamson added the comment: Hmm, after a bit more poking I found this: https://docs.python.org/3/library/time.html#time.tzset "Note Although in many cases, changing the TZ environment variable may affect the output of functions like localtime() without calling tzset(), this behavior

[issue30052] URL Quoting page links to function Bytes instead of defintion

2017-04-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: I've looked into this a little more and it seems that, in all instances, the :class:`bytes` and :class:`bytearray` mark-up link to the Built-In Functions page instead of the Built-In Types page. It also looks like the Built-In Functions page has specific code

[issue30062] datetime in Python 3.6+ no longer respects 'TZ' environment variable

2017-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +belopolsky ___ Python tracker ___ ___

[issue30062] datetime in Python 3.6+ no longer respects 'TZ' environment variable

2017-04-12 Thread Adam Williamson
New submission from Adam Williamson: I can't figure out yet why this is, but it's very easy to demonstrate: [adamw@adam anaconda (time-log %)]$ python35 Python 3.5.2 (default, Feb 11 2017, 18:09:24) [GCC 7.0.1 20170209 (Red Hat 7.0.1-0.7)] on linux Type "help", "copyright", "credits" or

[issue30061] Check if PyObject_Size() raised an error

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1239 ___ Python tracker ___ ___

[issue30061] Check if PyObject_Size() raised an error

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review ___ Python tracker ___

[issue30061] Check if PyObject_Size() raised an error

2017-04-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyObject_Size(), PySequence_Size() and PyMapping_Size() can raise an exception. But not always this is checked after using them. This can lead to a crash. For example: >>> import io >>> class R(io.IOBase): ... def readline(self): return None ... >>>

[issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6

2017-04-12 Thread Łukasz Langa
Łukasz Langa added the comment: No Serhiy, I need a new patch with tests, etc. -- ___ Python tracker ___ ___

[issue30059] No documentation for C type Py_Ellipsis

2017-04-12 Thread Michael Seifert
Michael Seifert added the comment: > I'm wondering if it is worth to add a separate section for Ellipsis at the > same level as "Slice Objects", but in the same file. I'm not sure either. There seems to be no precedent in the documentation, for example "Py_NotImplemented" is also just

[issue30059] No documentation for C type Py_Ellipsis

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm wondering if it is worth to add a separate section for Ellipsis at the same level as "Slice Objects", but in the same file. See for example "Instance Method Objects" and "Method Objects" in method.rst. -- nosy: +serhiy.storchaka

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: This needs backport, which I will do later today. Thanks. -- assignee: docs@python -> Mariatta nosy: +Mariatta stage: -> backport needed versions: +Python 3.7 ___ Python tracker

[issue30060] Crash on Py_Finalize if Py_NoSiteFlag is used

2017-04-12 Thread Stephen Kelly
New submission from Stephen Kelly: When attempting to use PyImport_ImportModule("os") (or to import many other libraries), there is a crash on Py_Finalize if Py_NoSiteFlag is set. The issue appears to be the use of frozenset() as a result of importing the module. I reproduced this on Windows

[issue30059] No documentation for C type Py_Ellipsis

2017-04-12 Thread Michael Seifert
New submission from Michael Seifert: The "Py_Ellipsis" object is part of the public C-API but it isn't documented anywhere. It is defined in "sliceobject.o/.h" so I created a PR and added it to the "slice" documentation. -- assignee: docs@python components: Documentation messages:

[issue29994] site.USER_SITE is None for Windows embeddable Python 3.6

2017-04-12 Thread Steve Dower
Steve Dower added the comment: Actually, I suspect you're not importing site on startup at all (which is great for performance), but that means that site.main() is not being run. I'll post more details on the pip bug. -- ___ Python tracker

[issue30058] Buffer overflow in kqueue.control()

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch presumably fixes the issue. But since this is *BSD specific I can't even check that it is compiled. -- stage: -> patch review ___ Python tracker

[issue30058] Buffer overflow in kqueue.control()

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1237 ___ Python tracker ___ ___

[issue29994] site.USER_SITE is None for Windows embeddable Python 3.6

2017-04-12 Thread Steve Dower
Steve Dower added the comment: Yes, fixing pip in this case is the right approach. Since you're going to be including a copy of pip with your application, you can also just patch that yourself to get going while the pip team decides how to go from here. Or you could add a sitecustomize.py

[issue30058] Buffer overflow in kqueue.control()

2017-04-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The first parameter of kqueue.control() is documented as an iterable. But actually it should have a length. kqueue.control() uses PyObject_Size() for allocating an array and PyObject_GetIter()+PyIter_Next() for iterating kevent objects and filling the

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
Changes by Jeroen Demeyer : Added file: http://bugs.python.org/file46802/fix30057-py3.patch ___ Python tracker ___

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
Changes by Jeroen Demeyer : -- keywords: +patch Added file: http://bugs.python.org/file46801/fix30057-py2.patch ___ Python tracker

[issue30056] RuntimeWarning: invalid value encountered in maximum/minimum

2017-04-12 Thread R. David Murray
R. David Murray added the comment: Numpy is not part of the python standard library. You should report this issue to the numpy bug tracker, which appears to be here: https://github.com/numpy/numpy/issues. Or perhaps first ask the numpy community if this is really a bug: the new version

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: There is a race condition in calling signal.signal() if the signal arrives while (or right before) signal.signal() is being executed: the function signal.signal(sig, action) marks the signal "sig" as not tripped. Because of this, signals can get lost.

[issue30056] RuntimeWarning: invalid value encountered in maximum/minimum

2017-04-12 Thread Amy
New submission from Amy: I just updated to numpy 1.12.1 and am getting this Runtime Warning when using numpy.minimum or numpy.maximum: RuntimeWarning: invalid value encountered in maximum Prior to updating, I was using numpy 1.10.x and had no issues running numpy.minimum or numpy.maximum

[issue30055] Missed testcleanup in decimal.rst

2017-04-12 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +1236 ___ Python tracker ___ ___

[issue30055] Missed testcleanup in decimal.rst

2017-04-12 Thread Marco Buttu
New submission from Marco Buttu: The testsetup in Doc/library/decimal.rst is not enough for isolating the tests in respect to the other rst files. Currently we have the following testsetup, without a testcleanup: .. testsetup:: * import decimal import math from decimal import

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: With this changeset it would: https://github.com/numpy/numpy/pull/8885 -- ___ Python tracker ___

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: What's the status in numpy? Is the current numpy release able to use CPython 3.6 tracemalloc private functions? -- ___ Python tracker

[issue29791] print documentation: flush is also a keyword argument

2017-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review type: enhancement -> behavior versions: +Python 3.5, Python 3.7 ___ Python tracker

[issue29791] print documentation: flush is also a keyword argument

2017-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +1235 ___ Python tracker ___ ___

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: I am not sure if _PyTraceMalloc_GetTraceback really needs to be a public function. Exposing the tracing information should probably just go over python interfaces. -- ___ Python tracker

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread STINNER Victor
New submission from STINNER Victor: The issue #26530 added a private C API to manually track/untrack memory blocks in tracemalloc. I was just validated by Julian Taylor who confirms that the API works as expected: http://bugs.python.org/issue26530#msg291551 So I propose to make the 3 newly

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: "I don't see any reason why not to.": Ok, I created the issue #30054. -- ___ Python tracker ___

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: I don't see any reason why not to. -- ___ Python tracker ___ ___

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: Julian Taylor: "The api looks good to me. Works fine in numpy." Cool! Should it be made public in that case? (Remove _ prefix and document it.) -- ___ Python tracker

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: The api looks good to me. Works fine in numpy. -- nosy: +jtaylor ___ Python tracker ___

[issue30017] zlib.error: Error -2 while flushing: inconsistent stream state

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1234 ___ Python tracker ___ ___

[issue30017] zlib.error: Error -2 while flushing: inconsistent stream state

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4c0d9ea995da595e90e08813b89510de59907802 by Serhiy Storchaka in branch 'master': bpo-30017: Allowed calling the close() method of the zip entry writer object (#1041)

[issue30027] test_xml_etree and test_xml_etree_c fail due to AssertionError: unhandled warning DeprecationWarning

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30027] test_xml_etree and test_xml_etree_c fail due to AssertionError: unhandled warning DeprecationWarning

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 65c5b096ac2c6608d296f1603cd4792086108c95 by Serhiy Storchaka in branch '2.7': bpo-30027: Fix Py3k warnings in test_xml_etree. (#1065) https://github.com/python/cpython/commit/65c5b096ac2c6608d296f1603cd4792086108c95 --

[issue13285] signal module ignores external signal changes

2017-04-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I have a preliminary implementation (in the cysignals package) at https://github.com/sagemath/cysignals/pull/53 -- ___ Python tracker

[issue30053] Problems building with --enable-profiling on macOS

2017-04-12 Thread Brecht Machiels
Changes by Brecht Machiels : Added file: http://bugs.python.org/file46800/make_gcc.txt ___ Python tracker ___

[issue30053] Problems building with --enable-profiling on macOS

2017-04-12 Thread Brecht Machiels
Changes by Brecht Machiels : Added file: http://bugs.python.org/file46799/make.txt ___ Python tracker ___

[issue30053] Problems building with --enable-profiling on macOS

2017-04-12 Thread Brecht Machiels
New submission from Brecht Machiels: The python.exe produced during the build process is somehow broken: $ ./python.exe -S Killed: 9 Strangely, it works when run from gdb: $ gdb -args ./python.exe -S GNU gdb (GDB) 7.12.1 Copyright (C) 2017 Free Software Foundation, Inc.

[issue30052] URL Quoting page links to function Bytes instead of defintion

2017-04-12 Thread Cheryl Sabella
New submission from Cheryl Sabella: On the URL Quoting page, the following line: `string may be either a str or a bytes.` Has the `str` link to: https://docs.python.org/3/library/stdtypes.html#str But the `bytes` link to: https://docs.python.org/3/library/functions.html#bytes Should the

[issue30049] Don't cache tp_iternext

2017-04-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

[issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What if use the term "singleton"? It includes "initialize once" and "finalize at shutdown" meanings. _Py_INIT_SINGLETON() or _Py_SET_SINGLETON()? -- ___ Python tracker

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is worth documenting. Even if multiprocessing reseeds the module-global random generator, it doesn't reseed other instances of Random. -- ___ Python tracker

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3e0f1fc4e0ffcfcc706015fa3d67c262948ef171 by Serhiy Storchaka (NAKAMURA Osamu) in branch 'master': bpo-30047: Fix a typo in Doc/library/select.rst (#1086) https://github.com/python/cpython/commit/3e0f1fc4e0ffcfcc706015fa3d67c262948ef171

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1233 ___ Python tracker ___ ___

[issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: I dislike _Py_SET_FINALIZED and _Py_SET_ONCE name. I prefer to mention an "initialization" because it's a common pattern in programming and it is known that it only requires to be done once. _PY_ONCEVAR_INIT() macro is unusual: it only evaluate the second

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I mean mentioning fork(), which people usually don't call directly, is not necessary, so, indeed, a note isn't necessary. -- ___ Python tracker

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: > I'm not sure that's necessary. Do you mean that adding a note is not necessary? Or proposing a solution in the note? -- ___ Python tracker

[issue29995] re.escape() escapes too much

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka dependencies: +Add examples for re.escape() ___ Python tracker

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-12 Thread Armin Rigo
Armin Rigo added the comment: https://github.com/python/cpython/pull/1089 (I fixed the problem with my CLA check. Now https://cpython-devguide.readthedocs.io/pullrequest.html#licensing says "you can ask for the CLA check to be run again" but doesn't tell how to do that, so as far as I can

[issue30021] Add examples for re.escape()

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> serhiy.storchaka ___ Python tracker ___

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-12 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1232 ___ Python tracker ___

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: FYI, Tornado 4.5b switched buffer implementation from deque-of-bytes to bytearray like asyncio. I sent PR for fixing "unreleased memoryview". https://github.com/tornadoweb/tornado/pull/2008 This is common pitfall when implementing buffer. --

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure that's necessary. fork() is a low-level primitive, people can/should use multiprocessing.Process instead, which does re-seed the PRNG. -- nosy: +pitrou ___ Python tracker

[issue30050] Please provide a way to disable the warning printed if the signal module's wakeup fd overflows

2017-04-12 Thread Nathaniel Smith
Nathaniel Smith added the comment: I haven't noticed the error in the wild because I don't use set_wakeup_fd on Linux/MacOS, because of this issue :-). But on MacOS literally all it would take is to receive two signals in quick succession, or to receive one signal at a moment when someone has

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread STINNER Victor
Changes by STINNER Victor : -- assignee: -> docs@python components: +Documentation nosy: +docs@python, rhettinger, serhiy.storchaka ___ Python tracker

[issue30030] Simplify _RandomNameSequence

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: After reviewing the change, I created the issue #30051: "Document that the random module doesn't support fork". -- ___ Python tracker

[issue30051] Document that the random module doesn't support fork

2017-04-12 Thread STINNER Victor
New submission from STINNER Victor: When reviewing the issue #30030, it reminded me that the random module "doesn't support fork": after fork, the parent and the child produce the same "random" number sequence. I suggest to add a quick note about that: not a warning, just a note, as a

[issue30050] Please provide a way to disable the warning printed if the signal module's wakeup fd overflows

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: > One way that writing to the wakeup fd can fail is if the pipe or socket's > buffer is already full, in which case we get EWOULDBLOCK or WSAEWOULDBLOCK. Is it a theorical question or did you notice the error in the wild? I mean: without sending a signal in a

[issue30050] Please provide a way to disable the warning printed if the signal module's wakeup fd overflows

2017-04-12 Thread Nathaniel Smith
New submission from Nathaniel Smith: When a wakeup fd is registered via signal.set_wakeup_fd, then the C level signal handler writes a byte to the wakeup fd on each signal received. If this write fails, then it prints an error message to the console. Some projects use the wakeup fd as a way

[issue30049] Don't cache tp_iternext

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1231 ___ Python tracker ___ ___

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: This behavior is documented as: https://docs.python.org/3.6/library/asyncio-task.html#asyncio.Task.cancel > Unlike Future.cancel(), this does not guarantee that the task will be > cancelled: the exception might be caught and acted upon, delaying > cancellation

[issue30049] Don't cache tp_iternext

2017-04-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Some operations cache the value of the tp_iternext slot and call it in a loop. But calling tp_iternext can run arbitrary code, release GIL and change the tp_iternext slot in the same or other thread. This can leads to visible behavior difference, such as

[issue13285] signal module ignores external signal changes

2017-04-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Ping? I'll try to implement this in cysignals (which is more difficult than doing it in CPython because I cannot access all internals of the Python signal module). -- ___ Python tracker

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: When task.cancel() called, CancelledError is thrown to coro2. But coro2 doesn't call `yield from` after task.cancel(). So the exception is never raised. If you add `yield from` after `task.cancel()`, the script runs expected. --- $ cat at.py import asyncio as a

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-12 Thread Armin Rigo
Armin Rigo added the comment: Update: a review didn't show any other similar problems (pathlib.py is a thin layer after all). Applied the fix and test (x2.diff) inside PyPy. -- ___ Python tracker

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2017-04-12 Thread Frank Blankenburg
Changes by Frank Blankenburg : -- nosy: +FrankBlabu ___ Python tracker ___ ___

[issue29994] site.USER_SITE is None for Windows embeddable Python 3.6

2017-04-12 Thread Brecht Machiels
Brecht Machiels added the comment: I see. In that case I think pip should be able to handle the case when site.USER_SITE is None. I have created a ticket here: https://github.com/pypa/pip/issues/4437. I am using the embeddable Python what's it intended for, to make a self-contained