[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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() function or via the '-d' 
command line parameter).

Examining the code before the f1a8df0ac98 commit suggests the original intent 
for the 'ddir' parameter, when recursing into subdirectories, was to alter the 
root of the path displayed in exception traces. That means that the 
hierarchical directory structure of the reported source path in each compiled 
file was maintained, and only the root directory being compiled was replaced 
with ddir.

More recently two new parameters, 'stripdir' and 'prependdir', have been added 
with commit 8e7bb991de7 which seem to largely reimplement the missing behaviour 
in a different way.

The current behaviour does not seem very useful or expected. I think it would 
be helpful to restore the original behaviour and would be happy to contribute a 
PR to do so. Additionally it may be worth consulting the submitter of bpo-38112 
whether the alternative arguments are still necessary once the regression is 
fixed, though this is optional and not needed to fix the core issue.



Here's a simple script to demonstrate the above:

mkdir -p library/a/a

cat <<'EOF' > library/__init__.py
def go():
  raise AssertionError('dummy')
EOF
cp library/__init__.py library/a/__init__.py
cp library/__init__.py library/a/a/__init__.py

python3 -m compileall -b -d /usr/lib library
rm library/**/*.py

python3 -c 'from library import go; go()'
python3 -c 'from library.a import go; go()'
python3 -c 'from library.a.a import go; go()'



And the resulting output which shows that each module is claiming to be raised 
from the same location:

Listing 'library'...
Compiling 'library/__init__.py'...
Listing 'library/a'...
Compiling 'library/a/__init__.py'...
Listing 'library/a/a'...
Compiling 'library/a/a/__init__.py'...

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/__init__.py", line 2, in go
AssertionError: dummy

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/__init__.py", line 2, in go
AssertionError: dummy

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/__init__.py", line 2, in go
AssertionError: dummy

--
components: Library (Lib)
messages: 356102
nosy: hetman
priority: normal
severity: normal
status: open
title: Regression in compileall ddir parameter when recursing
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 already defines a siginfo structseq.
3. (least convincing) os/posix has way too much stuff. I generally think that 
we should strive to find a good home for new OS-level functionality that isn't 
the os module.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/5c0c325453a175350e3c18ebb10cc10c37f9595c


--
nosy: +miss-islington
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 'setuptools' as options.

See code:

   setuptools.dist._parse_config_files()
   in Python-3.8.0:  line 604 - line 608

The consequence is the processing of the standard replacement of hyphens by 
underscores for alias names.

The resulting behaviour is here three folded.


1. The technical behaviour of the alias replacement for valid
   aliases id flawless.

2. The technical behaviour of the display representation for alias
   names containing a hyphen is erroneous.

   For example:

  python setup.py alias my-alias alias

   Results flawless in:

  [aliases]
  my-alias = alias

   The display:

  python setup.py alias

   is erroneous:

  (3.8.0)$ python setup.py alias
  running alias
  Command Aliases
  ---
  setup.py alias my_alias alias

   because the modified internal values are displayed - with replaced
   hyphens in alias names.


3. The call of the alias as command replacement is erroneous in general:

  3.0. the original call is flawless:

 (3.8.0)$ python setup.py alias

running alias
Command Aliases
---
setup.py alias my_alias alias


  3.1. the call by defined literal alias is erroneous:

(3.8.0)$ python setup.py my-alias

invalid command name 'my-alias'

  3.2. the call by modified alias is also erroneous,
 as though the alias is not detected, resulting here in the
 display of an empty list:

(3.8.0)$ python setup.py my_alias

running alias
Command Aliases
---


Another example to mention here is the acceptance of alias names including 
spaces, which prbably should be suppressed, because as far as I can see command 
name could not contain spaces at all.

E.g. the alias 'ls -l' is handeled erroneous in accordance to the previous 
remarks, but is basically not valid at all.

   (3.8.0)$ python setup.py 'ls -l' alias

Results in the flawless configuration entry:

   [aliases]
   ls -l = alias

The erroneous display:

(3.8.0)$ python setup.py alias

running alias
Command Aliases
---
setup.py alias ls _l alias

The behaviour should be fixed to be consistent to allow valid names and reject 
others. The accepted names should be fully functional, and displayed and made 
available for custom representation literally as provided by the user. A simple 
reverse-replacement is here not reliable.

The alternative of the caching of the original input is currently not possible 
for a simple public command API due to the lack of fully customization of the 
'distclass' see issue Issue38711. Thus this seems currently to require a 
complete second scan including eventually selected user files as eventually 
selected by the provided call parameters.

