[issue35070] test_getgrouplist may fail on macOS if user in too many groups

2019-06-13 Thread Ned Deily


Ned Deily  added the comment:


New changeset 8725c83ed5ca8959195ad8326db99d564a921749 by Ned Deily (Jeffrey 
Kintscher) in branch 'master':
bpo-35070: test_getgrouplist may fail on macOS if too many groups (GH-13071)
https://github.com/python/cpython/commit/8725c83ed5ca8959195ad8326db99d564a921749


--

___
Python tracker 

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



[issue35070] test_getgrouplist may fail on macOS if user in too many groups

2019-06-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13904
pull_request: https://github.com/python/cpython/pull/14042

___
Python tracker 

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



[issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation

2019-06-13 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> I would argue the sequence doesn't really matter that much for non SWIG 
> packages

I don't think that this is correct. Or at least, it's not obvious to me that 
this is correct. It's not uncommon for projects to extend distutils in various 
ways and the proposed change may break those packages.

Adding a separate build step for SWIG (then the order would be build_swig, 
build_py, build_ext) would be safer and IMHO also more logical.

--

___
Python tracker 

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



[issue35070] test_getgrouplist may fail on macOS if user in too many groups

2019-06-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13905
pull_request: https://github.com/python/cpython/pull/14043

___
Python tracker 

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



[issue37259] Missing Doc/whatsnew/3.9.rst file

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Ned!

--

___
Python tracker 

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



[issue37262] Make unittest assertions staticmethods/classmethods

2019-06-13 Thread Pascal Chambon


New submission from Pascal Chambon :

Is there any reasons why assertXXX methods in TestCase are instance methods and 
not staticmethods/classmethods?

Since they (to my knowledge) don't need to access an instance dict, they could 
be turned into instance-less methods, and thus be usable from other testing 
frameworks (like pytest, for those who want to use all the power of fixtures 
and yet benefit from advanced assertions, like Django's TestCase's assertXXX).

Am I missing something here?

--
components: Tests
messages: 345463
nosy: pakal
priority: normal
severity: normal
status: open
title: Make unittest assertions staticmethods/classmethods
type: enhancement
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



[issue37253] PyCompilerFlags got a new cf_feature_version field

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 022ac0a497b668d8b15e34e582a6396ead1a35e1 by Victor Stinner in 
branch 'master':
bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020)
https://github.com/python/cpython/commit/022ac0a497b668d8b15e34e582a6396ead1a35e1


--

___
Python tracker 

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



[issue35070] test_getgrouplist may fail on macOS if user in too many groups

2019-06-13 Thread miss-islington


miss-islington  added the comment:


New changeset b4c8ef7c67712c6639ee896bf7cb8ca1c204946d by Miss Islington (bot) 
in branch '3.7':
bpo-35070: test_getgrouplist may fail on macOS if too many groups (GH-13071)
https://github.com/python/cpython/commit/b4c8ef7c67712c6639ee896bf7cb8ca1c204946d


--
nosy: +miss-islington

___
Python tracker 

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



[issue37253] PyCompilerFlags got a new cf_feature_version field

2019-06-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13906
pull_request: https://github.com/python/cpython/pull/14044

___
Python tracker 

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



[issue35070] test_getgrouplist may fail on macOS if user in too many groups

2019-06-13 Thread miss-islington


miss-islington  added the comment:


New changeset c80183e6ca8c0ce834fc6444a71c7f31a3eb05b7 by Miss Islington (bot) 
in branch '3.8':
bpo-35070: test_getgrouplist may fail on macOS if too many groups (GH-13071)
https://github.com/python/cpython/commit/c80183e6ca8c0ce834fc6444a71c7f31a3eb05b7


--

___
Python tracker 

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



[issue35070] test_getgrouplist may fail on macOS if user in too many groups

2019-06-13 Thread Ned Deily


Ned Deily  added the comment:

Merged for release in 3.8.0b2 and 3.7.4.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2019-06-13 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +13907
pull_request: https://github.com/python/cpython/pull/14045

___
Python tracker 

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



[issue36689] docs: os.path.commonpath raises ValueError for different drives

2019-06-13 Thread makdon


makdon  added the comment:

I create a PR according Windson Yang's suggestion.

--
keywords: +patch
message_count: 4.0 -> 5.0
nosy: +makdon
nosy_count: 8.0 -> 9.0
pull_requests: +13908
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14045

___
Python tracker 

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



[issue37253] PyCompilerFlags got a new cf_feature_version field

2019-06-13 Thread miss-islington


miss-islington  added the comment:


New changeset 032bf30643fff49b5595b53f9c1ce5b2cd2df504 by Miss Islington (bot) 
in branch '3.8':
bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020)
https://github.com/python/cpython/commit/032bf30643fff49b5595b53f9c1ce5b2cd2df504


--

___
Python tracker 

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



[issue35070] test_getgrouplist may fail on macOS if user in too many groups

2019-06-13 Thread Ned Deily


Ned Deily  added the comment:

This issue has roamed quite a bit so it is a little bit difficult to tell what 
problem(s) have been seen here.  But, clearly Jeffrey's PR fixes a real and now 
reproducible problem so I'm declaring victory and have closed this issue now.  
Thanks everyonw!  I am going to leave Issue33223 open (thanks xtreak!) for 
further investigation.

