[issue23545] Turn on extra warnings on GCC

2016-09-10 Thread Martin Panter

Martin Panter added the comment:

Can one of the -Wall flags be dropped? What is the difference between $OPT and 
$CFLAGS_NODIST?

gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes-std=c99 -Wall -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers   -I. -IInclude 
-I./Include-DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c

--

___
Python tracker 

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



[issue27350] Compact and ordered dict

2016-09-10 Thread STINNER Victor

STINNER Victor added the comment:

As I expected, a dictionary lookup is a _little bit_ slower (3%) between Python 
3.5 and Python 3.6:

$ ./python -m perf timeit -s 'd={str(i):i for i in range(100)}' 'd["10"]; 
d["20"]; d["30"]; d["40"]; d["50"]; d["10"]; d["20"]; d["30"]; d["40"]; 
d["50"]' --rigorous

Median +- std dev: [lookup35] 309 ns +- 10 ns -> [lookup36] 320 ns +- 8 ns: 
1.03x slower

--

___
Python tracker 

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



[issue28019] itertools.count() falls back to fast (integer) mode when step rounds to 1

2016-09-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue18401] Tests for pdb import ~/.pdbrc

2016-09-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

(Copied from my post to python-checkins.)
On Windows, HOME is spelled USERPROFILE or ,HOMEDRIVE + HOMEPATH.  These are 
set by default on Windows.  The OS specific os.path.expanduser('~') deals with 
this difference.  I don't know what you are testing exactly, but I believe 
cross-platform modules should use the latter instead of the *NIX-specific HOME.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue27350] Compact and ordered dict

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are a lot of other changes in interpreter core between 3.5 and 3.5 (such 
as new bytecode and optimized function calls). Could you compare the 
performance between the version just before adding new dict implementation and 
the version just after this?

--

___
Python tracker 

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



[issue27971] utf-16 decoding can't handle lone surrogates

2016-09-10 Thread Christoph Reiter

Christoph Reiter added the comment:

Closing as wontfix if there are concerns regarding compatibility seems fine to 
me.

Thanks for looking into this.

I've also found a workaround for my usecase in the meantime: 
https://github.com/lazka/senf/commit/b7dadb05a29db5f0d74f659971b0a86d5e579028

--

___
Python tracker 

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



[issue28058] [Patch] Don't use st_uid and st_gid on CloudABI

2016-09-10 Thread Ed Schouten

New submission from Ed Schouten:

CloudABI is a UNIX-like runtime environment that uses a capability-based 
security model. As there is no support for traditional UNIX credentials (uid_t, 
gid_t), its struct stat doesn't provide st_uid and st_gid.

Python can already deal with the absence of these fields, as it also needs to 
treat Windows similarly. Attached is a patch that simply adds CloudABI to the 
relevant '#if' in posixmodule.c.

--
components: Extension Modules
files: patch-st_uid-st_gid
messages: 275591
nosy: EdSchouten
priority: normal
severity: normal
status: open
title: [Patch] Don't use st_uid and st_gid on CloudABI
versions: Python 3.7
Added file: http://bugs.python.org/file44525/patch-st_uid-st_gid

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Seems after this changeset Python is broken:

shell@ASUS_Z00E_2:/data/local/tmp/python3 $ python3.6
Failed to import the site module
Traceback (most recent call last):
  File "/data/local/tmp/python3/lib/python3.6/site.py", line 549, in 
main()
  File "/data/local/tmp/python3/lib/python3.6/site.py", line 536, in main
known_paths = addusersitepackages(known_paths)
  File "/data/local/tmp/python3/lib/python3.6/site.py", line 281, in 
addusersitepackages
user_site = getusersitepackages()
  File "/data/local/tmp/python3/lib/python3.6/site.py", line 257, in 
getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File "/data/local/tmp/python3/lib/python3.6/site.py", line 247, in getuserbase
USER_BASE = get_config_var('userbase')
  File "/data/local/tmp/python3/lib/python3.6/sysconfig.py", line 600, in 
get_config_var
return get_config_vars().get(name)
  File "/data/local/tmp/python3/lib/python3.6/sysconfig.py", line 549, in 
get_config_vars
_init_posix(_CONFIG_VARS)
  File "/data/local/tmp/python3/lib/python3.6/sysconfig.py", line 420, in 
_init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named 
'_sysconfigdata_m_linux_aarch64-linux-android'

sysconfig data is installed as 
lib-dynload/_sysconfigdata_m_linux_x86_64-linux-gnu.py. It should be at 
lib-dynload/_sysconfigdata_m_linux_aarch64-linux-android.py?

PS: I'm building for Android AArch64 on Linux x86_64

--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue28018] Cross compilation fails in regen

2016-09-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Closing, regen is not used anymore after issue28046 landed.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2016-09-10 Thread Mark Dickinson

Mark Dickinson added the comment:

A similar bug affects the new `choices` method: in the `choices` source, if 
`random() * total` happens to round up to `total`, the bisect call returns an 
out-of-range index.

There are two ways that that could happen: (1) double rounding, as in this 
issue (which will occur very rarely and is hard to reproduce), and (2) `total` 
being subnormal (easy to reproduce, but unlikely to occur in practice).

>>> from random import choices
>>> choices(500, population=[1, 2], weights=[1e-323, 1e-323])
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/mdickinson/Python/cpython/Lib/random.py", line 360, in choices
return [population[bisect(cum_weights, random() * total)] for i in range(k)]
  File "/Users/mdickinson/Python/cpython/Lib/random.py", line 360, in 
return [population[bisect(cum_weights, random() * total)] for i in range(k)]
IndexError: list index out of range

--

___
Python tracker 

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



[issue27829] test.regrtest: changed environment variables are not logged

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 491bbba73bca by Victor Stinner in branch 'default':
Show regrtest env changed warn on Windows buildbot
https://hg.python.org/cpython/rev/491bbba73bca

--

___
Python tracker 

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



[issue28059] Windows: test_platform.test_architecture_via_symlink() regression

2016-09-10 Thread STINNER Victor

New submission from STINNER Victor:

It looks like test_platform started to fail on AMD64 Windows10 3.x between 
build 1456 (success) and 1458 (failure, 1457 was interrupted or something like 
that).

The regression may be related to the issue #27932, change 31b7eaff5588.

http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/1458/steps/test/logs/stdio

==
FAIL: test_architecture_via_symlink (test.test_platform.PlatformTest)
--
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_platform.py", line 
33, in test_architecture_via_symlink
self.assertEqual(get(real), get(link))
AssertionError: Tuples differ: (b"('64bit', 'WindowsPE')\r\n", None) != (b'', 
None)

First differing element 0:
b"('64bit', 'WindowsPE')\r\n"
b''

- (b"('64bit', 'WindowsPE')\r\n", None)
+ (b'', None)

--

--
components: Windows
messages: 275596
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows: test_platform.test_architecture_via_symlink() regression

___
Python tracker 

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



[issue28056] sizeof unit tests fail on ARMv7

2016-09-10 Thread STINNER Victor

STINNER Victor added the comment:

According to buildbots, the issue seems to be fixed.

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

___
Python tracker 

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



[issue16202] sys.path[0] security issues

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Reviewing the issue, I think there's still an open question regarding the way 
distutils handles generated script execution that may impact setuptools as, so 
adding Jason to the nosy list.

For the "don't set sys.path[0] by default" aspect, we would need a different 
executable that uses more paranoid defaults, which would be contingent on the 
PEP 432 startup refactoring landing for 3.7 (as too much behaviour is currently 
embedded inside Py_Main for alternate defaults to be reasonably maintained).

--
nosy: +jason.coombs

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Got it. When calling `python -m sysconfig --generate-posix-vars`, the host 
(Linux x86_64) Python is used, so _get_sysconfigdata_name() returns the name 
for Linux instead of for Android. Maybe _get_sysconfigdata_name() should check 
whether it's used for cross-compiling or not.

--

___
Python tracker 

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



[issue27292] Warn users that os.urandom() prior to 3.6 can return insecure values

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

On modern Intel chips, one of the entropy sources is the CPU itself, and so 
this problem is mostly theoretical on such systems unless you're worried about 
the quality of Intel's entropy generation (in which case you're well and truly 
into sovereign espionage and advanced persistent threat territory, and really 
shouldn't be blindly trusting operating systems and programming language 
runtimes to already be doing the right thing).

So the main ways to get bad entropy from /dev/urandom on Linux are:

- a misconfigured VM that has been cut off from all decent entropy sources, and 
doesn't have any persistent storage attached
- an embedded non-Intel chip that doesn't have any decent entropy sources or 
persistent storage attached

If you're not doing either of those things, you're probably fine. If you're 
worried that you might be, try running Python 3.6 and calling os.getrandom() 
explicitly to see what happens.

--

___
Python tracker 

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



[issue22493] Deprecate the use of flags not at the start of regular expression

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch that deprecates flags not at the start. fnmatch.translate() now 
uses scoped flags (issue433028).

--
Added file: http://bugs.python.org/file44526/re_deprecate_nonstart_flags2.patch

___
Python tracker 

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