--
components: Distutils
messages: 356094
nosy: acue, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: setup command alias erroneous for names with hyphens
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
'distclass='. This allows to define a custom 'Distribution' 
class to be used as a replacement of the 'Distribution' class.

First of all for an ordinary user it is not clear whether 
'distutils.dist.Distribution', and/or 'setuptools.dist.Distribution' is 
replaced. Even more confusing, the 'self' parameter is cross-passed between the 
classes by using a derived instance provided by:

   _Distribution = get_unpatched(distutils.core.Distribution)

The second is the integration of the initialization bootstrap, which completely 
ignores the user defined custom class. The main API 'setup()' defined in 
'setuptools.init.setup()' calls first the local private function 
'_install_setup_requires' - 'setuptools.init._install_setup_requires()', which 
calls the instanciates the hardcoded 'distutils.core.Distribution()', and 
therein calls the methods 'dist.parse_config_files()', and 
'dist.fetch_build_eggs()', which - as far as I can see - finally prohibits the 
use of a custom version of these, or easily add another one.

The consequence is that the configuration file parameters could basically not 
be fully customized by the custom class.

The association with the parameter 'distclass' for me - and I guess for others 
too - is that the 'complete' 'Distribution' class could be customized by this 
API. But this is currently not possible. So, even though I see the problems 
that can arise from the use of the modified 'self' parameter - I would propose 
the application of the 'distclass' for the initial bootstrap by the read of the 
configuration file too. In case this prooves too risky - due to 'distutils' 
coupling with 'setuptools', at least a parameter for the initial read of the 
configuration files should be offered.


The best of course would be the fusion of both parts, probably in a future 
release.

I have tested 3.8.0, but as far as I can see this is the case for all releases.

PS: I am writing now another issue for the 'alias' command and going add the 
number as an possible example for the required custom class.

--
components: Distutils
messages: 356090
nosy: acue, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: setup parameter 'distclass' ignored for configuration files
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, this file, consisting of 3 lines:

  line one
  line two
  line three

Doesn't result in the expected modification running the following program:

with open('file', 'r+', buffering=1) as f:
print(f.tell())  # => 0
print(f.readline().strip())  # we read 1 line
print(f.tell())  # => 9  
print('Hello', file=f)   # we write "Hello\n"
print(f.tell())  # => 34

Instad of

  line one
  Hello
  wo
  line three

It results in

  line one
  line two
  line threeHello

But it works just fine if `f.seek(f.tell())` is added the program, right before 
the write operation.

There are several possible explanations on StackOverflow, involving the 
buffering for IO in text files:

https://stackoverflow.com/a/58722058/11601118

--
components: IO
messages: 356089
nosy: Manuel Ignacio Pérez Alcolea
priority: normal
severity: normal
status: open
title: unsynchronized write pointer in io.TextIOWrapper in 'r+' mode
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 comments should be kept literally, just the section '[aliases]' should be 
modified.

The comments in the section '[aliases]' should be basically kept, even though a 
manual modification by the user could cause problems e.g. in case of deleting 
an alias by the 'setup.py alias' command.

Anyhow, at least the only section modified should - must - be the '[aliases]' 
section.

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.

I have tested 3.8.0, but as far as I can see this is the case for all releases.

--
components: Distutils
messages: 356088
nosy: acue, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: distutils - setuptools - alias command removes comments from setup.cfg
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 longer supported, with the fix likely being in 
one of the later branches. I've updated my installation from python.org and 
everything works as expected now. Let me know if you want me to close this 
issue, and thank you for your insights!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
waitid+WNOWAIT. On kqueue platforms you can do it with kqueue.

Then, you take a lock, and use it to atomically call waitpid/waitid to reap the 
process + update self.returncode to record that you've done so.

In send_signal, we use the same lock to atomically check whether the process 
has been reaped, and then send the signal if it hasn't.

That doesn't fix your test, but it does fix the race condition: as long as 
users only interact with the process through the Popen API, it guarantees that 
send_signal will never rather the wrong process.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 race condition. What it demonstrates is 
increased robustness against user code that corrupts Popen's internal state by 
reaping one of its processes behind its back.

That kind of robustness might be a good motivation on its own! (I actually just 
did a bunch of work to make trio more robust against user code closing fds 
behind its back, which is a similar kind of thing.) But it's a very different 
motivation than what you say in this bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 True and False 
by identity, but for any truthy or falsey value.

If you don't like the terms "truthy" and "falsey", lower-case true and false 
would also be acceptable.

--
nosy: +steven.daprano
resolution: not a bug -> 
status: closed -> open
type:  -> enhancement
versions:  -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: +zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