--

___
Python tracker 

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



[issue33223] test_posix fails ERRNO 0

2019-06-13 Thread Ned Deily


Ned Deily  added the comment:

See also the discussion and fix merged in Issue35070.

--

___
Python tracker 

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



[issue37263] spawn asyncio subprocesses in a thread pool

2019-06-13 Thread Andrew Svetlov


New submission from Andrew Svetlov :

Subprocess starting can be a long blocking operation, see 
https://github.com/python-trio/trio/issues/1109 for discussion

--
messages: 345472
nosy: asvetlov
priority: normal
severity: normal
status: open
title: spawn asyncio subprocesses in a thread pool

___
Python tracker 

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



[issue26180] multiprocessing.util._afterfork_registry leak in threaded environment

2019-06-13 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Why is it that __init__ is called multiple times? I'm just wondering if we 
could somehow ensure that __init__ is called only once.

--
nosy: +jdemeyer

___
Python tracker 

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



[issue37264] Python 3.7.3 win 64bit - unresolved external symbol PyOS_AfterFork_Child

2019-06-13 Thread Massimo Fidanza


New submission from Massimo Fidanza :

I need to build mod_wsgi under Windows 10 64bit, but I get a linking error
mod_wsgi.obj : error LNK2001: unresolved external symbol 
PyOS_AfterFork_Child
build\lib.win-amd64-3.7\mod_wsgi\server\mod_wsgi.cp37-win_amd64.pyd : fatal 
error LNK1120: 1 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 
14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1120

I checked my installation and found that inside include\intrcheck.h, 
PyOS_AfterFork_Child is declared, but if I run dumpbin /exports on libs\* 
(libpython37.a, python3.lib and python37.lib) there is only PyOS_AfterFork 
exported, and not PyOS_AfterFork_Child, PyOS_AfterFork_Parent and 
PyOS_BeforeFork. I have installed Python3.7.3 using "Windows x86-64 executable 
installer" (python-3.7.3-amd64.exe) downloaded from python.org

--
components: Library (Lib)
messages: 345474
nosy: Massimo Fidanza
priority: normal
severity: normal
status: open
title: Python 3.7.3 win 64bit - unresolved external symbol PyOS_AfterFork_Child
type: compile error
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



[issue37264] Python 3.7.3 win 64bit - unresolved external symbol PyOS_AfterFork_Child

2019-06-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +Windows
nosy: +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



[issue37262] Make unittest assertions staticmethods/classmethods

2019-06-13 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also issue19645 which seems to be a slightly related discussion

--
nosy: +xtreak

___
Python tracker 

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



[issue37262] Make unittest assertions staticmethods/classmethods

2019-06-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +Library (Lib) -Tests
nosy: +ezio.melotti, michael.foord, rbcollins
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



[issue37265] Memory leaks regression caused by: Fix threading._shutdown() race condition

2019-06-13 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#/builders/189/builds/60

Examples:

test_ssl leaked [3, 3, 3] references, sum=9
test_ssl leaked [3, 3, 3] memory blocks, sum=9
test_decimal leaked [4, 4, 4] references, sum=12
test_decimal leaked [4, 4, 4] memory blocks, sum=12
test_httplib leaked [1, 1, 1] references, sum=3
test_httplib leaked [1, 1, 1] memory blocks, sum=3
test_multiprocessing_fork leaked [27, 27, 27] references, sum=81
test_multiprocessing_fork leaked [27, 27, 27] memory blocks, sum=81
test_multiprocessing_forkserver leaked [27, 27, 27] references, sum=81
test_multiprocessing_forkserver leaked [27, 27, 27] memory blocks, sum=81
test_socketserver leaked [15, 15, 15] references, sum=45
test_socketserver leaked [15, 15, 15] memory blocks, sum=45
test_capi leaked [17, 17, 17] references, sum=51
test_capi leaked [17, 17, 17] memory blocks, sum=51
test_smtplib leaked [47, 47, 47] references, sum=141
test_smtplib leaked [47, 47, 47] memory blocks, sum=141
test_io leaked [23254, 23250, 23254] references, sum=69758
test_io leaked [7703, 7701, 7703] memory blocks, sum=23107
test_pickle leaked [6, 6, 6] references, sum=18
test_pickle leaked [6, 6, 6] memory blocks, sum=18
test_httpservers leaked [43, 43, 43] references, sum=129
test_httpservers leaked [43, 43, 43] memory blocks, sum=129
test_nntplib leaked [1, 1, 1] references, sum=3
test_nntplib leaked [1, 1, 1] memory blocks, sum=3
test_os leaked [5, 5, 5] references, sum=15
test_os leaked [5, 5, 5] memory blocks, sum=15
test_subprocess leaked [4, 4, 4] references, sum=12
test_subprocess leaked [4, 4, 4] memory blocks, sum=12
test_socket leaked [7, 7, 7] references, sum=21
test_socket leaked [7, 7, 7] memory blocks, sum=21
test_multiprocessing_spawn leaked [27, 27, 27] references, sum=81
test_multiprocessing_spawn leaked [27, 27, 27] memory blocks, sum=81
test_concurrent_futures leaked [3, 3, 3] references, sum=9
test_concurrent_futures leaked [3, 3, 3] memory blocks, sum=9
test_asyncio leaked [62, 62, 62] references, sum=186
test_asyncio leaked [62, 62, 62] memory blocks, sum=186