[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

I think those names (with the leading underscore removed) would be fine as a 
public API - the fact that PySlice_EvalIndices doesn't take a reference to the 
slice object seems similar to a static method, where the prefix is there for 
namespacing reasons, rather than because it actually operates on a slice 
instance.

--

___
Python tracker 

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



[issue28022] SSL releated deprecation for 3.6

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 for a common note in all affected modules along the lines of "An 
appropriately configured SSLContext should be provided for any use cases that 
involve accepting self-signed certificates, privately signed certificates, or 
any other kind of certificate that won't validate against the default system 
certificate trust store.

It is expected that a future version of Python will switch to explicitly 
verifying SSL certificates for all SSL/TLS protected connections by default 
(due to the widespread use of self-signed and privately signed certificates for 
other protocols, full verification is currently the default only for HTTPS)."

Regarding ssl.wrap_socket(), would it be feasible to provide a migration path 
to a situation where that's just a thin wrapper around 
ssl.get_default_context().wrap_socket()?

Comparing the parameter lists:

>>> module_params - method_params
{'ciphers', 'keyfile', 'ca_certs', 'ssl_version', 'cert_reqs', 'certfile'}
>>> method_params - module_params
{'server_hostname'}

That means the real problems are the ciphers, keyfile, ca_certs, ssl_version, 
cert_reqs and certfile parameters and the internal use of SSLContext() rather 
than get_default_context(), rather than the essential idea of providing a 
shorthand spelling for "wrap a socket with the default SSL/TLS settings".

--

___
Python tracker 

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



[issue28043] Sane defaults for SSLContext options and ciphers

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 from me for a model where ssl.get_default_context() can change in 
maintenance releases, while the ssl.SSLContext defaults get updated for feature 
releases.

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

The danger of sprints, and decisions being made without adequate input from 
affected parties.

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Ethan started a python-dev thread here: 
https://mail.python.org/pipermail/python-dev/2016-September/146358.html

--

___
Python tracker 

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



[issue24363] httplib fails to handle semivalid HTTP headers

2016-09-10 Thread Martin Panter

Martin Panter added the comment:

Patch for Python 2

--
Added file: http://bugs.python.org/file44527/header.py2.patch

___
Python tracker 

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



[issue28004] Optimize bytes.join(sequence)

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tests in the article don't look reliable. For example bytes_percent() and 
bytes_plus() test nothing, because b"%s %s" % (b"hi", b"there") and b"hi" + b" 
" + b"there" are evaluated at compile time.

Yes, bytes.join(sequence) is a little slower on Python 3 for short sequences. 
But for long sequences Python 3 is faster.

The code for bytes.join() is already too complex, and the proposed optimization 
makes it more complicated. And the optimization decreases performance on my 
netbook:

$ ./python -m timeit -s "sep=b' '; seq=(b'hello', b'world')" -- 'sep.join(seq); 
sep.join(seq); sep.join(seq); sep.join(seq); sep.join(seq); sep.join(seq); 
sep.join(seq); sep.join(seq); sep.join(seq); sep.join(seq)'

Python 2.7: 10 loops, best of 3: 7.24 usec per loop
Python 3.6 unpatched: 10 loops, best of 3: 8.62 usec per loop
Python 3.6 patched: 10 loops, best of 3: 9.11 usec per loop

--

___
Python tracker 

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



[issue27137] Python implementation of `functools.partial` is not a class

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks folks - for 3.6, the pure Python and accelerated C implementations of 
functools.partial are now both multiprocessing, subclassing, and REPL friendly 
:)

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

___
Python tracker 

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



[issue27137] Python implementation of `functools.partial` is not a class

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cdc91b6ae3b2 by Nick Coghlan in branch 'default':
Issue #27137: align Python & C implementations of functools.partial
https://hg.python.org/cpython/rev/cdc91b6ae3b2

--
nosy: +python-dev

___
Python tracker 

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



[issue17909] Autodetecting JSON encoding

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Having hit the json.loads() problem recently when porting a project to Python 
3, I'm keen to see this land for 3.6.

Accodingly, assigning to myself to review and merge Serhiy's patch - if it 
proves necessary, we can tweak the details of the encoding detection during 
beta.

--
assignee: serhiy.storchaka -> ncoghlan

___
Python tracker 

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



[issue17909] Autodetecting JSON encoding

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e9e1bf9ec2ac by Nick Coghlan in branch 'default':
Issue #17909: Accept binary input in json.loads
https://hg.python.org/cpython/rev/e9e1bf9ec2ac

--
nosy: +python-dev

___
Python tracker 

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



[issue17909] Autodetecting JSON encoding

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks for tackling this Serhiy!

I removed issue 13916 from the dependency list, as while that's a reasonable 
suggestion, I don't think this fix is conditional on that change.

--
dependencies:  -disallow the "surrogatepass" handler for non utf-* encodings
resolution:  -> fixed

___
Python tracker 

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



[issue10976] accept bytes in json.loads()

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

As Martin noted, Serhiy has implemented the autodetection option for json.loads 
in #17909 so closing this one as out of date - UTF-8, UTF-16 and UTF-32 encoded 
JSON data will be deserialised automatically in 3.6, while other text encodings 
aren't officially supported by the JSON RFCs.

--
resolution:  -> out of date
status: open -> closed
superseder:  -> Autodetecting JSON encoding

___
Python tracker 

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



[issue22555] Tracking issue for adjustments to binary/text boundary handling

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Added another issue to the tracking list: 

