[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

@cjw296 since the unit tests were added and the original report is fixed with 
3.7 and above can this be closed?

--

___
Python tracker 

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



[issue35468] [3.6/3.7] idlelib/help.html mentions 3.8alpha0 docs

2018-12-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IDLE pays no attention to that part of the html file.

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



[issue8765] Tests unwillingly writing unicocde to raw streams

2018-12-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10357

___
Python tracker 

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



[issue20800] Cannot run gui tests twice.

2018-12-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Either test repeated works now.

--
resolution:  -> out of date
stage: needs patch -> 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



[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-12 Thread Chris Withers


Chris Withers  added the comment:

Yep! Good catch :-)

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



[issue8765] Tests unwillingly writing unicocde to raw streams

2018-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I agree, that it would be right to accept only binary strings when write to 
binary stream. But I afraid that it is too late to change this in the 16th 
bugfix of 2.7. This can break existing code or tests.

I suggest to change the behavior only in the Py3k compatibility mode. PR 11127 
is based on issue_8765.diff, but emits a warning when run Python with the -3 
option.

$ ./python -3 -c "import io; io.FileIO('/dev/null', 'w').write(u'')"
-c:1: DeprecationWarning: write() argument must be string or buffer, not 
'unicode'
$ ./python -3 -We -c "import io; io.FileIO('/dev/null', 'w').write(u'')"
Traceback (most recent call last):
  File "", line 1, in 
DeprecationWarning: write() argument must be string or buffer, not 'unicode'

This will help to migrate to Python 3, but keeps the behavior unchanged in 
normal run.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue20623] Run test_htmlparser with unbuffered source

2018-12-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
type: behavior -> enhancement
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue20127] Race condition in test_threaded_import.task()?

2018-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Buildbots logs no longer available. Looking at the code, I see nothing 
suspicious in the finally clause. The size of the done_tasks is increased by 1 
in every thread, and at least one thread will call done.set() when 
len(done_tasks) == N. Could you please provide more information Eric?

--
nosy: +serhiy.storchaka
status: open -> pending

___
Python tracker 

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



[issue31823] Opaque default value for close_fds argument in Popen.__init__

2018-12-12 Thread Tal Einat


Tal Einat  added the comment:

Gregory, this issue was about the docs, not the doc-string (help()). Are you 
sure it should be closed?

--

___
Python tracker 

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



[issue15192] test_bufio failures on Win64 buildbot

2018-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The implementation of test.support.unlink() was changed since. It tries to 
change permissions of read-only files, and repeat attempts several times. It 
looks more reliable now. Is this issue still reproducible?

--
nosy: +serhiy.storchaka
status: open -> pending

___
Python tracker 

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



[issue13369] timeout with exit code 0 while re-running failed tests

2018-12-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-12 Thread Chris Withers


Chris Withers  added the comment:


New changeset 6a12931c9cb5d472fe6370dbcd2bde72f34dddb4 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-17185: Add __signature__ to mock that can be used by inspect for signature 
(GH11125)
https://github.com/python/cpython/commit/6a12931c9cb5d472fe6370dbcd2bde72f34dddb4


--

___
Python tracker 

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



[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10358

___
Python tracker 

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



[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-12 Thread Chris Withers


Change by Chris Withers :


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



[issue8314] test_ctypes fails in test_ulonglong on sparc buildbots

2018-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Starting from 3.7 Python always uses system libffi. 3.4 and 3.5 are in security 
bugfix only mode. So this issue is only for 2.7 and 3.6.

--
nosy: +serhiy.storchaka
versions: +Python 3.6 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue9999] test_shutil cross-file-system tests are fragile (may not test what they purport to test)

2018-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Starting from issue11560 test_shutil patches os.rename to imitate a failure in 
cross-file-system move.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
stage: needs patch -> 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



[issue9960] test_structmembers fails on s390x (bigendian 64-bit): int/Py_ssize_t issue

2018-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This was fixed in issue17928.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
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



[issue2661] Mapping tests cannot be passed by user implementations

2018-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Walter, do you mind to create a PR?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue14143] test_ntpath failure on Windows

2018-12-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue35469] [2.7] time.asctime() regression

2018-12-12 Thread STINNER Victor


New submission from STINNER Victor :

It seems like bpo-31339 introduced a regression with commit 
eeadf5fc231163ec97a8010754d9c995c7c14876 to fix a security issue.

Copy of of bencordova's comment from GitHub:
https://github.com/python/cpython/pull/3293#issuecomment-446378058

I'm new at commenting on this project so apologies if this is not the 
appropriate place to do so.

>From what I can see (upgrading from python 2.7.13->2.7.15), the string format 
>on line 648 of Modules/timemodule.c causes a different output from 
>time.ctime() and time.asctime(t) for "days of the month < 10"

"%s %s%3d %.2d:%.2d:%.2d %d"

