[issue38705] venv creation on macOS Catalina is failing

2019-11-05 Thread Ned Deily
Change by Ned Deily : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38715] Regression in compileall ddir parameter when recursing

2019-11-05 Thread hetman
New submission from hetman : There appears to have been a regression introduced in the compileall library back with Python 3.5 as a result of commit f1a8df0ac98 . The issues appears when compiling a hierarchy of directories with the 'ddir' parameter specified (either in the compile_dir()

[issue38712] add signal.pidfd_send_signal

2019-11-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes, I thought about that a bit. I choose signal because: 1. signal already has some specialized functions that send signals pthread_kill and raise_signal. 2. If we every do want to implement the third parameter of pidfd_send_signal, the signal module

[issue38684] hashlib: build fails when blake2 is disabled in OpenSSL

2019-11-05 Thread Christian Heimes
Christian Heimes added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> compile error ___ Python tracker ___

[issue38684] hashlib: build fails when blake2 is disabled in OpenSSL

2019-11-05 Thread miss-islington
miss-islington added the comment: New changeset 7c20888e71304ecbf4bd3d595f364b7c691d30a0 by Miss Islington (bot) in branch '3.8': bpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL (GH-17043) https://github.com/python/cpython/commit/7c20888e71304ecbf4bd3d595f364b7c691d30a0

[issue38713] expose P_PIDFD

2019-11-05 Thread miss-islington
miss-islington added the comment: New changeset 5c0c325453a175350e3c18ebb10cc10c37f9595c by Miss Islington (bot) (Benjamin Peterson) in branch 'master': closes bpo-38713: Expose P_PIDFD in os if it's defined. (GH-17071)

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

2019-11-05 Thread Arno-Can Uestuensoez
Arno-Can Uestuensoez added the comment: Current related issues are: issue 38714 issue 38711 issue 38709 -- ___ Python tracker ___

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

2019-11-05 Thread Arno-Can Uestuensoez
Arno-Can Uestuensoez added the comment: Current related issues are: issue 38714 issue 38711 issue 38709 -- ___ Python tracker ___

[issue38714] setup command alias erroneous for names with hyphens

2019-11-05 Thread Arno-Can Uestuensoez
Arno-Can Uestuensoez added the comment: Current related issues are: issue 38714 issue 38711 issue 38709 -- ___ Python tracker ___

[issue38714] setup command alias erroneous for names with hyphens

2019-11-05 Thread Arno-Can Uestuensoez
Change by Arno-Can Uestuensoez : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38714] setup command alias erroneous for names with hyphens

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 aliases as represented by the command 'setup.py alias' are internally treated by

[issue38712] add signal.pidfd_send_signal

2019-11-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: I guess a bikeshed question is whether it should be `os.pidfd_send_signal` (like `os.kill`) or `signal.pidfd_send_signal` (like `signal.pthread_kill`). I don't actually care either way myself :-) -- ___ Python

[issue38713] expose P_PIDFD

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

[issue38713] expose P_PIDFD

2019-11-05 Thread Benjamin Peterson
New submission from Benjamin Peterson : On Linux 5.4, P_PIDFD allows using waitid with a pidfd. -- components: Library (Lib) messages: 356092 nosy: benjamin.peterson, njs priority: normal severity: normal status: open title: expose P_PIDFD versions: Python 3.9

[issue38712] add signal.pidfd_send_signal

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

[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:

[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

[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

[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,

[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

[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 ___

[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 --

[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

[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

[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

[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

[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 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

[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

[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 ___

[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 ___

[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: +16576 pull_request: https://github.com/python/cpython/pull/17067 ___ 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 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 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

[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?

[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

[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.

[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:

[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').

[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

[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:

[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):

[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 ___

[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:

[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

[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

[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:

[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

[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 ___

[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)

[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

[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:

[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

[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

[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,

[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

[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 ___ ___

[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:

[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

[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:

[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.

[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

[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 ___

[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

[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
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

[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

[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

[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

[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

[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:

[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)

[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

[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)

[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 ___

[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

[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.

[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 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

[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

[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

[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

[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

[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? --

[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 ___

[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)

[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)

[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:

[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

[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

[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

[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

[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

[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

[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. --

[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:

[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

  1   2   >