[issue31420] Reference leaks introduced by bpo-30860

2017-09-14 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +3557

___
Python tracker 

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



[issue30860] Consolidate stateful C globals under a single struct.

2017-09-14 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +3556

___
Python tracker 

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



[issue31464] Remove trailing spaces from Python-ast.h

2017-09-14 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed PR makes Parser/asdl_c.py not emitting trailing spaces for blank lines 
in Include/Python-ast.h.

--
messages: 302149
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Remove trailing spaces from Python-ast.h
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



[issue31464] Remove trailing spaces from Python-ast.h

2017-09-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +3558

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:

test_threading.test_foreign_thread() failed:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/879/steps/test/logs/stdio

0:08:53 load avg: 1.84 [286/405/1] test_threading failed (env changed) -- 
running: test_multiprocessing_spawn (51 sec)
(...)
test_dummy_thread_after_fork (test.test_threading.ThreadTests) ... ok
test_enumerate_after_join (test.test_threading.ThreadTests) ... ok
test_finalize_runnning_thread (test.test_threading.ThreadTests) ... ok
test_finalize_with_trace (test.test_threading.ThreadTests) ... ok
test_foreign_thread (test.test_threading.ThreadTests) ... Warning -- 
threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 1)
Dangling thread: <_MainThread(MainThread, started 34369060864)>
ok
test_frame_tstate_tracing (test.test_threading.ThreadTests) ... ok

--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:

3 more warnings in test_threading on AMD64 FreeBSD 10.x Shared 3.x:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/886/steps/test/logs/stdio

0:03:45 load avg: 4.05 [246/405/1] test_thread failed (env changed)
(...)
test_nt_and_posix_stack_size (test.test_thread.ThreadRunningTests) ... (...)
task 4 done
task 10 done
all tasks done
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 
1)
Dangling thread: <_MainThread(MainThread, started 34393318400)>
ok
(...)
test_starting_threads (test.test_thread.ThreadRunningTests) ...
(...)
task 9 will run for 55us
task 9 done
all tasks done
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 
1)
Dangling thread: <_MainThread(MainThread, started 34393318400)>
ok


http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/884/steps/test/logs/stdio

0:05:44 load avg: 3.00 [249/405/1] test_thread failed (env changed) -- running: 
test_concurrent_futures (31 sec), test_multiprocessing_fork (60 sec)
test_barrier (test.test_thread.BarrierTest) ...
(...)
task 5 leaving barrier
task 3 leaving barrier
tasks done
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 
1)
Dangling thread: <_MainThread(MainThread, started 34393318400)>
ok

--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/881/steps/test/logs/stdio

0:08:05 load avg: 1.58 [288/405/1] test_threading failed (env changed) -- 
running: test_multiprocessing_spawn (83 sec)
(...)
test_dummy_thread_after_fork (test.test_threading.ThreadTests) ... ok
test_enumerate_after_join (test.test_threading.ThreadTests) ... ok
test_finalize_runnning_thread (test.test_threading.ThreadTests) ... ok
test_finalize_with_trace (test.test_threading.ThreadTests) ... ok
test_foreign_thread (test.test_threading.ThreadTests) ...

Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 
1)
Dangling thread: <_MainThread(MainThread, started 34368585728)>

ok
test_frame_tstate_tracing (test.test_threading.ThreadTests) ... ok
test_ident_of_no_threading_threads (test.test_threading.ThreadTests) ... ok

--

___
Python tracker 

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



[issue31420] Reference leaks introduced by bpo-30860

2017-09-14 Thread Eric Snow

Eric Snow added the comment:


New changeset dae0276bb6bc7281d59fb0b8f1aab31634ee80dc by Eric Snow in branch 
'master':
bpo-30860: Fix a refleak. (#3567)
https://github.com/python/cpython/commit/dae0276bb6bc7281d59fb0b8f1aab31634ee80dc


--

___
Python tracker 

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



[issue30860] Consolidate stateful C globals under a single struct.

2017-09-14 Thread Eric Snow

Eric Snow added the comment:


New changeset dae0276bb6bc7281d59fb0b8f1aab31634ee80dc by Eric Snow in branch 
'master':
bpo-30860: Fix a refleak. (#3567)
https://github.com/python/cpython/commit/dae0276bb6bc7281d59fb0b8f1aab31634ee80dc


--

___
Python tracker 

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



[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-14 Thread Eryk Sun

Eryk Sun added the comment:

> Now I can read from the "R" pipes with 0 problems (getting the error 
> and output streams)

The pipe handles are inherited by waitfor.exe, just as before. You'll find that 
reading to EOF will block just as it does when using subprocess.PIPE with 
communicate(). For example:

stderr = open(errPipeR, 'r')
err = stderr.read()

The above stderr.read() will return when waitfor.exe either exits or gets 
terminated.

> and proc.communicate exits as soon as the called process exits 
> (4 seconds).

proc.stdout and proc.stderr are None in this case, so all communicate() can do 
is write to proc.stdin, if there's input text, and then wait() for the process 
to exit.

--

___
Python tracker 

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



[issue31465] Allow _PyType_Lookup() to raise exceptions

2017-09-14 Thread Stefan Behnel

New submission from Stefan Behnel:

Follow-up to issue 31336:
The fact that _PyType_Lookup() does not propagate exceptions leaves some space 
for ambiguity. If, in a chain of MRO lookups, one would fail and a later one 
would succeed, is it correct to keep trying? What if the first failure actually 
failed to see an otherwise existing attribute in that class? We simply can't 
know because the lookup failed for *some* reason.

I think, the only way to really avoid that ambiguity would be to allow 
_PyType_Lookup() to raise exceptions, and to make it fail on the first error.

--
components: Interpreter Core
messages: 302156
nosy: scoder
priority: normal
severity: normal
status: open
title: Allow _PyType_Lookup() to raise exceptions
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue31336] Speed up _PyType_Lookup() for class creation

2017-09-14 Thread Stefan Behnel

Stefan Behnel added the comment:

One more thing: the fact that the lookup does not propagate exceptions leaves 
some space for ambiguity. If, in a chain of MRO lookups, one would fail and a 
later one would succeed, is it correct to keep trying? What if the first 
failure actually failed to see an otherwise existing attribute in that class? 
We simply can't know because the lookup failed for *some* reason.

I think, the only way to really avoid that ambiguity would be to allow 
_PyType_Lookup() to raise exceptions, and to make it fail on the first error. 
I've created issue 31465 for this.

--

___
Python tracker 

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



[issue21537] functools.lru_cache does not cache exceptions

2017-09-14 Thread Sviatoslav Sydorenko

Sviatoslav Sydorenko added the comment:

Hi,

I've got similar need (caching exceptions). My use case is syscall, which is 
not going to result in something different regardless of the number of times 
it's called. But I'd like to be able to have exception already raised for me by 
lru_cache, so that I won't poke kernel with no need.

I'd suggest adding `cache_exceptions=False` key to the decorator to let user 
control whether it's worth enabling. This might be useful in stdlib.

--
nosy: +webknjaz

___
Python tracker 

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



[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +patch
pull_requests: +3559
stage: resolved -> patch review

___
Python tracker 

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



[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:

I wrote an non-regression test for the Python master branch using the test case 
attached to https://github.com/libexpat/libexpat/issues/115: PR 3570.

--

___
Python tracker 

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



[issue31392] Upgrade installers to OpenSSL 1.1.0f

2017-09-14 Thread Christian Heimes

Christian Heimes added the comment:

Ned, can you take care of macOS? Victor noted that master still builds with 
1.0.2k.

--
assignee: christian.heimes -> ned.deily

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2017-09-14 Thread Christian Heimes

Changes by Christian Heimes :


--
keywords: +patch
pull_requests: +3560
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



[issue31392] Upgrade installers to OpenSSL 1.1.0f

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:

FYI I wrote a script to get the version of all library copies embedded in 
CPython:
https://github.com/haypo/misc/blob/master/cpython/external_versions.py

This is how I noticed the OpenSSL version inconsistency.

--
nosy: +haypo

___
Python tracker 

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



[issue31466] No easy way to change float formatting when subclassing encoder.JSONEncoder

2017-09-14 Thread Quentin Peter

New submission from Quentin Peter:

I want to output floats in ENG format. Working with distance in micrometers, it 
is a bit annoying to see:
2.5e-5
.0003
instead of 
25e-6
300e-6
The solution I found was to redefine `iterencode` but that doesn't feel right.

I would like to see something similar to the "default" function that is easely 
modified.

--
messages: 302162
nosy: qpeter
priority: normal
severity: normal
status: open
title: No easy way to change float formatting when subclassing 
encoder.JSONEncoder
type: enhancement
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



[issue31466] No easy way to change float formatting when subclassing encoder.JSONEncoder

2017-09-14 Thread Quentin Peter

Changes by Quentin Peter :


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

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:

Oh, test_concurrent_futures.test_exception_with_success() failed on Travis CI 
:-(

https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.6457

test_exception_with_success (test.test_concurrent_futures.FutureTests) ... 
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 
2)
Dangling thread: 
Dangling thread: <_MainThread(MainThread, started 3656)>
ok

--

___
Python tracker 

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



[issue31467] cElementTree behaves differently compared to ElementTree

2017-09-14 Thread Ravikumar

New submission from Ravikumar:

I have started learning python and I see below snippet fails. I do not 
understand how to fix the issue and assume this might be a bug in 
multiprocessing library.

I use Python 2.7.12


My python snippet

import xml.etree.ElementTree as ET# WORKS
import xml.etree.cElementTree as ET# DOES NOT WORK
import multiprocessing

tree = ET.parse('country_data.xml')
root = tree.getroot()

manager = multiprocessing.Manager()
elems_saved = manager.dict()

elems_saved["1"]=root


/tmp/Python$ cat country_data.xml 



1
2008
141100




/tmp/Python$


OUTPUT

/tmp/Python$ python testxml.py 
Traceback (most recent call last):
  File "testxml.py", line 10, in 
elems_saved["1"]=root
  File "", line 2, in __setitem__
  File "/usr/lib/python2.7/multiprocessing/managers.py", line 758, in 
_callmethod
conn.send((self._id, methodname, args, kwds))
TypeError: expected string or Unicode object, NoneType found

Please let me know if I am wrong

--
components: Library (Lib), XML
messages: 302164
nosy: poojariravi
priority: normal
severity: normal
status: open
title: cElementTree behaves differently compared to ElementTree
type: behavior
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



[issue31467] cElementTree behaves differently compared to ElementTree

2017-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This error is from cPickle.

>>> import xml.etree.cElementTree as ET
>>> root = ET.XML('')
>>> import pickle
>>> pickle.dumps(root)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/pickle.py", line 1380, in dumps
Pickler(file, protocol).dump(obj)
  File "/usr/lib/python2.7/pickle.py", line 224, in dump
self.save(obj)
  File "/usr/lib/python2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
  File "/usr/lib/python2.7/pickle.py", line 400, in save_reduce
save(func)
  File "/usr/lib/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.7/pickle.py", line 754, in save_global
(obj, module, name))
pickle.PicklingError: Can't pickle : 
it's not found as __main__.copyelement
>>> import cPickle
>>> cPickle.dumps(root)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: expected string or Unicode object, NoneType found

cElementTree.Element is not pickleable in Python 2. And I think it is too later 
to add this feature in 2.7. The obvious solution -- use Python 3.

--
nosy: +eli.bendersky, scoder, serhiy.storchaka

___
Python tracker 

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



[issue31467] cElementTree behaves differently compared to ElementTree

2017-09-14 Thread Ravikumar

Ravikumar added the comment:

Thanks for the quick update. It helped us to understand the issue.

We will check of how to proceed further in our implementation.

/ Ravi

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



[issue31467] cElementTree behaves differently compared to ElementTree

2017-09-14 Thread Ravikumar

Ravikumar added the comment:

Just now I have figured out that , in the documentation it was mentioned that 
cElementTree module is deprecated in Python 3.3 version. 

"The xml.etree.ElementTree module implements a simple and efficient API for 
parsing and creating XML data.

Changed in version 3.3: This module will use a fast implementation whenever 
available. The xml.etree.cElementTree module is deprecated."

https://docs.python.org/3/library/xml.etree.elementtree.html


In that case, will your resolution comment still holds valid ??
If so then, how to use cElementTree in my usecase

--
status: closed -> open

___
Python tracker 

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



[issue31467] cElementTree behaves differently compared to ElementTree

2017-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Use ElementTree. In Python 3 ElementTree is accelerated and cElementTree is a 
deprecated alias of ElementTree.

--

___
Python tracker 

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



[issue31455] ElementTree.XMLParser() mishandles exceptions

2017-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I agree. While these issues are not totally independent (they changes the same 
code), my issue needs uncommon use of __new__ and __init__, while your issue 
can be exposed in normal cases.

--

___
Python tracker 

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



[issue31468] os.path.samefile fails on windows network drive

2017-09-14 Thread Daniel Sauer

New submission from Daniel Sauer:

On my Windows network drive os.path.samefile() seems to return True regardless 
of input paths. In my case this results in an error trying to save checkpoints 
of jupyter notebooks on this drive.
I am using Windows 7, my working directory is located on a network drive that 
is offline-available (CSC cache).
Tracing this problem back it seems to have something to do with 
nt._getfinalpathname() reporting a wrong result.

--
components: Windows
messages: 302170
nosy: Daniel Sauer, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.path.samefile fails on windows network drive
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue31467] cElementTree behaves differently compared to ElementTree

2017-09-14 Thread Ravikumar

Changes by Ravikumar :


--
status: open -> closed

___
Python tracker 

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



[issue31467] cElementTree behaves differently compared to ElementTree

2017-09-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> wont fix

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2017-09-14 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Sorry I don't have any tests yet.  I've added a few, but it's taking me forever 
to figure out the bindings for testing the `Double-Button-1` and `B1-Motion`.  
I actually have a test for `Double-Button-1` now, but still working on 
`B1-Motion`.

--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3562

___
Python tracker 

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



[issue31469] Running inside docker container from non-root user

2017-09-14 Thread Dmitriy

New submission from Dmitriy:

When i try to run youtube-dl inside docker container from non root user i 
recieve this error:

failed to import the site module traceback (most recent call last): file 
"/usr/lib/python3.6/site.py", line 544, in main() file 
"/usr/lib/python3.6/site.py", line 530, in main known_paths = 
addusersitepackages(known_paths) file "/usr/lib/python3.6/site.py", line 282, 
in addusersitepackages user_site = getusersitepackages() file 
"/usr/lib/python3.6/site.py", line 258, in getusersitepackages user_base = 
getuserbase() # this will also set user_base file "/usr/lib/python3.6/site.py", 
line 248, in getuserbase user_base = get_config_var('userbase') file 
"/usr/lib/python3.6/sysconfig.py", line 601, in get_config_var return 
get_config_vars().get(name) file "/usr/lib/python3.6/sysconfig.py", line 558, 
in get_config_vars _config_vars['userbase'] = _getuserbase() file 
"/usr/lib/python3.6/sysconfig.py", line 205, in _getuserbase return 
joinuser("~", ".local") file "/usr/lib/python3.6/sysconfig.py", line 184, in 
joinuser return os.path.expanduser(os.path.join(*args)) file 
"/usr/lib/python3.6/posi
 xpath.py", line 247, in expanduser userhome = pwd.getpwuid(os.getuid()).pw_dir 
keyerror: 'getpwuid(): uid not found: 1000'

I believe this problem is described here:
http://blog.dscpl.com.au/2015/12/unknown-user-when-running-docker.html

this simple fix make it work again

--
components: Library (Lib)
messages: 302172
nosy: cinerar
priority: normal
pull_requests: 3563
severity: normal
status: open
title: Running inside docker container from non-root user
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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3564

___
Python tracker 

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



[issue30809] IDLE parenmatch - highlighting options

2017-09-14 Thread Charles Wohlganger

Changes by Charles Wohlganger :


--
keywords: +patch
pull_requests: +3565
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



[issue30809] IDLE parenmatch - highlighting options

2017-09-14 Thread Charles Wohlganger

Changes by Charles Wohlganger :


--
pull_requests:  -2554

___
Python tracker 

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



[issue28411] Eliminate PyInterpreterState.modules.

2017-09-14 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +3566
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



[issue31462] Remove trailing whitespaces

2017-09-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I plan to backport the idlelib changes.  Do you prefer than I try to include 
other files (by using cherry-pick) or only do idlelib (probably much easier)?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue31469] Running inside docker container from non-root user

2017-09-14 Thread R. David Murray

R. David Murray added the comment:

It sounds like docker is just broken (I would expect unix tools to work in a 
docker container).  That however is beside the point.

I believe this is a duplicate of issue 10496, but I don't know why it hasn't 
been fixed.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue31469] Running inside docker container from non-root user

2017-09-14 Thread R. David Murray

Changes by R. David Murray :


--
superseder:  -> Python startup should not require passwd entry

___
Python tracker 

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



[issue31457] LoggerAdapter objects cannot be nested

2017-09-14 Thread Łukasz Langa

Łukasz Langa added the comment:


New changeset 1bbd482bcf6ea36bfe488f868810ffe110238ae1 by Łukasz Langa in 
branch 'master':
bpo-31457: Allow for nested LoggerAdapter objects (#3551)
https://github.com/python/cpython/commit/1bbd482bcf6ea36bfe488f868810ffe110238ae1


--

___
Python tracker 

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



[issue31457] LoggerAdapter objects cannot be nested

2017-09-14 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3567

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2017-09-14 Thread R. David Murray

R. David Murray added the comment:

Unless I'm mistaken, this has come up again in issue 31469.

--
nosy: +cinerar, r.david.murray

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 18e95b4176256f100429a806d0455406df98f984 by Victor Stinner in 
branch 'master':
bpo-31234: Join threads in tests (#3572)
https://github.com/python/cpython/commit/18e95b4176256f100429a806d0455406df98f984


--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 8dcf22f442320e4c1a5408e67b4c9002ad105f17 by Victor Stinner in 
branch 'master':
bpo-31234: Join threads in test_hashlib (#3573)
https://github.com/python/cpython/commit/8dcf22f442320e4c1a5408e67b4c9002ad105f17


--

___
Python tracker 

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



[issue31470] Py_Initialize documentation wrong

2017-09-14 Thread Jim Jewett

New submission from Jim Jewett:

Per 
https://docs.python.org/3/c-api/init.html#initializing-and-finalizing-the-interpreter
 Py_Initialize() "should be called before using any other Python/C API 
functions; with the exception of Py_SetProgramName(), Py_SetPythonHome() and 
Py_SetPath()."


(1)  I suspect that should be either Py_Initialize() or Py_InitializeEx().

(2)  Other functions can also be called first.  The ones I notice are:
(2a)  Py_IsInitialized() wouldn't be useful if you couldn't call it first.
(2b)  Py_SetStandardStreamEncoding explicitly says it *should* be called before 
Py_Initialize, if it is called at all.



(Probably applies to earlier python versions as well.)

--
assignee: docs@python
components: Documentation
messages: 302179
nosy: Jim.Jewett, docs@python
priority: normal
severity: normal
status: open
title: Py_Initialize documentation wrong
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



[issue31462] Remove trailing whitespaces

2017-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Usually we don't backport such kind of changes. And I afraid that 
cherry-picking would be with many conflicts, because many changes are in new 
code. The idlelib changes are more harmless, since they are in text files.

--

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Oren Milman

New submission from Oren Milman:

The following code causes an assertion failure on Windows:
class BadEnv(dict):
keys = None

import subprocess

import sys

subprocess.Popen([sys.executable, "-c", "pass"], env=BadEnv())


this is because getenvironment() (in Modules/_winapi.c) calls PyMapping_Values()
immediately after calling PyMapping_Keys().
calling PyMapping_Values() ultimately leads to calling _PyObject_FastCallDict(),
which does 'assert(!PyErr_Occurred());'.
thus, in case of an error in PyMapping_Keys(), the assertion fails.

--
components: Extension Modules
messages: 302181
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: assertion failure in subprocess.Popen() in case the env arg has a bad 
keys() method
type: crash
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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3568

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo, serhiy.storchaka

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> needs patch

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3569

___
Python tracker 

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



[issue31457] LoggerAdapter objects cannot be nested

2017-09-14 Thread Łukasz Langa

Łukasz Langa added the comment:


New changeset 20fa05d0223101b8e0005525b94a2eac892348de by Łukasz Langa (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31457: Allow for nested LoggerAdapter objects (GH-3551) (#3576)
https://github.com/python/cpython/commit/20fa05d0223101b8e0005525b94a2eac892348de


--

___
Python tracker 

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



[issue31454] Include "import as" in documentation

2017-09-14 Thread Steve Johnson

Steve Johnson added the comment:

In the 2.7 Tutorial, section 6, modules, where it describes the various syntax 
for using import. 

> On Sep 13, 2017, at 10:42 AM, R. David Murray  wrote:
> 
> 
> R. David Murray added the comment:
> 
> Where do you find that it is not documented that you would expect it to be?  
> Because 'import' 'as' is certainly documented.
> 
> --
> nosy: +r.david.murray
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue31454] Include "import as" in documentation

2017-09-14 Thread Steve Johnson

Steve Johnson added the comment:

My suggestion was to include this in the 2.7 tutorial, section 6 (modules) 
where the various syntax is described for import. Most of us don't dig into the 
reference until we are trying to find something specific. The tutorial is an 
excellent place to introduce useful but not obvious features of the language.

> On Sep 13, 2017, at 12:15 PM, Mariatta Wijaya  wrote:
> 
> 
> Mariatta Wijaya added the comment:
> 
> import as is documented, so I'm closing this unless you have other concerns.
> 
> Python 3 docs: https://docs.python.org/3/reference/simple_stmts.html#import
> ```
> If the module name is followed by as, then the name following as is bound 
> directly to the imported module
> ```
> 
> Wording is somewhat different in Python 2.7 docs, but it's there: 
> https://docs.python.org/2.7/reference/simple_stmts.html#the-import-statement
> 
> Thanks.
> 
> --
> nosy: +Mariatta
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue31472] "Emulating callable objects" documentation misleading

2017-09-14 Thread Nathan Marrow

New submission from Nathan Marrow:

The documentation for emulating callable objects with __call__ seems to imply 
only positional arguments are supported. For instance, it says __call__ is 
"object.__call__(self[, args…])" and describes:

Called when the instance is “called” as a function; if this method is defined, 
x(arg1, arg2, ...) is a shorthand for x.__call__(arg1, arg2, ...).

When it should be something like (Not sure exactly what the syntax would be 
here):
"object.__call__(self[, args…] [,**kwargs...])"

Called when the instance is “called” as a function; if this method is defined, 
x(arg1, arg2, ..., arg3=arg3) is a shorthand for x.__call__(arg1, arg2, ..., 
arg3=arg3).

--
assignee: docs@python
components: Documentation
messages: 302185
nosy: docs@python, nmarrow
priority: normal
severity: normal
status: open
title: "Emulating callable objects" documentation misleading
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-14 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Yuri, it looks like a serious bug.

I expected `success_coro(5)` cancelling but see print out.

--
components: +Library (Lib)
stage:  -> needs patch
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



[issue31473] PyMem_Raw* API in debug mode are not thread safe

2017-09-14 Thread Xiang Zhang

New submission from Xiang Zhang:

PyMem_Raw* APIs should be thread safe. But in debug mode, they are not that 
simple and increment a global variable *serialno* and the incrementing action 
is not thread safe.

--
components: Interpreter Core
messages: 302187
nosy: haypo, xiang.zhang
priority: normal
severity: normal
stage: needs patch
status: open
title: PyMem_Raw* API in debug mode are not thread safe
type: behavior
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



[issue31474] [2.7] Fix -Wnonnull and -Wint-in-bool-context warnings

2017-09-14 Thread Christian Heimes

New submission from Christian Heimes:

GCC 7.1 shows a bunch onf warnings related to -Wnonnull and 
-Wint-in-bool-context when compiling Python 2.7:

In file included from Include/Python.h:78:0,
 from Objects/listobject.c:3:
Objects/listobject.c: In function ‘list_resize’:
Include/pymem.h:110:34: warning: ‘*’ in boolean context, suggest ‘&&’ instead 
[-Wint-in-bool-context]
  (type *) PyMem_REALLOC((p), (n) * sizeof(type)) )
  ^
Include/pymem.h:77:21: note: in definition of macro ‘PyMem_REALLOC’
 : realloc((p), (n) ? (n) : 1))
 ^
Objects/listobject.c:62:9: note: in expansion of macro ‘PyMem_RESIZE’
 PyMem_RESIZE(items, PyObject *, new_allocated);
 ^~~~


In file included from Python/formatter_string.c:17:0:
Python/../Objects/stringlib/formatter.h: In function ‘format_float_internal’:
Python/../Objects/stringlib/formatter.h:576:9: warning: argument 2 null where 
non-null expected [-Wnonnull]
 memmove(buf,
 ^~~~
 prefix,
 ~~~
 spec->n_prefix * sizeof(STRINGLIB_CHAR));
 
In file included from Include/Python.h:38:0,
 from Python/formatter_string.c:6:
/usr/include/string.h:47:14: note: in a call to function ‘memmove’ declared here
 extern void *memmove (void *__dest, const void *__src, size_t __n)

--
assignee: christian.heimes
components: Build
messages: 302188
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: [2.7] Fix  -Wnonnull and -Wint-in-bool-context warnings
type: compile error
versions: Python 3.3

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Oren Milman

Changes by Oren Milman :


--
keywords: +patch
pull_requests: +3570
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



[issue31474] [2.7] Fix -Wnonnull and -Wint-in-bool-context warnings

2017-09-14 Thread Christian Heimes

Changes by Christian Heimes :


--
keywords: +patch
pull_requests: +3571
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



[issue31474] [2.7] Fix -Wnonnull and -Wint-in-bool-context warnings

2017-09-14 Thread Christian Heimes

Changes by Christian Heimes :


--
versions: +Python 2.7 -Python 3.3

___
Python tracker 

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



[issue31454] Include "import as" in tutorial

2017-09-14 Thread R. David Murray

R. David Murray added the comment:

I agree that it would seem reasonable to add this to section 6.1 of the 
tutorial, since it mentions both import statement variants and the modules 
"global symbol table", which are the two concepts involved in import as.

Would you like to propose a PR?

--
resolution: not a bug -> 
stage: resolved -> needs patch
status: closed -> open
title: Include "import as" in documentation -> Include "import as" in tutorial

___
Python tracker 

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



[issue31454] Include "import as" in tutorial

2017-09-14 Thread R. David Murray

Changes by R. David Murray :


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



[issue31475] Bug in argparse - not supporting utf8

2017-09-14 Thread Ali Razmjoo

New submission from Ali Razmjoo:

Regarding #3468 discussion, there is the same bug was in argparse (and 
optparse) which fixed in this PR. utf8 is not supported in argprase module

#3478: https://github.com/python/cpython/pull/3577
current pr: https://github.com/python/cpython/pull/3577

Regards.

--
messages: 302190
nosy: Ali Razmjoo
priority: normal
pull_requests: 3572
severity: normal
status: open
title: Bug in argparse - not supporting utf8
type: compile error

___
Python tracker 

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



[issue31475] Bug in argparse - not supporting utf8

2017-09-14 Thread R. David Murray

R. David Murray added the comment:

As I requested in the PR, please provide a way to reproduce the bug you are 
reporting.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue31457] LoggerAdapter objects cannot be nested

2017-09-14 Thread Łukasz Langa

Changes by Łukasz Langa :


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



[issue31475] Bug in argparse - not supporting utf8

2017-09-14 Thread R. David Murray

R. David Murray added the comment:

Note that as far as I know without a reproducer, it is confusing to me to talk 
about argparse supporting or not supporting utf8.  It deals only with text 
strings, which are unicode.  Or is this a 2.7 only bug report?  (Although even 
there it would be a question of unicode support, not utf8).

--

___
Python tracker 

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



[issue28556] typing.py upgrades

2017-09-14 Thread Łukasz Langa

Changes by Łukasz Langa :


--
pull_requests: +3573

___
Python tracker 

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



[issue28411] Eliminate PyInterpreterState.modules.