The "%3d" in this change removes the leading zero on the tm_mday but maintains 
a leading space.

Just looking for feedback on what the intention was and if this is a bug.

python 2.7.13:

>>> import time
>>> t = time.strptime("6 Dec 18", "%d %b %y")
>>> time.asctime(t)
'Thu Dec 06 00:00:00 2018'

python 2.7.15:

>>> import time
>>> t = time.strptime("6 Dec 18", "%d %b %y")
>>> time.asctime(t)
'Thu Dec  6 00:00:00 2018'

Note, the string with this change includes two spaces between "Dec" and "6" 
which also looks awkward.

Original Post:
https://github.com/python/cpython/commit/eeadf5fc231163ec97a8010754d9c995c7c14876#r31642310

--
components: Library (Lib)
messages: 331687
nosy: vstinner
priority: normal
severity: normal
status: open
title: [2.7] time.asctime() regression
versions: Python 2.7

___
Python tracker 

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



[issue15626] unittest.main negates -bb option and programmatic warning configuration

2018-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Something was changed in 3.7, but I do not see differences in unittest that can 
cause this.

$ python3.6 -bb testbb.py 
testbb.py:7: BytesWarning: str() on a bytes instance
  str(b"")
.
--
Ran 1 test in 0.000s

OK

$ python3.7 -bb testbb.py 
E
==
ERROR: test_foo (__main__.Test)
--
Traceback (most recent call last):
  File "testbb.py", line 7, in test_foo
str(b"")
BytesWarning: str() on a bytes instance

--
Ran 1 test in 0.001s

FAILED (errors=1)


Perhaps it is related to issue20361.

--
components: +Library (Lib) -Tests
nosy: +ncoghlan, rbcollins, serhiy.storchaka, vstinner
versions: +Python 3.6 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue11955] 3.3 : test_argparse.py fails 'make test'

2018-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I can not reproduce failures. Are they still reproducible?

--
nosy: +serhiy.storchaka
status: open -> pending

___
Python tracker 

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



[issue35469] [2.7] time.asctime() regression

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

Even if behavior changes in minor Python release are not welcome, IMHO this one 
was justified and worth it. asctime() has a crappy API: it returns a pointer to 
a static buffer somewhere in the libc. asctime_r() is better, but it has an 
undefined behavior for year after . The change has been made to fix a 
security issue when Python runs on musl (C library).

I suggest to close the issue as "not a bug". Use time.strftime() if you want a 
specific format.

On Python 2.7.13, the format depended on the C library. Now Python 2.7 and 3 
always have the same output on all platforms (on any C library).


> It seems like bpo-31339 introduced a regression with commit 
> eeadf5fc231163ec97a8010754d9c995c7c14876 to fix a security issue.

commit eeadf5fc231163ec97a8010754d9c995c7c14876
Author: Victor Stinner 
Date:   Wed Sep 6 01:35:39 2017 +0200

...
Backport and adapt the _asctime() function from the master branch to
not depend on the implementation of asctime() and ctime() from the
external C library. This change fixes a bug when Python is run using
the musl C library.
...


python 2.7.13: 'Thu Dec 06 00:00:00 2018'
python 2.7.15: 'Thu Dec  6 00:00:00 2018'
Python 3.7.1:  'Thu Dec  6 00:00:00 2018'

Python 2.7 and 3.7 now have exactly the same output.

This format seems to be consistent with asctime() format of glibc 2.28 on my 
Fedora 29:
---
#include 
#include 

int main()
{
char *str;
struct tm *tm;
time_t t = 0;
tm = gmtime(&t);
str = asctime(tm);
printf("%s", str);
return 0;
}
---

Output:
---
Thu Jan  1 00:00:00 1970
---



The Python format comes from bpo-8013:

commit b9588b528a48302a4884d0500caec71f1c59280c
Author: Alexander Belopolsky 
Date:   Tue Jan 4 16:34:30 2011 +

Issue #8013: time.asctime and time.ctime no longer call system asctime
and ctime functions.  The year range for time.asctime is now 1900
through maxint.  The range for time.ctime is the same as for
time.localtime.  The string produced by these functions is longer than
24 characters when year is greater than .
...
+char buf[20]; /* 'Sun Sep 16 01:03:52\0' */
...
+n = snprintf(buf, sizeof(buf), "%.3s %.3s%3d %.2d:%.2d:%.2d",
+ wday_name[timeptr->tm_wday],
+ mon_name[timeptr->tm_mon],
+ timeptr->tm_mday, timeptr->tm_hour,
+ timeptr->tm_min, timeptr->tm_sec);
...


Discussions:

* https://mail.python.org/pipermail/python-dev/2011-January/107187.html
* https://bugs.python.org/issue8013#msg125281



> Note, the string with this change includes two spaces between "Dec" and "6" 
> which also looks awkward.

