[issue29463] Add `docstring` attribute to AST nodes

2017-02-11 Thread Jeff Allen

Jeff Allen added the comment:

Just terminology ... strictly speaking what you've done here is "add a *field* 
to the nodes Module, FunctionDef and ClassDef", rather than add an *attribute* 
-- that is, when one is consistent with the terms used in the ast module 
(https://docs.python.org/3/library/ast.html#node-classes) or Wang 
(https://docs.python.org/devguide/compiler.html#wang97).

--
nosy: +jeff.allen

___
Python tracker 

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



[issue29387] Tabs vs spaces FAQ out of date

2017-02-11 Thread Jim DeLaHunt

Jim DeLaHunt added the comment:

PR https://github.com/python/cpython/pull/41 to the new Github repo contains 
the following wording in Doc/faq/windows.rst:

Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs 
and spaces are causing problems in leading whitespace.
You may also run the :mod:`tabnanny` module to check a directory tree 
in batch mode.

This is parallel wording with the contents of Martin's patch.

The PR may be enough to fix this issue.

--
pull_requests: +44

___
Python tracker 

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



[issue29521] Minor warning messages when compiling documentation

2017-02-11 Thread Jim DeLaHunt

Jim DeLaHunt added the comment:

I submitted a PR https://github.com/python/cpython/pull/41 to the new Github 
repo which finishes clearing the warnings in this bug report.

I would appreciate review and committing.

--
pull_requests: +43

___
Python tracker 

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



[issue29521] Minor warning messages when compiling documentation

2017-02-11 Thread Jim DeLaHunt

Jim DeLaHunt added the comment:

It looks like commit e7ffb99f842ebff97cffa0fc90b18be4e5abecf2 to the new GitHub 
python/cpython repo, by Ryan Gonzalez, fixed the problems in Doc/conf.py, 
Doc/Makefile, and Misc/NEWS . It did not fix the problems in Doc/make.bat or 
Doc/faq/windows.rst .  I'll make a new Pull Request on the new repo to fix 
these two parts.

That commit was related to https://github.com/python/cpython/pull/9. 

http://bugs.python.org/issue29527 talks about over 6000 warnings in the doc 
build, maybe including some of these. Another PR appeared to have fixed many of 
the warnings.

--

___
Python tracker 

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



[issue28941] Update the link to Source Code in Python Docs from hg to github

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
assignee: docs@python -> Mariatta

___
Python tracker 

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



[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +41

___
Python tracker 

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



[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +42

___
Python tracker 

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



[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +40

___
Python tracker 

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



[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +39

___
Python tracker 

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



[issue28929] Provide a link from documentation back to its source file

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +38

___
Python tracker 

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



[issue28929] Provide a link from documentation back to its source file

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +37

___
Python tracker 

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



[issue28929] Provide a link from documentation back to its source file

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +36

___
Python tracker 

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



[issue28929] Provide a link from documentation back to its source file

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +35

___
Python tracker 

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



[issue28929] Provide a link from documentation back to its source file

2017-02-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


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

___
Python tracker 

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



[issue29026] time.time() documentation should mention UTC timezone

2017-02-11 Thread Eric Appelt

Eric Appelt added the comment:

As we have moved to GitHub and mandatory reviews with Pull Requests, I have 
created a new patch in PR#34 which incorporates Victor's suggestions.

--

___
Python tracker 

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



[issue29527] Travis: doc job is broken

2017-02-11 Thread Zachary Ware

Zachary Ware added the comment:

PR16 made the Travis build situation better, but we still have some warnings to 
look into.  I thought we had a PR for that, but I can't seem to find it.

--
nosy: +zach.ware
pull_requests: +34

___
Python tracker 

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



[issue28739] PEP 498: docstrings as f-strings

2017-02-11 Thread Joakim Soderlund

Joakim Soderlund added the comment:

I got slightly confused here while playing around.

Python 3.6.0 (default, Jan 31 2017, 11:39:39) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class Huacaya:
...   f"""Huacaya!"""
... 
>>> class Suri:
...   f"""{'Suri!'}"""
... 
>>> Huacaya.__doc__ is None
False
>>> Suri.__doc__ is None
True

At first I thought f-strings *did* work as docstrings since it worked  just 
fine for the first class. But, the docstring suddenly vanished when putting an 
actual expression into it.

--
nosy: +JockeTF

___
Python tracker 

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



[issue29529] Backport Travis configuration

2017-02-11 Thread Brett Cannon

Brett Cannon added the comment:

https://github.com/python/core-workflow/issues/19 should be decided upon before 
backporting anything.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue29536] test_hashlib failure on Ubuntu 16.04

2017-02-11 Thread Sachin Kumar

New submission from Sachin Kumar:

When executing 
./python -m test -v test_hashlib
on Python 3.7, the test fails.

This is the complete traceback:

CPython 3.7.0a0 (default, Feb 8 2017, 03:10:42) [GCC 5.4.0 20160609]
==   Linux-4.4.0-62-generic-x86_64-with-debian-stretch-sid little-endian
==   hash algorithm: siphash24 64bit
==  cwd: /XXX/build/test_python_14437
==  encodings: locale=UTF-8, FS=utf-8
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
Run tests sequentially
0:00:00 [1/1] test_hashlib
test_algorithms_available (test.test_hashlib.HashLibTestCase) ... ok
test_algorithms_guaranteed (test.test_hashlib.HashLibTestCase) ... ok
test_blake2b (test.test_hashlib.HashLibTestCase) ... ok
test_blake2b_vectors (test.test_hashlib.HashLibTestCase) ... ERROR
test_blake2s (test.test_hashlib.HashLibTestCase) ... ok
test_blake2s_vectors (test.test_hashlib.HashLibTestCase) ... ERROR
test_blocksize_name (test.test_hashlib.HashLibTestCase) ... ok
test_blocksize_name_blake2 (test.test_hashlib.HashLibTestCase) ... ok
test_blocksize_name_sha3 (test.test_hashlib.HashLibTestCase) ... ok
test_case_blake2b_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_blake2b_1 (test.test_hashlib.HashLibTestCase) ... ok
test_case_blake2s_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_blake2s_1 (test.test_hashlib.HashLibTestCase) ... ok
test_case_md5_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_md5_1 (test.test_hashlib.HashLibTestCase) ... ok
test_case_md5_2 (test.test_hashlib.HashLibTestCase) ... ok
test_case_md5_huge (test.test_hashlib.HashLibTestCase) ... skipped 'not enough 
memory: 4.0G minimum needed'
test_case_md5_uintmax (test.test_hashlib.HashLibTestCase) ... skipped 'not 
enough memory: 4.0G minimum needed'
test_case_sha1_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha1_1 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha1_2 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha1_3 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha224_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha224_1 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha224_2 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha224_3 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha256_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha256_1 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha256_2 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha256_3 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha384_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha384_1 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha384_2 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha384_3 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha3_224_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha3_224_vector (test.test_hashlib.HashLibTestCase) ... ERROR
test_case_sha3_256_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha3_256_vector (test.test_hashlib.HashLibTestCase) ... ERROR
test_case_sha3_384_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha3_384_vector (test.test_hashlib.HashLibTestCase) ... ERROR
test_case_sha3_512_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha3_512_vector (test.test_hashlib.HashLibTestCase) ... ERROR
test_case_sha512_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha512_1 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha512_2 (test.test_hashlib.HashLibTestCase) ... ok
test_case_sha512_3 (test.test_hashlib.HashLibTestCase) ... ok
test_case_shake128_vector (test.test_hashlib.HashLibTestCase) ... ERROR
test_case_shake256_vector (test.test_hashlib.HashLibTestCase) ... ERROR
test_case_shake_128_0 (test.test_hashlib.HashLibTestCase) ... ok
test_case_shake_256_0 (test.test_hashlib.HashLibTestCase) ... ok
test_extra_sha3 (test.test_hashlib.HashLibTestCase) ... ok
test_get_builtin_constructor (test.test_hashlib.HashLibTestCase) ... ok
test_gil (test.test_hashlib.HashLibTestCase) ... ok
test_hash_array (test.test_hashlib.HashLibTestCase) ... ok
test_hexdigest (test.test_hashlib.HashLibTestCase) ... ok
test_large_update (test.test_hashlib.HashLibTestCase) ... ok
test_name_attribute (test.test_hashlib.HashLibTestCase) ... ok
test_no_unicode (test.test_hashlib.HashLibTestCase) ... ok
test_no_unicode_blake2 (test.test_hashlib.HashLibTestCase) ... ok
test_no_unicode_sha3 (test.test_hashlib.HashLibTestCase) ... ok
test_threaded_hashing (test.test_hashlib.HashLibTestCase) ... ok
test_unknown_hash (test.test_hashlib.HashLibTestCase) ... ok
test_pbkdf2_hmac_c (test.test_hashlib.KDFTests) ... ok
test_pbkdf2_hmac_py (test.test_hashlib.KDFTests) ... ok
test_scrypt (test.test_hashlib.KDFTests) ... skipped '   test requires OpenSSL 
> 1.1'

==
ERROR: 

[issue29530] Windows buildbots broken by the migration to GitHub (meta issue)

2017-02-11 Thread Steve Dower

Steve Dower added the comment:

> Does Git support per-file settings like the svn:eol-style property in 
> Subversion or .hgeol in Mercurial?

The .gitattributes file seems to be full of glob patterns, so I assume a full 
file path will work.

However, that doesn't help with tarballs. Fixing the tests is the best way.

--

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Now I think that it would be safer to omit the function name in error message 
rather than fixing the compilation and bumping the magic number.

Nick, if you want I could write a patch that fixes the possible security issue 
for .pyc files with old magic number.

--

___
Python tracker 

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



[issue29530] Windows buildbots broken by the migration to GitHub (meta issue)

2017-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Does Git support per-file settings like the svn:eol-style property in 
Subversion or .hgeol in Mercurial?

--
nosy: +serhiy.storchaka

___
Python tracker 

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




[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could anyone please explain to me the comment from _bootstrap_external.py?

# Starting with the adoption of PEP 3147 in Python 3.2, every bump in magic
# number also includes a new "magic tag", i.e. a human readable string used
# to represent the magic number in __pycache__ directories.  When you change
# the magic number, you must also set a new unique magic tag.  Generally this
# can be named after the Python major version of the magic number bump, but
# it can really be anything, as long as it's different than anything else
# that's come before.  The tags are included in the following table, starting
# with Python 3.2a0.

--

___
Python tracker 

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



[issue29530] Windows buildbots broken by the migration to GitHub (meta issue)

2017-02-11 Thread R. David Murray

R. David Murray added the comment:

Some of the tests (notably email tests) are *testing* platform line endings.  
In tests that I rewrote I did my best to make the tests independent of the line 
endings of checked in files (that is, constructing the files-to-test in the 
test itself instead of checking them in), but I wouldn't be surprised if there 
were a few tests that weren't converted to that paradigm.  (I haven't looked to 
see if there are any test.test_email.test_email failures, which is where they'd 
be.)

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



[issue29463] Add `docstring` attribute to AST nodes

2017-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Therefore we loss the possibility to set a breakpoint on the docstring? It 
doesn't look a great lost.

--

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-11 Thread Brett Cannon

Brett Cannon added the comment:

OK, so it sounds like Serhiy had good reason to do what he did.

If we do add a test then I would argue that the message should be very clear 
that the magic number can change in a bugfix release but that it should be 
discussed with python-dev first so that downstream can be aware of the issue 
ahead of time (as Nick pointed out, it took a very special circumstance to make 
this come up and so chances are it shouldn't again, but institutional memory 
doesn't necessarily last 20 years either ;) .

--

___
Python tracker 

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



[issue29339] Interactive: Move to same indentation level as previousline

2017-02-11 Thread 12345 67890

12345 67890 added the comment:

I guess the workflow has been fixed so that I can submit a PR! I wasn't 
expecting this so soon, but I will get around to this as soon as I have time.

--

___
Python tracker 

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



[issue29527] Travis: doc job is broken

2017-02-11 Thread Brett Cannon

Brett Cannon added the comment:

It really depends on why the warnings are there. If it's a configuration issue 
with how Misc/NEWS is being built then that can be fixed to deal with a lot of 
warnings upfront. Otherwise we can also strip out the references from Misc/NEWS 
to deal with the warnings.

--

___
Python tracker 

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



[issue29324] test_aead_aes_gcm fails on Kernel 4.9

2017-02-11 Thread Christian Heimes

Christian Heimes added the comment:

Thx Barry,

I'll try to find some time to verify the new Kernel API and commit the patch 
early next week.

--

___
Python tracker 

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



[issue29534] _decimal difference with _pydecimal

2017-02-11 Thread Armin Rigo

Armin Rigo added the comment:

Sorry!  It should be repr(a) inside the print.  Here is the fixed version:

class X(Decimal):
def __init__(self, a):
print('__init__:', repr(a))
X.from_float(42.5)   # __init__: Decimal('42.5')

X.from_float(42) # with _pydecimal: __init__: 42
 # with _decimal:   __init__: Decimal('42')

--

___
Python tracker 

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



[issue22807] uuid.uuid1() should use uuid_generate_time_safe() if available

2017-02-11 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
versions: +Python 3.3, 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



[issue29324] test_aead_aes_gcm fails on Kernel 4.9

2017-02-11 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

Confirmed that test_socket_aead_kernel49.patch fixes the problem for Ubuntu 
17.04.  It'll probably fix it for Debian Stretch too give its kernel version 
number, but I haven't tested that yet.

--

___
Python tracker 

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



[issue29530] Windows buildbots broken by the migration to GitHub (meta issue)

2017-02-11 Thread Steve Dower

Steve Dower added the comment:

My vote would be to make the tests not presume anything about line endings, to 
the point of converting test files on the fly to be sure.

I'm mostly free today (in a different city with nothing to do), so if my hotel 
internet will let me SSH to github then I can work on this today. If people are 
around, I'll be on IRC too.

--

___
Python tracker 

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



[issue29531] Update Doc/README.txt to README.rst

2017-02-11 Thread Roger Sachan

Changes by Roger Sachan :


--
pull_requests:  -29

___
Python tracker 

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



[issue29324] test_aead_aes_gcm fails on Kernel 4.9

2017-02-11 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue29534] _decimal difference with _pydecimal

2017-02-11 Thread Stefan Krah

Stefan Krah added the comment:

I get the the same output, perhaps I misunderstand something here:

>>> from _decimal import *
>>> class X(Decimal):
... def __init__(self, a):
... print('__init__:', a)
... 
>>> X.from_float(42.5)
__init__: 42.5
Decimal('42.5')
>>> X.from_float(42)
__init__: 42
Decimal('42')
>>> 
>>> 
>>> from _pydecimal import *
>>> class X(Decimal):
... def __init__(self, a):
... print('__init__:', a)
... 
>>> X.from_float(42.5) 
__init__: 42.5
Decimal('42.5')
>>> X.from_float(42) 
__init__: 42
Decimal('42')

--

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

My apologies for breaking the world. But I considered this bug as security 
issue. Unlikely, but not impossible. The BUILD_MAP_UNPACK_WITH_CALL opcode is 
rarely used, but if it is used, it can cause reading arbitrary memory and 
either crashing or even exposing the content of this memory in error message 
that can be leaked to remote user. This hole would be better to close early. I 
expected this change would be included in 3.5.2.

The more robust solution would be to add the support of two magic numbers and 
check on loading whether the BUILD_MAP_UNPACK_WITH_CALL opcode is occurred in a 
precompiled file with old magic number. But this solution looked too excessive.

It would be nice to design a mechanism for possible future bytecode fixes.

--

___
Python tracker 

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



[issue29535] datetime hash is deterministic in some cases

2017-02-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue29530] Windows buildbots broken by the migration to GitHub (meta issue)

2017-02-11 Thread Zachary Ware

Zachary Ware added the comment:

We really need to be able to function regardless of the core.autocrlf setting.  
See #27425 for more about the EOL issues.

--
dependencies: +Tests fail because of git's newline preferences on Windows

___
Python tracker 

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



[issue29530] Windows buildbots broken by the migration to GitHub (meta issue)

2017-02-11 Thread Zachary Ware

Changes by Zachary Ware :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
priority: normal -> critical
versions: +Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue29535] datetime hash is deterministic in some cases

2017-02-11 Thread Christian Heimes

Christian Heimes added the comment:

I only checked Python 2.7. For Python 3.x it's a bit more complicated:

timedelta: PyObject_Hash(), always the same hash value
date: _Py_HashBytes(), always a randomized hash value
time: _Py_HashBytes() for offset = None, PyObject_Hash() for offset != 0
datetime: _Py_HashBytes() for offset = None, PyObject_Hash() for offset != 0
timezone: PyObject_Hash() (inherited from object)

I don't know why the datetime module doesn't use hash randomization for 
datetime and time objects with an offset. MAL is the master of (date)time. He 
might know.

--
nosy: +lemburg

___
Python tracker 

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



[issue29530] Windows buildbots broken by the migration to GitHub (meta issue)

2017-02-11 Thread Jeremy Kloth

Jeremy Kloth added the comment:

Tests are now failing due to end-of-line (?) differences.

I did a quick reading of the devguide, but didn't see any mention of the 
settings to be used for Git on Windows wrt core.autocrlf.

--

___
Python tracker 

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



[issue29535] datetime hash is deterministic in some cases

2017-02-11 Thread Armin Rigo

Armin Rigo added the comment:

That's not what the docs say.  E.g.: 
https://docs.python.org/3/reference/datamodel.html#object.__hash__ says

By default, the __hash__() values of str, bytes and datetime objects are 
“salted” with an unpredictable random value. Although they remain constant 
within an individual Python process, they are not predictable between repeated 
invocations of Python.

Morever, this command really prints changing numbers:

~/svn/python/3.7-debug/python -c "import datetime;print(hash(d  
atetime.datetime(2016,10,10,0,0,0,0)))"

--

___
Python tracker 

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



[issue2292] Missing *-unpacking generalizations

2017-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Issue26213 was opened for documenting bytecode changes. But 21 months and 3 
releases after the code patch the documentation is still not updated.

--
nosy: +larry, serhiy.storchaka

___
Python tracker 

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



[issue26213] Document BUILD_*_UNPACK opcodes

2017-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

At the same time the semantic of the BUILD_MAP opcode was changed. However the 
documentation was not updated and currently it doesn't match the 
implementation. This caused an issue in third-party projects that operate with 
bytecode.

See also issue28810 for documenting bytecode changes in 3.6.

--
priority: low -> high
type:  -> behavior
versions: +Python 3.5, Python 3.7

___
Python tracker 

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



[issue402227] make BUILD_MAP use it's argument

2017-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

After all this change was implemented as a part of PEP 448 implementation 
(issue2292). But it was not documented and current documentation of the 
BUILD_MAP opcode doesn't match the implementation. See also issue26213.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29530] Windows buildbots broken by the migration to GitHub (meta issue)

2017-02-11 Thread Jeremy Kloth

Jeremy Kloth added the comment:

After ensuring that Git is available to the buildbot service, the initial 
update fails due to the existing build directory containing the Mercurial 
checkout.

After manually removing the contents of the build directories, the update task 
successfully completes.

--
nosy: +jkloth

___
Python tracker 

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



[issue29535] datetime hash is deterministic in some cases

2017-02-11 Thread Christian Heimes

Christian Heimes added the comment:

Only the hash of str and bytes are randomized/ The types date, datetime and 
time are not subject to hash randomization. Same for int, float, bool and None.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue29535] datetime hash is deterministic in some cases

