[issue23790] When xdrlib.Packer().pack_string() fails, the Packer is corrupted

2015-05-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - rejected
stage:  - resolved
status: pending - closed

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



[issue23970] Update distutils.msvccompiler for VC14

2015-05-27 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

I was away the last few days, so just found the changes now.

IMO, it's a good idea to use a new module for the new compiler, but don't think 
it's a good idea to make the whole module private, since this implicitly 
disallows sub-classing the compiler class going forward, which people will need 
to do sooner or later.

Why not rename the module to msvc14compiler (or some other public name) instead 
?

--

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



[issue23914] pickle fails with SystemError

2015-05-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
priority: normal - low

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



[issue17941] namedtuple should support fully qualified name for more portable pickling

2015-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 That will not work correctly if the module name has a dot in it.

Pickling qualified names with arbitrary number of dots is supported in 3.4 with 
protocol 4 and in 3.5 with all protocols (backward compatibly).

--
nosy: +serhiy.storchaka

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



[issue22955] Pickling of methodcaller, attrgetter, and itemgetter

2015-05-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-27 Thread Thomas Guettler

Thomas Guettler added the comment:

Who has enough knowledge of the tarfile module to create a good patch?

--
nosy: +guettli

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



[issue24295] Backport of #17086 causes regression in setup.py

2015-05-27 Thread Moritz Sichert

New submission from Moritz Sichert:

In 7955d769fdf5 a bug of #14330 got fixed and it got backported for 2.7.
But these changes were reverted by another backport in 8ee6d96a1019 (which was 
a backport for #17086).

The issue here is that right know setup.py looks for ssl and other libs' 
headers in /usr/include *first* before it searches in /usr/local/include.
That makes it really hard to compile python with a setup where you have a newer 
version of openssl in /usr/local than the one in /usr.

--
components: Build
files: setup_regression.patch
keywords: patch
messages: 244154
nosy: moritzs
priority: normal
severity: normal
status: open
title: Backport of #17086 causes regression in setup.py
type: compile error
versions: Python 2.7
Added file: http://bugs.python.org/file39515/setup_regression.patch

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



[issue23513] Add support for classes/object model in multiprocessing/pickle

2015-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please provide full example that you want to work and test it in 
Python 3.5? I suppose your issue is fixed in 3.5.

--
nosy: +serhiy.storchaka

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



[issue18032] Optimization for set/frozenset.issubset()

2015-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In C implementation no need to create set object seen. More efficient way is to 
use bit array.

Here is a patch that uses this approach.

./python -m timeit -s s1 = set(range(1000)) s1.issubset(range(1000))
Unpatched  : 1 loops, best of 3: 115 usec per loop
bru's patch: 1 loops, best of 3: 114 usec per loop
My patch   : 1 loops, best of 3: 92.6 usec per loop

./python -m timeit -s s1 = set(range(1000)) s1.issubset(range(1, 1000))
Unpatched  : 1 loops, best of 3: 73.4 usec per loop
bru's patch: 1 loops, best of 3: 114 usec per loop
My patch   : 1 loops, best of 3: 93 usec per loop

./python -m timeit -s s1 = set(range(100)) s1.issubset(range(1, 1000))
Unpatched  : 1 loops, best of 3: 73.6 usec per loop
bru's patch: 1 loops, best of 3: 89 usec per loop
My patch   : 1 loops, best of 3: 62.4 usec per loop

./python -m timeit -s s1 = set(range(100)) s1.issubset(range(1000))
Unpatched  : 1 loops, best of 3: 75.5 usec per loop
bru's patch: 10 loops, best of 3: 8.77 usec per loop
My patch   : 10 loops, best of 3: 5.34 usec per loop

./python -m timeit -s s1 = set('a'); s2 = ['a'] + ['b'] * 1 
s1.issubset(s2)
Unpatched  : 1000 loops, best of 3: 326 usec per loop
bru's patch: 100 loops, best of 3: 0.394 usec per loop
My patch   : 100 loops, best of 3: 0.409 usec per loop

./python -m timeit -s s1 = set('a'); from itertools import repeat 
s1.issubset(repeat('a'))
Unpatched  : NEVER FINISHES
bru's patch: 100 loops, best of 3: 0.794 usec per loop
My patch   : 100 loops, best of 3: 0.725 usec per loop

--
nosy: +serhiy.storchaka

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



[issue23574] datetime: support leap seconds

2015-05-27 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Here's what mxDateTime uses:

 import mx.DateTime

 t1 = mx.DateTime.DateTime(2012,6,30,23,59,60)
 t2 = mx.DateTime.DateTime(2012,7,1,0,0,0)

 t1
mx.DateTime.DateTime object for '2012-06-30 23:59:60.00' at 7fbb36008d68
 t2
mx.DateTime.DateTime object for '2012-07-01 00:00:00.00' at 7fbb36008d20

 t2-t1
mx.DateTime.DateTimeDelta object for '00:00:00.00' at 7fbb35ff0540
 (t2-t1).seconds
0.0

 t1 + mx.DateTime.oneSecond
mx.DateTime.DateTime object for '2012-07-01 00:00:01.00' at 7fbb360083d8

It preserves the broken down values, but uses POSIX days of 86400 seconds per 
day to calculate time deltas.

It's a compromise, not a perfect solution, but it prevents applications from 
failing for that one second every now and then.

I don't believe there is a perfect solution, since what your application or 
users expect may well be different. All I can say is that raising exceptions in 
these rare cases is not what your users typically want :-)