If you want a specific format, I suggest you to use time.strftime(). You may 
have a look at the datetime module.


> Original Post:

Sorry, the correct URL is:
https://github.com/python/cpython/commit/eeadf5fc231163ec97a8010754d9c995c7c14876#r31642310

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



[issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 16d63202af35dadd652a5e3eae687ea709e95b11 by Victor Stinner in 
branch '2.7':
bpo-16039: CVE-2013-1752: Limit imaplib.IMAP4_SSL.readline() (GH-11120)
https://github.com/python/cpython/commit/16d63202af35dadd652a5e3eae687ea709e95b11


--

___
Python tracker 

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



[issue16039] imaplib: unlimited readline() from connection

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 16d63202af35dadd652a5e3eae687ea709e95b11 by Victor Stinner in 
branch '2.7':
bpo-16039: CVE-2013-1752: Limit imaplib.IMAP4_SSL.readline() (GH-11120)
https://github.com/python/cpython/commit/16d63202af35dadd652a5e3eae687ea709e95b11


--

___
Python tracker 

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



[issue35470] A deadly decref in _PyImport_FindExtensionObjectEx()

2018-12-12 Thread Zackery Spytz


New submission from Zackery Spytz :

In _PyImport_FindExtensionObjectEx(), "mod" shouldn't be decrefed if 
_PyState_AddModule() fails.

--
components: Interpreter Core
messages: 331693
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: A deadly decref in _PyImport_FindExtensionObjectEx()
versions: 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



[issue35470] A deadly decref in _PyImport_FindExtensionObjectEx()

2018-12-12 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +10359
stage:  -> patch review

___
Python tracker 

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



[issue33106] Deleting a key in a read-only gdbm results in KeyError, not gdbm.error

2018-12-12 Thread Xiang Zhang


Xiang Zhang  added the comment:


New changeset 4fb0b8bc25c52aae8dcb4353e69c1c88999a9a53 by Xiang Zhang in branch 
'master':
bpo-33106: change dbm key deletion error for readonly file from KeyError to 
dbm.error (#6295)
https://github.com/python/cpython/commit/4fb0b8bc25c52aae8dcb4353e69c1c88999a9a53


--

___
Python tracker 

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



[issue33106] Deleting a key in a read-only gdbm results in KeyError, not gdbm.error

2018-12-12 Thread Xiang Zhang


Change by Xiang Zhang :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: behavior -> enhancement

___
Python tracker 

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



[issue35470] A deadly decref in _PyImport_FindExtensionObjectEx()

2018-12-12 Thread Xiang Zhang


Xiang Zhang  added the comment:

What about version 3.6?

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue15626] unittest.main negates -bb option and programmatic warning configuration

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

> Something was changed in 3.7

Yeah, Python 3.7 handles warning options differently: there is the PEP 565 and 
this commit:

commit 747f48e2e92390c44c72f52a1239959601cde157
Author: Victor Stinner 
Date:   Tue Dec 12 22:59:48 2017 +0100

bpo-32230: Set sys.warnoptions with -X dev (#4820)

Rather than supporting dev mode directly in the warnings module, this
instead adjusts the initialisation code to add an extra 'default'
entry to sys.warnoptions when dev mode is enabled.

This ensures that dev mode behaves *exactly* as if `-Wdefault` had
been passed on the command line, including in the way it interacts
with `sys.warnoptions`, and with other command line flags like `-bb`.

Fix also bpo-20361: have -b & -bb options take precedence over any
other warnings options.

Patch written by Nick Coghlan, with minor modifications of Victor Stinner.

--

___
Python tracker 

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



[issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

The issue should now be fixed. I will reopen it if the test starts failing on a 
CI.

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



[issue16039] imaplib: unlimited readline() from connection

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

I added imaplib.IMAP4_SSL.readline() to my python-security website:

https://python-security.readthedocs.io/vuln/cve-2013-1752_cve-2013-1752_limit_imaplib.imap4_ssl.readline.html

I'm now waiting for a Python 2.7.16 release.

--
priority: release blocker -> 

___
Python tracker 

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



[issue35471] Remove macpath module

2018-12-12 Thread STINNER Victor


New submission from STINNER Victor :

The module 'macpath' has been deprecated in Python 3.7 by bpo-9850 and 
scheduled for removal in Python 3.8. Attached PR removes the module.

--
components: Library (Lib)
messages: 331699
nosy: vstinner
priority: normal
severity: normal
status: open
title: Remove macpath module
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



[issue35471] Remove macpath module

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +10360
stage:  -> patch review

___
Python tracker 

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



[issue35471] Remove macpath module

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

According to the PEP 11, MacOS 9 support has been dropped in Python 2.4 
(released in 2004: 14 years ago!). So I think that it's now ok to remove the 
macpath module, especially because it's deprecated since Python 3.7.

--

___
Python tracker 

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



[issue9850] obsolete macpath module dangerously broken and should be removed

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-35471: "Remove macpath module".

--

___
Python tracker 

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



[issue35471] Remove macpath module

2018-12-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue35471] Remove macpath module

2018-12-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm in favour of removing macpath.

I was against removing the module in the past because parts of the macOS API 
still used (on probably still use) classic MacOS style paths.  Most if not all 
APIs are by this time deprecated, which makes it less and less like that anyone 
will use macpath going forward.

--

___
Python tracker 

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



[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

The new test_del_pool() test of the fix failed on a buildbot: bpo-35413 
"test_multiprocessing_fork: test_del_pool() leaks dangling threads and 
processes on AMD64 FreeBSD CURRENT Shared 3.x".

--

___
Python tracker 

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



[issue35413] test_multiprocessing_fork: test_del_pool() leaks dangling threads and processes on AMD64 FreeBSD CURRENT Shared 3.x

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

I reverted the change which addd test_del_pool():
https://bugs.python.org/issue34172#msg331198

So this issue can be fixed.

--
resolution:  -> fixed
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



[issue13369] timeout with exit code 0 while re-running failed tests

2018-12-12 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy
status: pending -> open

___
Python tracker 

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



[issue8314] test_ctypes fails in test_ulonglong on sparc buildbots

2018-12-12 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue2661] Mapping tests cannot be passed by user implementations

2018-12-12 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue14143] test_ntpath failure on Windows

2018-12-12 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy
status: pending -> open

___
Python tracker 

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



[issue11955] 3.3 : test_argparse.py fails 'make test'

2018-12-12 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy
status: pending -> open

___
Python tracker 

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



[issue15626] unittest.main negates -bb option and programmatic warning configuration

2018-12-12 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue11955] 3.3 : test_argparse.py fails 'make test'