In short, I propose to call poll() before calling os.kill() in send_signal().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 hyperkitty had a Message-ID "X"*260 in the testsuite that used to pass with 
3.7, but fails with 3.8.

==
ERROR: test_long_message_id (hyperkitty.tests.lib.test_incoming.TestAddToList)
--
Traceback (most recent call last):
  File "./hyperkitty/tests/lib/test_incoming.py", line 295, in 
test_long_message_id
msg["Message-ID"] = "X" * 260
  File "/usr/lib/python3.8/email/message.py", line 409, in __setitem__
self._headers.append(self.policy.header_store_parse(name, val))
  File "/usr/lib/python3.8/email/policy.py", line 148, in header_store_parse
return (name, self.header_factory(name, value))
  File "/usr/lib/python3.8/email/headerregistry.py", line 602, in __call__
return self[name](name, value)
  File "/usr/lib/python3.8/email/headerregistry.py", line 197, in __new__
cls.parse(value, kwds)
  File "/usr/lib/python3.8/email/headerregistry.py", line 530, in parse
kwds['parse_tree'] = parse_tree = cls.value_parser(value)
  File "/usr/lib/python3.8/email/_header_value_parser.py", line 2116, in 
parse_message_id
message_id.append(token)
UnboundLocalError: local variable 'token' referenced before assignment

Similarly another user, surkova reports that value[0] in get_msg_id function is 
buggy too (doesn't check that value has a member)

First reported 
https://github.com/python/cpython/pull/13397#discussion_r341968031

Ideally, I'd like the function to raise a documented Exception for invalid 
Message-id, but not fail with what look like regular programming bugs in the 
email module. Expectation is that email module is either more permissive or is 
coded more defence-in-depth with more checking in place.

--
messages: 356072
nosy: xnox
priority: normal
severity: normal
status: open
title: parse_message_id in email module is very buggy / crashy
versions: Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

When creating a new process via fork, the Native ID in the new MainThread is 
incorrect. The new forked process' threading.MainThread object inherits the 
Native ID from the parent process' MainThread instead of capturing/updating its 
own (new) Native ID.

See the following snippet:

>>> import threading, multiprocessing
>>> multiprocessing.set_start_method('fork') # or 'forkserver'
>>> def proc(): print(threading.get_native_id(), 
>>> threading.main_thread().native_id) # get_native_id(), mainthread.native_id
>>> proc()
22605 22605 # get_native_id(), mainthread.native_id
>>> p = multiprocessing.Process(target=proc)
>>> p.start()
22648 22605 # get_native_id(), mainthread.native_id
>>>
>>> def update(): threading.main_thread()._set_native_id()
>>> def print_and_update(): proc(); update(); proc()
>>> print_and_update()
22605 22605 # get_native_id(), mainthread.native_id
22605 22605 
>>> p2=multiprocessing.Process(target=print_and_update); p2.start()
22724 22605 # get_native_id(), mainthread.native_id
22724 22724
>>> print_and_update()
22605 22605 # get_native_id(), mainthread.native_id
22605 22605

As you can see, the new Process object's MainThread.native_id attribute matches 
that of the MainThread of its parent process. 

Unfortunately, I'm not too familiar with the underlying mechanisms that 
Multiprocessing uses to create forked processes. 
I believe this behavior occurs because (AFAIK) a forked multiprocessing.Process 
copies the MainThread object from its parent process, rather than 
reinitializing a new one. Looking further into the multiprocessing code, it 
appears the right spot to fix this would be in the 
multiprocessing.Process.bootstrap() function. 

I've created a branch containing a working fix - I'm also open to suggestions 
of how a fix might otherwise be implemented. 
If it looks correct I'll create a PR against the CPython 3.8 branch. 

See the branch here: https://github.com/jaketesler/cpython/tree/fix-mp-native-id

Thanks all!
-Jake

--
components: Library (Lib)
messages: 356070
nosy: jaketesler, vstinner
priority: normal
severity: normal
status: open
title: Multiprocessing: bug with Native ID for threading.mainthread()
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 have been a release where the syscall existed but it wasn't 
pollable. Not sure what the error for that looks like.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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):
if not hasattr(os, "pidfd_open"):
 raise RuntimeError("os.pidfd_open() is unavailable.")
...

Thoughts?

> My WIP progress patch is attached. It passes all asyncio tests.

I think we could also specifically look for race conditions with `./python -m 
test test_asyncio.test_subprocess -F -j4`, rather than relying on the tests 
passing with a single job. The other child watchers have been particularly 
infamous when it comes race conditions and resource leaks. 

I'd be glad to work on testing and opening a PR to asyncio if needed (while 
giving Benjamin credit for the patch of course).