* Automatically decode binary data in json.loads: issue #17909

--
dependencies: +Autodetecting JSON encoding

___
Python tracker 

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



[issue17909] Autodetecting JSON encoding

2016-09-10 Thread Nick Coghlan

Changes by Nick Coghlan :


--
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue19837] Wire protocol encoding for the JSON module

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

For 3.6, the decoding case has been handled via Serhiy's autodetection patch in 
issue 17909

--

___
Python tracker 

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



[issue28060] Clean up division fast paths in Objects/longobject.c

2016-09-10 Thread Mark Dickinson

New submission from Mark Dickinson:

We seem to have ended up with redundant fast path checks for division in 
longobject.c: long_div has a fast path check, but the long_div slow path calls 
l_divmod, which then does a second, identical, fast path check. long_mod has 
similar behaviour. long_divmod, however, has no fast path, so relies on the one 
from l_divmod.

This patch removes the extra fast path from l_divmod, and then adds a top-level 
fast path check to long_divmod.

--
assignee: mark.dickinson
files: divmod_fastpath.patch
keywords: patch
messages: 275618
nosy: mark.dickinson
priority: normal
severity: normal
stage: commit review
status: open
title: Clean up division fast paths in Objects/longobject.c
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file44528/divmod_fastpath.patch

___
Python tracker 

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



[issue28060] Clean up division fast paths in Objects/longobject.c

2016-09-10 Thread Mark Dickinson

Mark Dickinson added the comment:

N.B. The patch also tweaks the fast path condition to *include* the common case 
of a dividend of 0, and *exclude* the rare case of a negative divisor. (The 
latter change helps to keep the fast path code simple.)

--

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Martin, the patch isn't currently applying to trunk - would you have time to 
take a look at that?

Ned, this is tangentially related to Martin's work on subclass initialization 
in PEP 487: one of the current problems with zero-argument super is that we 
don't actually populate the class cell until quite late in the type creation 
process, so even after the metaclass.__new__ call finishes, zero-argument super 
still doesn't work yet.

That aspect of the change is clearly a bug fix, but fixing it will have the 
side-effect of making "__cell__" visible in the class body during execution as 
a CPython implementation detail.

Would that still be OK to go into beta 2 rather than beta 1?

(Assigned to Ned due to the release management question)

--
assignee:  -> ned.deily
nosy: +ned.deily

___
Python tracker 

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



[issue27792] bool % int has inconsistent return type.

2016-09-10 Thread Mark Dickinson

Mark Dickinson added the comment:

> BTW, Mark, do you think the fast path in long_mod is really needed? Actually 
> the same fast path has already existed in l_divmod.

See issue 28060 for fast path cleanup.

--

___
Python tracker 

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



[issue21590] Systemtap and DTrace support

2016-09-10 Thread Kubilay Kocak

Changes by Kubilay Kocak :


--
nosy: +koobs

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Reopening until the __definition_order__ question has been resolved.

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

___
Python tracker 

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



[issue21590] Systemtap and DTrace support

2016-09-10 Thread Kubilay Kocak

Kubilay Kocak added the comment:

@Ɓukasz in case you're not aware, all koobs-freebsd* bots are DTrace enabled, 
and can be tested with the custom builder. I'm on IRC (python-dev) if you need 
anything from me to help progress this

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

I don't think this is necessarily a blocker for beta 1 (since it can be treated 
as a bug fix for beta 2 if it's decided to restore the originally proposed 
behaviour), but it should definitely be resolved before beta 2.

--
priority:  -> deferred blocker

___
Python tracker 

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



[issue27938] PyUnicode_AsEncodedString, PyUnicode_Decode: add fast-path for "us-ascii" encoding

2016-09-10 Thread Kubilay Kocak

Kubilay Kocak added the comment:

@Victor I was just checking this issue to copy the test command, to provide 
results to you both when I saw the lovely surprise. Thank you :)

--

___
Python tracker 

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



[issue27350] Compact and ordered dict

2016-09-10 Thread INADA Naoki

INADA Naoki added the comment:

3% slowdown in microbench is not surprising.
Compact dict introduces one additional indirection.

Instead, I've added freelist for most compact PyDictKeys.
So I think overall performance is almost same to before compact dict.

--

___
Python tracker 

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



[issue28061] Python crashes on 'from test import support'

2016-09-10 Thread Emanuel Barry

New submission from Emanuel Barry:

VS breaks at line Objects/dictobject.c:2339 - 'if 
(mp->ma_keys->dk_usable * 3 < other->ma_used * 2)'

I don't have any more useful information; I'm running Windows 7.

--
components: Interpreter Core
messages: 275627
nosy: ebarry, haypo, methane, ned.deily, serhiy.storchaka
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Python crashes on 'from test import support'
type: crash
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



[issue28062] Streamline repr(partial object)

2016-09-10 Thread Emanuel Barry