I used git bisect and I found... my own change :-)

commit 468e5fec8a2f534f1685d59da3ca4fad425c38dd
Author: Victor Stinner 
Date:   Thu Jun 13 01:30:17 2019 +0200

bpo-36402: Fix threading._shutdown() race condition (GH-13948)

Fix a race condition at Python shutdown when waiting for threads.
Wait until the Python thread state of all non-daemon threads get
deleted (join all non-daemon threads), rather than just wait until
Python threads complete.

* Add threading._shutdown_locks: set of Thread._tstate_lock locks
  of non-daemon threads used by _shutdown() to wait until all Python
  thread states get deleted. See Thread._set_tstate_lock().
* Add also threading._shutdown_locks_lock to protect access to
  threading._shutdown_locks.
* Add test_finalization_shutdown() test.

--
components: Library (Lib)
messages: 345476
nosy: vstinner
priority: normal
severity: normal
status: open
title: Memory leaks regression caused by: Fix threading._shutdown() race 
condition
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



[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-06-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13909
pull_request: https://github.com/python/cpython/pull/14047

___
Python tracker 

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



[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Robert Collins


Robert Collins  added the comment:

Sorry for the slow reply here;

There are API breaks involved in any decoupling that involves the exception 
raising because of the failureException attribute. Something with signalling 
that can be adapted by other test suites etc might have merit, but I think we 
are lacking a clear use case for doing this to the existing exceptions. Setting 
up a way for new things to be more easily used by users of other test 
frameworks is quite attractive; perhaps just writing them as separate functions 
with an adapter to failureException would be sufficient.

--
versions: +Python 3.9 -Python 3.5

___
Python tracker 

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



[issue37265] Memory leaks regression caused by: Fix threading._shutdown() race condition

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

Oh. It's a stupid bug: will be fixed by PR 14047.

--

___
Python tracker 

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



[issue37262] Make unittest assertions staticmethods/classmethods

2019-06-13 Thread Robert Collins


Robert Collins  added the comment:

I think this is strictly redundant with that other ticket and I'm going to 
close it. That said, they need access to self.failureException. 
https://docs.python.org/3/library/unittest.html#unittest.TestCase.failureException

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



[issue35070] test_getgrouplist may fail on macOS if user in too many groups

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

> clearly Jeffrey's PR fixes a real and now reproducible problem so I'm 
> declaring victory and have closed this issue now.  Thanks everyone!

Well done Jeffrey Kintscher! The test was failing randomly for years, I recall 
many bugs and many people complaining, but nobody succeeded to come up with a 
fix.

Note: this off-by-one looks magic to me, but I'm happy that it works :-)

/*
 * NGROUPS_MAX is defined by POSIX.1 as the maximum
 * number of supplimental groups a users can belong to.
 * We have to increment it by one because
 * getgrouplist() returns both the supplemental groups
 * and the primary group, i.e. all of the groups the
 * user belongs to.
 */
ngroups = 1 + MAX_GROUPS;

--

___
Python tracker 

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



[issue37262] Make unittest assertions staticmethods/classmethods

2019-06-13 Thread Pascal Chambon


Pascal Chambon  added the comment:

Indeed I missed this ticket, thanks

--

___
Python tracker 

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



[issue37231] Optimize calling special methods

2019-06-13 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset b4b814b3988abf69f07f8492d82e855c51b2a75d by Inada Naoki (Jeroen 
Demeyer) in branch 'master':
bpo-37231: optimize calls of special methods (GH-13973)
https://github.com/python/cpython/commit/b4b814b3988abf69f07f8492d82e855c51b2a75d


--
nosy: +inada.naoki

___
Python tracker 

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



[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Pascal Chambon


Pascal Chambon  added the comment:

(Redirected here from https://bugs.python.org/issue37262)

I haven't dug the assertThat() idea, but why not make, as a first step, turn 
assertion methods in TestCase to staticmethods/classmethods, instead of 
instance methods?

Since they (to my knowledge) don't need to access an instance dict, they could 
be turned into such instance-less methods, and thus be usable from other 
testing frameworks (like pytest, for those who want to use pytest fixtures and 
yet benefit from advanced assertions like Django's TestCase's assertions).

"failureException" and others are meant to be (sub)class attributes, so no 
backwards incompatible change should occur (unless someone did really weird 
things with manually instantiated TestCases).

--
nosy: +pakal

___
Python tracker 

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



[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Michael Foord


Michael Foord  added the comment:

Has anyone seen any real world use cases for failureException? It's a real 
hindrance to a whole bunch of changes sounds decoupling. 

On the other hand something like assertThat could catch a custom exception from 
the matchers (subclass of AssertionError) and raise failureException

--

___
Python tracker 

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2019-06-13 Thread STINNER Victor


New submission from STINNER Victor :

Py_EndInterpreter() calls threading._shutdown() which waits for non-daemon 
threads spawned in the subinterpreters. Problem: daemon threads continue to run 
after threading._shutdown(), but they rely on an interpreter which is being 
finalized and then deleted.

Attached example shows the problem:

$ ./python subinterp_daemon_thread.py 
hello from daemon thread
Fatal Python error: Py_EndInterpreter: not the last thread

Current thread 0x7f13e5926740 (most recent call first):
  File "subinterp_daemon_thread.py", line 23 in 
Aborted (core dumped)

Catching the bug in Py_EndInterpreter() is too late. IMHO we must simply deny 
daemon threads by design in subinterpreters for safety.

In the main interpreter, we provide best effort to prevent crash at exit, but 
IMHO the implementation is ugly :-( ceval.c uses exit_thread_if_finalizing(): 
it immediately exit the current daemon thread if the threads attempts to 
acquire or release the GIL, whereas the interpreter is gone. Problem: we cannot 
release/clear some data structure at Python exit because of that. So 
Py_Finalize() may leak some memory by design, because of daemon threads.

IMHO we can be way stricter in subinterpreters.

I suggest to only modify Python 3.9.

--
components: Interpreter Core
files: subinterp_daemon_thread.py
messages: 345485
nosy: vstinner
priority: normal
severity: normal
status: open
title: Daemon threads must be forbidden in subinterpreters
versions: Python 3.9
Added file: https://bugs.python.org/file48417/subinterp_daemon_thread.py

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() is broken for netstat

2019-06-13 Thread Michael Felt


Michael Felt  added the comment:

I have modified -

_NODE_GETTERS_WIN32 = [_windll_getnode, _netbios_getnode, _ipconfig_getnode]

_NODE_GETTERS_UNIX = [_unix_getnode, _ifconfig_getnode, _ip_getnode,
  _arp_getnode, _lanscan_getnode, _netstat_getnode]

to:

  +683  # _OS_GETTERS, when known, are targetted for a specific OS or platform.
  +684  # The order is by 'common practice' on the specified platform.
  +685  # Note: 'posix' and 'windows' _OS_GETTERS are prefixed by a 
dll/dlload() method
  +686  # which, when successful, means none of these "external" methods are 
called.
  +687  # _GETTERS is (also) used by test_uuid.py to SkipUnless(), e.g.,
  +688  # @unittest.skipUnless(_uuid._ifconfig_getnode in _uuid._GETTERS, 
...)
  +689  if _LINUX:
  +690  _OS_GETTERS = [_ip_getnode, _ifconfig_getnode]
  +691  elif _DARWIN:
  +692  _OS_GETTERS = [_ifconfig_getnode, _arp_getnode, _netstat_getnode]
  +693  elif _WINDOWS:
  +694  _OS_GETTERS = [_netbios_getnode, _ipconfig_getnode]
  +695  elif _AIX:
  +696  _OS_GETTERS = [_netstat_getnode]
  +697  else:
  +698  _OS_GETTERS = [_ifconfig_getnode, _ip_getnode, _arp_getnode,
  +699 _netstat_getnode, _lanscan_getnode]
  +700  if os.name == 'posix':
  +701  _GETTERS = [_unix_getnode] + _OS_GETTERS
  +702  elif os.name == 'nt':
  +703  _GETTERS = [_windll_getnode] + _OS_GETTERS
  +704  else:
  +705  _GETTERS = _OS_GETTERS

The shortened list, and in particular the move of _ip_getnode before 
_ifconfig_getnode is my experience that the "old" programs such as ifconfig, 
arp, and netstat are (occasionally) not available - with "ip" being the 
replacement for all.

Further, re: linux, on the two distros I could test (centos and debian) neither 
arp nor netstat return a (useable) MACADDR aka "node" value.

Requesting verification from people with other platforms.

Also, would like to know specifics for other platforms (e.g., OpenBSD, HPUX, 
Solaris). 

More generally speaking - if os.name is "posix" or "windows" - this  lists are 
almost irrelevant because the "DLL" _uuid module should provide the needed 
value.

The "plus" is that on systems that audit such things, there are fewer calls to 
non-existent programs and/or negative side-effects from calling programs that 
can/do not provide any useful data.

--

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() is broken for netstat

2019-06-13 Thread Michael Felt


Change by Michael Felt :


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



[issue21872] LZMA library sometimes fails to decompress a file

2019-06-13 Thread Ma Lin


Change by Ma Lin :


--
pull_requests: +13910
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14048

___
Python tracker 

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



[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Pascal Chambon


Pascal Chambon  added the comment:

I don't get it, why would failureException block anything ? The 
unittest.TestCase API must remain the same anyway, but it could become just a 
wrapper towards external assertions.

For example :

class TestCase:

   assertEqual = wrap(assertions.assert_equal)

Where "wrap" for example is some kind of functools.partial() injecting into 
external assertions a parameter "failure_exception_class". Having all these 
external assertions take such a parameter (defaulting to AssertionError) would 
be a great plus for adaptability anyway.

--
versions: +Python 3.5 -Python 3.9

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() needs refresh

2019-06-13 Thread Michael Felt


Michael Felt  added the comment:

p.s. - changed the title: way back when I first started on this I was mainly 
concerned that the _netstat_getnode() routine was broken for AIX. During the 
research and follow-up discussions it has become clear that it is more than 
just an AIX issue. There are multiple aspects that need attention.

Footnote: For most platforms, most of the data accessed via Lib/uuid is 
actually retrieved via Modules/_uuid. The majority of issues with Lib/uuid 
occur during testing: ./python -m test test_uuid

At least two PR (8672 - fix bug for AIX), (12777 - make "_getters" lists 
platform specific when possible). FYI: the first PR (5183) was when I was 
trying to patch multiple issues.

--
title: core logic of uuid.getnode() is broken for netstat -> core logic of 
uuid.getnode() needs refresh

___
Python tracker 

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



[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2019-06-13 Thread hai shi


hai shi  added the comment:

spawn_python in script_helper is good enough, so this bug looks like cloud be 
closed.

--

___
Python tracker 

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



[issue37258] Logging cache not cleared properly when setting level

2019-06-13 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

A unittest patch for this issue. This occurs in master and 3.8 too.

diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 50148dc2f2..30fd9ee37a 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -4172,6 +4172,27 @@ class ModuleLevelMiscTest(BaseTest):
 logging.setLoggerClass(logging.Logger)
 self.assertEqual(logging.getLoggerClass(), logging.Logger)

+def test_subclass_logger_cache(self):
+
+class MyLogger(logging.getLoggerClass()):
+pass
+
+logger = MyLogger('test')
+stream = io.StringIO()
+h = logging.StreamHandler(stream)
+logger.addHandler(h)
+
+logger.setLevel(logging.DEBUG)
+logger.debug("hello")
+self.assertEqual(stream.getvalue().strip(), "hello")
+
+stream.truncate(0)
+stream.seek(0)
+
+logger.setLevel(logging.INFO)
+logger.debug("hello")
+self.assertEqual(stream.getvalue(), "")
+
 @support.requires_type_collecting
 def test_logging_at_shutdown(self):
 # Issue #20037

--
nosy: +xtreak
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



[issue21872] LZMA library sometimes fails to decompress a file

2019-06-13 Thread Ma Lin


Ma Lin  added the comment:

I wrote a review guide in PR 14048.

--
versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2019-06-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.snow

___
Python tracker 

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



[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6f75c873752a16a7ad8f35855b1e29f59d048e84 by Victor Stinner in 
branch 'master':
tbpo-36402: Fix threading.Thread._stop() (GH-14047)
https://github.com/python/cpython/commit/6f75c873752a16a7ad8f35855b1e29f59d048e84


--

___
Python tracker 

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2019-06-13 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +13911
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14049

___
Python tracker 

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



[issue37265] Memory leaks regression caused by: Fix threading._shutdown() race condition

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

commit 6f75c873752a16a7ad8f35855b1e29f59d048e84 (HEAD -> master, 
upstream/master)
Author: Victor Stinner 
Date:   Thu Jun 13 12:06:24 2019 +0200

tbpo-36402: Fix threading.Thread._stop() (GH-14047)

Remove the _tstate_lock from _shutdown_locks, don't remove None.

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



[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-06-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13912
pull_request: https://github.com/python/cpython/pull/14050

___
Python tracker 

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



[issue37267] os.dup() creates an inheritable fd when handling a character file on Windows

2019-06-13 Thread Zackery Spytz


New submission from Zackery Spytz :

In PR 13739, Eryk Sun mentioned that the Windows implementation of os.dup() 
returns an inheritable fd when handling a character file. A comment in 
_Py_dup() makes it seem as though this is due to a belief that handles for 
character files cannot be made non-inheritable (which is wrong).

--
components: Extension Modules, Windows
messages: 345494
nosy: ZackerySpytz, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.dup() creates an inheritable fd when handling a character file on 
Windows
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



[issue37267] os.dup() creates an inheritable fd when handling a character file on Windows

2019-06-13 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +13913
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14051

___
Python tracker 

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



[issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8

2019-06-13 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +13914
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14052

___
Python tracker 

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



[issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation

2019-06-13 Thread Jeroen van den Hout


Jeroen van den Hout  added the comment:

> Adding a separate build step for SWIG (then the order would be build_swig, 
> build_py, build_ext) would be safer and IMHO also more logical.

I like this suggestion and contemplated it. However SWIG interface files are 
defined in Extension instances, which are inherently tight to the build_ext 
command. Breaking this link would require introspection of extensions before 
deciding on which command to invoke, or a completely separate SWIG Extension 
class, both of which require a change in usage.

> It's not uncommon for projects to extend distutils in various ways and the 
> proposed change may break those packages.

I argue that those packages are already tempering with default behavior of 
distutils, while the change I am proposing is fixing a flaw in basic 
functionality and might I say 'implied behavior' of distutils (as the docs say 
distutils understands SWIG, while it isn't currently even capable of installing 
correctly when SWIG files are used).

The build_ext and build_py commands are truly separate commands, except when 
SWIG interface files are used:

- build_py is responsible for copying pure python files to their correct 
directories, potentially compiling them to .pyc files.

- build_ext is responsible for compiling and linking C/C++ files and copying 
resultant files to their correct directories. It is only when SWIG files are 
supplied that a .py file is produced, which quite neatly would be picked up by 
build_py, given the chance.

--

___
Python tracker 

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



[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Michael Foord


Michael Foord  added the comment:

Suppose failureException is set to TypeError on that TestCase class, how would 
your assertEquals signal failure to the test runner?

--

___
Python tracker 

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



[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Michael Foord


Michael Foord  added the comment:

Hmm, it could be done by __init_subclass__ potentially.

--

___
Python tracker 

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



[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Michael Foord


Michael Foord  added the comment:

Or even making the assert methods into custom descriptors.

--

___
Python tracker 

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



[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Robert Collins


Robert Collins  added the comment:

Right now that attribute could be set by each test separately, or even varied 
within a test.

TBH I'm not sure that the attribute really should be supported; perhaps 
thinking about breaking the API is worth doing.

But - what are we solving for here. The OP here seems interested in using the 
assertion like things entirely outside of a test context.

What would a nice clean API for that be? (Yes I like matchers, but put that 
aside - if the APIs aren't close enough, lets make sure we do a good job for 
each audience rather than a compromise..)

--

___
Python tracker 

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



[issue20443] __code__. co_filename should always be an absolute path

2019-06-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13915
pull_request: https://github.com/python/cpython/pull/14053

___
Python tracker 

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



[issue19645] decouple unittest assertions from the TestCase class

2019-06-13 Thread Pascal Chambon


Pascal Chambon  added the comment:

"Suppose failureException is set to TypeError on that TestCase class, how would 
your assertEquals signal failure to the test runner?"

failureException is an artefact from unittest.TestCase. It's only supposed to 
be used in a TestCase context, with an unittest-compatible runner. If people 
corrupt it, I guess it's their problem?

The point of decoupling is imho that other test runner might use the separate 
set of assertions. These assertions should raise a sensible default (i.e 
AssertionError) when encountering troubles, and accepting an alternate class as 
parameter will allow each test framework to customize the way these assertions 
behave for it.

--

___
Python tracker 

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



[issue20443] __code__. co_filename should always be an absolute path

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

PR 14053 is a different approach than PR 13527: compute the absolute path to 
the script filename in PyConfig_Read() just after parsing the command line.

--
nosy: +vstinner

___
Python tracker 

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



[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e40a97a721d46307dfdc2b0322028ccded6eb571 by Victor Stinner in 
branch '3.8':
[3.8] bpo-36402: Fix threading._shutdown() race condition (GH-13948) (GH-14050)
https://github.com/python/cpython/commit/e40a97a721d46307dfdc2b0322028ccded6eb571


--

___
Python tracker 

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



[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-06-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13916
pull_request: https://github.com/python/cpython/pull/14054

___
Python tracker 

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



[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 63ab4ba07b492448844940c347787ba30735b7f2 by Victor Stinner in 
branch 'master':
bpo-37210: Fix pure Python pickle when _pickle is unavailable (GH-14016)
https://github.com/python/cpython/commit/63ab4ba07b492448844940c347787ba30735b7f2


--

___
Python tracker 

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



[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-13 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
pull_requests: +13917
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/14055

___
Python tracker 

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



[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2019-06-13 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue37268] Deprecate the parser module

2019-06-13 Thread STINNER Victor


New submission from STINNER Victor :

The parser module should be deprecated as soon as possible according to Pablo 
Galindo Salgo and Guido van Rossum:
* https://mail.python.org/pipermail/python-dev/2019-May/157464.html
* https://bugs.python.org/issue37253#msg345398

I propose to deprecate it in Python 3.8: add a note in the documentation and 
emit a DeprecationWarning on "import parser".

--
components: Library (Lib)
messages: 345504
nosy: vstinner
priority: normal
severity: normal
status: open
title: Deprecate the parser 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



[issue37253] PyCompilerFlags got a new cf_feature_version field

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

> It's fine to document the current state. I don't think you should spend any 
> time *changing* the API to "future-proof" it.

Ok.

> I am hoping that larger changes to the compiler implementation will happen 
> before Python 4, which will make the whole API moot (including the "parser" 
> module, which should be deprecated ASAP). The compiler is excluded from the 
> ABI for a reason.

Aha, that sounds exciting :-)

I created bpo-37268 to propose to deprecate the parser module in Python 3.8.

--

PyCompilerFlags changes are now documented. I made the small code changes that 
I wanted to do in 3.8 and master. I close the issue.

--

___
Python tracker 

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



[issue37268] Deprecate the parser module

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

I searched for "import parser" in GitHub code search, but I failed to find any 
project using the Python stdlib parser module. I only found copies of the 
CPython code source which has on "import parser" in Lib/test/test_parser.py.

--

___
Python tracker 

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



[issue37268] Deprecate the parser module

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo: Are you interested to implement this change?

--
nosy: +pablogsal

___
Python tracker 

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



[issue37253] PyCompilerFlags got a new cf_feature_version field

2019-06-13 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



[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6eb2878e42152e9c45d7ee5e6f889532d753e67c by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-36402: Fix threading._shutdown() race condition (GH-13948) (GH-14050) 
(GH-14054)
https://github.com/python/cpython/commit/6eb2878e42152e9c45d7ee5e6f889532d753e67c


--

___
Python tracker 

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



[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

The bpo-18808 "Thread.join returns before PyThreadState is destroyed" was not 
fixed in Python 2.7: threading.Thread has no _tstate_lock attribute. I'm not 
comfortable to backport bpo-18808 "feature" or "bugfix" to Python 2.7, not to 
backport this change.

Python 2.7 works as it is, and it's going to reach its end of life at the end 
of the year. I guess that people learnt how to work around Python 2.7 
limitation like bpo-18808.

--

___
Python tracker 

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



[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

I pushed my change to 3.8 and master branches. I close the issue.

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



[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-13 Thread miss-islington


miss-islington  added the comment:


New changeset cbda40db7b604b377acfd3f04e19407ca33748a7 by Miss Islington (bot) 
in branch '3.8':
bpo-37210: Fix pure Python pickle when _pickle is unavailable (GH-14016)
https://github.com/python/cpython/commit/cbda40db7b604b377acfd3f04e19407ca33748a7


--
nosy: +miss-islington

___
Python tracker 

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



[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, the root issue (threading._shutdown() race condition) has been fixed in 
Python 3.7, 3.8 and master branches. I close the issue. Thanks for the reviews!

--
components: +Library (Lib) -Tests
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



[issue37267] os.dup() creates an inheritable fd when handling a character file on Windows

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

If you care of inherited handles on Windows, please have a look at:

* https://github.com/python/cpython/pull/7827 from 
https://bugs.python.org/issue18174
* https://github.com/python/cpython/pull/7966 from 
https://bugs.python.org/issue33966

ref: https://pythondev.readthedocs.io/unstable_tests.html#windows-handles

I decided to give up because of multiprocessing race conditions. I failed to 
fix them.

--
nosy: +vstinner

___
Python tracker 

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



[issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6d22cc8e90ccb1e1965b1a4bc79456e2cc1e5a3e by Victor Stinner in 
branch 'master':
bpo-37261: Fix support.catch_unraisable_exception() (GH-14052)
https://github.com/python/cpython/commit/6d22cc8e90ccb1e1965b1a4bc79456e2cc1e5a3e


--

___
Python tracker 

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



[issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8

2019-06-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13918
pull_request: https://github.com/python/cpython/pull/14056

___
Python tracker 

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



[issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage

2019-06-13 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 0a9baec16c17d261377fb8a31a57d8c397e25af6 by Victor Stinner (Miss 
Islington (bot)) in branch '3.8':
bpo-36779: time.tzname returns empty string on Windows if default cod… 
(GH-13073) (GH-14032)
https://github.com/python/cpython/commit/0a9baec16c17d261377fb8a31a57d8c397e25af6


--
nosy: +vstinner

___
Python tracker 

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



[issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage

2019-06-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13919
pull_request: https://github.com/python/cpython/pull/14057

___
Python tracker 

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



[issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8

2019-06-13 Thread miss-islington


miss-islington  added the comment:


New changeset b4f5b212535e75503fc33513676837089037bb48 by Miss Islington (bot) 
in branch '3.8':
bpo-37261: Fix support.catch_unraisable_exception() (GH-14052)
https://github.com/python/cpython/commit/b4f5b212535e75503fc33513676837089037bb48


--
nosy: +miss-islington

___
Python tracker 

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



[issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage

2019-06-13 Thread miss-islington

miss-islington  added the comment:


New changeset 6a433f5ae63de72a85d20b05ff826c6f72d529b7 by Miss Islington (bot) 
in branch '3.7':
bpo-36779: time.tzname returns empty string on Windows if default cod… 
(GH-13073)
https://github.com/python/cpython/commit/6a433f5ae63de72a85d20b05ff826c6f72d529b7


--

___
Python tracker 

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



[issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

I tested manually "./python -m test test_io -m CBufferedRWPairTest -R 3:3": it 
failed before the fix, it now pass on 3.8 and master with the fix. I close the 
issue.

Enjoy resurrected objects...

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



[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2019-06-13 Thread miss-islington


miss-islington  added the comment:


New changeset 95492032c48fef20b9c7076a23fe7e46927a4688 by Miss Islington (bot) 
(Makdon) in branch 'master':
bpo-6689: os.path.commonpath raises ValueError for different drives isn't 
documented (GH-14045)
https://github.com/python/cpython/commit/95492032c48fef20b9c7076a23fe7e46927a4688


--
nosy: +miss-islington

___
Python tracker 

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



[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2019-06-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13920
pull_request: https://github.com/python/cpython/pull/14058

___
Python tracker 

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



[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2019-06-13 Thread miss-islington


miss-islington  added the comment:


New changeset ec3839a215a68cf35ff1f90cb6823f67a5abdce3 by Miss Islington (bot) 
in branch '3.8':
bpo-6689: os.path.commonpath raises ValueError for different drives isn't 
documented (GH-14045)
https://github.com/python/cpython/commit/ec3839a215a68cf35ff1f90cb6823f67a5abdce3


--

___
Python tracker 

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



[issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8

2019-06-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13921
pull_request: https://github.com/python/cpython/pull/14059

___
Python tracker 

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



[issue20443] __code__. co_filename should always be an absolute path

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

One of the side effect of my PR 14053 is that tracebacks are more verbose: the 
filename is now absolute rather than relative.

Currently:

$ python3 x.py 
Traceback (most recent call last):
  File "x.py", line 4, in 
func()
  File "x.py", line 2, in func
bug
NameError: name 'bug' is not defined

With my PR:

$ ./python x.py 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/x.py", line 4, in 
func()
  File "/home/vstinner/prog/python/master/x.py", line 2, in func
bug
NameError: name 'bug' is not defined

--

___
Python tracker 

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



[issue37268] Deprecate the parser module

2019-06-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yep, will make a PR soon.

--

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-13 Thread Steve Dower


Steve Dower  added the comment:

I think Vinay gets to make the call, but I also agree that some sort of error 
handling by default makes sense for logging. Especially now that it's (about to 
be) easier to override the default.

FWIW, I'd leave the default arguments as None and just coerce it as late as 
possible, before TextIOWrapper does it.

--

___
Python tracker 

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



[issue26180] multiprocessing.util._afterfork_registry leak in threaded environment

2019-06-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

With master and Windows 10, the output looks like
(0, 61333912, ): 

(1, 63524512, . at 
0x03CA2940>): 
(2, 60787504, . at 
0x03CA2760>): ProcessLocalSet()
(5, 63524512, . at 
0x03CA2C60>): 
... <8 more lines like the two with ForkAwareLocal.__init__>

I am not familiar with multiprocessing Managers and the doc is not completely 
clear to me.  Does bug3.py only run in one process or does it result in 
multiple processes?  If the latter, I expect it would need an "if __name__ == 
'__main__':" clause, at least on Windows.  (Milan, I should have asked what OS 
you used, as mp has OS-specific behaviors.)
(https://docs.python.org/3/library/multiprocessing.html#the-spawn-and-forkserver-start-methods,
 Safe importing of main module)

--
versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue37241] Item Count Error in Shelf

2019-06-13 Thread Jesse Bacon


Jesse Bacon  added the comment:

I was using anaconda distribution on OSX.  It failed for 3.6 and 3.7.  I pulled 
off anaconda and compiled from source and the script executed correctly 
regardless of whether or not "--enable-optimizations" was set.  Anaconda claims 
to be geared towards scientists so this is alarming.  Thank you for your time.

--

___
Python tracker 

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



[issue37241] Item Count Error in Shelf

2019-06-13 Thread Jesse Bacon


Change by Jesse Bacon :


--
resolution:  -> third party

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-06-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13922
pull_request: https://github.com/python/cpython/pull/14060

___
Python tracker 

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



[issue37264] Python 3.7.3 win 64bit - unresolved external symbol PyOS_AfterFork_Child

2019-06-13 Thread Steve Dower


Steve Dower  added the comment:

Windows does not have fork, and so the fork functionality is not built into it 
(PyOS_AfterFork() is empty).

You will need to report this to mod_wsgi to be able to build without fork 
support.

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



[issue36763] Implementation of the PEP 587

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

Two interesting TODO.

sysmodule.c: get_xoptions()

/* PEP432 TODO: we can reach this if xoptions is NULL in the main
*  interpreter config. When that happens, we need to properly set
 * the `xoptions` reference in the main interpreter config as well.
 *
 * For Python 3.7, we shouldn't be able to get here due to the
 * combination of how _PyMainInterpreter_ReadConfig and _PySys_EndInit
 * work, but we expect 3.8+ to make the _PyMainInterpreter_ReadConfig
 * call optional for embedding applications, thus making this
 * reachable again.
 */

sysmodule.c: get_warnoptions()

/* PEP432 TODO: we can reach this if warnoptions is NULL in the main
*  interpreter config. When that happens, we need to properly set
 * the `warnoptions` reference in the main interpreter config as well.
 *
 * For Python 3.7, we shouldn't be able to get here due to the
 * combination of how _PyMainInterpreter_ReadConfig and _PySys_EndInit
 * work, but we expect 3.8+ to make the _PyMainInterpreter_ReadConfig
 * call optional for embedding applications, thus making this
 * reachable again.
 */

--

___
Python tracker 

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



[issue37241] Item Count Error in Shelf

2019-06-13 Thread SilentGhost


Change by SilentGhost :


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



[issue36763] Implementation of the PEP 587

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

_PySys_ReadPreInitOptions() code should be moved somewhere closer to 
PyConfig_Read().

--

___
Python tracker 

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



[issue37213] Peeephole optimizer does not optimize functions with multiline expressions

2019-06-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5 by Pablo Galindo in 
branch 'master':
bpo-37213: Handle negative line deltas correctly in the peephole optimizer 
(GH-13969)
https://github.com/python/cpython/commit/3498c642f4e83f3d8e2214654c0fa8e0d51cebe5


--

___
Python tracker 

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



[issue37213] Peeephole optimizer does not optimize functions with multiline expressions

2019-06-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13923
pull_request: https://github.com/python/cpython/pull/14063

___
Python tracker 

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



[issue37213] Peeephole optimizer does not optimize functions with multiline expressions

2019-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

> The optimization is skipped if lnotab contains 255. It was very uncommon in 
> older versions (only when the function contains very large expressions, 
> larger than hundreds of lines or bytecode instructions), but in 3.8 this 
> situation is common.

Do you know why 255 became more common? Is it the side effect if an AST 
optimization?

--

___
Python tracker 

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



[issue37213] Peeephole optimizer does not optimize functions with multiline expressions

2019-06-13 Thread miss-islington


miss-islington  added the comment:


New changeset 5282b3b1d2e0bdf13899b1616aea20a6e3c4e13e by Miss Islington (bot) 
in branch '3.8':
bpo-37213: Handle negative line deltas correctly in the peephole optimizer 
(GH-13969)
https://github.com/python/cpython/commit/5282b3b1d2e0bdf13899b1616aea20a6e3c4e13e


--
nosy: +miss-islington

___
Python tracker 

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



[issue37213] Peeephole optimizer does not optimize functions with multiline expressions

2019-06-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Should we backport this to 3.7 as well?

--

___
Python tracker 

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



  1   2   >