--
nosy: +aeros

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 appear to be using the Apple-supple Python 3.7.3 that 
is included with Apple's Xcode 11 Command Line Tools for 10.15 Catalina and is 
not part of a standard macOS installation.  I believe that Python3 is there 
only to support other parts of the Command Line Tools and it is not recommended 
that you use it for your own projects.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

'False is not True' 
'True is not False'

As a side note, the suggested error message is syntactically correct Python. 

The assosciated file is Lib/unittest/case.py .

--
components: Library (Lib)
messages: 356065
nosy: brandtbucher, mkarotsieris
priority: normal
pull_requests: 16573
severity: normal
status: open
title: What should the error message in the exception raised by assertTrue and 
assertFalse be?
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

... which demonstrates clearly that the value being rounded is closer to 0.9 
than to 1.0.

--
nosy: +mark.dickinson
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

After the call to Py_FinalizeEx() the interpreter no longer exists, and it is 
unsafe to call Python API functions (other than the ones listed as safe to call 
before a call to Py_Initialize).  Py_DECREF is not on that safe list.

--
nosy: +ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

  File 
"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/runpy.py",
 line 193, in _run_module_as_main
"__main__", mod_spec)
  File 
"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/runpy.py",
 line 85, in _run_code
exec(code, run_globals)
  File "/Users/user1/Documents/repos/adg/src/adg/__main__.py", line 35, in 

CommandProcessor.validate(args, current_os)
  File "/Users/user1/Documents/repos/adg/src/adg/helpers/commandprocessor.py", 
line 21, in validate
LibraryProcessor.process_libraries(command.library, command.platform, 
command.out)
  File "/Users/user1/Documents/repos/adg/src/adg/helpers/coreutil.py", line 79, 
in process_libraries
LibraryInstaller.create_environment()
  File "/Users/user1/Documents/repos/adg/src/adg/helpers/coreutil.py", line 40, 
in create_environment
venv.create(virtual_environment_directory, with_pip=True)
  File 
"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/venv/__init__.py",
 line 363, in create
builder.create(env_dir)
  File 
"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/venv/__init__.py",
 line 68, in create
self._setup_pip(context)
  File 
"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/venv/__init__.py",
 line 261, in _setup_pip
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
  File 
"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/subprocess.py",
 line 395, in check_output
**kwargs).stdout
  File 
"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/subprocess.py",
 line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 
'['/Users/user1/Documents//repos/adg/src/dtemp/bin/python3', '-Im', 
'ensurepip', '--upgrade', '--default-pip']' died with .

Seems like attempting to run this both from inside and outside the virtual 
environment results in the error.

--
components: macOS
messages: 356061
nosy: dend, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: venv creation on macOS Catalina is failing
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 msg356011 is too complex, it can be simplified to:

// START

class GIL_lock
{
public:
GIL_lock()
{
m_state = PyGILState_Ensure();
}

~GIL_lock()
{
   PyGILState_Release(m_state);
}

private:
PyGILState_STATE m_state;
};

// END

This is always safe, even if the thread currently owns the GIL. This will block 
when another thread owns the GIL, and will block forever when that other thread 
is not running Python code (and will therefore not release the GIL)

Is the problem also present with Python 3.8, or only 3.7? 

And for what it is worth, I don't have problems in my own code that uses these 
APIs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.dower, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 closer to 0.9 than to 1.0.

>>> Fraction(0.95) - Fraction(0.9)
Fraction(450359962737049, 9007199254740992)
>>> Fraction(1) - Fraction(0.95)
Fraction(225179981368525, 4503599627370496)
>>> (Fraction(1) - Fraction(0.95)) - (Fraction(0.95) - Fraction(0.9))
Fraction(1, 9007199254740992)

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 appears when running python.exe.
I don't think anyone besides me cares about Vista, so I'd change the text to: 
"Note that Python 3.8.0 requires Windows 7 or later". It's more positive this 
way ;)

--
messages: 356055
nosy: senyai
priority: normal
severity: normal
status: open
title: No `GetActiveProcessorCount` on Windows Vista
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 356054
nosy: yudongliu
priority: normal
severity: normal
status: open
title: should we expect round(0.95,1) to be 1.0, instead of 0.9?
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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. This is unlike master where the attribute lookup happens 
after the union checking code.



λ win32\python_d.exe -m test -R 3:3 test_ctypes
0:00:00 Run tests sequentially
0:00:00 [1/1] test_ctypes
beginning 6 repetitions
123456
..

== Tests result: SUCCESS ==

1 test OK.

Total duration: 14.8 sec
Tests result: SUCCESS