New submission from Emanuel Barry:

This is a followup to #27137, where it was found out the repr of a partial 
object includes the module (i.e. 'functools') only if it's not a subclass. This 
behaviour is surprising at best. Attached patch streamlines the reprs of 
partial objects to always include the module.

Raymond, do you remember why this approach was taken? Looking at the code, it 
seems it was just the easiest way to go about it.

Side-note: I couldn't run the test suite since I ran into #28061, so I just did 
manual testing.

--
components: Library (Lib)
files: functools_partial_repr_1.patch
keywords: patch
messages: 275628
nosy: ebarry, ncoghlan, rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Streamline repr(partial object)
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file44529/functools_partial_repr_1.patch

___
Python tracker 

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



[issue27137] Python implementation of `functools.partial` is not a class

2016-09-10 Thread Emanuel Barry

Emanuel Barry added the comment:

Thank you Nick! I just opened #28062 to fix the repr inconsistency between 
functools.partial and any subclass :)

--

___
Python tracker 

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



[issue28061] Python crashes on 'from test import support'

2016-09-10 Thread INADA Naoki

INADA Naoki added the comment:

Which hg (or git) revision do you use?

--

___
Python tracker 

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



[issue28061] Python crashes on 'from test import support'

2016-09-10 Thread Emanuel Barry

Emanuel Barry added the comment:

Latest, i.e. https://hg.python.org/cpython/rev/a477ef882a16

--

___
Python tracker 

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



[issue28062] Streamline repr(partial object)

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Similar issues: issue27541 and issue21861.

--

___
Python tracker 

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



[issue28061] Python crashes on 'from test import support'

2016-09-10 Thread INADA Naoki

INADA Naoki added the comment:

According to IRC log, the issue happens on Windows.
And hg revision is a477ef882a16.

I'll try building Python on Windows 10 amd64 in this weekend.

--

___
Python tracker 

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



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-10 Thread Matthias Klose

Matthias Klose added the comment:

I don't like that configure check, because it depends on the kernel being used 
at runtime.  For many architectures you can define in the kernel if the kernel 
should allow unaligned accesses or not.  Sure this is not an issue for linux 
distro builds, but might be unexpected for third party builds.

--

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Confirming the problem reported by Chi Hsuan Yen. The attached patch fixes this.

Another problem is that the shared libraries names of the extension modules are 
now suffixed with the wrong triplet, i.e. with the build system triplet instead 
of the target host triplet. So they cannot be imported. Not sure where this 
regression has been introduced.

--
Added file: http://bugs.python.org/file44530/get_sysconfigdata_name.diff

___
Python tracker 

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



[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-09-10 Thread Joseph Shen

Joseph Shen added the comment:

I noticed someone use `plat-win` instead of `DLLs` in this 
http://bugs.python.org/issue28046, so what's your opinion for this?
`plat-win` looks more meaningful than old `DLLs` at least for me,
do your have any plan for this in the 3.6 release?

--

___
Python tracker 

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



[issue28043] Sane defaults for SSLContext options and ciphers

2016-09-10 Thread Christian Heimes

Christian Heimes added the comment:

I'm planning to remove PROTOCOL_TLS again and replace it with something more 
sensible.

--

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Zachary Ware

Zachary Ware added the comment:

Xavier, that change looks good to me, please commit it.

--

___
Python tracker 

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



[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-09-10 Thread Steve Dower

Steve Dower added the comment:

I don't intend to change any defaults arbitrarily, but you can easily specify a 
folder with whatever name you like for these. I agree it would be a more 
sensible name, but it's such a minor issue that change would be more disruptive 
than helpful.

--

___
Python tracker 

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



[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-09-10 Thread Joseph Shen

Joseph Shen added the comment:

Yeah it's true, anyway thanks for your support
On Sat, Sep 10, 2016 at 22:10 Steve Dower  wrote:

>
> Steve Dower added the comment:
>
> I don't intend to change any defaults arbitrarily, but you can easily
> specify a folder with whatever name you like for these. I agree it would be
> a more sensible name, but it's such a minor issue that change would be more
> disruptive than helpful.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-09-10 Thread Zachary Ware

Zachary Ware added the comment:

Joseph: "plat-win" was actually removed from the comment in #28046; it is an 
obsolete name that hasn't been used since August 21, 2000.  I just killed the 
platform directories, let's not bring them back :)

--

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1d71ce4531ac by Xavier de Gaye in branch 'default':
Issue #28046: Fix get_sysconfigdata_name().
https://hg.python.org/cpython/rev/1d71ce4531ac

--

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

With this patch no extensions in Modules/ can be built. Let me check whether 
there's a bug in my build script.

--

___
Python tracker 

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



[issue27874] inconsistent sys.path behavior when using PythonXX.zip

2016-09-10 Thread Joseph Shen

Joseph Shen added the comment:

Oh, can't believe this, and I thought iPhone 8 will bring back my lovely
3.5mm jack ^_^

On Sat, Sep 10, 2016 at 22:16 Zachary Ware  wrote:

>
> Zachary Ware added the comment:
>
> Joseph: "plat-win" was actually removed from the comment in #28046; it is
> an obsolete name that hasn't been used since August 21, 2000.  I just
> killed the platform directories, let's not bring them back :)
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28063] Adding a mutually exclusive group to an argument group results in segmentation fault under linux

2016-09-10 Thread John Didion

New submission from John Didion:

The following code works fine when I run it on OSX 10.9, but causes a 
segmentation fault when run on linux. Specifically, the Travis build on python 
3.5.2 results in a segfault when the last line is uncommented.

import argparse
parser = argparse.ArgumentParser()
group = parser.add_argument_group("Colorspace options")
group.add_mutually_exclusive_group()

--
messages: 275645
nosy: John.Didion
priority: normal
severity: normal
status: open
title: Adding a mutually exclusive group to an argument group results in 
segmentation fault under linux
type: crash
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



[issue26081] Implement asyncio Future in C to improve performance

2016-09-10 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file44531/fastfuture.patch

___
Python tracker 

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



[issue28063] Adding a mutually exclusive group to an argument group results in segmentation fault under linux

2016-09-10 Thread John Didion

John Didion added the comment:

This code also works fine when I run it myself on python 3.5.1 on an SL6 
machine, so it's either specific to 3.5.2 or it's very platform-specific.

--

___
Python tracker 

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



[issue28063] Adding a mutually exclusive group to an argument group results in segmentation fault under linux

2016-09-10 Thread SilentGhost

SilentGhost added the comment:

Cannot reproduce this either on stock 3.5.2 or 3.6 on Ubuntu.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue28054] Diff for visually comparing actual with expected in mock.assert_called_with.

2016-09-10 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +michael.foord
versions: +Python 3.7 -Python 3.3

___
Python tracker 

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



[issue28063] Adding a mutually exclusive group to an argument group results in segmentation fault under linux

2016-09-10 Thread John Didion

John Didion added the comment:

I can't reproduce it with 3.5.2 on SL6 either. So it must be a weird issue 
specific to whatever environment they're using for builds on Travis. I'll close 
this and submit it as a bug over there.

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue28063] Adding a mutually exclusive group to an argument group results in segmentation fault under linux

2016-09-10 Thread SilentGhost

Changes by SilentGhost :


--
stage:  -> resolved

___
Python tracker 

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



[issue24391] Better repr for threading objects

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I agree, that the address is the least interesting thing, and I think this is 
an argument to make it the last thing in the repr (at least for those of us who 
read from left to right). Many objects in different modules outputs the address 
last. The only exceptions are asyncio (just because it constructs reprs from 
super().__repr__(), including verbose "object" after type name), 
concurrent.futures and weakref.finalize (the latter contains multiple addresses 
in any case). Do we need "object" after type name?

--

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Hmm things are quite complicated. Brief: the build is broken for out-of-source 
cross-compiling if the host Python is an in-source build.

(Below $build_dir refers to the directory that invokes $source_dir/configure)

In an out-of-source build, setup.py relies on 
sysconfig.get_config_var('srcdir') to get correct filenames. In _init_posix(), 
_get_sysconfigdata_name() still returns an incorrect name (for example, 
_sysconfigdata_m_linux_x86_64-linux-gnu, on Linux x86_64). There's no 
_sysconfigdata_m_linux_x86_64-linux-gnu.py in 
$build_dir/build/lib.linux-aarch64-3.6, so $PYTHON_FOR_BUILD imports the one 
from the host python, which has srcdir == '.' As a result, build_ext can't find 
source files:

building 'xxlimited' extension
/home/yen/Projects/python3-android/clang-bin/cc -fPIC -Wno-unused-result 
-Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector-strong -g -fvar-tracking-assignments -g 
-fvar-tracking-assignments -march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector-strong -g -fvar-tracking-assignments -g 
-fvar-tracking-assignments -std=c99 -DPy_LIMITED_API=0x0305 -I./Include -I. 
-IInclude -I/usr/include -I/usr/local/include 
-I/home/yen/Projects/python3-android/src/cpython/build-target/Include 
-I/home/yen/Projects/python3-android/src/cpython/build-target -c xxlimited.c -o 
build/temp.linux-aarch64-3.6/xxlimited.o
clang: error: unknown argument: '-fvar-tracking-assignments'
clang: error: unknown argument: '-fvar-tracking-assignments'
clang: error: unknown argument: '-fvar-tracking-assignments'
clang: error: unknown argument: '-fvar-tracking-assignments'
clang: error: no such file or directory: 'xxlimited.c'
clang: error: no input files

Ironically, before 1d71ce4531ac, $build_dir/build/lib.linux-aarch64-3.6 has 
_sysconfigdata_m_linux_x86_64-linux-gnu.py, so building is OK.

