[issue38680] PyGILState_Release does not release gil correctly, resulting in deadlock

2019-11-05 Thread Damien LEFEVRE
Damien LEFEVRE added the comment: I see the same problem. We call python functions from C++ and use this locking class within each call: ''' #pragma once #ifdef _DEBUG #undef _DEBUG #include #define _DEBUG #else #include #endif // _DEBUG #include "gcc_helper.h" GCC_DIAG_OF

[issue38680] PyGILState_Release does not release gil correctly, resulting in deadlock

2019-11-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: I don't think this is a bug: - PyGILState_Ensure() acquires the GIL when it is not already acquired (and can be called without checking). It cannot acquire the GIL when some other thread has already taken the GIL, but wait until the GIL is released. The

[issue38696] HTTP modules documentation error

2019-11-05 Thread Stojan Jovic
New submission from Stojan Jovic : I have found error in "Usage" section of HTTP modules documentation page, specifically line: http.HTTPStatus.OK.value should be fixed to: HTTPStatus.OK.value according to the import and other usage examples. -- assignee: docs@python components: Docume

[issue38696] HTTP modules documentation error

2019-11-05 Thread Stojan Jovic
Stojan Jovic added the comment: Page link: https://docs.python.org/3/library/http.html -- ___ Python tracker ___ ___ Python-bugs-li

[issue38694] docs.python.org does not switch version properly

2019-11-05 Thread Ned Deily
Ned Deily added the comment: That is working as designed because a particular release version of the Python docset contains the What's New documents of previous versions. So when you use the version switcher to move from 3.8 to 3.9, you are now looking at the 3.8 What's New in the 3.9 docse

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Awesome! I think the patch can be splitted in os.pidfd_open() and asyncio part itself. os modification is clear. asyncio part looks correct after the brief view. My the main question is: how to detect if the new watcher can be used or asyncio should fallba

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Nathaniel, you may be interested in the pidfd_open(), at least in adding the function to os module. -- nosy: +njs ___ Python tracker ___ ___

[issue38680] PyGILState_Release does not release gil correctly, resulting in deadlock

2019-11-05 Thread Damien LEFEVRE
Damien LEFEVRE added the comment: @ronaldoussoren The issue here is that the behavior between Python 3.6 and 3.7 has changed. Our code runs perfectly fine with 3.6. We release the lock each time our functions get out of scope and so we know for sure there is no lock left behind. Starting wi

[issue38690] Command line option with &/or without a space results in the same outcome

2019-11-05 Thread Ned Deily
Ned Deily added the comment: That's an interesting question. There is much prior art here dating back to the earliest days of Unix. The Open Group Base Specification has a section dealing with the syntax of utility arguments with suggestions of when or when not a space between the option a

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

2019-11-05 Thread Wei-Cheng Pan
Wei-Cheng Pan added the comment: Executing () created at /.../lib/python3.8/asyncio/queues.py:70> took 0.104 seconds Executing () created at /.../lib/python3.8/asyncio/queues.py:70> took 0.121 seconds I was expecting it can display the stack of the awaitable. -- ___

[issue38662] Decouple ensurepip from pip's internals using runpy

2019-11-05 Thread Ned Deily
Ned Deily added the comment: Can you explain how this would be rolled out? Does this mean as of a planned release of pip the current ensurepip would break? If so, when? Is 2.7 still supported with that version of pip and, if so, have you tested the PR with it? -- nosy: +ned.deily

[issue38697] test.support.find_unused_port() race condition: test_socket fails with OSError: [Errno 98] Address already in use

2019-11-05 Thread STINNER Victor
New submission from STINNER Victor : When two tests using support.find_unused_port() run in parallel, it's possible to get the same port number and so the first process using it wins, and the other one fails. Example with test_socket running in parallel of multiple many other tests. Example

[issue38683] Installation failed - no privileges to access directory

2019-11-05 Thread Ned Deily
Change by Ned Deily : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: crash -> ___ Python tracker ___ _

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: My point is: without a deep understanding we cannot "just enable" a new protocol. The evidence that it works in some limited scenarios is not enough for opening the can of worms. It is true for seqpacket, and especially true for other even not discussed prot

[issue38692] add a pidfd child process watcher

2019-11-05 Thread STINNER Victor
STINNER Victor added the comment: I like the idea of exposing pidfd_open() syscall as os.pidfd_open(). Benjamin: Would you mind to create a PR based on your patch, but without your asyncio change? > +#ifndef __NR_pidfd_open I would prefer to avoid this part of the patch. You should accept

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

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the clarification. I forgot about this thing; the output can be improved sure. As a workaround you can use the following hack:: import asyncio.task asyncio.task.Task = asyncio.task._PyTask IIRC the pure python version prints a coroutine name at lea

[issue38692] add a pidfd child process watcher

2019-11-05 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue38692] add a pidfd child process watcher

2019-11-05 Thread STINNER Victor
STINNER Victor added the comment: +self._loop._remove_reader(pidfd) +os.close(pidfd) Note: Maybe do these operations in the reverse order. I expect a higher risk of exception when calling Python self._loop._remove_reader(), than on closing a FD that we opened. -- __

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-11-05 Thread STINNER Victor
STINNER Victor added the comment: > closes bpo-37633: Reëxport some function compatibility wrappers for macros in > ``pythonrun.h``. (GH-17056) Aha, finally more diversity of languages in commit messages! :-D -- ___ Python tracker

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

2019-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: I've assigned myself to never forget about the issue; if somebody wants to fix _CTask and TaskWakeupMethWrapper representation -- you are welcome -- assignee: -> asvetlov ___ Python tracker

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

2019-11-05 Thread Wei-Cheng Pan
Wei-Cheng Pan added the comment: I cannot import asyncio.task, so I did this instead: import asyncio.tasks asyncio.tasks.Task = asyncio.tasks._PyTask Then it changed to this: Executing wait_for= created at /.../lib/python3.8/unittest/async_case.py:118> took 0.187 seconds I suppose this me

[issue38698] While parsing email message id: UnboundLocalError

2019-11-05 Thread Nikita Hoffmann
New submission from Nikita Hoffmann : Parsing an invalid email message id can throw a header parser error. A bug in parse_message_ still tries to append the unset token to a variable. File "/opt/python-3.8.0/lib/python3.8/email/_header_value_parser.py", line 2116, in parse_message_ id mes

[issue38662] Decouple ensurepip from pip's internals using runpy

2019-11-05 Thread Pradyun Gedam
Pradyun Gedam added the comment: On Tue, 5 Nov 2019 at 4:30 PM, Ned Deily wrote: > > Ned Deily added the comment: > > Can you explain how this would be rolled out? This, as in? If you're referring to this specific change, I don't think there's anything special needed for this change (it's ba

[issue38698] While parsing email message id: UnboundLocalError

2019-11-05 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. Can you please attach a sample script to reproduce this error? -- nosy: +maxking, xtreak ___ Python tracker ___

[issue38693] Use f-strings instead of str.format within importlib

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

[issue38159] PyState_AddModule docs should say that it's not necessary to call it.

2019-11-05 Thread miss-islington
miss-islington added the comment: New changeset 4342af00d87de0a0d0ef3bfda4d6edb08ac2427a by Miss Islington (bot) in branch '3.7': [3.7] bpo-38159: Clarify documentation of PyState_AddModule (GH-16101) (GH-17027) https://github.com/python/cpython/commit/4342af00d87de0a0d0ef3bfda4d6edb08ac2427

[issue38159] PyState_AddModule docs should say that it's not necessary to call it.

2019-11-05 Thread miss-islington
miss-islington added the comment: New changeset 1270d2cf1d17bfa581bf2a19f82c8cb43bf793d9 by Miss Islington (bot) in branch '3.8': [3.8] bpo-38159: Clarify documentation of PyState_AddModule (GH-16101) (GH-17026) https://github.com/python/cpython/commit/1270d2cf1d17bfa581bf2a19f82c8cb43bf793d

[issue38495] print built-in function docs bug

2019-11-05 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +16570 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17062 ___ Python tracker ___ __

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-05 Thread Malversán
Malversán added the comment: I agree. Your question about potential message size overflow should be tested (either for recv() and recvmsg()). Could you please link the resource where you found the recommendation of using recvmsg() over recv() for SOCK_SEQ_PACKET? --

[issue38698] While parsing email message id: UnboundLocalError

2019-11-05 Thread Nikita Hoffmann
Change by Nikita Hoffmann : Added file: https://bugs.python.org/file48696/samplescript.py ___ Python tracker ___ ___ Python-bugs-list mailin

[issue38699] socket: change listen() default backlog from 128 to 4096?

2019-11-05 Thread STINNER Victor
New submission from STINNER Victor : Currently, socket.socket.listen() called with no argument limits the default backlog to 128: /* We try to choose a default backlog high enough to avoid connection drops * for common workloads, yet not too high to limit resource usage. */ int bac

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-11-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Tue, Nov 5, 2019, at 03:12, STINNER Victor wrote: > > STINNER Victor added the comment: > > > closes bpo-37633: Reëxport some function compatibility wrappers for macros > > in ``pythonrun.h``. (GH-17056) > > Aha, finally more diversity of languages in

[issue38699] socket: change listen() default backlog from 128 to 4096?

2019-11-05 Thread STINNER Victor
STINNER Victor added the comment: > I just saw an article suggesting to use 4096 instead: In fact, it's a change in the Linux kernel directly proposed by Eric Dumazet (Google) for Linux kernel 5.5: https://lore.kernel.org/netdev/20191030163620.140387-1-eduma...@google.com/ The change has alr

[issue38700] typo in unittest mock docs

2019-11-05 Thread Arunkumar Mani
New submission from Arunkumar Mani : at various places in the docs for unittest mock[https://docs.python.org/3.7/library/unittest.mock.html#magic-mock], assert is wriiten as assret -- assignee: docs@python components: Documentation messages: 356039 nosy: Arunkumar Mani, docs@python pr

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +16571 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17063 ___ Python tracker ___ ___

[issue38700] typo in unittest mock docs

2019-11-05 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Can you please add the specific piece of text? There is an illustration to say that it's common mistake to type assret instead of assert with which mock gives a new child mock. This can be made stricter with unsafe mode to detect this typo. --

[issue38701] datetime.timedelta string representation is ambiguous

2019-11-05 Thread Serge Matveenko
New submission from Serge Matveenko : Negative `timedelta` string representation is ambiguous. ``` >>> from datetime import datetime, timedelta >>> d2 = datetime.now() >>> d1 = d2 - timedelta(days=42, seconds=5) >>> str(d2 - d1) '42 days, 0:00:05' >>> str(d1 - d2) '-43 days, 23:59:55' ``` I wo

[issue38700] typo in unittest mock docs

2019-11-05 Thread Arunkumar Mani
Arunkumar Mani added the comment: my bad. i misread the docs. you are right -- stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue35381] posixmodule: convert statically allocated types (DirEntryType & ScandirIteratorType) to heap-allocated types

2019-11-05 Thread miss-islington
miss-islington added the comment: New changeset b3966639d28313809774ca3859a347b9007be8d2 by Miss Islington (bot) (Eddie Elizondo) in branch 'master': bpo-35381 Remove all static state from posixmodule (GH-15892) https://github.com/python/cpython/commit/b3966639d28313809774ca3859a347b9007be8d2

[issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True

2019-11-05 Thread Pete Wicken
Pete Wicken added the comment: Looks like this happens because the is_private method that gets called is from _BaseNetwork, which checks if the network address '0.0.0.0' and the broadcast address '255.255.255.255' are both private, which they are as 0.0.0.0 falls into 0.0.0.0/8. I think for

[issue38360] single-argument form of -isysroot should be supported

2019-11-05 Thread Joshua Root
Joshua Root added the comment: Ping? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc

2019-11-05 Thread miss-islington
miss-islington added the comment: New changeset bf17d41826a8bb4bc1e34ba6345da98aac779e41 by Miss Islington (bot) (Jeroen Demeyer) in branch 'master': bpo-37645: add new function _PyObject_FunctionStr() (GH-14890) https://github.com/python/cpython/commit/bf17d41826a8bb4bc1e34ba6345da98aac779e4

[issue38701] datetime.timedelta string representation is ambiguous

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

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: Thanks for the CC. It would be nice to get `pidfd_send_signal` as well, while we're at it. But that could be a separate PR. AFAICT the other bits of the pidfd API right now are some extra flags to clone, and an extra flag to waitid. The waitid flag is nice

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes, I will be submitting followup changes for pidfd_send_signal and the other goodies. I would like to use pidfds in subprocess, but as you as you say, that's another kettle of fish. -- ___ Python tracker

[issue38699] socket: change listen() default backlog from 128 to 4096?

2019-11-05 Thread Ammar Askar
Ammar Askar added the comment: Just for some more reference points from "production" python web servers: * gunicorn - 2048 (https://github.com/benoitc/gunicorn/blob/678b326dc030b450717ec505df69863dcd6fb716/docs/source/settings.rst#backlog) * tornado - 128 (https://github.com/tornadoweb/torn

[issue38702] Adding new types to parser/unparse.py

2019-11-05 Thread Julin
New submission from Julin : The parser/unparse.py file lacks functions to handle the `Str`, `Num`, `Bytes` and `NameConstant` types. Can we add them since it seems to be simple enough? -- components: Demos and Tools messages: 356050 nosy: ju-sh priority: normal severity: normal status

[issue38702] Adding new types to parser/unparse.py

2019-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: These types are obsolete. The compiler never generates an AST tree containing them. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue38702] Adding new types to parser/unparse.py

2019-11-05 Thread Julin
Julin added the comment: Okay. But can lines like if first:first = False else: self.write(", ") be changed to span across more number of lines? Because things like first:first looks like a type hint. -- ___ Python tracker

[issue16575] ctypes: unions as arguments

2019-11-05 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +16572 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/17064 ___ Python tracker ___ _

[issue38691] importlib: PYTHONCASEOK should be ignored when using python3 -E

2019-11-05 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue16575] ctypes: unions as arguments

2019-11-05 Thread Ammar Askar
Ammar Askar added the comment: Opened https://github.com/python/cpython/pull/17064 to fix this. Essentially it's a tiny little oversight in the back-porting. In the 3.7 branch, we perform an attribute lookup for `from_param` before the union checking code, so we must remember to DECREF it. Th

[issue38703] should we expect round(0.95, 1) to be 1.0, instead of 0.9?

2019-11-05 Thread Yudong Liu
New submission from Yudong Liu : Python 3.7.0 (default, Aug 22 2018, 20:50:05) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> round(0.95,1) 0.9 >>> round(0.95) 1 >>> round(0.96,1) 1.0 -- components: Library (Lib) messages: 35605

[issue38704] No `GetActiveProcessorCount` on Windows Vista

2019-11-05 Thread Arseniy
New submission from Arseniy : This[https://www.python.org/downloads/windows/] page says "Note that Python 3.8.0 cannot be used on Windows XP or earlier.". I tried to install it on Windows Vista and got a message that `GetActiveProcessorCount` is missing from `KERNEL32.DLL`. This message appea

[issue38693] Use f-strings instead of str.format within importlib

2019-11-05 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue38704] No `GetActiveProcessorCount` on Windows Vista

2019-11-05 Thread Arseniy
Arseniy added the comment: just tested, CPython 3.7.5 Successfully runs on Windows Vista. -- ___ Python tracker ___ ___ Python-bugs

[issue38703] should we expect round(0.95, 1) to be 1.0, instead of 0.9?

2019-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 0.95 is actually 278419646001971/4503599627370496 which is smaller than 95/100. >>> from fractions import Fraction >>> Fraction(0.95) Fraction(4278419646001971, 4503599627370496) >>> Fraction(0.95) - Fraction(95, 100) Fraction(-1, 22517998136852480) It is c

[issue38704] No `GetActiveProcessorCount` on Windows Vista

2019-11-05 Thread Zachary Ware
Zachary Ware added the comment: Added our 3.8 RM to adjust the download page. Steve, can or should we adjust the installer to refuse to install on Vista? Is there other documentation we need to adjust? -- components: +Installation, Windows nosy: +lukasz.langa, paul.moore, steve.dowe

[issue38680] PyGILState_Release does not release gil correctly, resulting in deadlock

2019-11-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm afraid it will be close to impossible to determine what's going on without a reproducer. There's not enough context in the issue to understand the report, in particular what the main thread is doing and how that's releasing the GIL. BTW. The code in

[issue22253] ConfigParser does not handle files without sections

2019-11-05 Thread Pedro Lacerda
Pedro Lacerda added the comment: Hi, there is a working PR at https://github.com/python/cpython/pull/2735. I was in doubt about get the default section with `__init__(..., allow_unnamed_section=True)` and `config.get('', 'option')` or with `config.get(DEFAULT_SECTION, 'option')`. I'd prefer

[issue38705] venv creation on macOS Catalina is failing

2019-11-05 Thread Den Delimarsky
New submission from Den Delimarsky : I have a project, where I am working inside a virtual environment (on macOS Catalina). Inside said project, I am attempting to create a new virtual environment with: venv.create(virtual_environment_directory, with_pip=True) This, however, errors out: F

[issue38609] Trashcan mechanism segfault during interpreter finalization in Python 3.7.5

2019-11-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: The attached code creates a static (global) C++ object that owns a reference to a Python object, and releases that reference in its destructor. That destructor runs at program termination, which is after interpreter shutdown (that is after Py_FinalizeEx is

[issue38703] should we expect round(0.95, 1) to be 1.0, instead of 0.9?

2019-11-05 Thread Mark Dickinson
Mark Dickinson added the comment: What Serhiy said. round is behaving as intended and as designed here. Note: you can also see the actual value of a float object easily by using Decimal: >>> from decimal import Decimal >>> Decimal(0.95) Decimal('0.94995559107901499373

[issue38705] venv creation on macOS Catalina is failing

2019-11-05 Thread Den Delimarsky
Den Delimarsky added the comment: Should also mention that this is working as expected in Python 3.8.0 -- ___ Python tracker ___ __

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

2019-11-05 Thread Mikeli Karotsieri
New submission from Mikeli Karotsieri : The error messages included in the exceptions raised when assertTrue and assertFalse fail are respectively: 'False is not true' 'True is not false ' This issue's goal is to find out if it would be more correct or/and beneficial for those messages to

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

2019-11-05 Thread Mikeli Karotsieri
Change by Mikeli Karotsieri : -- pull_requests: -16573 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

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

2019-11-05 Thread Mikeli Karotsieri
Change by Mikeli Karotsieri : -- keywords: +patch pull_requests: +16574 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17049 ___ Python tracker __

[issue38705] venv creation on macOS Catalina is failing

2019-11-05 Thread Ned Deily
Ned Deily added the comment: Thanks for the report but without a supplying a reproducible test case it's really difficult to say what issue you might be seeing. FWIW, I was not able to reproduce a failure but I was just guessing what your project code really does. Also be aware that you app

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

2019-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: assertTrue() does not assert that the value is True. It asserts that it is true. For example, non-zero number or non-empty collections will pass the check. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: patch review -> resolved status:

[issue38692] add a pidfd child process watcher

2019-11-05 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-38630 "subprocess.Popen.send_signal() should poll the process". -- ___ Python tracker ___ __

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Kyle Stanley
Kyle Stanley added the comment: > My the main question is: how to detect if the new watcher can be used or > asyncio should fallback to threaded based solution? Perhaps in the __init__ we could do something like this: class PidfdChildWatcher(AbstractChildWatcher): def __init__(self):

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

2019-11-05 Thread Jake Tesler
Change by Jake Tesler : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: hasattr is useful for supporting old versions of the os module, but asyncio doesn't have to care about that. You should probably try calling pidfd_open and see whether you get -ESYSCALL, and also maybe try passing it to poll(), since I think there might hav

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

2019-11-05 Thread Jake Tesler
New submission from Jake Tesler : I have encountered a minor bug with the new `threading.get_native_id()` featureset in Python 3.8. The bug occurs when creating a new multiprocessing.Process object on Unix (or on any platform where the multiprocessing start_method is 'fork' or 'forkserver').

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

2019-11-05 Thread Jake Tesler
Change by Jake Tesler : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue38708] parse_message_id in email module is very buggy / crashy

2019-11-05 Thread Dimitri John Ledkov
New submission from Dimitri John Ledkov : email module has recently got parse_message_id which is more strict now, then before. However, it's not programmed as defensively as expected. Given bogus message-id, it crashes with unbound local variable, or like accessing a non-existing index. So

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: It sounds like there's actually nothing to do here? (Except maybe eventually switch to pidfd or similar, but Victor says he wants to use a different issue for that.) Can this be closed? -- nosy: +njs ___ Python t

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-05 Thread STINNER Victor
STINNER Victor added the comment: > It sounds like there's actually nothing to do here? (Except maybe eventually > switch to pidfd or similar, but Victor says he wants to use a different issue > for that.) Can this be closed? I opened this issue to propose PR 16984. Did you notice the PR? I

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: But then deeper in the thread it sounded like you concluded that this didn't actually help anything, which is what I would expect :-). -- ___ Python tracker __

[issue38696] HTTP modules documentation error

2019-11-05 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +16575 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17066 ___ Python tracker ___

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-05 Thread STINNER Victor
STINNER Victor added the comment: > But then deeper in the thread it sounded like you concluded that this didn't > actually help anything, which is what I would expect :-). The PR contains a test which demonstrate one race condition. It fails without the fix. -- __

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-05 Thread STINNER Victor
STINNER Victor added the comment: > (Except maybe eventually switch to pidfd or similar, but Victor says he wants > to use a different issue for that.) pidfd is not available on all platforms (ex: Windows). -- ___ Python tracker

[issue38696] HTTP modules documentation error

2019-11-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +16576 pull_request: https://github.com/python/cpython/pull/17067 ___ Python tracker ___ __

[issue38696] HTTP modules documentation error

2019-11-05 Thread Zachary Ware
Zachary Ware added the comment: New changeset 56698d57691af2272f695f8c17c835ed99545cde by Zachary Ware (Ammar Askar) in branch 'master': bpo-38696: Fix usage example of HTTPStatus (GH-17066) https://github.com/python/cpython/commit/56698d57691af2272f695f8c17c835ed99545cde -- nosy: +

[issue38696] HTTP modules documentation error

2019-11-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +16577 pull_request: https://github.com/python/cpython/pull/17068 ___ Python tracker ___ __

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: pidfd_open was added after pidfd pollling, so it should suffice to make sure pidfd_open doesn't ENOSYS. -- ___ Python tracker ___ ___

[issue38703] should we expect round(0.95, 1) to be 1.0, instead of 0.9?

2019-11-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Possibly even easier than using Decimal: py> '%.17f' % 0.95 '0.94996' BTW, this is a FAQ: https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate -- nosy: +steven.daprano

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

2019-11-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm reopening this as an enhancement, because I think Mikeli is onto something here. I'd like to propose making the messages: "False is not a truthy value." "True is not a falsey value." to make it explicit that we are testing not for the singletons

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

2019-11-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Since error messages aren't part of the API and backwards-compatibility doesn't apply to them, this could still go into 3.8. -- stage: resolved -> versions: +Python 3.8 -Python 3.9 ___ Python tracker

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

2019-11-05 Thread Ammar Askar
Ammar Askar added the comment: I like Steven's "truthy value" or "true value" proposal. Another alternative: "x does not evaluate to true" "x does not evaluate to false" -- nosy: +ammar2 ___ Python tracker

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: You can't solve a time-of-check-to-time-of-use race by adding another check. I guess your patch might narrow the race window slightly, but it was a tiny window before and it's a tiny window after, so I don't really get it. The test doesn't demonstrate a rac

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: Hmm, you know, on further thought, it is actually possible to close this race for real, without pidfd. What you do is split 'wait' into two parts: first it waits for me process to become reapable without actually reaping it. On Linux you can do this with w

[issue38705] venv creation on macOS Catalina is failing

2019-11-05 Thread Den Delimarsky
Den Delimarsky added the comment: @ned.deily actually you bring up a very good point, I did not notice that it was using the default Catalina Python 3 install. I've chatted with @brett.cannon about this earlier and it seemed like the issue was in that the Python version I was using is no lon

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 6c4c45efaeb40f4f837570f57d90a0b3429c6ae9 by Benjamin Peterson in branch 'master': bpo-38692: Add os.pidfd_open. (GH-17063) https://github.com/python/cpython/commit/6c4c45efaeb40f4f837570f57d90a0b3429c6ae9 -- ___

[issue38692] add a pidfd child process watcher

2019-11-05 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +16578 pull_request: https://github.com/python/cpython/pull/17069 ___ Python tracker ___ ___

[issue38709] distutils - setuptools - alias command removes comments from setup.cfg

2019-11-05 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez : The command 'alias' rewrites the configuration file completely when a new alias is added. The default file is 'setup.cfg'. All comments of the original file are stripped off before, though the new 'setup.cfg' does not contain any comments. The comme

[issue38710] unsynchronized write pointer in io.TextIOWrapper in 'r+' mode

2019-11-05 Thread Manuel Ignacio Pérez Alcolea
New submission from Manuel Ignacio Pérez Alcolea : There seems to be a bug in the `io.TextIOWrapper` class while working in 'r+' mode, although I can't say the source of the problem is right there. The write pointer doesn't match `file.tell()` after performing a read operation. For example, th

[issue38711] setup parameter 'distclass' ignored for configuration files

2019-11-05 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez : Even though this involves 'setuptools', I write this issue here because of the tight coupling of 'distutils' and 'setuptools' e.g. by the passed 'self' parameter. The central API 'setup()' - 'setuptools.init.setup()' - provides the parameter 'distcl

[issue38712] add signal.pidfd_send_signal

2019-11-05 Thread Benjamin Peterson
New submission from Benjamin Peterson : Add signal.pidfd_send_signal, which will wrap the Linux 5.1 syscall of the same name. -- components: Library (Lib) messages: 356091 nosy: benjamin.peterson priority: normal severity: normal status: open title: add signal.pidfd_send_signal version

[issue38712] add signal.pidfd_send_signal

2019-11-05 Thread Benjamin Peterson
Change by Benjamin Peterson : -- nosy: +njs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

  1   2   >