--
nosy: +ammar2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: open
title: Adding new types to parser/unparse.py
type: enhancement
versions: Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/tornado/blob/c50aed0f96d92f9b0ef4cd0837c0104f140ca77e/tornado/tcpserver.py#L178)

* uwsgi - 100 
(https://github.com/unbit/uwsgi/blob/3149df02ed443131c54ea6afb29fcbb0ed4d1139/core/init.c#L115)

--
nosy: +ammar2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-to-have but not really 
urgent, since it's easy enough to use a flag even if the stdlib doesn't 
explicitly expose it. The clone flags are super interesting, but before we can 
use them, we need to have some way to access clone itself, and that's a big 
complicated project, so we definitely shouldn't worry about it here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 this to get it right, you would have to change the is_private check 
for networks to iterate over each possible subnet and check if that is in the 
private networks list. This takes an unfeasibly long time.

So, we would probably have to add special cases for these networks, unless 
people have better ideas.

--
nosy: +Wicken

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 would expect `str(d1 - d2)` to be one of the following:
* '-42 days, 0:00:05'
* '-(42 days, 0:00:05)'
* '- 42 days, 0:00:05'

--
components: Library (Lib)
messages: 356041
nosy: lig
priority: normal
severity: normal
status: open
title: datetime.timedelta string representation is ambiguous
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
priority: normal
severity: normal
status: open
title: typo in unittest mock docs
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 already been merged upstream:

/* Maximum queue length specifiable by listen.  */
#define SOMAXCONN   4096

https://github.com/torvalds/linux/blob/a99d8080aaf358d5d23581244e5da23b35e340b9/include/linux/socket.h#L265

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 commit messages! :-D

This kind of orthography is allowable if obscure in English. 
https://en.wikipedia.org/wiki/Diaeresis_(diacritic)#English

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 backlog = Py_MIN(SOMAXCONN, 128);

I just saw an article suggesting to use 4096 instead:
https://blog.cloudflare.com/syn-packet-handling-in-the-wild/

On my Fedora 30, listen() manual page says:

   The  behavior of the backlog argument on TCP sockets changed with Linux
   2.2.  Now it specifies the  queue  length  for  completely  established
   sockets  waiting  to  be  accepted, instead of the number of incomplete
   connection requests.  The maximum length of the  queue  for  incomplete
   sockets  can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog.  When
   syncookies are enabled there is no logical maximum length and this set‐
   ting is ignored.  See tcp(7) for more information.

   Ifthe   backlog   argument   is   greater   than   the   value   in
   /proc/sys/net/core/somaxconn, then it is  silently  truncated  to  that
   value;  the  default  value  in  this  file  is 128.  In kernels before
   2.4.25, this limit was a hard coded value, SOMAXCONN,  with  the  value
   128.

Python 3.8 new socket.create_server() calls sock.listen() by default: so use 
Py_MIN(SOMAXCONN, 128) by default.

--
components: Library (Lib)
messages: 356037
nosy: giampaolo.rodola, vstinner
priority: normal
severity: normal
status: open
title: socket: change listen() default backlog from 128 to 4096?
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/1270d2cf1d17bfa581bf2a19f82c8cb43bf793d9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/4342af00d87de0a0d0ef3bfda4d6edb08ac2427a


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 backwards compatible
with past pip releases, but that doesn't matter).

ensurepip only installs the bundled wheel it already has, into the
environment. Thus, existing ensurepip releases won't be broken.

However, when we bump up to pip 19.3 [1], we'd need to be updating the
invocation since it's using a pip internal and pip's internals can change
without notice even in a patch version.

This change ensures that ensurepip is robust to changes in the location of
pip's main function, thus making those updates as simple as a bundled wheel
change.

[1]: IIUC we try to keep CPython's bundled wheel in sync with latest)

Does this mean as of a planned release of pip the current ensurepip would
> break?

Yes. pip 19.3 made a change and as can be seen in the PR for that (sorry,
it's a GitHub PR and my internet is ridiculously slow right now).

  If so, when?

That's already been released. 🙃

Is 2.7 still supported with that version of pip and, if so, have you tested
> the PR with it?

Yes, pip will support 2.7 at least until CPython does (and likely longer).

>
> --
> nosy: +ned.deily
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
message_id.append(token)
UnboundLocalError: local variable 'token' referenced before assignment

Version 3.7 is not affected.

--
components: email
messages: 356030
nosy: Nikita Hoffmann, barry, r.david.murray
priority: normal
severity: normal
status: open
title: While parsing email message id: UnboundLocalError
type: crash
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 means the entire test case is slow?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >