[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your contribution Osvaldo.

--
resolution:  -> fixed
stage: backport needed -> 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



[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 1a3bc5546aa27f01426ad76618a9b2c3b698ae68 by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-30441: Fix bug when modifying os.environ while iterating over it 
(GH-2409). (#2557)
https://github.com/python/cpython/commit/1a3bc5546aa27f01426ad76618a9b2c3b698ae68


--

___
Python tracker 

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



[issue25497] Rewrite test_robotparser

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2627

___
Python tracker 

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



[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset bebd2cfa5f21811dd0ee4f3b1a1b85d379b83436 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-30441: Fix bug when modifying os.environ while iterating over it 
(GH-2409). (#2556)
https://github.com/python/cpython/commit/bebd2cfa5f21811dd0ee4f3b1a1b85d379b83436


--

___
Python tracker 

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



[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-07-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2626

___
Python tracker 

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



[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-07-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2625

___
Python tracker 

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



[issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two

2017-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since nobody has provided a patch I have made it myself.

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



[issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two

2017-07-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2624

___
Python tracker 

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



[issue30790] Can't use proxy to connect internet on windows

2017-07-03 Thread Wu Zongyong

Changes by Wu Zongyong :


--
pull_requests: +2623

___
Python tracker 

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



[issue6691] Support for nested classes and function for pyclbr

2017-07-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Test_pyclbr could improve.  There are notes on the PR for a new issue for that. 
 If I find that further change is needed after applying to IDLE's module 
browser, #1612262, that will be another new issue.

--
resolution:  -> fixed
stage: test needed -> 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



[issue6691] Support for nested classes and function for pyclbr

2017-07-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 246ff3bd00f97658e567a7087645a6b76e056491 by terryjreedy 
(csabella) in branch 'master':
bpo-6691: Pyclbr now reports nested classes and functions. (#2503)
https://github.com/python/cpython/commit/246ff3bd00f97658e567a7087645a6b76e056491


--

___
Python tracker 

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



[issue16328] win_add2path.py sets wrong user path

2017-07-03 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue12910] urrlib.quote quotes too many chars, e.g., '()'

2017-07-03 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Issue 16285 updated the urllib.parse.quote() reserved list to add '~'.

>From the docstring:
def quote(string, safe='/', encoding=None, errors=None):
"""quote('abc def') -> 'abc%20def'

Each part of a URL, e.g. the path info, the query, etc., has a
different set of reserved characters that must be quoted.

RFC 3986 Uniform Resource Identifiers (URI): Generic Syntax lists
the following reserved characters.

reserved= ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
  "$" | "," | "~"

Each of these characters is reserved in some component of a URL,
but not necessarily in all of them.

Python 3.7 updates from using RFC 2396 to RFC 3986 to quote URL strings.
Now, "~" is included in the set of reserved characters.


However, looking at RFC3986 (https://tools.ietf.org/html/rfc3986), appendix A 
has the following:

   unreserved= ALPHA / DIGIT / "-" / "." / "_" / "~"
   reserved  = gen-delims / sub-delims
   gen-delims= ":" / "/" / "?" / "#" / "[" / "]" / "@"
   sub-delims= "!" / "$" / "&" / "'" / "(" / ")"
 / "*" / "+" / "," / ";" / "="


Should the missing ones be added or should this issue be closed if they aren't 
going to be added?

Thanks.

--
nosy: +csabella

___
Python tracker 

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



[issue16328] win_add2path.py sets wrong user path

2017-07-03 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Any interest in making a PR for this patch?

--
nosy: +csabella

___
Python tracker 

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



[issue20692] Tutorial and FAQ: how to call a method on an int

2017-07-03 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Sreepriya Chalakkal,

Would you be able to prepare a pull request on GitHub for your patch?


Thanks!

--
nosy: +csabella

___
Python tracker 

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



[issue20692] Tutorial and FAQ: how to call a method on an int

2017-07-03 Thread Jakub Stasiak

Changes by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

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



[issue30843] [2.7] Lib/test/site.py conflicts with Lib/site.py when running tests

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Lib/test/site.py conflicts with Lib/site.py when running tests -> [2.7] 
Lib/test/site.py conflicts with Lib/site.py when running tests

___
Python tracker 

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



[issue30843] Lib/test/site.py conflicts with Lib/site.py when running tests

2017-07-03 Thread STINNER Victor

New submission from STINNER Victor:

I added Lib/test/bisect.py in the commit 
d7955b8196578306e9d86f6c61c9cb3ee72edab0, bpo-29512.

When a test is loaded by Lib/test/regrtest.py when regrtest.py runs with 
"python -m test", test files like Lib/test/test_bisect.py are created with 
__package__ = ['test']. In this case, "import bisect" loads Lib/test/bisect.py 
rather than Lib/bisect.py. For test_bisect.py, I worked around the issue using 
"from __future__ import absolute_import".

But then I saw this bug:

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

Run tests in parallel using 2 child processes
(...)
0:02:41 [144/403/1] test_multiprocessing failed
test test_multiprocessing failed -- Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/test_multiprocessing.py",
 line 1669, in test_connection
self.assertEqual(poll(TIMEOUT1), True)
AssertionError: False != True
(...)
Re-running test 'test_multiprocessing' in verbose mode
(...)
==
ERROR: test_array (test.test_multiprocessing.WithProcessesTestArray)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/test_multiprocessing.py",
 line 1027, in test_array
arr = self.Array('i', seq)
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/__init__.py",
 line 260, in Array
return Array(typecode_or_type, size_or_initializer, **kwds)
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/sharedctypes.py",
 line 120, in Array
obj = RawArray(typecode_or_type, size_or_initializer)
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/sharedctypes.py",
 line 93, in RawArray
result = _new_value(type_)
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/sharedctypes.py",
 line 68, in _new_value
wrapper = heap.BufferWrapper(size)
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/heap.py",
 line 243, in __init__
block = BufferWrapper._heap.malloc(size)
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/heap.py",
 line 223, in malloc
(arena, start, stop) = self._malloc(size)
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/heap.py",
 line 115, in _malloc
i = bisect.bisect_left(self._lengths, size)
AttributeError: 'module' object has no attribute 'bisect_left'


The wrong bisect module was picked when test_multiprocessing was run for the 
second time.

The first run was done in a slave process. The second run was done in the main 
regrtest process.

--
components: Tests
messages: 297618
nosy: haypo
priority: normal
severity: normal
status: open
title: Lib/test/site.py conflicts with Lib/site.py when running tests
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



[issue30842] pyenv activate for bash and tcsh

2017-07-03 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

@Antoine: Another example of performance issue caused by rounding ;-)

See also my article on pytime and timestamp rounding, 
https://haypo.github.io/pytime.html

--

___
Python tracker 

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



[issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

On Python 3, time.sleep(seconds) rounds seconds towards +Infinity: see 
bpo-22117, commot cb29f0177c91ebb739b89d8cc4ba223785c94d61. time.sleep(0.0001) 
sleeps 15.6 ms on Windows.

On Python 2.7, time.sleep(seconds) rounds towards zero. time.sleep(0.0001) 
sleeps 0 ms on Windows, and so the  collect_in_thread() thread calls 
gc.collect() in a sleep.

--

___
Python tracker 

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



[issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2622

___
Python tracker 

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



[issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

The problem are the 3 tests of test_weakref which uses collect_in_thread():

* test_threaded_weak_valued_setdefault(): 50k iterations
* test_threaded_weak_valued_pop(): 50k iterations
* test_threaded_weak_valued_consistency(): 200k iterations

On my Linux with Python 2.7 compiled in debug mode, the two first tests take 1 
second, but the last test takes 10 seconds.

--

___
Python tracker 

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



[issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Another example (I checked, all tests are run except of test_weakref):

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%202.7/builds/148/steps/test/logs/stdio

...
0:05:30 [400/403] test_file_eintr passed
0:05:30 [401/403] test_glob passed
0:05:54 [402/403] test_mmap passed (41 sec)

command timed out: 1200 seconds without output, attempting to kill
program finished with exit code 1
elapsedTime=1556.477000

--
components: +Tests
nosy: +haypo, pitrou
title: test_weakref hangs on AppVeyor (2.7) -> [2.7] test_weakref hangs on 
Python 2.7 on Windows

___
Python tracker 

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



[issue30838] re \w does not match some valid Unicode characters

2017-07-03 Thread Matthew Barnett

Matthew Barnett added the comment:

In Unicode 9.0.0, U+1885 and U+1886 changed from being 
General_Category=Other_Letter (Lo) to General_Category=Nonspacing_Mark (Mn).

U+2118 is General_Category=Math_Symbol (Sm) and U+212E is 
General_Category=Other_Symbol (So).

\w doesn't include Mn, Sm or So.

The .identifier method uses the Unicode properties XID_Start and XID_Continue, 
which include these codepoints.

--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

I would prefer to make test_datetime faster in master before backporting.

--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-03 Thread Utkarsh Upadhyay

Changes by Utkarsh Upadhyay :


--
pull_requests: +2621

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-03 Thread Utkarsh Upadhyay

Changes by Utkarsh Upadhyay :


--
pull_requests: +2620

___
Python tracker 

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



[issue30842] pyenv activate for bash and tcsh

2017-07-03 Thread Arnon Sela

New submission from Arnon Sela:

Remove hard coded path in activate family of virtualenv scripts.

Currently, VIRTUAL_ENV is set hard coded.  Event after --relocatable

Instead, change to have is defined dynamically:

E.g. bash:

called=$_
[[ $called != $0 ]] && fullpath="${BASH_SOURCE[@]}" || fullpath=$0
fullpath=$(readlink -f $fullpath)
VIRTUAL_ENV=$(dirname $(dirname $fullpath))

E.g. tcsh:

set sourced=($_)
if ("$sourced" != "") then
set fullpath="$sourced[2]"
endif
if ("$0" != "tcsh") then
set fullpath="$0"
endif
set fullpath=`readlink -f $fullpath`
set binpath=`dirname $fullpath`
setenv VIRTUAL_ENV `dirname $binpath`

--
messages: 297611
nosy: PyAcrisel
priority: normal
severity: normal
status: open
title: pyenv activate for bash and tcsh
type: enhancement
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



[issue26251] Use "Low-fragmentation Heap" memory allocator on Windows

2017-07-03 Thread Steve Dower

Steve Dower added the comment:

I wouldn't be opposed to seeing it tried again, but I have no strong opinion. I 
don't think this is a major performance bottleneck right now.

--

___
Python tracker 

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



[issue30841] A shadowing variable naming emitted for Python-ast.c

2017-07-03 Thread Yuan Chao Chou

Changes by Yuan Chao Chou :


--
pull_requests: +2619

___
Python tracker 

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



[issue30841] A shadowing variable naming emitted for Python-ast.c

2017-07-03 Thread Yuan Chao Chou

Changes by Yuan Chao Chou :


--
pull_requests: +2618

___
Python tracker 

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



[issue30841] A shadowing variable naming emitted for Python-ast.c

2017-07-03 Thread Yuan Chao Chou

Changes by Yuan Chao Chou :


--
pull_requests: +2617

___
Python tracker 

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



[issue30841] A shadowing variable naming emitted for Python-ast.c

2017-07-03 Thread Yuan Chao Chou

New submission from Yuan Chao Chou:

When Parser/asdl_c.py is composing the content of Python/Python-ast.c, it uses 
"value" to name the variables in inner blocks, which can shadow the variables 
named the same in outer blocks. It would be a good practice to avoid the 
shadowing naming to prevent the variables from being misused.

--
components: Interpreter Core
messages: 297609
nosy: OswinC
priority: normal
severity: normal
status: open
title: A shadowing variable naming emitted for Python-ast.c
type: compile error
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



[issue30840] Contrary to documentation, relative imports cannot pass through the top level

2017-07-03 Thread Malcolm Smith

New submission from Malcolm Smith:

https://docs.python.org/3/reference/simple_stmts.html#the-import-statement 
defers the full specification of relative imports to PEP 328. PEP 328 gives the 
example "from ...sys import path" in a second-level package, and notes "while 
that last case is legal, it is certainly discouraged".

However, in the current implementation it actually isn't legal. Using a stdlib 
second-level package to test:

Python 3.5.3 (default, Apr 10 2017, 07:53:16)  [GCC 6.3.0 64 bit (AMD64)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.dom
>>> __package__ = "xml.dom"
>>> from . import minidom  # Works fine
>>> from ...sys import path
Traceback (most recent call last):
  File "", line 1, in 
ValueError: attempted relative import beyond top-level package

Either the documentation or the implementation should be fixed.

--
components: Interpreter Core
messages: 297608
nosy: Malcolm Smith
priority: normal
severity: normal
status: open
title: Contrary to documentation, relative imports cannot pass through the top 
level
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



[issue30837] Mac OS High Sierra Beta - Python Crash

2017-07-03 Thread Ned Deily

Ned Deily added the comment:

Sorry, without more information, there is not much we can do about this.  Can 
you supply a reproducible test case?  In any case, the crash is from use of the 
Apple-supplied system Python 2.7.10 which is a few releases behind the most 
recent released upstream (2.7.13).  And it is running on pre-release public 
beta.  You should report the problem to Apple using their Feedback Assistant.

All that said, the crash trace does show the Python helper extension module 
_scproxy in the chain and _scproxy has been problematic in the past: it is used 
to get network proxy information from the System Configuration framework. 
Previous crashes seemed to be due to lack of thread-safety in Apple's 
libdispatch, see for bpo-30385, but that doesn't seem to be the case here.  
Things may work differently under the covers in High Sierra.  If you are able 
to reliably reproduce the problem, it would be interesting to see if the 
workaround in http://bugs.python.org/issue30385#msg293958 helps.

--

___
Python tracker 

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



[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 6969eaf4682beb01bc95eeb14f5ce6c01312e297 by Serhiy Storchaka in 
branch 'master':
bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)
https://github.com/python/cpython/commit/6969eaf4682beb01bc95eeb14f5ce6c01312e297


--

___
Python tracker 

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



[issue30839] Larger and/or configurable _MAX_LENGTH for unittest messages

2017-07-03 Thread Maarten ter Huurne

New submission from Maarten ter Huurne:

In a unit test for one of my projects I am comparing tree-structured objects 
using assertEqual(). Because there can be a few nested levels, the repr() 
string can exceed the _MAX_LENGTH which is just 80 characters. Not by much, but 
enough to get shortened and therefore requiring extra effort to figure out 
where the difference is.

I think it is useful to shorten the messages at some point, to avoid 
accidentally spamming the log with pages of output that no-one is going to 
read. However, 80 characters is a length that someone debugging a failing test 
case can easily deal with. So I think the limit could be set an order of 
magnitude larger.

Making the maximum length configurable would also solve the issue, but still it 
would be good to increase the default maximum then, in my opinion.

The discussion of #27432 mentions _MAX_LENGTH customization, but that issue is 
not primarily about _MAX_LENGTH.

--
components: Library (Lib)
messages: 297605
nosy: maarten-treewalker
priority: normal
severity: normal
status: open
title: Larger and/or configurable _MAX_LENGTH for unittest messages
type: enhancement
versions: Python 3.4

___
Python tracker 

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



[issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser

2017-07-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2616

___
Python tracker 

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



[issue30838] re \w does not match some valid Unicode characters

2017-07-03 Thread David Lord

David Lord added the comment:

Adding `or ('a' + s).isidentifer()`, to catch valid id_continue characters, to 
the test in the previous script reveals many more characters that seem like 
valid word characters but aren't matched by `\w`.

--

___
Python tracker 

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



[issue30838] re \w does not match some valid Unicode characters

2017-07-03 Thread ThiefMaster

Changes by ThiefMaster :


--
nosy: +ThiefMaster

___
Python tracker 

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



[issue30838] re \w does not match some valid Unicode characters

2017-07-03 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



[issue30838] re \w does not match some valid Unicode characters

2017-07-03 Thread David Lord

New submission from David Lord:

This came up while writing a regex to match characters that are valid in Python 
identifiers for Jinja. https://github.com/pallets/jinja/pull/731 `\w` matches 
all valid identifier characters except for 4 special cases:

import unicodedata
import re
import sys

cre = re.compile(r'\w')

for cp in range(sys.maxunicode + 1):
s = chr(cp)

if s.isidentifier() and not cre.match(s):
print(hex(cp), unicodedata.name(s))

0x1885 MONGOLIAN LETTER ALI GALI BALUDA
0x1886 MONGOLIAN LETTER ALI GALI THREE BALUDA
0x2118 SCRIPT CAPITAL P
0x212e ESTIMATED SYMBOL

Python < 3.6 matches the two Mongolian characters, not sure why 3.6 stopped 
matching them.

For our case, we just added them to a character set, 
`[\w\u1885\u1886\u2118\u212e]`.

It can cause unexpected behavior when using `\b`, since that's defined as the 
transition from `\w` to `\W` and those 4 characters aren't in `\w`. 
`re.match(r'\b[\w\u212e', '℮')` fails to match.

--
components: Regular Expressions, Unicode
messages: 297603
nosy: davidism, ezio.melotti, haypo, mrabarnett
priority: normal
severity: normal
status: open
title: re \w does not match some valid Unicode characters
type: behavior
versions: 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



[issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

For Lib/test/test_robotparser.py: with the current design of the test file, 
it's not easy to fix. I tried a different approach: copy the file from the 
match branch and adapt it for Python 2.7.

See https://github.com/python/cpython/pull/2546

--

___
Python tracker 

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



[issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2615

___
Python tracker 

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



[issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2614

___
Python tracker 

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



[issue30758] regrtest hangs sometimes on the master branch (test_pydoc? test_subprocess?)

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

I have no idea for the test_pydoc bug, but it was only seen once. I close the 
issue, but I may reopen it if I see again these bugs.

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



[issue30758] regrtest hangs sometimes on the master branch (test_pydoc? test_subprocess?)

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Maybe the commit cdee3f14f7f4c995e7eedb0bf6a67e260c739f7d fixed test_subprocess 
on the x86 Windows7 3.x buildbot.

--

___
Python tracker 

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



[issue30837] Mac OS High Sierra Beta - Python Crash

2017-07-03 Thread Joshua

New submission from Joshua:

Process:   Python [13106]
Path:  
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier:Python
Version:   2.7.10 (2.7.10)
Code Type: X86-64 (Native)
Parent Process:Python [13070]
Responsible:   Python [13106]
User ID:   501

Date/Time: 2017-07-03 10:28:23.591 -0400
OS Version:Mac OS X 10.13 (17A291m)
Report Version:12
Anonymous UUID:C76645A8-C44A-EAB5-D937-2BD69A20A0A9


Time Awake Since Boot: 18000 seconds

System Integrity Protection: enabled

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_CRASH (SIGABRT)
Exception Codes:   0x, 0x
Exception Note:EXC_CORPSE_NOTIFY

Termination Reason:Namespace OBJC, Code 0x1

Application Specific Information:
crashed on child side of fork pre-exec
objc[13106]: +[__NSPlaceholderDate initialize] may have been in progress in 
another thread when fork() was called.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib  0x7fffbded33d6 __abort_with_payload 
+ 10
1   libsystem_kernel.dylib  0x7fffbdecdf71 
abort_with_payload_wrapper_internal + 89
2   libsystem_kernel.dylib  0x7fffbdecdf18 abort_with_reason + 
22
3   libobjc.A.dylib 0x7fffbd1a99f2 
_objc_fatalv(unsigned long long, unsigned long long, char const*, 
__va_list_tag*) + 108
4   libobjc.A.dylib 0x7fffbd1a98a4 _objc_fatal(char 
const*, ...) + 135
5   libobjc.A.dylib 0x7fffbd1aa4cb 
performForkChildInitialize(objc_class*, objc_class*) + 341
6   libobjc.A.dylib 0x7fffbd19ae8f lookUpImpOrForward + 
228
7   libobjc.A.dylib 0x7fffbd19a914 
_objc_msgSend_uncached + 68
8   com.apple.CoreFoundation0x7fff96aa2a92 CFDateCreate + 34
9   com.apple.CoreFoundation0x7fff96aa0168 
__CFBinaryPlistCreateObjectFiltered + 1608
10  com.apple.CoreFoundation0x7fff96aa1947 
__CFBinaryPlistCreateObjectFiltered + 7719
11  com.apple.CoreFoundation0x7fff96a86b1b 
__CFTryParseBinaryPlist + 187
12  com.apple.CoreFoundation0x7fff96a864b1 
_CFPropertyListCreateWithData + 97
13  com.apple.CoreFoundation0x7fff96a863a0 
CFPropertyListCreateWithData + 80
14  com.apple.CoreFoundation0x7fff96a9f08b -[CFPrefsPlistSource 
handleReply:toRequestNewDataMessage:onConnection:retryCount:error:] + 683
15  com.apple.CoreFoundation0x7fff96a9edb3 
__93-[CFPrefsSearchListSource 
handleReply:toRequestNewDataMessage:onConnection:retryCount:error:]_block_invoke
 + 147
16  libxpc.dylib0x7fffbe040d71 xpc_array_apply + 57
17  com.apple.CoreFoundation0x7fff96a9ecec 
-[CFPrefsSearchListSource 
handleReply:toRequestNewDataMessage:onConnection:retryCount:error:] + 300
18  com.apple.CoreFoundation0x7fff96c2644c 
__80-[CFPrefsSearchListSource 
alreadylocked_generationCountFromListOfSources:count:]_block_invoke_3.139 + 76
19  com.apple.CoreFoundation0x7fff96c4d3e4 -[_CFXPreferences 
withConnectionForRole:performBlock:] + 36
20  com.apple.CoreFoundation0x7fff96c263f5 
__80-[CFPrefsSearchListSource 
alreadylocked_generationCountFromListOfSources:count:]_block_invoke_2.138 + 117
21  libsystem_trace.dylib   0x7fffbe01f1ab 
_os_activity_initiate_impl + 53
22  com.apple.CoreFoundation0x7fff96c26352 
__80-[CFPrefsSearchListSource 
alreadylocked_generationCountFromListOfSources:count:]_block_invoke.136 + 114
23  com.apple.CoreFoundation0x7fff96c25c97 
CFPREFERENCES_IS_WAITING_FOR_USER_CFPREFSD + 39
24  com.apple.CoreFoundation0x7fff96c25eec 
-[CFPrefsSearchListSource 
alreadylocked_generationCountFromListOfSources:count:] + 348
25  com.apple.CoreFoundation0x7fff96a9d476 
-[CFPrefsSearchListSource alreadylocked_copyDictionary] + 326
26  com.apple.CoreFoundation0x7fff96a9cff3 
-[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 67
27  com.apple.CoreFoundation0x7fff96be1465 -[CFPrefsSource 
copyValueForKey:] + 53
28  com.apple.CoreFoundation0x7fff96c4c040 
__76-[_CFXPreferences 
copyAppValueForKey:identifier:container:configurationURL:]_block_invoke + 32
29  com.apple.CoreFoundation0x7fff96c2730f 
__108-[_CFXPreferences(SearchListAdditions) 
withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke
 + 287
30  com.apple.CoreFoundation0x7fff96c27185 
-[_CFXPreferences(SearchListAdditions) 
withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 341
31  

[issue29469] AST-level Constant folding

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Naoki: Can you please create a PR for your patch?

--

___
Python tracker 

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



[issue20669] OpenBSD: socket.recvmsg tests fail with OSError: [Errno 40] Message too long

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

I'm sorry but I don't have OpenBSD, and there is no more OpenBSD buildbot, so I 
close this issue as out of date :-( We failed to find anyone to review the 
patch since 2 years.

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



[issue29469] AST-level Constant folding

2017-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In general the patch LGTM. I haven't found bugs.

I think that at this stage we can asdl_ct.py and ast_opt.ct and use just their 
result, ast_opt.c (maybe rename to optimize.c?) The grammar is not often 
changed, and in that case it would be not hard to modify the code manually. In 
any case compile.c should be modified manually. After removing no-op functions 
like astfold_operator() and inlining simple functions like astfold_arg() the 
code should be clearer.

Instead of converting all kinds of constants to Constant_kind, you could use 
is_const() and get_const_value() from compile.c.

I suggest to remove the parts of the peepholer that are superseeded by the AST 
optimizer.

As for preventing expensive calculations, there is a patch for the peepholer 
that does this. I wait on implementing the AST-level constant folding for 
adapting that patch for it.

--

___
Python tracker 

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



[issue19325] _osx_support imports many modules

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

> FYI, issue29585 removes _osx_support dependency from site.py

Done: Lib/site.py doesn't import _osx_support anymore. So I close this issue.

--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue19325] _osx_support imports many modules

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: fixed -> out of date

___
Python tracker 

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



[issue26251] Use "Low-fragmentation Heap" memory allocator on Windows

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Steve: "We tried it at one point, but it made very little difference (...)"

Ok. Can 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



[issue30836] test_c_locale_coercion fails on AIX

2017-07-03 Thread Nick Coghlan

Nick Coghlan added the comment:

I also belatedly checked your list at 
https://unicodebook.readthedocs.io/operating_systems.html#locale-encoding, and 
confirmed that AIX is the only anomalous case you'd previously identified 
(aside from the odd nominally-ASCII-but-not-really behaviour on FreeBSD, Mac OS 
X, and Solaris).

--

___
Python tracker 

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



[issue30836] test_c_locale_coercion fails on AIX

2017-07-03 Thread Nick Coghlan

Nick Coghlan added the comment:

This should be a fairly straightforward test-only fix: updating the start of 
https://github.com/python/cpython/blob/master/Lib/test/test_c_locale_coercion.py
 to set C_LOCALE_STREAM_ENCODING to 'iso8859-1' when 
"sys.platform.startswith('aix')".

--
keywords: +easy

___
Python tracker 

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



[issue30726] [Windows] Warnings in elementtree due to new expat

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Segev Finer: Would you mind to backport PR 2375 to 3.6 and 3.5 branches?

Maybe also to 2.7, at least in PCbuild, maybe also PC/VS9.0/.

--

___
Python tracker 

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



[issue30818] Warning -- asyncore.socket_map was modified by test_ftplib on AMD64 FreeBSD 10.x Shared 3.x

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Ok, let's say that it's now fixed ;-)

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30183] [HPUX] compilation error in pytime.c with cc compiler

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

@David Haney: Can you please give the list of tests which fail on HP-UX? I 
would like to have an idea of the status of the HP-UX support.

--

___
Python tracker 

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



[issue30832] Remove own implementation for thread-local storage

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Well done, I didn't see any major outdage (compilation error) on 3.x buildbots 
;-)

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



[issue30836] test_c_locale_coercion fails on AIX

2017-07-03 Thread STINNER Victor

New submission from STINNER Victor:

One example:

http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/957/steps/test/logs/stdio

0:08:55 [ 91/406/2] test_c_locale_coercion failed -- running: test_importlib 
(41 sec)
skipped 'No C-with-UTF-8 locale available'
test_LC_ALL_set_to_C (test.test_c_locale_coercion.LocaleCoercionTests) ... 
test_PYTHONCOERCECLOCALE_not_zero 
(test.test_c_locale_coercion.LocaleCoercionTests) ... 
test_PYTHONCOERCECLOCALE_set_to_warn 
(test.test_c_locale_coercion.LocaleCoercionTests) ... 
test_PYTHONCOERCECLOCALE_set_to_zero 
(test.test_c_locale_coercion.LocaleCoercionTests) ... 
test_test_PYTHONCOERCECLOCALE_not_set 
(test.test_c_locale_coercion.LocaleCoercionTests) ... 
==
FAIL: test_LC_ALL_set_to_C (test.test_c_locale_coercion.LocaleCoercionTests) 
(env_var='LANG', nominal_locale='', PYTHONCOERCECLOCALE=None)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_c_locale_coercion.py",
 line 309, in _check_c_locale_coercion
coercion_expected)
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_c_locale_coercion.py",
 line 202, in _check_child_encoding_details
self.assertEqual(encoding_details, expected_details)
AssertionError: {'fsencoding': 'iso8859-1', 'stdin_info': 'iso8859-1:surr[140 
chars] 'c'} != {'fsencoding': 'ascii', 'stdin_info': 'ascii:surrogateesc[124 
chars] 'c'}
- {'fsencoding': 'iso8859-1',
?  

+ {'fsencoding': 'ascii',
? +++ ^

   'lang': '',
   'lc_all': 'c',
   'lc_ctype': '',
-  'stderr_info': 'iso8859-1:backslashreplace',
?   

+  'stderr_info': 'ascii:backslashreplace',
?  +++ ^

-  'stdin_info': 'iso8859-1:surrogateescape',
?  

+  'stdin_info': 'ascii:surrogateescape',
? +++ ^

-  'stdout_info': 'iso8859-1:surrogateescape'}
?   

+  'stdout_info': 'ascii:surrogateescape'}
?  +++ ^

--
components: Tests
messages: 297587
nosy: haypo, ncoghlan
priority: normal
severity: normal
status: open
title: test_c_locale_coercion fails on AIX
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



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Ok! "python -m test.bisect" is now available in 2.7, 3.5, 3.6 and master 
branches ;-)

--

___
Python tracker 

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



[issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding

2017-07-03 Thread Andrew Donnellan

Changes by Andrew Donnellan :


--
pull_requests: +2613

___
Python tracker 

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



[issue30259] Test somehow that generated files are up to date: run make regen-all

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

https://github.com/python/cpython/pull/2542 confirms that the "make clinic" 
test works, the CI fails with:

Generated files not up to date

 M Modules/clinic/posixmodule.c.h

 M Modules/posixmodule.c

--

I close the issue, thanks Zach for the automated tests!

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



[issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding

2017-07-03 Thread Andrew Donnellan

New submission from Andrew Donnellan:

Parsing an email containing a multipart Content-Type, along with a 
Content-Transfer-Encoding containing an invalid (non-ASCII-decodable) byte will 
fail.

email.feedparser.FeedParser._parsegen() calls 
"self._cur.get('content-transfer-encoding', '8bit')" to get the header.

It then tries to check whether the C-T-E is in the allowable set of ('7bit', 
'8bit', 'binary'), and to do so case-insensitively, it tries to convert the 
header to lowercase. However, because there's an invalid character in there, 
it's dealing with a Header object rather than a str. Hence it throws an 
AttributeError.

Correct behaviour would be to convert the Header to a str, see that it's not 
valid, and continue on to handle the defect as usual.

Thanks to Daniel Axtens for finding this bug as he was running the AFL fuzzer 
on the email parsing code in Patchwork 
(https://github.com/getpatchwork/patchwork).

Pull request incoming.

--
components: Library (Lib), email
files: testprog.py
messages: 297584
nosy: Andrew Donnellan, barry, r.david.murray
priority: normal
severity: normal
status: open
title: AttributeError when parsing multipart email with invalid non-decodable 
Content-Transfer-Encoding
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46989/testprog.py

___
Python tracker 

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



[issue30259] Test somehow that generated files are up to date: run make regen-all

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

https://github.com/python/cpython/pull/2543 confirms that the "make regen-all" 
test works, the CI fails with:

Generated files not up to date

 M Include/Python-ast.h

--

___
Python tracker 

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



[issue30259] Test somehow that generated files are up to date: run make regen-all

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2612

___
Python tracker 

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



[issue30259] Test somehow that generated files are up to date: run make regen-all

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2611

___
Python tracker 

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



[issue30330] test_socket.test_idna(): socket.gaierror: [Errno 11001] getaddrinfo failed on AMD64 Windows10 3.6

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this failure recently, so I consider that it was a DNS failure 
which only occurred once :-/

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



[issue30351] [2.7] regrtest hangs on Python 2.7 (test_threading?)

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

The main bug was fixed by the commit 7709b4d57b433ef027a2e7e63b4cab3fc9ad910d, 
so I now close this issue.

I will open a new issue if I see new failures after the fix, like msg297037 
(which only occurred once).

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



[issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Jeremy Kloth changed a memory stick on his physical server. I didn't see this 
bug recently, so I consider that the bug is fixed.

Thank you Jeremy!

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



[issue30649] test_utime_current_old() of test_os fails randomy on x86 Windows7 3.6

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue30651] test_poplib.test_stls_context() access violation on x86 Windows7 3.6 buildbot

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Sadly, I only saw this crash once. I don't know how to reproduce it. I close 
the bug since I don't expect to see it next weeks...

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



[issue30804] bolen-dmg-3.x build-installer.py failed

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue30834] Warning -- files was modified by test_import, After: ['@test_4852_tmp.pyc']

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

I'm unable to reproduce this bug on my Python 3.5 compiled in debug mode on 
Windows. I tried "./python -m test -v test_import", "./python -m test -R 3:3 
test_import", and with more flags from the buildbot. I also tried to remove 
__pycache__ directories, it doesn't help.

--

___
Python tracker 

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



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:


New changeset d7955b8196578306e9d86f6c61c9cb3ee72edab0 by Victor Stinner in 
branch '2.7':
[2.7] bpo-29512, bpo-30764: Backport regrtest enhancements from 3.5 to 2.7 
(#2541)
https://github.com/python/cpython/commit/d7955b8196578306e9d86f6c61c9cb3ee72edab0


--

___
Python tracker 

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



[issue30764] regrtest: Add --fail-env-changed option

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:


New changeset d7955b8196578306e9d86f6c61c9cb3ee72edab0 by Victor Stinner in 
branch '2.7':
[2.7] bpo-29512, bpo-30764: Backport regrtest enhancements from 3.5 to 2.7 
(#2541)
https://github.com/python/cpython/commit/d7955b8196578306e9d86f6c61c9cb3ee72edab0


--

___
Python tracker 

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



[issue29812] test for token.py, and consistency tests for tokenize.py

2017-07-03 Thread R. David Murray

R. David Murray added the comment:

I have no opinion on that issue.  I opened this issue to fix a hole in our 
validation, but if that hole no longer exists after that (subsequently opened 
:) issue is resolved, then this isn't needed (sorry, Ammar, and thank you for 
your work!)

--

___
Python tracker 

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



[issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

I failed to reproduce the issue by running test_logging in a loop on Koobs's 
FreeBSD CURRENT.

--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Let discuss too long time of testing datetime time zones in separate issue.

--

___
Python tracker 

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



[issue30832] Remove own implementation for thread-local storage

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:


New changeset aa0aa0492c5fffe750a26d2ab13737a1a6d7d63c by Victor Stinner 
(Masayuki Yamamoto) in branch 'master':
bpo-30832: Remove own implementation for thread-local storage (#2537)
https://github.com/python/cpython/commit/aa0aa0492c5fffe750a26d2ab13737a1a6d7d63c


--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-03 Thread Utkarsh Upadhyay

Utkarsh Upadhyay added the comment:

Hmm, I don't know if testing every zone is necessary. However, I would not be 
comfortable picking out the zones one ought to test, considering:

 if ('Riyadh8' in self.zonename or
# From tzdata NEWS file:
# The files solar87, solar88, and solar89 are no longer distributed.
# They were a negative experiment - that is, a demonstration that
# tz data can represent solar time only with some difficulty and 
error.
# Their presence in the distribution caused confusion, as Riyadh
# civil time was generally not solar time in those years.
self.zonename.startswith('right/')):

and:

> # Iran had a sub-minute UTC offset before 1946.

in 
https://github.com/python/cpython/blob/master/Lib/test/datetimetester.py#L4865

Perhaps @belopolsky can suggest something? (Already in Nosy List).

~
ut

--

___
Python tracker 

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



[issue30764] regrtest: Add --fail-env-changed option

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2610

___
Python tracker 

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



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2609

___
Python tracker 

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



[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-07-03 Thread Utkarsh Upadhyay

Utkarsh Upadhyay added the comment:

> [...] the extra information may be helpful the first time you see it, but if 
> you deal with timedeltas a lot, it would quickly become annoying.


It seems from the discussion on the issue that there are two kinds of 
developers:

  - One group which uses timedeltas so often that they will find it annoying if 
the repr was longer, which takes up more screen space.
  - The other group which occasionally uses timedelta but may forget what the 
arguments stood for.

I suspect that the distribution of programmers who use timedeltas binned by 
their frequency of usage will follow the Pareto principle: only 20% of the 
developers will account for 80% of uses of timedelta, and the remaining 80% of 
the developers will use it the remaining 20% of the time. Out of those 80% 
developers who use it sparingly, some fraction will find the repr with the 
keywords more informative than the current version and be a tiny bit happier.

I personally belong to the second group of developers. IMHO, Guido too may 
belong the second group https://marc.info/?l=python-dev=145066335824146=2 :


> Well it would have saved me an embarrassing moment -- I typed 
> `datetime.timedelta(seconds=1e6)` at the command prompt and when the response 
> came as `datetime.timedelta(11, 49600)` I mistook that as 11 years (I was in 
> a hurry and trying hard not to have to think :-).

@haypo: in the same mail, Guido also talks (jokes?) about improving timedeltas 
from grounds up:

> I might still go for it [i.e. changing the attributes], if it wasn't too late 
> by over a decade (as Tim says).

:)

Though I think the discussion there stopped before anyone could raise the 
objection about verbosity and clarity, Guido, IMO, was optimistic about this 
change:

> I still think the repr change to use keywords has a good chance for 3.6.

https://marc.info/?l=python-dev=145073617109654=2

~
ut

--

___
Python tracker 

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



[issue12568] Add functions to get the width in columns of a character

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

You need users who use CJK and understand locale issues especially the width of 
characters. Ask maybe Xiang Zhang and Naoki INADA?

--

___
Python tracker 

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




[issue27584] New addition of vSockets to the python socket module

2017-07-03 Thread Cathy Avery

Cathy Avery added the comment:

Fedora 25 has the proper headers.

--

___
Python tracker 

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



[issue30764] regrtest: Add --fail-env-changed option

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 0b1210739d12c26e4a161ffd494bd572d49b2483 by Victor Stinner in 
branch '3.5':
[3.5] bpo-29512, bpo-30764, bpo-30776: Backport regrtest enhancements from 3.6 
to 3.5 (#2540)
https://github.com/python/cpython/commit/0b1210739d12c26e4a161ffd494bd572d49b2483


--

___
Python tracker 

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



[issue24665] CJK support for textwrap

2017-07-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy:  -pitrou

___
Python tracker 

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



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 0b1210739d12c26e4a161ffd494bd572d49b2483 by Victor Stinner in 
branch '3.5':
[3.5] bpo-29512, bpo-30764, bpo-30776: Backport regrtest enhancements from 3.6 
to 3.5 (#2540)
https://github.com/python/cpython/commit/0b1210739d12c26e4a161ffd494bd572d49b2483


--

___
Python tracker 

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



[issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks references

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 0b1210739d12c26e4a161ffd494bd572d49b2483 by Victor Stinner in 
branch '3.5':
[3.5] bpo-29512, bpo-30764, bpo-30776: Backport regrtest enhancements from 3.6 
to 3.5 (#2540)
https://github.com/python/cpython/commit/0b1210739d12c26e4a161ffd494bd572d49b2483


--

___
Python tracker 

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



[issue12568] Add functions to get the width in columns of a character

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

> At least two other issues depend on this: issue17048 and issue24665.

I removed the dependency from bpo-24665 (CJK support for textwrap) to this 
issue, since its current PR uses unicodedata.east_asian_width(), not the C 
function wcswidth().

--

___
Python tracker 

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



[issue24665] CJK support for textwrap

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

I remove the dependency to bpo-12568 since the current PR uses 
unicodedata.east_asian_width(), not the C function wcswidth().

--
dependencies:  -Add functions to get the width in columns of a character

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

> Running the tests take ~ 10 minutes on my system with -utzdata enabled; 19 
> minutes does sound like a bit much but I'm not aware of the specs of the 
> buildbot machines.

I don't consider that 10 minutes to test the small datetime module is a 
reasonable duration. What does take such more time? Do we really need to test 
all timezones around the world?

--

___
Python tracker 

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



[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

Alexander: "Sorry for being late to the discussion, but please allow me to add 
a -1 vote."

While I agree that seconds=28747 is not perfect, IMHO 
"datetime.timedelta(seconds=28747)" is an enhancement over 
"datetime.timedelta(0, 28747)".

Can't we make small enhanements step by step, rather than each time try to 
redesign datetime? ;-)

(Yeah, datetime is now perfect, but well, it's now widely used and part of the 
stdlib!)

--

___
Python tracker 

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



[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-07-03 Thread STINNER Victor

STINNER Victor added the comment:

> Furthermore, "seconds=28747" is not that user-friendly. A friendlier 
> representation would be "hours=7, minutes=59, seconds=7" and similar 
> information is displayed when you print a timedelta: (...)

I agree that seconds=28747 is not that user-friendly, *but* maybe it shows a 
flaw in timedelta design?

Maybe timedelta should only expose properties which would *compute* hours, 
minutes, etc. from an internal storage? But if we change timedelta.seconds 
value, it is likely to break the backward compatibility. I wrote my own 
total_seconds() function which uses days, seconds and microseconds fields.

Or maybe we need a new method to convert a timedelta into a more human friendly 
(named)tuple?

--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-03 Thread Utkarsh Upadhyay

Utkarsh Upadhyay added the comment:

Previously, test_datetime was running only `_Fast` tests (i.e. testing the C 
module). Then (because of an erring commit from me), testing for `_Pure` 
implementation started but all tests per time-zone started running thrice 
instead of once. Hence, the timeouts while testing were triggered, breaking the 
buildbots. (Err ... sorry about that.)

However, the latest fix by Serihy now runs each test only once. The `_Pure` 
tests, nevertheless, are significantly slower than `_Fast` tests and, hence, 
the slowdown.

Running the tests take ~ 10 minutes on my system with -utzdata enabled; 19 
minutes does sound like a bit much but I'm not aware of the specs of the 
buildbot machines.

~
ut

--

___
Python tracker 

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



[issue29512] regrtest refleak: implement bisection feature

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2606

___
Python tracker 

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



[issue30764] regrtest: Add --fail-env-changed option

2017-07-03 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2607

___
Python tracker 

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



  1   2   >