2018-12-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue14143] test_ntpath failure on Windows

2018-12-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue13369] timeout with exit code 0 while re-running failed tests

2018-12-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue35267] reproducible deadlock with multiprocessing.Pool

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +pablogsal

___
Python tracker 

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



[issue35472] python 3.7.2 rc1 bumped the build requirements for no reason

2018-12-12 Thread Matthias Klose


New submission from Matthias Klose :

python 3.7.2 rc1 bumped the build requirements apparently for no reason, now 
requiring sphinx 1.7 instead of 1.6.x before.  This is a major pain, if you 
want to provide the build including the documentation on a stable release.  
Pretty please can we avoid such version bumps on the branches?

Plus the documentation seems to build fine with 1.6.7.

--
assignee: docs@python
components: Documentation
keywords: 3.7regression
messages: 331705
nosy: docs@python, doko, ned.deily
priority: release blocker
severity: normal
status: open
title: python 3.7.2 rc1 bumped the build requirements for no reason
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



[issue35471] Remove macpath module

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

> I was against removing the module in the past because parts of the macOS API 
> still used (on probably still use) classic MacOS style paths.  Most if not 
> all APIs are by this time deprecated, which makes it less and less like that 
> anyone will use macpath going forward.

bpo-9850 has a scary title: "obsolete macpath module dangerously broken and 
should be removed". Extract:

   "Even if one did have a need to use the obsolete old-style paths, the 
macpath module is currently practically unusable for anything other than simple 
character manipulations of the path.  Nearly all of the functions that actually 
call OS routines are broken in one or more ways."

--

___
Python tracker 

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



[issue35472] python 3.7.2 rc1 bumped the build requirements for no reason

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +mdk

___
Python tracker 

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



[issue35472] python 3.7.2 rc1 bumped the build requirements for no reason

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

"for no reason"

I guess that it's related to this change:

commit c03bf0ae794c3bec9b56f38164535fd1f5bfc04a
Author: Adrian Liaw 
Date:   Mon Nov 5 05:04:51 2018 +0800

Doc: Disable smartquotes for zh-tw, zh-cn, fr and ja translations (GH-9423)

Extract:

diff --git a/Doc/conf.py b/Doc/conf.py
index 6060ac176c..eb57ee0c93 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -41,13 +41,18 @@ today_fmt = '%B %d, %Y'
 # By default, highlight as Python 3.
 highlight_language = 'python3'
 
-# Require Sphinx 1.2 for build.
-needs_sphinx = '1.2'
+# Require Sphinx 1.7 for build.
+needs_sphinx = '1.7'
 
 # Ignore any .rst files in the venv/ directory.
 venvdir = os.getenv('VENVDIR', 'venv')
 exclude_patterns = [venvdir+'/*', 'README.rst']
 
+# Disable Docutils smartquotes for several translations
+smartquotes_excludes = {
+'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],
+}
+


According to Sphinx changelog, smartquotes_excludes is a new feature of Sphinx 
1.6.6:

https://www.sphinx-doc.org/en/master/changes.html#release-1-6-6-released-jan-08-2018

--
nosy: +vstinner

___
Python tracker 

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



[issue35465] Document add_signal_handler

2018-12-12 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The proposal sounds great!
Would you prepare a pull request for docs update?

--
nosy: +asvetlov

___
Python tracker 

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



[issue35346] Modernize Lib/platform.py code

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b0e0877629e3df4bc3042fd424e96f197b2e9fa4 by Victor Stinner in 
branch 'master':
bpo-35346: Drop Mac OS 9 support from platform (GH-10959)
https://github.com/python/cpython/commit/b0e0877629e3df4bc3042fd424e96f197b2e9fa4


--

___
Python tracker 

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



[issue35346] Modernize Lib/platform.py code

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10361

___
Python tracker 

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



[issue35346] Modernize Lib/platform.py code

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

> Top-imported warnings is not used.

Fixed by commit b8e689a6e8134e88f857a55e50b6a4977967e385.

> struct.calcsize('P') is always success.

I wrote PR 11130 for that.

Note: struct.calcsize('P') always works on Python 2.7 as well.

> plistlib is always available.

I don't know this module. This module imports many other modules like 
xml.parsers.expat. I don't think that the try/except ImportError hurts. Feel 
free to propose a PR if you want.

--

___
Python tracker 

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



[issue35412] test_future4 ran no test

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10362

___
Python tracker 

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



[issue35472] python 3.7.2 rc1 bumped the build requirements for no reason

2018-12-12 Thread Ned Deily


Ned Deily  added the comment:

Julien can give the definite answer.  But, sorry, I don't see this as a release 
blocker.  We've had to bump Sphinx versions for a number of reasons as the 
documentation has become more sophisticated between cycles and over a release 
cycle.  In fact, we're now using 1.8.2 for release builds.  And it shouldn't be 
an issue at all if one uses the doc Makefile venv target:

make venv
make html

--
priority: release blocker -> normal

___
Python tracker 

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



[issue35412] test_future4 ran no test

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10364

___
Python tracker 

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



[issue34279] RFC: issue a warning in regrtest when no tests have been executed?

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10363

___
Python tracker 

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



[issue35412] test_future4 ran no test

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 502fe19b10f66235fcf8f13fc1c0308190845def by Victor Stinner in 
branch 'master':
bpo-35412: Add testcase to test_future4 (GH-11131)
https://github.com/python/cpython/commit/502fe19b10f66235fcf8f13fc1c0308190845def


--

___
Python tracker 

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



[issue35473] Intel compiler (icc) does not fully support C11 Features, including atomics

2018-12-12 Thread jamie schnaitter


New submission from jamie schnaitter :

I am currently trying to build 3.6.7 and 3.7.1 using Intel 2019 and it is 
failing because Intel's implementation of C11, in particular stdatomic, is 
incomplete.  I receive many errors similar to the following, when it cannot 
find 'atomic_uintptr_t', which is not including in Intel's implementation:

```
In file included from ./Include/Python.h(56),
 from ./Modules/_io/bufferedio.c(11):
./Include/pyatomic.h(33): error: identifier "atomic_uintptr_t" is undefined
  atomic_uintptr_t _value;
```

The current check in configure.ac is insufficient, as it only checks to see 
that the header and library exist and that it contains 'atomic_int'.  The 
configure.ac should be changed to either check for all the atomic types it uses 
(or at least atomic_uintprt_t) or, when `--with-icc` is enabled, it should set 
'HAVE_STD_ATOMIC' to 0/false.

--
components: Build, Installation, Library (Lib), ctypes
messages: 331713
nosy: jamie schnaitter
priority: normal
severity: normal
status: open
title: Intel compiler (icc) does not fully support C11 Features, including 
atomics
type: compile error
versions: 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



[issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys

2018-12-12 Thread Elliot Edmunds


Elliot Edmunds  added the comment:

I have personally come across situations where I am calling a Python script 
from a C program and would like to check the exit codes of the script, and have 
had to write sys.exit(1) and sys.exit(0) in Python, and compared them to 
EXIT_SUCCESS/EXIT_FAILURE in C. It would have been easy to introduce a bug 
where I returned the wrong exit code, so I was hoping they would have been 
implemented in sys.

It seems like a no-brainer to add these, they reduce magic number use and 
improve the accessibility of Python to people coming from C. I would love to 
add these if everyone is OK with it.

--
nosy: +Elliot Edmunds
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue35474] mimetypes.guess_all_extensions potentially mutates list

2018-12-12 Thread Ryan McCampbell


New submission from Ryan McCampbell :

The mimetypes.guess_all_extensions function is defined as:

def guess_all_extensions(self, type, strict=True):
type = type.lower()
extensions = self.types_map_inv[True].get(type, [])
if not strict:
for ext in self.types_map_inv[False].get(type, []):
if ext not in extensions:
extensions.append(ext)
return extensions