Again, I don't know to fix it :(

[1] https://hg.python.org/cpython/file/1d71ce4531ac/setup.py#l218

--

___
Python tracker 

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



[issue28059] Windows: test_platform.test_architecture_via_symlink() regression

2016-09-10 Thread STINNER Victor

STINNER Victor added the comment:

http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/2553/steps/test/logs/stdio

test_architecture_via_symlink (test.test_platform.PlatformTest) ... Traceback 
(most recent call last):
  File "", line 1, in 
  File "D:\buildarea\3.x.bolen-windows8\build\lib\platform.py", line 501, in 

import ctypes
  File "D:\buildarea\3.x.bolen-windows8\build\lib\ctypes\__init__.py", line 7, 
in 
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
FAIL

--

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-09-10 Thread Guido van Rossum

Guido van Rossum added the comment:

> That aspect of the change is clearly a bug fix

I am happy to *rule* that we can treat it as a bugfix, but I disagree
that it's *clearly* a bugfix. It's definitely debatable. This area of
the language is so obscure and so few people remember why it was done
the way that it's done that I expect that someone out there will be
unhappy about the change. But... change happens, so it's okay.

(Please don't respond arguing the "clearly" part, just go ahead and do it. :-)

--

___
Python tracker 

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



[issue28061] Python crashes on 'from test import support'

2016-09-10 Thread STINNER Victor

STINNER Victor added the comment:

> VS breaks at line Objects/dictobject.c:2339 - 'if 
> (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)'

Can you elaborate? Does the compilation fail? Did you get a crash? What was you 
doing while getting this error/message?

... Can you please give clues how to reproduce the issue?

--

___
Python tracker 

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



[issue25969] Update lib2to3 grammar to include missing unpacking generalizations.

2016-09-10 Thread Xiang Zhang

Xiang Zhang added the comment:

Gregory, the change adds a print in: 
https://hg.python.org/cpython/file/tip/Lib/lib2to3/fixes/fix_reload.py#l29

./python -m test test_lib2to3
Run tests sequentially
0:00:00 [1/1] test_lib2to3
obj: Leaf(1, 'a')
obj: Leaf(1, 'a')
obj: Leaf(1, 'a')
obj: Leaf(1, 'a')
obj: Leaf(1, 'a')
obj: Leaf(1, 'a')
obj: Node(star_expr, [Leaf(16, '*'), Leaf(1, 'h')])
obj: Node(argument, [Leaf(36, '**'), Leaf(1, 'i')])
1 test OK.

Total duration: 12 sec
Tests result: SUCCESS

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Now that you point it out, I agree "clearly" is overstating things when it 
comes to claiming bug fix status for a form of usage that has never worked in 
the entire life of zero-argument super :)

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Brett Cannon

Brett Cannon added the comment:

Do realize that the PEP author was there and made the decision along with Guido 
to not move forward with a new feature that has not seen the light of day in a 
stable release, so I don't think blaming the sprinting environment is entirely 
fair in this case.

--

___
Python tracker 

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



[issue26900] Exclude the private API from the stable API

2016-09-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue28064] String executed inside a function ignores global statements

2016-09-10 Thread Qwert225

New submission from Qwert225:

String executed inside a function ignores global statements stated before 
string execution.

See the example below - the global variable value should be changed to 
'newText' by the function, but is not.
Example:

variable = 'text'

def changeVariable():
global variable
exec("variable = 'newText'")

changeVariable()

print(str(variable))

--
messages: 275657
nosy: Qwert225
priority: normal
severity: normal
status: open
title: String executed inside a function ignores global statements
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



[issue26081] Implement asyncio Future in C to improve performance

2016-09-10 Thread Guido van Rossum

Guido van Rossum added the comment:

The actual _futures module appears missing from your latest patch -- what's up 
with that?

--

___
Python tracker 

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



[issue28059] Windows: test_platform.test_architecture_via_symlink() regression

2016-09-10 Thread Steve Dower

Steve Dower added the comment:

That's strange, win32 should always have _ctypes available. I'll try and take a 
look later today

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

While I hadn't read the related thread at the point where I made that comment 
(so thank you for at least raising the question there), I'm still on the 
opposite side of the planet, so any decision made in less than 24 hours from 
proposal to resolution is necessarily "too fast" for global collaboration (and 
48 hours is better).

I'm not particularly fond of __definition_order__ either, but one of the 
specific points raised in the PEP 520 discussions due to Inada-san's pending 
patch was whether or not making class namespaces ordered by default would 
eliminate the need for the attribute, and the conclusion was that it 
*wouldn't*. So the "We made class namespaces ordered, so now 
__definition_order__ is gone" sounded a lot like folks forgetting that part of 
the discussions, and instead getting rid of a feature that was there for 
multiple reasons, not just because __dict__ didn't preserve the order.

--

___
Python tracker 

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