2017-09-14 Thread Eric Snow

Eric Snow added the comment:


New changeset d393c1b227f22fb9af66040b2b367c99a4d1fa9a by Eric Snow in branch 
'master':
bpo-28411: Isolate PyInterpreterState.modules (#3575)
https://github.com/python/cpython/commit/d393c1b227f22fb9af66040b2b367c99a4d1fa9a


--

___
Python tracker 

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



[issue31438] IDLE 3 crashes and quits when caret character typed

2017-09-14 Thread ALPER PAKSOY

ALPER PAKSOY added the comment:

Problem has been solved after installation of ActiveTcl 8.5.18.0 from 
ActiveState's web site as per Terry’s recommendations and, then, reinstallation 
of Python 3.6.2 package from python.org. However, there were many (mis)steps 
per my ignorance and laziness in between. Thank you very much for all the help!

Noteworthy case notes:

1. The previously installed IDLE 3.6.2 as part of the Python 3.6.2 package 
continued crashing whenever I entered the caret character after the 
installation of ActiveTcl 8.5.18.0. I noticed that the IDLE’s Tk version showed 
8.5.9 even after I installed, as recommended, ActiveTcl 8.5.18.0, and rebooted 
my computer. Note that the “info patchlevel” script I executed within tclsh had 
started returning “8.5.18” instead of “8.5.9” after the installation of 
ActiveTcl 8.5.18.0.

2. I could not find a way to make the existing Python / IDLE 3.6.2 installation 
recognise ActiveTcl 8.5.18.0 as the IDLE’s Tk version kept showing 8.5.9. 
Therefore, I  reinstalled the Python 3.6.2 package downloaded from python.org. 
The package made the installation to a new location rather than overwriting the 
existing Python / IDLE 3.6.2 files.

3. The newly installed IDLE 3.6.2 has been working fine without showing any 
signs of instability. There are no crashes when I type the caret character. Its 
Tk version shows 8.5.18 along with the tclsh interpreter. 

4. I removed all the files associated with the “buggy” Python / IDLE 3.6.2 
installation via the terminal window in order to prevent any future confusion 
between the old and new installations.

5. Though I installed ActiveTcl 8.6.6.8606 from ActiveState’s web site in my 
earlier trials, I don’t think I was able to fully test whether this latest Tcl 
really works with Python / IDLE 3.6.2 or not. After installing ActiveTcl 
8.6.6.8606, the “info patchlevel” I executed within tchlsh started returning 
“8.6.6” but the (old) IDLE 3.6.2’s Tk version still showed 8.5.9. I, then, 
installed ActiveTcl 8.5.18.0 after uninstalling ActiveTcl 8.6.6.8606 as a 
precaution. It  occurred to me that I may need to reinstall the Python 3.6.2 
package from python.org only after installing the ActiveTcl 8.5.18.0.

--
assignee:  -> terry.reedy
components: +IDLE -Tkinter, macOS
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



[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-14 Thread Yury Selivanov

Yury Selivanov added the comment:

Andrew, looks like it.  You can take a look if you want (I don't have time to 
work on this right now).

--

___
Python tracker 

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



[issue28556] typing.py upgrades

2017-09-14 Thread Łukasz Langa

Łukasz Langa added the comment:


New changeset f350a268a7071ce7d7a5bb86a9b1229782d4963b by Łukasz Langa in 
branch 'master':
bpo-28556: typing.get_type_hints: better globalns for classes and modules 
(#3582)
https://github.com/python/cpython/commit/f350a268a7071ce7d7a5bb86a9b1229782d4963b


--

___
Python tracker 

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



[issue28556] typing.py upgrades

2017-09-14 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3574

___
Python tracker 

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



[issue30096] Update examples in abc documentation to use abc.ABC

2017-09-14 Thread Éric Araujo

Éric Araujo added the comment:

> "Best practices" according to whom?

Well at least two senior core developers :)  See the rationale in #16049 when 
abc.ABC was first added (with Guido approving that inheritance is nicer for 
most people).

--

___
Python tracker 

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



[issue31454] Include "import as" in tutorial

2017-09-14 Thread Steve Johnson

Steve Johnson added the comment:

I don't know what a PR is, so I'll let you guys handle it if it is OK with you.

> On Sep 14, 2017, at 11:47 AM, R. David Murray  wrote:
> 
> 
> R. David Murray added the comment:
> 
> I agree that it would seem reasonable to add this to section 6.1 of the 
> tutorial, since it mentions both import statement variants and the modules 
> "global symbol table", which are the two concepts involved in import as.
> 
> Would you like to propose a PR?
> 
> --
> resolution: not a bug -> 
> stage: resolved -> needs patch
> status: closed -> open
> title: Include "import as" in documentation -> Include "import as" in tutorial
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 0b3a87ef54a0112b74e8a1d8c6f87d10db4239ab by Serhiy Storchaka 
(Oren Milman) in branch 'master':
bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in case env 
has a bad keys() method. (#3580)
https://github.com/python/cpython/commit/0b3a87ef54a0112b74e8a1d8c6f87d10db4239ab


--

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3575

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Is this bug reproducible in 2.7?

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



[issue31476] "Open Module..." Not Working in IDLE for Standard Library

2017-09-14 Thread Stephen Paul Chappell

New submission from Stephen Paul Chappell:

Ever since Python 3.6.1, trying to open a Python-source library module in IDLE 
on Windows (10) has not worked properly since the installer has only been 
providing *.pyc files. Learning how to use Python has always been easy since it 
(1) has a great help document, (2) makes it easy to get help() on objects, and 
(3) allows the source to easily be explored and/or patched. Is there something 
special that needs to be done to get both the standard library's *.py files and 
precompile them to *.pyc during installation?

I would be glad to run further tests if the Windows installer can be run 
headless with specific command-line arguments.

--
assignee: terry.reedy
components: IDLE, Library (Lib), Windows
messages: 302201
nosy: Zero, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: "Open Module..." Not Working in IDLE for Standard Library
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



[issue31454] Include "import as" in tutorial

2017-09-14 Thread R. David Murray

R. David Murray added the comment:

Well, this is all volunteer work.  Maybe someone else will feel like doing it :)

--

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset f135f62cfd1529cbb9326e53728a22afd05b6bc3 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in 
case env has a bad keys() method. (GH-3580) (#3584)
https://github.com/python/cpython/commit/f135f62cfd1529cbb9326e53728a22afd05b6bc3


--

___
Python tracker 

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



[issue31455] ElementTree.XMLParser() mishandles exceptions

2017-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c8d8e15bfc24abeeaaf3d8be9073276b0c011cdf by Serhiy Storchaka 
(scoder) in branch 'master':
bpo-31455: Fix an assertion failure in ElementTree.XMLParser(). (#3545)
https://github.com/python/cpython/commit/c8d8e15bfc24abeeaaf3d8be9073276b0c011cdf


--

___
Python tracker 

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



[issue31455] ElementTree.XMLParser() mishandles exceptions

2017-09-14 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3576

___
Python tracker 

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



[issue31477] IDLE 'strip trailing whitespace' changes the value of multiline strings

2017-09-14 Thread Dan Snider

New submission from Dan Snider:

This function is supposed to be purely cosmetic. It just cleans up the junk 
whitespace commonly left behind when coding. But it could cause a problem when 
someone expects some string they defined to stay the same value, and then use 
that function and all of a sudden they have a crazy bug that you wouldn't even 
know how to find.

--
assignee: terry.reedy
components: IDLE
messages: 302204
nosy: bup, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE 'strip trailing whitespace' changes the value of multiline strings
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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:


New changeset ff40ecda73178dfcad24e26240d684356ef20793 by Victor Stinner in 
branch 'master':
bpo-31234: Add test.support.wait_threads_exit() (#3578)
https://github.com/python/cpython/commit/ff40ecda73178dfcad24e26240d684356ef20793


--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b8c7be2c523b012e57915182543d06657161057f by Victor Stinner in 
branch 'master':
bpo-31234: Join threads in test_threading (#3579)
https://github.com/python/cpython/commit/b8c7be2c523b012e57915182543d06657161057f


--

___
Python tracker 

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



[issue11874] argparse assertion failure with brackets in metavars

2017-09-14 Thread wim glenn

Changes by wim glenn :


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



[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-14 Thread Oren Milman

New submission from Oren Milman:

The following code causes an assertion failure:
class BadInt(int):
def __abs__(self):
return None

import random

random.seed(BadInt())


this is because random_seed() (in Modules/_randommodule.c) assumes that
PyNumber_Absolute() returned an int, and so it passes it to _PyLong_NumBits(),
which asserts it received an int.


what should we do in such a case?
should we raise an exception? (the docs don't mention abs() in case the seed is
an int - https://docs.python.org/3.7/library/random.html#random.seed)

--
components: Extension Modules
messages: 302208
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: assertion failure in random.seed() in case the seed argument has a bad 
__abs__() method
type: crash
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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3577

___
Python tracker 

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



[issue28556] typing.py upgrades

2017-09-14 Thread Łukasz Langa

Łukasz Langa added the comment:


New changeset 1658ec07577ef9696cea76fcf7fac2da18403ec5 by Łukasz Langa (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-28556: typing.get_type_hints: better globalns for classes and modules 
(GH-3582) (#3583)
https://github.com/python/cpython/commit/1658ec07577ef9696cea76fcf7fac2da18403ec5


--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 167cbde50a88ec2a7d26b2cb9891d5e32bdfbfb5 by Victor Stinner in 
branch 'master':
bpo-31234: Join threads in test_queue (#3586)
https://github.com/python/cpython/commit/167cbde50a88ec2a7d26b2cb9891d5e32bdfbfb5


--

___
Python tracker 

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



[issue31465] Allow _PyType_Lookup() to raise exceptions

2017-09-14 Thread Stefan Behnel

Stefan Behnel added the comment:

I'm working on a PR for this, but after changing all usages and fixing up some 
error handling here and there, it results in an interpreter crash for me. I'll 
try to debug it during the next days.

--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3578

___
Python tracker 

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



[issue30758] test_pydoc hangs sometimes on 3.6 and master branches on ARMv7 Ubuntu 3.6/3.x

2017-09-14 Thread STINNER Victor

STINNER Victor added the comment:

Python 3.6 is impacted as well on the same buildbot slave, ARMv7 Ubuntu 3.6:

http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.6/builds/736/steps/test/logs/stdio

--
title: test_pydoc hangs sometimes on 3.6 and master branches on ARMv7 Ubuntu 
3.x -> test_pydoc hangs sometimes on 3.6 and master branches on ARMv7 Ubuntu 
3.6/3.x

___
Python tracker 

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



[issue31479] Always reset the signal alarm on unit tests

2017-09-14 Thread STINNER Victor

New submission from STINNER Victor:

While fixing bpo-17085 on Python 2.7 (test_socket: cancel scheduled alarm on 
test failure), I noticed that not all unit tests currently always reset the 
signal alarm.

I propose to always use the pattern "try/finally: signal.alarm(0)" to make sure 
that a test doesn't "leak" a pending fatal signal alarm.

Attached PR fixes the issue.

I don't think that it's worth it to backport the fix, since it only impacts 
tests which fail, interrupted manually by CTRL+c or other corner cases.

--
components: Tests
messages: 302213
nosy: haypo
priority: normal
severity: normal
status: open
title: Always reset the signal alarm on unit tests
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



[issue31479] Always reset the signal alarm on unit tests

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31479] Always reset the signal alarm in tets

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Always reset the signal alarm on unit tests -> Always reset the signal 
alarm in tets

___
Python tracker 

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



[issue31479] Always reset the signal alarm on unit tests

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue31479] Always reset the signal alarm in tests

2017-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Always reset the signal alarm in tets -> Always reset the signal alarm 
in tests

___
Python tracker 

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



  1   2   >