If any mime type exists in both the strict and non-strict types_map_inv and it 
is called with strict=False, then it will modify the strict list in-place which 
effects future calls even with strict=True. While this doesn't manifest as an 
error for me because the dictionaries are non-overlapping, it is a potential 
error; it is also vulnerable to people accidentally modifying the returned 
list. The list should be copied after the first lookup.

--
components: Library (Lib)
messages: 331715
nosy: rmccampbell7
priority: normal
severity: normal
status: open
title: mimetypes.guess_all_extensions potentially mutates list
type: behavior

___
Python tracker 

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



[issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference.

2018-12-12 Thread Eric Snow


New submission from Eric Snow :

In the C-API documentation the entry for PyImport_AddModuleObject[1] does not 
indicate that it returns a borrowed reference.

[1] https://docs.python.org/3/c-api/import.html#c.PyImport_AddModuleObject

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 331716
nosy: docs@python, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Docs do not show PyImport_AddModuleObject() returns a borrowed reference.
type: enhancement
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



[issue35476] _imp_create_dynamic_impl() does not clear error.

2018-12-12 Thread Eric Snow


New submission from Eric Snow :

In _imp_create_dynamic_impl() [1] the case where 
_PyImport_FindExtensionObject() returns NULL may leave an error set.  Either 
the error should be raised (like _imp_create_builtin() does) or it should be 
cleared (via PyErr_Clear()).

--
components: Interpreter Core
messages: 331717
nosy: eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: _imp_create_dynamic_impl() does not clear error.
type: behavior
versions: 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



[issue35470] A deadly decref in _PyImport_FindExtensionObjectEx()

2018-12-12 Thread Eric Snow


Change by Eric Snow :


--
nosy: +eric.snow
type:  -> behavior
versions: +Python 3.6

___
Python tracker 

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



[issue35306] OSError [WinError 123] when testing if pathlib.Path('*') (asterisks) exists

2018-12-12 Thread Vladimir Matveev


Change by Vladimir Matveev :


--
keywords: +patch
pull_requests: +10365
stage:  -> patch review

___
Python tracker 

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



[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-12 Thread Brett Cannon


Change by Brett Cannon :


--
title: Document add_signal_handler -> [asyncio] Document loop.add_signal_handler

___
Python tracker 

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



[issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys

2018-12-12 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy:  -terry.reedy

___
Python tracker 

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



[issue25430] speed up ipaddress __contain__ method

2018-12-12 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-12 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
components: +asyncio
nosy: +yselivanov

___
Python tracker 

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



[issue35472] python 3.7.2 rc1 bumped the build requirements for no reason

2018-12-12 Thread Julien Palard


Julien Palard  added the comment:

Hi Matthias,

Sorry to hear it's a pain for you. Can you explain in more details what hurt 
your workflow?

We bumped Sphinx, as Victor said, to fix rendering issues in those 
documentation translations: zh-tw, zh-cn, fr and ja, so it's not a feature or 
an ideology of "being up-to-date", we were fixing an issue in those 4 
translations.

Please also note that in the near future we'll probably stick to a fresh 
version of Sphinx as we're expecting other fixes or features to land, I don't 
have all of them in mind but at least:

- https://github.com/sphinx-doc/sphinx/issues/5561 (release in 1.8.2)
- https://github.com/sphinx-doc/sphinx/pull/5559 (to be released in 2.0.0)

The colspan/rowspan thing is needed for the documentation of Python 3.8, so 
we'll have to bump to sphinx 2.0 for Python 3.8.

--

___
Python tracker 

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



[issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice

2018-12-12 Thread STINNER Victor


New submission from STINNER Victor :

On a file, "with file:" fails if it's used a second time:
---
fp = open('/etc/issue')
with fp:
print("first")
with fp:
print("second")
---

fails with "ValueError: I/O operation on closed file", because file.__enter__() 
raises this exception if the file is closed.

I propose to have the same behavior on multiprocessing.Pool.__enter__() to 
detect when the multiprocessing API is misused.

Anyway, after the first "with pool:" block, the pool becomes unusable to 
schedule now tasks: apply() raise ValueError("Pool not running") in that case 
for example.

--
components: Library (Lib)
messages: 331719
nosy: vstinner
priority: normal
severity: normal
status: open
title: multiprocessing.Pool.__enter__() should raise an exception if called 
twice
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



[issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +10366
stage:  -> patch review

___
Python tracker 

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



[issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

Currently, the error only occurs when apply() is called:
---
import multiprocessing

def the_test():
pool = multiprocessing.Pool(1)
with pool:
print(pool.apply(int, (2,)))
with pool:
print(pool.apply(int, (3,))) # <-- raise here

the_test()
---

I would prefer to get an error on at the second "with pool:" line.

--

___
Python tracker 

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



[issue31823] Opaque default value for close_fds argument in Popen.__init__

2018-12-12 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Only if someone can point to a concrete problem to be fixed in the 3.7+ docs.  
Looking at all references to close_fds in 
https://docs.python.org/3/library/subprocess.html I don't see one.

(I'm not going to touch the 3.6 docs)

--

___
Python tracker 

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



[issue35208] IDLE: Squeezed lines count ignores window width

2018-12-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Changing the width of the window changes the number of visible lines because of 
line wrapping.  But it does not change the number of logical lines.  My 
understanding is that squeezer currently reports the latter, and that is not 
necessarily a bug.  Not that I am considering replacing line wrapping with a 
horizontal scrollbar.

--

___
Python tracker 

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



[issue34977] Release Windows Store app containing Python

2018-12-12 Thread Steve Dower


Change by Steve Dower :


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



[issue35467] IDLE: unrequested pasting into Shell after restart

2018-12-12 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I don't believe I've seen this happen, but I'll watch for it.  One thing that I 
noticed while trying to recreate it is that I can press F5 on the Shell window 
even though there isn't a Run menu.  Maybe the issue is somehow related using 
shortcuts that aren't defined for Shell.

--

___
Python tracker 

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



[issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated

2018-12-12 Thread STINNER Victor


New submission from STINNER Victor :

The following code hangs:
---
import multiprocessing, time
pool = multiprocessing.Pool(1)
result = pool.apply_async(time.sleep, (1.0,))
pool.terminate()
result.get()
---

pool.terminate() terminates workers before time.sleep(1.0) completes, but the 
pool doesn't mark result as completed with an error.

Would it be possible to mark all pending tasks as failed? For example, "raise" 
a RuntimeError("pool terminated before task completed").

--
components: Library (Lib)
messages: 331724
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: multiprocessing: ApplyResult.get() hangs if the pool is terminated
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



[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-35478: multiprocessing: ApplyResult.get() hangs if the pool is 
terminated.

--

___
Python tracker 

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



[issue23057] [Windows] asyncio: support signal handlers on Windows (feature request)

2018-12-12 Thread Vladimir Matveev


Change by Vladimir Matveev :


--
keywords: +patch
pull_requests: +10367
stage: needs patch -> patch review

___
Python tracker 

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



[issue35479] multiprocessing.Pool.join() always takes at least 100 ms

2018-12-12 Thread STINNER Victor


New submission from STINNER Victor :

The join() method of multiprocessing.Pool calls self._worker_handler.join(): 
it's a thread running _handle_workers(). The core of this thread function is:

while thread._state == RUN or (pool._cache and thread._state != 
TERMINATE):
pool._maintain_pool()
time.sleep(0.1)

I understand that the delay of 100 ms is used to check regularly the stop 
condition changed. This sleep causes a mandatory delay of 100 ms on Pool.join().

--
components: Library (Lib)
messages: 331726
nosy: vstinner
priority: normal
severity: normal
status: open
title: multiprocessing.Pool.join() always takes at least 100 ms
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



[issue35479] multiprocessing.Pool.join() always takes at least 100 ms

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +10368
stage:  -> patch review

___
Python tracker 

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



[issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +10369
stage:  -> patch review

___
Python tracker 

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



[issue35479] multiprocessing.Pool.join() always takes at least 100 ms

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:

Attached PR 11136 modify _worker_handler() loop to wait on threading.Event 
events, so Pool.join() completes as soon as possible.

Example:
---
import multiprocessing
import time

def the_test():
start_time = time.monotonic()
pool = multiprocessing.Pool(1)
res = pool.apply_async(int, ("1",))
pool.close()
#pool.terminate()
pool.join()
dt = time.monotonic() - start_time
print("%.3f sec" % dt)

the_test()
---

Minimum timing with _handle_results() using:

* current code (time.sleep(0.1)): min 0.132 sec
* time.sleep(1.0): min 1.033 sec
* my PR using events (wait(0.1)): min 0.033 sec

Currently, join() minimum timing depends on _handle_results() sleep() duration 
(100 ms).

With my PR, it completes as soon as possible: when state change and/or when a 
result is set.

My PR still requires an hardcoded delay of 100 ms to workaround bpo-35478 bug: 
results are never set if the pool is terminated.

--

___
Python tracker 

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



[issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice

2018-12-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 08c2ba0717089662132af69bf5948d82277a8a69 by Victor Stinner in 
branch 'master':
bpo-35477: multiprocessing.Pool.__enter__() fails if called twice (GH-11134)
https://github.com/python/cpython/commit/08c2ba0717089662132af69bf5948d82277a8a69


--

___
Python tracker 

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



[issue35477] multiprocessing.Pool.__enter__() should raise an exception if called twice

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


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



[issue9334] argparse: add a full fledged parser as a subparser

2018-12-12 Thread Victor Porton


Victor Porton  added the comment:

Subparsers are added like:

subparsers.add_parser('checkout', aliases=['co'])

But I want to use a parser BOTH as a subparser and as a full-fledged parser.

It is because my program should understand both of the following command line 
options:

boiler chain -t http://www.w3.org/1999/xhtml -W inverseofsum

and

boiler pipe 'chain -t http://www.w3.org/1999/xhtml -W inverseofsum + 
transformation http://example.com/ns1'.

I split it (at +) into several lists of arguments as explained in 
https://stackoverflow.com/a/53750697/856090

So I need `chain` both as a subparser and as a standalone parser of `-t 
http://www.w3.org/1999/xhtml -W inverseofsum`.

So, feature which I want:

subparsers.add_parser('checkout', aliases=['co'], parser=...)

where ... is a reference to a parser object.

--
nosy: +porton
title: argparse does not accept options taking arguments beginning with dash 
(regression from optparse) -> argparse: add a full fledged parser as a subparser
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue35480] argparse: add a full fledged parser as a subparser

2018-12-12 Thread Victor Porton


New submission from Victor Porton :

Subparsers are added like:

subparsers.add_parser('checkout', aliases=['co'])

But I want to use a parser BOTH as a subparser and as a full-fledged parser.

It is because my program should understand both of the following command line 
options:

boiler chain -t http://www.w3.org/1999/xhtml -W inverseofsum

and

boiler pipe 'chain -t http://www.w3.org/1999/xhtml -W inverseofsum + 
transformation http://example.com/ns1'.

I split it (at +) into several lists of arguments as explained in 
https://stackoverflow.com/a/53750697/856090

So I need `chain` both as a subparser and as a standalone parser of `-t 
http://www.w3.org/1999/xhtml -W inverseofsum`.

So, feature which I want:

subparsers.add_parser('checkout', aliases=['co'], parser=...)

where ... is a reference to a parser object.

--
components: Library (Lib)
messages: 331730
nosy: porton
priority: normal
severity: normal
status: open
title: argparse: add a full fledged parser as a subparser
type: enhancement
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



[issue35442] Chain of several subcommands in argparse

2018-12-12 Thread Victor Porton


Victor Porton  added the comment:

One of possible solutions:
https://bugs.python.org/issue35480

--

___
Python tracker 

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



[issue9334] argparse: add a full fledged parser as a subparser

2018-12-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

Why the title change? The original problem still exists, and I don't see how 
it's related to subparsers.

--

___
Python tracker 

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



[issue33725] Python crashes on macOS after fork with no exec

2018-12-12 Thread Ned Deily


Ned Deily  added the comment:

> Would it be safe to run the multiprocessing tests on recent macOS with the 
> OBJC_DISABLE_INITIALIZE_FORK_SAFETY environment variable set?

See Ronald's reply above in msg331101. I believe his point is that there is 
nothing you can do to make this safe. And it's not a new problem with 10.14 or 
10.13. What is new is that Apple is trying to more forcefully make you aware of 
the danger by causing the runtime to try to catch and crash these cases earlier 
rather than permit them to perhaps silently cause failures later.

--

___
Python tracker 

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



[issue35480] argparse: add a full fledged parser as a subparser

2018-12-12 Thread Victor Porton


Victor Porton  added the comment:

Oh, I noticed I can do

my_subparser = subparsers.add_parser('checkout', aliases=['co'])

So resolution invalid.

--
resolution:  -> not a bug

___
Python tracker 

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



[issue33725] Python crashes on macOS after fork with no exec

2018-12-12 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Dec 12, 2018, at 17:59, Ned Deily  wrote:
> 
> Ned Deily  added the comment:
> 
>> Would it be safe to run the multiprocessing tests on recent macOS with the 
>> OBJC_DISABLE_INITIALIZE_FORK_SAFETY environment variable set?
> 
> See Ronald's reply above in msg331101. I believe his point is that there is 
> nothing you can do to make this safe. And it's not a new problem with 10.14 
> or 10.13. What is new is that Apple is trying to more forcefully make you 
> aware of the danger by causing the runtime to try to catch and crash these 
> cases earlier rather than permit them to perhaps silently cause failures 
> later.

In my experiments at least, setting the env var *does* prevent the crash, but 
it doesn’t avoid the undefined semantics (i.e. what happens when the ObjC 
runtime is called at that point?) and I fully expect that Apple will remove 
that bandaid at some point.

The other key thing is that I don’t believe you can set the env var *in 
process* and have it take effect after the fork.  It must be set before the 
parent process starts.  So that probably makes it less useful for the 
multiprocessing tests by itself.

--

___
Python tracker 

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



[issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated

2018-12-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10370

___
Python tracker 

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



  1   2   >