--
nosy: +lemburg

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



[issue18032] Optimization for set/frozenset.issubset()

2015-05-27 Thread Bruno Cauet

Bruno Cauet added the comment:

Serhiy, that sounds good but I think that you have forgotten to attach the 
mentioned patch.

--

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-27 Thread Martin Panter

Martin Panter added the comment:

I have learnt to run the interactive interpeter (and also most of my own 
scripts) with the -b -Wall options. But having these switched on automatically 
may not be a bad thing.

--
nosy: +vadmium

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



[issue24296] Queue documentation note needed

2015-05-27 Thread Sandy Chapman

New submission from Sandy Chapman:

The example at the bottom of the following page should have a warning added:

https://docs.python.org/2/library/queue.html

The warning should be such that the user is informed that the threads in the 
example are not cleaned up and will continue to run. Any future additions to 
the queue will then be processed immediately by those threads.

--
assignee: docs@python
components: Documentation
messages: 244156
nosy: Sandy Chapman, docs@python
priority: normal
severity: normal
status: open
title: Queue documentation note needed

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



[issue23275] Can assign [] = (), but not () = []

2015-05-27 Thread Rahul Gupta

Rahul Gupta added the comment:

isn't it logical?

[] is a mutable data structure
while () is a immutable data structure

(b, a) = [1, 2] is fine because a and b are mutable

--
nosy: +Rahul Gupta

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



[issue24297] Lib/symbol.py is out of sync with Grammar/Grammar

2015-05-27 Thread R. David Murray

R. David Murray added the comment:

It is automatically generated in that it isn't hand-written.  On the other 
hand, it isn't automatically generated in the sense of being part of the make 
process, ./python symbol.py is supposed to be run by hand when it is 
appropriate.

A bit ago someone wrote tests for keyword.py that among other things made sure 
we didn't forget to update it when needed.  Someone needs to write a similar 
test for symbol, it looks like.

Whether or not one or both of these could be/should be incorporated into make 
(now that we have 'make touch' to deal with the consequences) is a separate 
question.  As to why it is checked in, we check in almost all the build 
artifacts previous to the compile stage, so that there is no need to have an 
already-built python to build python from source.

--
nosy: +benjamin.peterson, r.david.murray

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-27 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See discussion on Python-Ideas [1].

[1] http://comments.gmane.org/gmane.comp.python.ideas/32191

--
components: +Interpreter Core
nosy: +serhiy.storchaka
versions: +Python 3.6

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



[issue24296] Queue documentation note needed

2015-05-27 Thread R. David Murray

R. David Murray added the comment:

If you know anything about threads you can see that the threads are not 
explicitly shut down.  As a standalone example it is correct, in that they 
get shut down at interpreter shutdown.

I'm not sure it is appropriate to include what is essentially a thread tutorial 
note in the queue docs.  A crosslink to threading would certainly be a good 
idea; perhaps the introductory sentence could be tweaked to point people who 
don't already know threads in the correct direction for enlightenment.

--
nosy: +r.david.murray

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



[issue23275] Can assign [] = (), but not () = []

2015-05-27 Thread Martin Panter

Martin Panter added the comment:

I prefer to unpack into square brackets in general because it is a mnemonic for 
the star argument being a list:

 (a, *b) = range(3)
 a
0
 b  # A list, even though it was unpacked using tuple-like syntax
[1, 2]

--

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



[issue24297] Lib/symbol.py is out of sync with Grammar/Grammar

2015-05-27 Thread Marius Gedminas

New submission from Marius Gedminas:

While investigating 
https://bitbucket.org/pypa/setuptools/issue/388/install-from-sdist-fails-on-python-350b1
 I noticed that Grammar/Grammar changed in 3.5, but Lib/symbol.py wasn't 
updated.

I'm not familiar with the CPython parser, but I suspect that 
adding/removing/splitting grammar rules causes the nonterminal symbol IDs to 
shift, which ought to require an update in symbol.py.

Huh.  Now I see a comment in the file says it is automatically generated, but 
in that case why wasn't that done when I did 'hg pull -u  make  make 
install'?  Why is it checked into source control?

--
components: Library (Lib)
messages: 244160
nosy: mgedmin
priority: normal
severity: normal
status: open
title: Lib/symbol.py is out of sync with Grammar/Grammar
versions: Python 3.5

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



[issue23275] Can assign [] = (), but not () = []

2015-05-27 Thread Devin Jeanpierre

Devin Jeanpierre added the comment:

[a, b] = (1, 2) is also fine.

--

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



[issue23970] Update distutils.msvccompiler for VC14

2015-05-27 Thread Steve Dower

Steve Dower added the comment:

I understood it only disallowed complaining about breaking changes without a 
deprecation cycle :)

I'm sorry I didn't realize you were away. If you have examples of how 
subclassing this class (and not just CCompiler) is useful and does something 
that can't be done through the existing interface, then we'll have something to 
discuss. From past experiences, I now prefer to default to disallow 
inheritance by default, as it isn't a breaking change to allow it again in the 
future but you can't go the other way.

--

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



[issue23275] Can assign [] = (), but not () = []

2015-05-27 Thread Ionel Cristian Mărieș

Changes by Ionel Cristian Mărieș cont...@ionelmc.ro:


--
nosy: +ionelmc

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



[issue18032] Optimization for set/frozenset.issubset()

2015-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, sorry. Here is it.

--
Added file: http://bugs.python.org/file39516/set_issubset_bitarray.patch

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



[issue23970] Update distutils.msvccompiler for VC14

2015-05-27 Thread Mark Lawrence

Mark Lawrence added the comment:

If the name is changed I'd like to see something that doesn't reflect the msvc 
version, as my understanding is that from now on the old compatibility issues 
are gone.

--

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



[issue24295] Backport of #17086 causes regression in setup.py

2015-05-27 Thread Matthias Klose

Matthias Klose added the comment:

I'll look at this in June. I don't think that reverting is the right choice 
here.

--

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



[issue23359] Speed-up set_lookkey()

2015-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why you have added entry-hash == 0?

--

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-05-27 Thread Paul Hobbs

New submission from Paul Hobbs:

Using pid namespacing it is possible to have multiple processes with the same 
pid.  semlock_new creates a semaphore file with the template 
/dev/shm/mp{pid}-{counter}.  This can conflict if the same semaphore file 
already exists due to another Python process have the same pid.

This bug has been fixed in Python3: https://bugs.python.org/issue8713.  
However, that patch is very large (40 files, ~4.4k changed lines) and only 
incidentally fixes this bug while introducing a large backwards-incompatible 
refactoring and feature addition.

The following small patch to just _multiprocessing/semaphore.c fixes the 
problem by using the system clock and retrying to avoid conflicts:

--- a/Modules/_multiprocessing/semaphore.c
+++ b/Modules/_multiprocessing/semaphore.c
@@ -7,6 +7,7 @@
  */
 
 #include multiprocessing.h
+#include time.h
 
 enum { RECURSIVE_MUTEX, SEMAPHORE };
 
@@ -419,7 +420,7 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject 
*kwds)
 {
 char buffer[256];
 SEM_HANDLE handle = SEM_FAILED;
-int kind, maxvalue, value;
+int kind, maxvalue, value, try;
 PyObject *result;
 static char *kwlist[] = {kind, value, maxvalue, NULL};
 static int counter = 0;
@@ -433,10 +434,24 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject 
*kwds)
 return NULL;
 }
 
-PyOS_snprintf(buffer, sizeof(buffer), /mp%ld-%d, (long)getpid(), 
counter++);
+/* With pid namespaces, we may have multiple processes with the same pid.
+ * Instead of relying on the pid to be unique, we use the microseconds time
+ * to attempt to a unique filename. */
+for (try = 0; try  100; ++try) {
+struct timespec tv;
+long arbitrary = clock_gettime(CLOCK_REALTIME, tv) ? 0 : tv.tv_nsec;
+PyOS_snprintf(buffer, sizeof(buffer), /mp%ld-%d-%ld,
+  (long)getpid(),
+  counter++,
+  arbitrary);
+SEM_CLEAR_ERROR();
+handle = SEM_CREATE(buffer, value, maxvalue);
+if (handle != SEM_FAILED)
+break;
+else if (errno != EEXIST)
+goto failure;
+}
 
-SEM_CLEAR_ERROR();
-handle = SEM_CREATE(buffer, value, maxvalue);
 /* On Windows we should fail if GetLastError()==ERROR_ALREADY_EXISTS */
 if (handle == SEM_FAILED || SEM_GET_LAST_ERROR() != 0)
 goto failure;

--
messages: 244211
nosy: Paul Hobbs
priority: normal
severity: normal
status: open
title: OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid 
- process mapping.
type: enhancement
versions: Python 2.7

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-05-27 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +devin, sbt
stage:  - patch review

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



[issue24299] 2.7.10 test__locale.py change breaks on Solaris

2015-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not the Right Answer because on Linux the thousands-separator for the 
fr_FR locale is a space.

Perhaps better solution would be to specify the UTF-8 encoding for fr_FR locale.

--
assignee:  - serhiy.storchaka
nosy: +lemburg, loewis, serhiy.storchaka
stage:  - patch review
versions: +Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39523/issue24299-2.7.patch

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-05-27 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +davin -devin

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-05-27 Thread Mike Frysinger

Changes by Mike Frysinger vap...@users.sourceforge.net:


--
nosy: +vapier

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



[issue24288] Include/opcode.h is modified during building

2015-05-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue24301] gzip module failing to decompress valid compressed file

2015-05-27 Thread Ned Deily

Ned Deily added the comment:

Can you add a public copy of a file that fails this way?  There are several 
open issues with gzip, like Issue1159051, that might cover this but it's hard 
to know for sure without a test case.

--
nosy: +ned.deily
type: crash - 

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-27 Thread Thomas Kluyver

Changes by Thomas Kluyver tak...@gmail.com:


--
nosy: +takluyver

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



[issue24295] Backport of #17086 causes regression in setup.py

2015-05-27 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +doko
priority: normal - high

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

But why was it building just fine before this commit? I haven't updated my 
system packages in a while.

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Steve Dower

Steve Dower added the comment:

Those macros are only included if Py_BUILD_CORE is defined, regardless of 
platform (see Include/pyport.h).

Is it possible that's being undefined somehow?

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Steve Dower

Steve Dower added the comment:

Looking at a `grep PY_CORE_CFLAGS`, that sounds reasonable to me.