[issue28059] Windows: test_platform.test_architecture_via_symlink() regression

2016-09-10 Thread Steve Dower

Steve Dower added the comment:

Though ctypes here is incorrect anyway. I really ought to rewrite it into the 
winapi module.

I'll revert the memory leak fix and fix the tests for b1, then look at 
converting it into a native function for b2.

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Brett Cannon

Brett Cannon added the comment:

All reasonable points. You just sounded upset and I wanted to point out the 
decision was not made lightly, without discussion with the person in charge of 
the proposal and the BDFL, or we were breaking backwards-compatibility due to 
some drunken ordered dictionary stupor we were in. :)

Anyway, that's it and any further comments I have on this specific topic I'll 
put on the python-dev thread.

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue28059] Windows: test_platform.test_architecture_via_symlink() regression

2016-09-10 Thread STINNER Victor

STINNER Victor added the comment:

> Though ctypes here is incorrect anyway. I really ought to rewrite it into the 
> winapi module.

I agree, it's much better to avoid ctypes in the stdlib.

--

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

With the attached patch, the python test suite runs smoothly on android and 
without errors on linux. On android, there are two new failed test cases in 
test_sysconfig that I will look into later (in the frame of this issue, I guess 
?), but otherwise about the same tests fail that were failing before.

Here are some details about the fix:

> Another problem is that the shared libraries names of the extension modules 
> are now suffixed with the wrong triplet.

This is because _init_posix() in Lib/distutils/sysconfig.py still imports the 
native python sysconfigdata module instead of the newly built one for the 
target host.

After _init_posix() is fixed, another problem occurs: extension modules are now 
built by including /usr/include from the native system and this leads to some 
unresolved dlopen references at run time on android. The reason is that 
add_gcc_paths() in setup.py calls sysconfig.get_config_var('CC') and this 
returns the native compiler instead of the cross-compiler.

So a solution is to set the _SYSCONFIGDATA_NAME environment variable in 
PYTHON_FOR_BUILD.

--
Added file: http://bugs.python.org/file44532/sysconfigdata_env_var.diff

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-09-10 Thread Martin Teichmann

Martin Teichmann added the comment:

This is the originial patch rebased such that it applies to the current master.

As a detail in the discussion: "__classcell__" is not visible during the 
execution of the class body, as it is added at the end of the class body. In 
this regard, it is different from "__qualname__", which is set at the beginning 
of the class body such that it may be changed.

The new __classcell__ does show up, however, in the namespace parameter to the 
__new__ method of the metaclass.

--
Added file: http://bugs.python.org/file44533/classcell.patch

___
Python tracker 

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



[issue25969] Update lib2to3 grammar to include missing unpacking generalizations.

2016-09-10 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Haha whoops, that'd be my debugging. I'll remove it this weekend if nobody
else has gotten to it.

On Sat, Sep 10, 2016, 9:44 AM Xiang Zhang  wrote:

>
> Xiang Zhang added the comment:
>
> Gregory, the change adds a print in:
> https://hg.python.org/cpython/file/tip/Lib/lib2to3/fixes/fix_reload.py#l29
>
> ./python -m test test_lib2to3
> Run tests sequentially
> 0:00:00 [1/1] test_lib2to3
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Node(star_expr, [Leaf(16, '*'), Leaf(1, 'h')])
> obj: Node(argument, [Leaf(36, '**'), Leaf(1, 'i')])
> 1 test OK.
>
> Total duration: 12 sec
> Tests result: SUCCESS
>
> --
> nosy: +xiang.zhang
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Zachary Ware

Zachary Ware added the comment:

LGTM, thank you Xavier!

--

___
Python tracker 

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



[issue24693] zipfile: change RuntimeError to more appropriate exception type

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 22112359abcf by Serhiy Storchaka in branch 'default':
Issue #24693: Changed some RuntimeError's in the zipfile module to more
https://hg.python.org/cpython/rev/22112359abcf

--
nosy: +python-dev

___
Python tracker 

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



[issue2380] Raise a Py3K warning for catching nested tuples with non-BaseException exceptions

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: belopolsky -> 
versions:  -Python 2.6, Python 2.7

___
Python tracker 

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



[issue15390] PEP 3121, 384 refactoring applied to datetime module

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: belopolsky -> 
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue8915] Use locale.nl_langinfo in _strptime

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.7 -Python 3.3

___
Python tracker 

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



[issue9398] Unify sys.settrace and sys.setprofile tests

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: belopolsky -> 
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



[issue26885] Add parsing support for more types in xmlrpc

2016-09-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue24693] zipfile: change RuntimeError to more appropriate exception type

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Changed cases 3, 4, 5, 7, and 8.

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

___
Python tracker 

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



[issue766910] fix one or two bugs in trace.py

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: belopolsky -> 
versions: +Python 3.7 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue10342] trace module cannot produce coverage reports for zipped modules

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



  1   2   >