2017-02-11 Thread Armin Rigo

New submission from Armin Rigo:

The documentation on the hash randomization says that date, time and datetime 
have a hash based on strings, that is therefore nondeterministic in several 
runs of Python.  I may either be missing a caveat, or the actual implementation 
does not follow its promise in case a timezone is attached to the datetime or 
time object:

~/svn/python/3.7-debug/python -c "import datetime;print(hash(d  
atetime.datetime(2016,10,10,0,0,0,0,datetime.timezone(datetime.timedelta(0, 
36000)"
(this gives -6021186165085109055 all the time)

~/svn/python/3.7-debug/python -c "import 
datetime;print(hash(datetime.time(0,0,0,0, 
datetime.timezone(datetime.timedelta(0, 36000)"
(this gives -3850122659820237607 all the time)

--
messages: 287601
nosy: arigo
priority: normal
severity: normal
status: open
title: datetime hash is deterministic in some cases
type: security
versions: Python 3.5, Python 3.7

___
Python tracker 

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



[issue29534] _decimal difference with _pydecimal

2017-02-11 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +mark.dickinson, rhettinger, skrah

___
Python tracker 

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



[issue29534] _decimal difference with _pydecimal

2017-02-11 Thread Armin Rigo

New submission from Armin Rigo:

A difference in behavior between _decimal and _pydecimal (it seems that 
_decimal is more consistent in this case):

class X(Decimal):
def __init__(self, a):
print('__init__:', a)
X.from_float(42.5)   # __init__: Decimal('42.5')

X.from_float(42) # with _pydecimal: __init__: 42
 # with _decimal:   __init__: Decimal('42')

--
messages: 287600
nosy: arigo
priority: normal
severity: normal
status: open
title: _decimal difference with _pydecimal
type: behavior
versions: Python 3.5, Python 3.7

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-11 Thread Nick Coghlan

Nick Coghlan added the comment:

Providing some additional background:

- 3.5.3 was the *first time ever* in more than two decades that CPython changed 
the magic number in a maintenance release. It *wasn't* necessary to do so - it 
could have been left alone (as 3.5.0, 3.5.1, and 3.5.2 can read the revised 
bytecode just fine - no changes were made to ceval, only to the code 
generator). If the magic number had been left alone, recompilation would have 
been limited solely to folks with affected bytecode files, which is 
approximately zero people in practice (as anyone impacted by the problem would 
have been getting weird runtime behaviour and presumably found a way to work 
around it).

- because the pyc caches for system packages on Linux are in system-owned 
directories, they're generated either at build time (Fedora et al) or install 
time (Debian et al) by the package that owns the corresponding source files and 
then installed with elevated privileges (e.g. "sudo dnf install 
python-requests"). These files *do not* belong to the CPython package, they 
belong to the individual Python modules that depend on CPython, so messing with 
them when installing a new version of CPython would be a significant breach of 
distro policies

- as a result, removing CPython 3.5.3's ability to read pyc files generated by 
3.5.0, 3.5.1 or 3.5.2 means that either the distros have to regenerate all of 
their Python dependent packages (to force recompilation of the affected 
bytecode files), or else patch the system Python so it can still read the old 
pyc files (which is the approach Peter is currently pursuing, since requiring a 
mass rebuild for a maintenance update is *also* against distro policy)

Thus this request to take the previously unwritten de facto policy (which 
worked fine and clearly isn't a major limitation on CPython maintainability, 
since the one time it has been done in 20+ years didn't actually need to do it) 
and make it an explicit official policy that's enforced by the test suite.

The reason that none of these concerns apply to Python feature releases is 
because those are only rolled out as part of distro version upgrades (e.g. the 
switch from 3.5 to 3.6 as the system Python is one of the upgrades going from 
F25 to F26), where both distro maintainers and distro users already expect to 
have to rebuild and reinstall almost everything.

--

___
Python tracker 

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



[issue29532] functools.partial is not compatible between 2.7 and 3.5

2017-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, this can be considered a bug. Following patch fixes it.

--
components: +Library (Lib)
keywords: +patch
nosy: +serhiy.storchaka
stage:  -> patch review
versions: +Python 3.7 -Python 3.4
Added file: http://bugs.python.org/file46633/partial-copy-kwargs.patch

___
Python tracker 

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



[issue19675] Pool dies with excessive workers, but does not cleanup

2017-02-11 Thread Camilla Montonen

Changes by Camilla Montonen :


--
nosy: +Winterflower

___
Python tracker 

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



[issue29533] urllib2 works slowly with proxy on windows

2017-02-11 Thread Julia Dolgova

Changes by Julia Dolgova :


--
keywords: +patch
Added file: http://bugs.python.org/file46632/socket.patch

___
Python tracker 

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



[issue29533] urllib2 works slowly with proxy on windows

2017-02-11 Thread Julia Dolgova

Changes by Julia Dolgova :


Added file: http://bugs.python.org/file46630/test.py

___
Python tracker 

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



[issue29533] urllib2 works slowly with proxy on windows

2017-02-11 Thread Julia Dolgova

Changes by Julia Dolgova :


Added file: http://bugs.python.org/file46631/log.txt

___
Python tracker 

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



[issue29533] urllib2 works slowly with proxy on windows

2017-02-11 Thread Julia Dolgova

Changes by Julia Dolgova :


Added file: http://bugs.python.org/file46629/socket.py

___
Python tracker 

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



[issue29533] urllib2 works slowly with proxy on windows

2017-02-11 Thread Julia Dolgova

New submission from Julia Dolgova:

I've found that urllib works sometimes slowly on windows with proxy.

To reproduce the issue:
on Windows:
1. Turn on the option "use proxy" in "browser settings" in "control panel".
No real proxy needed. The problem will come out before addressing to proxy. 
Just don't pay attention to exception.
2. Make sure that the list of addresses for proxy bypass is not empty
3. Execute checklib.py with socket.py (attached here) in the same directory

The result output could be:
A (not a problem):
Before call to _socket.gethostbyaddr("docs.python.org")
After call to _socket.gethostbyaddr("docs.python.org")

B (little problem):
Before call to _socket.gethostbyaddr("docs.python.org")
Exception in call to _socket.gethostbyaddr("docs.python.org")

C (worse problem):
Before call to _socket.gethostbyaddr("docs.python.org")
(Delay)
Exception in call to _socket.gethostbyaddr("docs.python.org")

The result A,B or C depends on what DNS server you use, what url you pass into 
urllib2.urlopen(), and could differ at different time because dns is not a 
stable thing. 
However, no matter what result you have, this test shows that a hostname is 
passed into gethostbyaddr instead of IP as expected and described in MSDN. It 
should be changed to gethostbyname_ex here.

test.py compare performance of gethostbyaddr and gethostbyname_ex. 
It sets different dns servers on the system and calls these functions with 
different hostnames passed into. Run on my computer shows that gethostbyname_ex 
is 3 times more productive and doesn't raise exceptions.

-
Attached files:
checklib.py - just make a call to urllib2.urlopen("https://docs.python.org;)
socket.py - not a patched lib. Has debug lines near 141 line. Use it with 
checklib.py.
test.py - compare performance of gethostbyaddr with gethostbyname_ex
log.txt - result of test.py on my computer (Windows 8, 64 bit)
socket.patch - socket.py patch

--
components: Library (Lib), Windows
files: checklib.py
messages: 287597
nosy: juliadolgova, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: urllib2 works slowly with proxy on windows
type: performance
versions: Python 2.7
Added file: http://bugs.python.org/file46628/checklib.py

___
Python tracker 

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



[issue28837] 2to3 does not wrap zip correctly

2017-02-11 Thread Stuart Berg

Stuart Berg added the comment:

Patch submitted as github PR #24:
https://github.com/python/cpython/pull/24

--

___
Python tracker 

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



[issue29532] functools.partial is not compatible between 2.7 and 3.5

2017-02-11 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Confirmed that in Python 2.7 calling g() before and after modifying the dict 
prints 3 both times; calling g() before modifying the dict prints 3, then after 
modifying it prints 5.

Python 3.3 behaves like 2.7, so this sounds like a regression in 3.5 or maybe 
3.4.

--
nosy: +steven.daprano
versions: +Python 3.4, Python 3.6

___
Python tracker 

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