I assumed that all core files were already being compiled with Py_BUILD_CORE 
(they certainly are for Windows), so this seems to be an oversight for 
timemodule.c.

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Ned Deily

Ned Deily added the comment:

I think you have a Python installed in /usr/local that is interfering.

--

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



[issue24301] gzip module failing to decompress valid compressed file

2015-05-27 Thread Eric Gorr

New submission from Eric Gorr:

I have a file whose first four bytes are 1F 8B 08 00 and if I use gunzip from 
the command line, it outputs:

gzip: zImage_extracted.gz: decompression OK, trailing garbage ignored

and correctly decompresses the file. However, if I use the gzip module to read 
and decompress the data, I get the following exception thrown:

  File /usr/lib/python3.4/gzip.py, line 360, in read
while self._read(readsize):
  File /usr/lib/python3.4/gzip.py, line 433, in _read
if not self._read_gzip_header():
  File /usr/lib/python3.4/gzip.py, line 297, in _read_gzip_header
raise OSError('Not a gzipped file')

I believe the problem I am facing is the same one described here in this SO 
question and answer:

http://stackoverflow.com/questions/4928560/how-can-i-work-with-gzip-files-which-contain-extra-data


This would appear to be serious bug in the gzip module that needs to be fixed.

--
components: Extension Modules
messages: 244188
nosy: Eric Gorr
priority: normal
severity: normal
status: open
title: gzip module failing to decompress valid compressed file
type: crash
versions: Python 3.4

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

 Wild guess: perhaps you did a ./configure or the Makefile did an implicit 
 call to configure recently and/or you did a make install (to /usr/local) 
 before?

I don't have 'python' in /usr/local and /usr/local/bin

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Ned Deily

Ned Deily added the comment:

But do you have any Python header files in /usr/local/include?  The gcc command 
you pasted shows -I/usr/local/include?  Mine don't show that.

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

yury@ysmac ~/dev/py/cpython (HG: default?) $ ls /usr/local/include/
librtmp osxfuse pycairo

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

FWIW, I think that in order to use _Py_BEGIN_SUPPRESS_IPH timemodule.c should 
be compiled with PY_CORE_CFLAGS, and that should be reflected in the Makefile.

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Ned Deily

Ned Deily added the comment:

Yury, I'm not seeing that compile error with current head of default on OS X. 
Try a clean build, perhaps?

--
nosy: +ned.deily

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



[issue24300] Code Refactoring in function nis_mapname()

2015-05-27 Thread pankaj.s01

New submission from pankaj.s01:

Hi,
Here , A code refactoring patch have been submitted for 
Function: nis_mapname() and 
File: Python-3.4.3/Modules/nismodule.c

Please Review it,

Thanks,
Pankaj

--
components: Extension Modules
files: Python-3.4.3-nismodule.patch
keywords: patch
messages: 244183
nosy: pankaj.s01
priority: normal
severity: normal
status: open
title: Code Refactoring  in function nis_mapname()
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file39521/Python-3.4.3-nismodule.patch

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



[issue24298] inspect.signature includes bound argument for wrappers around bound methods

2015-05-27 Thread Petr Viktorin

Petr Viktorin added the comment:

Reported by David Gibson here: 
https://bugzilla.redhat.com/show_bug.cgi?id=1201990

--

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



[issue24298] inspect.signature includes bound argument for wrappers around bound methods

2015-05-27 Thread Petr Viktorin

New submission from Petr Viktorin:

When obtaining the signature of a bound method, inspect.signature, by default, 
omits the self argument to the method, since it is already specified in the 
bound method.  However, if you create a wrapper around a bound method with 
functools.update_wrapper() or @functools.wraps, calling inspect.signature on 
the wrapper will return a signature which includes the self argument.

Reproducer:

import inspect
import functools

class Foo(object):
def bar(self, testarg):
pass

f = Foo()

@functools.wraps(f.bar)
def baz(*args):
f.bar(*args)


assert inspect.signature(baz) == inspect.signature(f.bar)

The program will fail with an assertion error. Examining inspect.signature(baz) 
shows:

 print(inspect.signature(baz))
(self, testarg)
 print(inspect.signature(f.bar))
(testarg)

Looking at the code in inspect.py:

The handling of bound methods appears at the top of 
inspect._signature_internal().  Since baz is not itself a bound method, it 
doesn't trigger this case.  Instead inspect.unwrap is called, returning f.bar.

inspect._signature_is_functionlike(f.bar) returns True, causing 
Signature.from_function to be called.  Unlike the direct bound method case, 
this includes the bound method's self argument.

--
messages: 244178
nosy: encukou
priority: normal
severity: normal
status: open
title: inspect.signature includes bound argument for wrappers around bound 
methods
versions: Python 3.4, Python 3.5

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



[issue24299] 2.7.10 test__locale.py change breaks on Solaris

2015-05-27 Thread John Beck

New submission from John Beck:

The upgrade from 2.7.9 to 2.7.10 resulted in test__locale failing.
This test had previously succeeded.  The difference is that the
thousands-separator for the fr_FR locale in known_numerics was
changed from '' (i.e., unknown) to ' ' (i.e. space).  But on Solaris,
'\xa0' (i.e., non-break space in ISO8859-1) is what the fr_FR locale
returns for LC_NUMERIC's thousands-separator.  I inquired with our
Globalization experts, who replied:

---
The short answer is that CLDR defines the group separator as no-break 
space (U+00A0): http://st.unicode.org/cldr-apps/v#/fr/Symbols/
so the solaris locale fr_FR (=fr_FR.ISO8859-1) is correct.

The long answer is that the situation is confusing, the fr_FR.ISO8859-1
defines the thousands_sep as no-break space, but fr_FR.UTF-8 defines
the thousands_sep as space (U+0020). There is no technical limit, but
combination of POSIX [1] and C language [2] limits the thousands_sep
to single byte character. The no-break space is single byte character
in ISO8859-1, but multibyte in UTF-8.

[1] 
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04

[2] http://en.cppreference.com/w/c/locale/lconv

http://en.cppreference.com/w/c/language/character_constant
---
The attached patch fixes the test on Solaris.  It is not clear if this
is the Right Answer for all platforms, but I offer the attached patch
in case it helps anyone else.

--
components: Library (Lib)
files: 25-test__locale.patch
keywords: patch
messages: 244181
nosy: jbeck
priority: normal
severity: normal
status: open
title: 2.7.10 test__locale.py change breaks on Solaris
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file39520/25-test__locale.patch

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

This exact sequence of commands

$ make clean
$ ./configure
$ make -j8

does not build.

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

$ hg status
shows nothing, branch is default (but 3.5 doesn't get built either) etc.

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Ned Deily

Ned Deily added the comment:

Wild guess: perhaps you did a ./configure or the Makefile did an implicit call 
to configure recently and/or you did a make install (to /usr/local) before?

--

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



[issue24297] Lib/symbol.py is out of sync with Grammar/Grammar

2015-05-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 843fe7e831a8 by Yury Selivanov in branch '3.5':
Issue 24297: Update symbol.py. See also issue 24017.
https://hg.python.org/cpython/rev/843fe7e831a8

New changeset 87509d71653b by Yury Selivanov in branch 'default':
Issue 24297: Update symbol.py. See also issue 24017.
https://hg.python.org/cpython/rev/87509d71653b

--
nosy: +python-dev

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



[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 843fe7e831a8 by Yury Selivanov in branch '3.5':
Issue 24297: Update symbol.py. See also issue 24017.
https://hg.python.org/cpython/rev/843fe7e831a8

New changeset 87509d71653b by Yury Selivanov in branch 'default':
Issue 24297: Update symbol.py. See also issue 24017.
https://hg.python.org/cpython/rev/87509d71653b

--

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



[issue24297] Lib/symbol.py is out of sync with Grammar/Grammar

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Attached is a new unittest to make sure that symbol.py is always updated.  
Essentially it's the same test that we have for keywords.py.  Please review.

--
assignee:  - yselivanov
keywords: +patch
nosy: +yselivanov
stage:  - patch review
versions: +Python 3.6
Added file: http://bugs.python.org/file39519/test_symbol.patch

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



[issue24288] Include/opcode.h is modified during building

2015-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think the intension was to produce aligned data, but the alignment of the 
second column was wrong. Here is a patch that corrects formatting.

--
stage: needs patch - patch review
Added file: http://bugs.python.org/file39517/generate_opcode_h_align.patch

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



[issue24297] Lib/symbol.py is out of sync with Grammar/Grammar

2015-05-27 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
priority: normal - release blocker

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



[issue24296] Queue documentation note needed

2015-05-27 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
assignee: docs@python - rhettinger
nosy: +rhettinger

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



[issue24296] Queue documentation note needed

2015-05-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

It is normal for daemon threads to not be shut down.   That is why they exist.  
The purpose of Queue.join() is to give other threads a way to know when daemons 
have finished doing their work (i.e. a print manager thread to indicate that it 
is done printing).  If the worker threads were actually going to terminate, you 
wouldn't need Queue.join(), you would use a Thread.join().

--

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



[issue24288] Include/opcode.h is modified during building

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

lgtm

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

timemodule.c no longer compiles on MacOSX:


gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv 
-O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I./Include 
-I. -IInclude -I/usr/local/include -I/Users/yury/dev/py/cpython/Include 
-I/Users/yury/dev/py/cpython -c /Users/yury/dev/py/cpython/Modules/timemodule.c 
-o 
build/temp.macosx-10.10-x86_64-3.5/Users/yury/dev/py/cpython/Modules/timemodule.o
/Users/yury/dev/py/cpython/Modules/timemodule.c:656:9: error: use of undeclared 
identifier '_Py_BEGIN_SUPPRESS_IPH'
_Py_BEGIN_SUPPRESS_IPH
^
/Users/yury/dev/py/cpython/Modules/timemodule.c:658:9: error: use of undeclared 
identifier '_Py_END_SUPPRESS_IPH'
_Py_END_SUPPRESS_IPH
^
2 errors generated.

--
nosy: +yselivanov
priority: normal - critical

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



[issue24270] PEP 485 (math.isclose) implementation

2015-05-27 Thread Tal Einat

Tal Einat added the comment:

Attached yet another revised version of the math.isclose() patch.

This patch fixes a problem with the tests in the previous patch which causes 
them to fail when the full test suite is run.

I've also slightly reworded the doc-string.

Hopefully this is ready to go in!

--
Added file: http://bugs.python.org/file39518/math_isclose_v4.patch

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Steve Dower

Steve Dower added the comment:

That change was in for beta 1, so we would have noticed if we didn't get Mac 
builds.

Something else has changed, probably some headers.

--

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



[issue24302] Dead Code of Handler check in function faulthandler_fatal_error()

2015-05-27 Thread pankaj.s01

New submission from pankaj.s01:

Hi,
There is dead code reported in this issue and I think no need to check for NULL 
of 'handler' in function faulthandler_fatal_error() and file 
Python-3.4.3/Modules/faulthandler.c . where 'handler' is pointed to staic array 
faulthandler_handlers[] which never will be null inside loop with 
faulthandler_nsignals value and doesn't means to check for NULL outside of 
loop. but if there is possibility of 'handler' to be NULL then it should be 
check inside the loop until
handler-signum is not equal to signum and then break;

--
components: Extension Modules
files: Python-3.4.3-faulthandler.patch
keywords: patch
messages: 244195
nosy: pankaj.s01
priority: normal
severity: normal
status: open
title: Dead Code of Handler check in function faulthandler_fatal_error()
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file39522/Python-3.4.3-faulthandler.patch

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



[issue24298] inspect.signature includes bound argument for wrappers around bound methods

2015-05-27 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
nosy: +yselivanov

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

 Towards the end of the configured top-level Makefile, you should see:

Yes, I don't see that line.  What should I do to regenerate it?  And another 
question: what did go wrong with my checkout?

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Majeed Arni

Majeed Arni added the comment:

Though %f is a valid format from Python's doc 
https://docs.python.org/2/library/datetime.html, the fix just ignores it on 
Windows? can we atleast get milliseconds on Windows and Micro on Linux?

%f  Microsecond as a decimal number, zero-padded on the left.   00, 
01, ..., 99 (4)

%f is an extension to the set of format characters in the C standard (but 
implemented separately in datetime objects, and therefore always available). 
When used with the strptime() method, the %f directive accepts from one to six 
digits and zero pads on the right.

New in version 2.6.

--

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



[issue23359] Speed-up set_lookkey()

2015-05-27 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue23359] Speed-up set_lookkey()

2015-05-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cd1e1715becd by Raymond Hettinger in branch 'default':
Issue #23359: Specialize set_lookkey intoa lookup function and an insert 
function.
https://hg.python.org/cpython/rev/cd1e1715becd

--

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



[issue23275] Can assign [] = (), but not () = []

2015-05-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Berker's patch looks good.
It has several virtues:

* the error message is reasonable and clear
* it makes the language more consistent
* it doesn't break any existing code.
* it makes the AST a little simpler and faster
  by removing a special case

The patch needs to updated:
* remove the whatsnew entry
* fix test_codeop which expects del () to raise SyntaxError
* fix test_syntax which fails on () = 1 and del ()
* fix test_with which fails on with mock as ()

--
assignee:  - rhettinger
versions: +Python 3.6 -Python 3.5

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Ned Deily

Ned Deily added the comment:

Yury, another (less) wild guess: do you have an out-of-date Modules/Setup or 
Setup.local?  timemodule is defined in Setup.dist but that will be overridden 
by a locally modified copy in the Modules directory.  Towards the end of the 
configured top-level Makefile, you should see:

# Rules appended by makedepend

[...]

Modules/timemodule.o: $(srcdir)/Modules/timemodule.c; $(CC) $(PY_CORE_CFLAGS)  
-c $(srcdir)/Modules/timemodule.c -o Modules/timemodule.o

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread R. David Murray

R. David Murray added the comment:

Note that when I run into build problems after an update, I generally run 'make 
distclean' and then redo the configure/make.  This generally cleans up any 
problems like this (and I don't find that I need to do it very often.)

--

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



[issue24302] Dead Code of Handler check in function faulthandler_fatal_error()

2015-05-27 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +haypo

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Ned Deily

Ned Deily added the comment:

So you did, sorry!  Another, perhaps evan more reliable option is (requires 
enabling the purge extension in hg):

hg purge --all

--

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



[issue24298] inspect.signature includes bound argument for wrappers around bound methods

2015-05-27 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
nosy: +ncoghlan

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Ned Deily

Ned Deily added the comment:

Check the times and contents on all of your Modules/Setup* files.  Try deleting 
Setup.local for one.

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

 Check the times and contents on all of your Modules/Setup* files.  Try 
 deleting Setup.local for one.

I just made a clean checkout and that helped.  I have no idea what caused this. 
 Thank you, Ned, for troubleshooting this with me!

--
priority: critical - normal

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Ned Deily

Ned Deily added the comment:

 Note that when I run into build problems after an update, I generally
 run 'make distclean' and then redo the configure/make.

Yes, but I believe that won't help with changed Modules/Setup* files and, 
because it is needed in the core interpreter executable, timemodule.c is 
supposed to be built using Setup and not setup.py.  Setup and Setup.local are 
designed to be locally modified and thus not revision controlled nor cleaned by 
make clean:

$ cat Modules/Setup.dist
# The file Setup is used by the makesetup script to construct the files
# Makefile and config.c, from Makefile.pre and config.c.in,
# respectively.  The file Setup itself is initially copied from
# Setup.dist; once it exists it will not be overwritten, so you can edit
# Setup to your heart's content.  Note that Makefile.pre is created
# from Makefile.pre.in by the toplevel configure script.
[...]
$ hg stat --all Modules
I Modules/Setup
I Modules/Setup.config
I Modules/Setup.local

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Steve, maybe you can surround _Py_BEGIN_SUPPRESS_IPH with #ifdef 
Py_BUILD_CORE?

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread R. David Murray

R. David Murray added the comment:

Right, that's why I said make *dist*clean.  That does delete any existing Setup 
file(s), which is what you want when working with a checkout for Python 
development purposes.

--

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



[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-05-27 Thread Steve Dower

Steve Dower added the comment:

When do we build timemodule.c outside of core?

--

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



[issue24298] inspect.signature includes bound argument for wrappers around bound methods

2015-05-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks for reporting this, Petr!

Nick, could you please take a look at the patch?

--
assignee:  - yselivanov
keywords: +patch
stage:  - patch review
versions: +Python 3.6
Added file: http://bugs.python.org/file39524/signature.patch

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-05-27 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue23275] Can assign [] = (), but not () = []

2015-05-27 Thread flying sheep

flying sheep added the comment:

 isn't it logical?
 
 [] is a mutable data structure
 while () is a immutable data structure

but you don’t assign to data structures, but to names. you *modify* data 
structures. and in the square bracket assignment syntax you don’t modify the 
list created by the []. in fact the [] never even create a list.

—

also it’s news to me that [a, b] = range(2) works!

i always did a, b = range(2), and knew that (a, b) = range(2) works.

but assigning to something looking like a list literal is new and surprising to 
me. (and i thought i’ve mastered every corner of python’s syntax)

--
nosy: +flying sheep

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



[issue24304] Documentation broken link to license

2015-05-27 Thread Leonardo Tada

New submission from Leonardo Tada:

In this page 
https://docs.python.org/3.4/faq/general.html#are-there-copyright-restrictions-on-the-use-of-python
the link for the PSF license page is broken.

--
assignee: docs@python
components: Documentation
messages: 244217
nosy: Leonardo Tada, docs@python
priority: normal
severity: normal
status: open
title: Documentation broken link to license

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



[issue8232] webbrowser.open incomplete on Windows

2015-05-27 Thread Brandon Milam

Brandon Milam added the comment:

I kept the changes to the WindowsDefault.open() method and used and extended 
eryksun's code to build the browser list using the registry. Also I added 
support for a few more browsers. Some of the browsers I could not find ways to 
differentiate between opening a new window or new tab using command line flags. 
This also removed the hardcoding I had put in the get function.

--
Added file: http://bugs.python.org/file39525/webbrowserfix2.patch

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



[issue24295] Backport of #17086 causes regression in setup.py

2015-05-27 Thread Moritz Sichert

Moritz Sichert added the comment:

I wouldn't call it reverting since it already was like this before and only got 
changed by accident in another backport.

--

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



[issue23359] Speed-up set_lookkey()

2015-05-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

[Reply to pitrou that I didn't seem to be able to make on Rietveld]

This part of the code is the most time sensitive and warrants expansion much 
more than other proposals (set copying, subset tests, etc).  I long aspired to 
split the lookup and insertion logic.  The former doesn't need dummy tracking 
and its split relieves the callers of doing dummy checks.  The latter needed to 
be more tightly integrated with set_insert_entry.  Both sets of logic have 
different branch prediction statistics depending on the input data.  Working 
going forward will be made easier for me by having the lookup and insertion 
logic separated.

The speed-up is modest but this part of a long series of modest speed-ups 
collectively adding-up to a nice boost.  The next in line is possibly adding 
likely/unlikely macros to improve the quality of code generation across 
different platforms. Overall the code size is just about the same it was in 
Python 2.7.

--

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



[issue23575] MIPS64 needs ffi's n32.S

2015-05-27 Thread Frank Schaefer

Frank Schaefer added the comment:

This patch alone is apparently not enough.  When this is enabled, and python 
2.7.10 is built with -mabi=n32, make test segfaults on test_ctypes.  Using 
--with(out)-system-ffi does not make a difference.

When I run the test by itself, it specifically fails at:

test_pyobject (ctypes.test.test_callbacks.Callbacks) ... Segmentation fault 
(core dumped)

I'm guessing Python is doing something bogus with libffi that kills it 
specifically on mips n32.

--
nosy: +kelledin

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



[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-05-27 Thread Martin Panter

Martin Panter added the comment:

I reported this to Gnu Readline: 
https://lists.gnu.org/archive/html/bug-readline/2015-05/msg00014.html. So far 
it sounds like there is no general solution. I am posting a patch implementing 
Sebastian’s workaround. But my personal philosophy is to leave Python alone if 
it is not doing anything wrong and this is indeed a Readline bug.

Chet also pointed out that there are other modes in addition to incremental 
search that are not cancelled. For instance, the “argument” mode where you 
press Alt+number etc.

--
keywords: +patch
Added file: http://bugs.python.org/file39514/readline-cancel.patch

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



[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-05-27 Thread Thomas Kluyver

Changes by Thomas Kluyver tak...@gmail.com:


--
nosy: +takluyver

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



[issue24306] Backport py.exe to 3.4

2015-05-27 Thread Steve Dower

New submission from Steve Dower:

For 3.5 32-bit installs we register in a different key to avoid collisions with 
64-bit installs, but now the 3.4 launcher can't find us.

If you have installed 3.4 for all users (likely) and then install 3.5 
just-for-me (also likely), then you'll continue to get the 3.4 launcher, and 
there's no way to avoid this because there's no option to omit it.

I think we should backport the launcher to 3.4 so that the next 3.4 release 
will be able to also work with 3.5.

Thoughts?

--
components: Windows
messages: 244226
nosy: steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Backport py.exe to 3.4
versions: Python 3.4

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



[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-05-27 Thread Nick Coghlan

Nick Coghlan added the comment:

Somewhat related issues are issue 16217 (traceback noise when running under 
python -m) and issue 23773 (traceback noise when running under custom import 
hooks)

For 3.4 and 3.5, we may want to consider a brute force solution where the 
warnings module just straight up ignores _frozen_importlib frames when counting 
stack levels.

For 3.6+, I've occasionally pondered various ideas for introducing the notion 
of a frame debugging level. The most recent variant of that idea would be to 
have all frames live in level zero by default, but there'd be a way to flag a 
module at compile time to set it higher for the code objects created by that 
module.

Displaying those frames in tracebacks would then be tied to both the current 
frame's debugging level and the interpreter's verbosity level (whichever was 
higher), while other stack related operations (like the warnings stacklevel and 
frame retrieval) would only consider frames at the current frame's debugging 
level and below.

--

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-05-27 Thread Mike Gilbert

Changes by Mike Gilbert floppymas...@gmail.com:


--
nosy: +floppymaster

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-27 Thread Nathaniel Smith

Nathaniel Smith added the comment:

*cough* You know, there's more to life than Python-X.Y.tar.gz :-). Not that I 
know how PendingDeprecationWarning is used in the wild. I've been thinking 
maybe we (numpy) should start using it for stuff that we want to discourage 
people from using (we know it was a bad idea or intrinsically broken or 
whatever), but don't yet have a full replacement to offer. It would help if 
there were some official guidance on what these things mean -- I can't find 
anything written down anywhere that even documents what you just said about how 
CPython proper uses them, so I imagine people have come up with all kinds of 
interpretations.

Anyway, my logic would be: when I am trying something out at the REPL, usually 
it is because I want to check how it works, to figure out what I should be 
doing in the real module code that I'm writing in the next window. When doing 
this, I definitely appreciate knowing that it will be removed and is being 
replaced -- it won't necessarily stop me from putting it into my code, but at 
least it's information that I can take into account.

I don't care a huge amount either way, though; if we decided to hide 
PendingDeprecationWarnings by default while showing DeprecationWarnings then 
numpy would just define a NumPyPendingDeprecationWarning subclass of 
DeprecationWarning and use that instead of PendingDeprecationWarning and all 
would work out fine :-).

--

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-27 Thread Nick Coghlan

Nick Coghlan added the comment:

The difference between the two used to be clearer: prior to Python 2.7, 
PendingDeprecationWarning was hidden by default (and thus mainly only visible 
to folks testing with -Wall), while DeprecationWarning was visible by default.

We blurred the line between the two thoroughly when DeprecationWarning also 
became hidden by default, giving the status quo:

Test frameworks: both visible by default
Interactive REPL: both hidden by default
Non-interactive execution: both hidden by default

Splitting them in the interactive REPL case would restore a meaningful 
behavioural difference that can help pragmatically guide decisions as to which 
is more appropriate to use:

Test frameworks: both visible by default
Interactive REPL: DW visible by default, PendingDW hidden by default
Non-interactive execution: both hidden by default

The current unanswerable How do my users interpret the difference between DW 
and PendingDW? question would be replaced by the much simpler Do I want folks 
using the interactive REPL to see this warning or not?

--

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



[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-27 Thread Stefan Behnel

Stefan Behnel added the comment:

 It *is* correct, see PEP 492.  Awaitable is either a coroutine *or* an object 
 with an __await__ method.

coroutine, yes. But Coroutine? Shouldn't the Coroutine ABC then require
__await__ to be implemented? Maybe even by inheriting from Awaitable?

 Just implement tp_await/__await__ for coroutine-like objects coming from 
 C-API or Cython.

Sure, that's how it's done. (Specifically, Coroutine is not an
Iterable/Iterator, but its __await__() returns a thin Iterator that simply
calls into the Generator code. A bit annoying and slowish, but that's what
it takes.)

I was just wondering how Cython should compile Python code that makes use
of this decorator. The Coroutine and Generator types are separated in
Cython now, and I think that's actually the right thing to do. This
types.coroutine() decorator and special casing in CPython's code base gets
a bit in the way here.

 In general, iteration protocol is still the foundation for Future-like objects

That's not really reflected in the ABCs, is it?

--

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



[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-27 Thread Martin Panter

Martin Panter added the comment:

I might be able to make a patch, but what should the patch do exactly?

* Raise an exception as soon as something wrong is found
* Defer exceptions until close() is called, to allow partial data recovery
* Add some sort of defects API that you can optionally inspect, like the email 
message library has
* A new tarfile.open(strict=True) mode

--
components: +Library (Lib)
nosy: +vadmium
type:  - enhancement

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



[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-27 Thread Ethan Furman

Ethan Furman added the comment:

I ran the OP's code in 2.7, 3.3, 3.4, and 3.5, as well as using ubuntu's gnu 
tar 1.27.1:

gnu tar did not report any errors.

Python (all tested versions) did not report any errors (with the errorlevel 
parameter missing, set to 1, and set to 2).

--

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



  1   2   >