[issue23630] support multiple hosts in create_server/start_server

2015-03-12 Thread Guido van Rossum

Guido van Rossum added the comment:

Could use a test. Hopefully Victor can do a thorough review.

On Tue, Mar 10, 2015 at 12:20 PM, Sebastien Bourdeauducq 
rep...@bugs.python.org wrote:


 Sebastien Bourdeauducq added the comment:

 See attached.

 --
 keywords: +patch
 Added file: http://bugs.python.org/file38428/asyncio_multibind.diff

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue23630
 ___


--

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



[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bf2016a1911f by Steve Dower in branch '3.4':
Issue #22028: Ensure mimetypes will not open registry keys with embedded nulls
https://hg.python.org/cpython/rev/bf2016a1911f

New changeset 6ccade563bf7 by Steve Dower in branch 'default':
Issue #22028: Ensure mimetypes will not open registry keys with embedded nulls
https://hg.python.org/cpython/rev/6ccade563bf7

--

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



[issue23630] support multiple hosts in create_server/start_server

2015-03-12 Thread Sebastien Bourdeauducq

New submission from Sebastien Bourdeauducq:

I would like to be able to bind asyncio TCP servers to an arbitrary list of 
hosts, not just either one host or all interfaces.

I propose that the host parameter of create_server and start_server can be a 
list of strings that describes each host. Sockets are created for the set of 
all addresses of all specified hosts. The list may also contain None, or the 
empty string, in which case all interfaces are assumed.

If a string or None is passed directly, the behavior is unchanged - so this 
should not break compatibility.

I can submit a patch if this feature is approved.

--
components: asyncio
messages: 237791
nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov
priority: normal
severity: normal
status: open
title: support multiple hosts in create_server/start_server
type: enhancement
versions: Python 3.4

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



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2015-03-12 Thread Davin Potts

Davin Potts added the comment:

Per Richard's post from 1 year ago where he offers both explanation and an 
example, ultimately concluding that things are working as intended, and because 
there have been no objections or requests for clarification in the past year, 
closing this and marking it as not a bug.

--
nosy: +davin
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue23629] Default __sizeof__ is wrong for var-sized objects

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dbd48b22b477 by Antoine Pitrou in branch '2.7':
Issue #23629: Fix the default __sizeof__ implementation for variable-sized 
objects.
https://hg.python.org/cpython/rev/dbd48b22b477

--

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



[issue23640] Enum.from_bytes() is broken

2015-03-12 Thread Bruno Cauet

Bruno Cauet added the comment:

Hi,
I feel like this behaviour does not only affect IntEnum  related but anything 
that inherits from int.

Example:
 class foo(int):
... def __init__(self, value, base=10):
... if value == 2:
... raise ValueError(not that!!)
... super(foo, self).__init__(value, base=base)
...
 x = foo.from_bytes(b\2, big)
 x
2
 type(x)
foo

2 solutions come to mind:
- always return an int, and not the type. deleting 
Objects/longobjects.c:4845,4866 does the job.
- instantiate the required type with the value as the (sole?) argument, 
correctly initializing the object to be returned. In Serhyi's example this 
results in x == AddressFamily.AF_UNIX. the same lines are concerned.

--
nosy: +bru

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



[issue23640] Enum.from_bytes() is broken

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Not all classmethods are constructors.

I see two solutions:

1) Override from_bytes() in IntEnum and every int subclass that needs this.

2) Change int.from_bytes() to call __new__.

--

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



[issue23615] Reloading tokenize breaks tokenize.open()

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The same issue exists in Lib/bz2.py, Lib/tarfile.py, Tools/freeze/bkfile.py.

May be write a code as

from builtins import open as _builtin_open

?

--
nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
type:  - behavior

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



[issue23615] Reloading tokenize breaks tokenize.open()

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. Do you want to write a patch for other cases Thomas?

--

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



[issue23605] Use the new os.scandir() function in os.walk()

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1a972140ab62 by Victor Stinner in branch 'default':
Issue #23605: os.walk() doesn't need to call entry.is_symlink() if followlinks
https://hg.python.org/cpython/rev/1a972140ab62

--

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



[issue2292] Missing *-unpacking generalizations

2015-03-12 Thread Neil Girdhar

Changes by Neil Girdhar mistersh...@gmail.com:


Added file: http://bugs.python.org/file38429/starunpack37.diff

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



[issue23629] Default __sizeof__ is wrong for var-sized objects

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f9afa4f87570 by Antoine Pitrou in branch '3.4':
Issue #23629: Fix the default __sizeof__ implementation for variable-sized 
objects.
https://hg.python.org/cpython/rev/f9afa4f87570

New changeset 9994e0172a0c by Antoine Pitrou in branch 'default':
Issue #23629: Fix the default __sizeof__ implementation for variable-sized 
objects.
https://hg.python.org/cpython/rev/9994e0172a0c

--
nosy: +python-dev

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



[issue23566] RFE: faulthandler.register() should support file descriptors

2015-03-12 Thread Wei Wu

Wei Wu added the comment:

Updated the patch and addressed the previous review comments:

 * Fixed the hasattr problem
 * Added a default value None for filename in check_dump_traceback
 * Reverted unnecessary code change in check_dump_traceback_later
 * Added a new paragraph to the enable, dump_traceback_later and
register in doc

Let me know if there is possible further improvement in this patch.

: )

--
Added file: http://bugs.python.org/file38445/issue23566_v3.patch

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



[issue23640] Enum.from_bytes() is broken

2015-03-12 Thread Bruno Cauet

Bruno Cauet added the comment:

I took the liberty of putting together a small patch which makes from_bytes() 
call  return type(value_found) if type != long (Serhiy's  my 2nd solution).

Ethan: in that case, type.from_bytes() would always return an int, and not 
resort to build-a-pseudo-int, right? That way not overriding from_bytes() would 
not result in strange behaviour.

--
Added file: 
http://bugs.python.org/file38447/0001-int.from_bytes-calls-constructor-for-subclasses.patch

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



[issue23642] Interaction of ModuleSpec and C Extension Modules

2015-03-12 Thread David Beazley

David Beazley added the comment:

Note: Might be related to Issue 19713.

--

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added new tests and tweaked regexpes. Thank you for your contribution Demian.

Now we can start long-standing deprecation process for conforming to RFC.

--
resolution:  - fixed
stage: commit review - resolved
status: open - closed
versions: +Python 2.7, Python 3.4

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



[issue23643] Segmentation Fault with Large Simple Function

2015-03-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

So the recursion crash was fixed in python3,
but it's still one of the limits of the Python AST compiler.

I suggest to replace your long expression by a list:
  exprs = [(1-a36)*(a37)*(1-a41), (a22)*(a33)*(1-a23), ...]
  return sum(exprs)

...but this function requires large storage at runtime, on the Python stack, 
and for the list.
Maybe better:
  loopcount = 0
  loopcount += (1-a36)*(a37)*(1-a41)
  ...
  return loopcount

--

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



[issue23605] Use the new os.scandir() function in os.walk()

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

 1) Serhiy's point about not needing to build the symlinks set when 
 followlinks is True is a good one, because it'll never get used. Just a if 
 not followlinks: ... around that try/except would do it. Though this is a 
 small optimization, as I expect 95% of people use os.walk() with 
 followlinks=False, which is the default.

No, it's not a small optimization. I/O are expensive, especially disk I/O. 
Try os.walk() on a NFS share with the cache disabled ;-)

 My first note was about efficiency of the implementation. When followlinks is 
 true, you can avoid testing entry.is_link() and creating the symlinks set.

Oh, I misunderstood your comment. The changeset 1a972140ab62 avoids calling 
entry.is_symlink() when it's not needed. Thanks for the report.

--

walk_added_symlink_to_dir.patch: Small modification to os.walk() to keep the 
performances of os.scandir() *and* still supported adding symlinks to dirs (no 
backward compatibility changes).

Happy? :-)

I started to work on an unit test, but I don't understand how WalkTests and 
FwalkTests are written.

The setUp() method contais unit tests?! For example, setUp() has a unit test 
removing a directory from the dirs list to check os.walk() behaviour.

I will try harder to understand how these tests are written and post a patch 
for tests later.

--
Added file: http://bugs.python.org/file38450/walk_added_symlink_to_dir.patch

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1c45047c5102 by Serhiy Storchaka in branch '2.7':
Issue #22928: Disabled HTTP header injections in httplib.
https://hg.python.org/cpython/rev/1c45047c5102

New changeset bf3e1c9b80e9 by Serhiy Storchaka in branch '3.4':
Issue #22928: Disabled HTTP header injections in http.client.
https://hg.python.org/cpython/rev/bf3e1c9b80e9

New changeset aa4c6992c126 by Serhiy Storchaka in branch 'default':
Issue #22928: Disabled HTTP header injections in http.client.
https://hg.python.org/cpython/rev/aa4c6992c126

--
nosy: +python-dev

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



[issue23605] Use the new os.scandir() function in os.walk()

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Happy? :-)

No, it doesn't fix my example. :-(

I see following possibilities:

1. Partially revert the patch and always call path.islink(). I will not kill 
all the benefit of using os.scandir(), because there is a benefit from avoiding 
path.isdir() and in any case in large directories most content is usually 
files, not dirs.

2. Accept and document behavior change. This will break someone's code. :-(

3. Left os.walk as was (or only partially optimized as in 1), and add a new 
function with new behavior.

4. Add new boolean parameter that control behavior to os.walk().

5. Try to detect when dir list or filesystem were changed. Victor's patch does 
the first. For the second we can check if top directory inode and mtime were 
changed. But I afraid this wouldn't decrease a number of system calls.

--

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



[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Trailing spaces, newlines and like were disabled in put_header() in issue22928. 
Now we can start long-standing deprecation process for headers that don't 
conform RFC 7230.

--
nosy: +serhiy.storchaka
stage: commit review - needs patch
versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue23192] Generator return value ignored in lambda function

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Committed with non-dis test. Thank you for your contribution Bruno.

--
resolution:  - fixed
stage: test needed - resolved
status: open - closed

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



[issue23605] Use the new os.scandir() function in os.walk()

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c06ebb57d4ed by Victor Stinner in branch '3.4':
Issue #23605: Refactor os.walk() tests to also run them on os.fwalk()
https://hg.python.org/cpython/rev/c06ebb57d4ed

--

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



[issue23633] Improve py launcher help, index, and doc

2015-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

C:\Users\Terrynotepad %localappdata%
Access denied

Alongside the EXE is not fine.  I only knew to look in C:/Windows because I 
have using DOS/Windoes since the early 80s (and there is still much that I do 
not know, like 'icacls'), and I believe there was a mention somewhere in the 
pydev py.exe discussion.  I still found it surprising since installed programs 
are generally not put there the way they once were.  If py.exe is always in 
that directory for all Windows versions we support, we should just say 'in 
C:/windows', but my impression is that this may not always be true.

Doc-only changes can and should be backported to 2.7 and 3.4, which do support 
XP.

--

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



[issue23605] Use the new os.scandir() function in os.walk()

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

walk_added_symlink_to_dir-2.patch: Ok, here is a new patch, now with tests.

Without the fix on os.walk(), WalkTests.test_add_dir_symlink() fails, whereas 
FwalkTests.test_add_dir_symlink() pass.

--
Added file: http://bugs.python.org/file38451/walk_added_symlink_to_dir-2.patch

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



[issue23632] memoryview doesn't allow tuple-indexing

2015-03-12 Thread Stefan Krah

Stefan Krah added the comment:

Yes, to be clear I'm +1 on this specific feature -- and separate issues. :)

--

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



[issue10967] move regrtest over to using more unittest infrastructure

2015-03-12 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag

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



[issue23644] swig compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread Joshua J Cogliati

New submission from Joshua J Cogliati:

The attached example works fine with Python 3.4.2, but fails with Python 
3.5.0a1 and 3.5.0a2

I am using:
$ g++ --version
g++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
$ swig -version

SWIG Version 3.0.5

Compiled with g++ [x86_64-redhat-linux-gnu]

Configured options: +pcre
$ python3 --version
Python 3.5.0a2



The output of trying the makefile with Python 3.5.0a2 is:

$ make
swig -c++ -python -py3 example.i
g++ -g -fPIC -c example.cxx example_wrap.cxx 
-I/local/python350a2/include/python3.5m -I/local/python350a2/include/python3.5m
In file included from /local/python350a2/include/python3.5m/pyatomic.h:10:0,
 from /local/python350a2/include/python3.5m/Python.h:53,
 from example_wrap.cxx:154:
/usr/include/c++/4.9.2/exception:161:34: error: missing binary operator before 
token (
 #if (__cplusplus = 201103L)  (ATOMIC_INT_LOCK_FREE  1)
  ^
In file included from /local/python350a2/include/python3.5m/pyatomic.h:10:0,
 from /local/python350a2/include/python3.5m/Python.h:53,
 from example_wrap.cxx:154:
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:40:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic _Bool atomic_bool;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:41:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic char atomic_char;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:42:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic signed char atomic_schar;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:43:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic unsigned char atomic_uchar;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:44:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic short atomic_short;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:45:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic unsigned short atomic_ushort;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:46:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic int atomic_int;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:47:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic unsigned int atomic_uint;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:48:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic long atomic_long;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:49:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic unsigned long atomic_ulong;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:50:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic long long atomic_llong;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:51:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic unsigned long long atomic_ullong;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:52:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __CHAR16_TYPE__ atomic_char16_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:53:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __CHAR32_TYPE__ atomic_char32_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:54:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __WCHAR_TYPE__ atomic_wchar_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:55:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __INT_LEAST8_TYPE__ atomic_int_least8_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:56:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __UINT_LEAST8_TYPE__ atomic_uint_least8_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:57:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __INT_LEAST16_TYPE__ atomic_int_least16_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:58:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __UINT_LEAST16_TYPE__ atomic_uint_least16_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:59:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __INT_LEAST32_TYPE__ atomic_int_least32_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:60:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __UINT_LEAST32_TYPE__ atomic_uint_least32_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:61:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __INT_LEAST64_TYPE__ atomic_int_least64_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:62:9: error: 
‘_Atomic’ does not name a type
 typedef _Atomic __UINT_LEAST64_TYPE__ atomic_uint_least64_t;
 ^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stdatomic.h:63:9: error: 
‘_Atomic’ 

[issue23566] RFE: faulthandler.register() should support file descriptors

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

 Let me know if there is possible further improvement in this patch.

I was going to push your change, but I noticed that you use stderr.fileno() in 
tests. I modified the test to use a different file descriptor. sys.stderr is 
also the default value, so the test may pass because the file descriptor was 
ignored (if there was a bug in your change, which is not the case).

I pushed the modified patch.

Thanks for your contribution Wei Wu!

--
resolution:  - fixed
status: open - closed

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



[issue23632] memoryview doesn't allow tuple-indexing

2015-03-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, we could certainly do both :) I don't think we should weigh this issue 
with separate features, though.

--

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



[issue23642] Interaction of ModuleSpec and C Extension Modules

2015-03-12 Thread Brett Cannon

Brett Cannon added the comment:

There is a proposed PEP on the import-sig: 
https://mail.python.org/pipermail/import-sig/2015-March/000904.html . I'm 
hoping to add it for the author to the PEP index on Friday.

Basically we punted on extension modules as we ran out of time in Python 3.4.

--

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



[issue23625] load_module() docs: zipped eggs are not loaded.

2015-03-12 Thread Brett Cannon

Brett Cannon added the comment:

I understood what you asked. My point is that mentioning eggs in the imp 
doesn't make sense since the imp module nor import supports them natively. Eggs 
are a setuptools thing, not a Python standard library thing.

--

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



[issue23632] memoryview doesn't allow tuple-indexing

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be add support of multi-dimensional sub-views?

 m = memoryview(bytearray(range(12)))
 m2 = m.cast('B', (3,4))
 m2[0]
Traceback (most recent call last):
  File stdin, line 1, in module
NotImplementedError: multi-dimensional sub-views are not implemented

Then we could use m2[0][1].

--
nosy: +serhiy.storchaka

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



[issue23566] RFE: faulthandler.register() should support file descriptors

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

Oops, I forgot Windows. On Windows, we should maybe use stderr.fileno() and 
avoid pass_fds.

(Or maybe just skip the tests on Windows?)

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5828/steps/test/logs/stdio

==
FAIL: test_dump_traceback_fd (test.test_faulthandler.FaultHandlerTests)
--
Traceback (most recent call last):
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_faulthandler.py, 
line 378, in test_dump_traceback_fd
self.check_dump_traceback(fd=fp.fileno())
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_faulthandler.py, 
line 365, in check_dump_traceback
trace, exitcode = self.get_output(code, filename, fd)
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_faulthandler.py, 
line 60, in get_output
process = script_helper.spawn_python('-c', code, pass_fds=pass_fds)
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\script_helper.py, line 
136, in spawn_python
**kw)
  File C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py, line 
855, in __init__
restore_signals, start_new_session)
  File C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py, line 
1096, in _execute_child
assert not pass_fds, pass_fds not supported on Windows.
AssertionError: pass_fds not supported on Windows.

==
FAIL: test_enable_fd (test.test_faulthandler.FaultHandlerTests)
--
Traceback (most recent call last):
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_faulthandler.py, 
line 235, in test_enable_fd
fd=fd)
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_faulthandler.py, 
line 106, in check_fatal_error
output, exitcode = self.get_output(code, filename=filename, fd=fd)
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_faulthandler.py, 
line 60, in get_output
process = script_helper.spawn_python('-c', code, pass_fds=pass_fds)
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\script_helper.py, line 
136, in spawn_python
**kw)
  File C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py, line 
855, in __init__
restore_signals, start_new_session)
  File C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py, line 
1096, in _execute_child
assert not pass_fds, pass_fds not supported on Windows.
AssertionError: pass_fds not supported on Windows.

--
resolution: fixed - 
status: closed - open

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



[issue23632] memoryview doesn't allow tuple-indexing

2015-03-12 Thread Stefan Krah

Stefan Krah added the comment:

sub-views and multi-dimensional slicing are not that bad: They're already 
implemented in _testbuffer (indeed with intermediate objects though).

--

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



[issue23642] Interaction of ModuleSpec and C Extension Modules

2015-03-12 Thread David Beazley

David Beazley added the comment:

This is great news.   Read the PEP draft and think this is a very good thing to 
be addressing. Thanks, Brett.

--

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



[issue23566] RFE: faulthandler.register() should support file descriptors

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e78de5b1e3ef by Victor Stinner in branch 'default':
Issue #23566: enable(), register(), dump_traceback() and dump_traceback_later()
https://hg.python.org/cpython/rev/e78de5b1e3ef

--
nosy: +python-dev

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



[issue23632] memoryview doesn't allow tuple-indexing

2015-03-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Sub-views are not as easily implemented. Besides, they create an intermediate 
object which is immediately thrown away. And tuple indexing is a very common 
idiom in the Numpy universe.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23632
___
___
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-03-12 Thread Akira Li

Akira Li added the comment:

POSIX timestamp doesn't count (literally) past/future leap seconds.
It allows to find out that the timestamp 2**31-1 corresponds to
2038-01-19T03:14:07Z (UTC) regardless of how many leap seconds will
occur before 2038:

   from datetime import datetime, timedelta
   str(datetime(1970,1,1) + timedelta(seconds=2**31-1))
  '2038-01-19 03:14:07'

If you use right timezone then mktime() may count leap seconds:

  $ TZ=right/UTC ./python
   import time
   time.mktime((2012, 6, 30, 23, 59, 59, -1, -1, -1))
  1341100823.0
   time.mktime((2012, 6, 30, 23, 59, 60, -1, -1, -1))
  1341100824.0
   time.mktime((2012, 7, 1, 0, 0, 0, -1, -1, -1))
  1341100825.0

It is a different time scale. There are no leap seconds in TAI:

   str(datetime(1970,1,1, 0,0, 10) + timedelta(seconds=1341100825))
  '2012-07-01 00:00:35'

i.e., 2012-07-01 00:00:35 TAI that corresponds to 2012-07-01 00:00:00
UTC. Each positive leap second increases the difference TAI-UTC (on
2015-07-01UTC it will be 36 [1]).

TAI-UTC in the future (more than 6 months) is unknown but it is less
than ~200 seconds until 2100 [2].

It might be convenient to think about datetime as a broken-down
timestamp and therefore

  (datetime(2012,6,30,23,59,60) - epoch) == 
  (datetime(2012,7, 1, 0, 0, 0) - epoch)

The code [3] that silently truncates 60 to 59 when datetime
constructor is called implicitly should retire.

Use case: parse timestamps that might include a leap second [4]

[1] https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat
[2] http://www.ucolick.org/~sla/leapsecs/year2100.html
[3] https://bugs.python.org/msg155689
[4] http://stackoverflow.com/q/21027639

--
nosy: +akira

___
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



[issue23566] RFE: faulthandler.register() should support file descriptors

2015-03-12 Thread Wei Wu

Wei Wu added the comment:

Or we could reuse the file created by filename in subprocess?

if filename:
file = open(filename, wb)
if use_fd:
file = file.fileno()
else:
file = None

In this case, we need to pass two arguments(both filename and a bool use_fd) to 
check_xxx functions.

--

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



[issue23605] Use the new os.scandir() function in os.walk()

2015-03-12 Thread Ben Hoyt

Ben Hoyt added the comment:

Thanks, Victor.

I haven't quite grokked all the changes here -- it's gotten somewhat more 
complicated with the scandir_it and manual next() call -- but I ran some 
benchmarks (via a hacked version of my scandir project's benchmark.py). The 
results were surprising, and in a good way:

Dev version in hg (no extra islink syscall):

Windows: 13.1x as fast (68.8x as fast in funky caching mode)
Linux: 7.8x as fast

With Victor's fast_bottom_up patch (100% correct behaviour):

Windows: 9.4x as fast (50.2x as fast in funky caching mode)
Linux: 6.5x as fast

So os.walk() will still be 10x as fast on Windows if you apply this patch, and 
6x as fast on my Linux VM. I haven't dug too deeply to know quite why the 
numbers are this good, especially on Linux, but that's what I'm seeing, which 
is great!

--

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



[issue23051] multiprocessing.pool methods imap()[_unordered()] deadlock

2015-03-12 Thread Davin Potts

Davin Potts added the comment:

After pondering it for two days and coming back to it with hopefully fresh 
eyes, I believe that changing the for-loop to a while-loop is not overall 
easier to understand -- I would lean towards keeping the for-loop.

I do think the change to the while-loop very much made the exception handling 
logic clearer but seeing the while-loop with the manual invocation of next 
and incrementing of the variable i and re-use of i as a signal to break out of 
a loop (setting i = None) made other things less clear.  My belief is that 
someone reading this method's code for the first time will read the for-loop 
version as, try to loop through the enumerated tasks and if anything goes 
wrong then set the next position in the cache to 'failed'.  That top-level 
reading is, I think, not quite as easy with the while-loop.  Without the 
exception handling that we add in this patch, the original code used the 
for-loop and would, I think, have looked weird if it had tried to use a 
while-loop -- I think that's a sign that the for-loop is likely to be more 
easily understood by a first-time reader.

Though I am not sure it really matters, the while-loop version would only help 
end the processing of further jobs if an exception occurs in the iterator 
whereas the for-loop version might help if exceptions occur in a couple of 
other places.  We do not have a clear motivation for needing that however.

--

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



[issue23639] Not documented special names

2015-03-12 Thread Martin Panter

Martin Panter added the comment:

Some of these that I believe are at least partially documented, so could be 
added to the index. But the index for these is not very good anyway, because 
they are listed in a funny (ASCII-betical?) order in a special section called 
“symbols”, rather than alphabetically as you would expect. But that would be a 
separate issue.

Potential index entries:

builtins.__build_class__() → 
https://docs.python.org/dev/library/dis.html#opcode-LOAD_BUILD_CLASS
__builtins__ global variable → 
https://docs.python.org/dev/reference/executionmodel.html#naming-and-binding
__conform__() method → 
https://docs.python.org/dev/library/sqlite3.html#letting-your-object-adapt-itself
__isabstractmethod__ → 
https://docs.python.org/dev/library/abc.html#abc.abstractmethod
Enum.__members__ → https://docs.python.org/dev/library/enum.html#iteration
__objclass__ → 
https://docs.python.org/dev/reference/datamodel.html#implementing-descriptors
type.__prepare__ → 
https://docs.python.org/dev/reference/datamodel.html#preparing-the-class-namespace
__pycache__/ directory → 
https://docs.python.org/dev/tutorial/modules.html#compiled-python-files
object.__signature__ → 
https://docs.python.org/dev/library/inspect.html#inspect.unwrap
object.__sizeof__() → https://docs.python.org/dev/library/sys.html#sys.getsizeof
module.__test__ → 
https://docs.python.org/dev/library/doctest.html#which-docstrings-are-examined
Real.__trunc__ → https://docs.python.org/dev/library/math.html#math.trunc
module.__warningregistry__ → 
https://docs.python.org/dev/library/warnings.html#warnings.warn_explicit
object.__weakref__ → 
https://docs.python.org/dev/c-api/typeobj.html#c.PyTypeObject.tp_weaklistoffset

Others that are referenced by the documentation, but not explained anywhere 
that I can tell:

* module.__version__, referenced as an attribute in a few modules and also in 
sample code
* __getformat__(), __setformat__(), __getinitargs__() methods, referenced in 
“unittest.mock” documentation

Regarding __base__, I always assumed this was a leftover from Python 2 from 
some time before multiple inheritance, so maybe __bases__ could be used instead 
now (unless testing backwards compatibility).

--

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



[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

Oh, test_signal fails with the patch because time.sleep() is not interrupted by 
a signal. New patch.

I also reverted #ifdef order in floatsleep() to have a patch easier to review.

--
Added file: http://bugs.python.org/file38457/sleep_eintr-2.patch

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



[issue23644] swig compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

The problem is more general than Python: #include stdatomic.h fails in C++. 
Try to compiled atomic.cpp with g++, you will get the same error.

The following bug report in the glibc has been closed as WONTFIX:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932

It suggests to use the following code:

#ifdef __cplusplus
#include atomic
using namespace std;
#else
#include stdatomic.h
#endif

I don't know if it works.

--
Added file: http://bugs.python.org/file38458/atomic.cpp

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



[issue23644] swig compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb48295e1f8b by Victor Stinner in branch 'default':
Issue #23644, #22038: Move #include stdatomic.c inside the extern C { ... }
https://hg.python.org/cpython/rev/eb48295e1f8b

--
nosy: +python-dev

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



[issue23644] swig compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread Joshua J Cogliati

Joshua J Cogliati added the comment:

I have:
/local/python_fix/include/python3.5m/pyatomic.h
#ifndef Py_LIMITED_API
#ifndef Py_ATOMIC_H
#define Py_ATOMIC_H

#include dynamic_annotations.h

#include pyconfig.h

#ifdef __cplusplus
extern C {
#endif

#if defined(HAVE_STD_ATOMIC)
#include stdatomic.h
#endif

...

and still get:
In file included from /local/python_fix/include/python3.5m/pyatomic.h:14:0,
 from /local/python_fix/include/python3.5m/Python.h:53,
 from example_wrap.cxx:154:
/usr/include/c++/4.9.2/exception:161:34: error: missing binary operator before 
token (
 #if (__cplusplus = 201103L)  (ATOMIC_INT_LOCK_FREE  1)


So the bug still seems to be there.

--

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



[issue23648] PEP 475 meta issue

2015-03-12 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
dependencies: +PEP 475 - EINTR handling, PEP 475: handle EINTR in the select 
and selectors module, PEP 475: handle EINTR in the socket module, PEP 475: 
handle EINTR in the time module, retry sleep()

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-03-12 Thread Demian Brecht

Demian Brecht added the comment:

Thanks for the tweaks Serhiy, those seem reasonable to me.

--

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



[issue23645] Incorrect doc for __getslice__

2015-03-12 Thread Gaëtan de Menten

New submission from Gaëtan de Menten:

The documentation for __getslice__ at 
https://docs.python.org/2/reference/datamodel.html#object.__getslice__ states: 
Note that missing i or j in the slice expression are replaced by zero or 
sys.maxint, respectively.

However, in practice, it seems like it is replaced by sys.maxsize instead. This 
is obviously only a problem for 64bit versions of Python 2 since sys.maxint and 
sys.maxsize are the same on 32bit Python.

In [1]: class A(object):
   ...: def __getslice__(self, i, j):
   ...: print i, j
   ...:

In [2]: a = A()

In [3]: a[:]
0 9223372036854775807

In [4]: import sys

In [5]: sys.maxint
Out[5]: 2147483647

In [6]: sys.maxsize
Out[6]: 9223372036854775807L

In [7]: sys.version
Out[7]: '2.7.9 |Continuum Analytics, Inc.| (default, Dec 18 2014, 16:57:52) 
[MSC v.1500 64 bit (AMD64)]'

--
assignee: docs@python
components: Documentation
messages: 237947
nosy: docs@python, gdementen
priority: normal
severity: normal
status: open
title: Incorrect doc for __getslice__
versions: Python 2.7

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



[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread Joshua J Cogliati

Joshua J Cogliati added the comment:

If I change the header to:
#ifndef Py_LIMITED_API
#ifndef Py_ATOMIC_H
#define Py_ATOMIC_H

#include dynamic_annotations.h

#include pyconfig.h

#ifdef __cplusplus
extern C {
#endif

#if defined(HAVE_STD_ATOMIC)
#ifdef __cplusplus
#include atomic
using namespace std;
#else
#include stdatomic.h
#endif
#endif

... (rest same)

AND use -std=c++11
Then the error changes to:
In file included from /local/python_fix/include/python3.5m/Python.h:53:0,
 from example_wrap.cxx:154:
/local/python_fix/include/python3.5m/pyatomic.h:42:5: error: ‘_Atomic’ does not 
name a type
 _Atomic void *_value;
 ^


Basically, atomic does define std::atomic_int, but it does not define 
_Atomic, so the line:
_Atomic void *_value;
will also need to be changed.

--
title: swig compile fails with ‘_Atomic’ does not name a type - g++ module 
compile fails with ‘_Atomic’ does not name a type

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



[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-12 Thread Charles-François Natali

Charles-François Natali added the comment:

As for the change to select/poll/etc, IIRC Guido was opposed to it,
that's why I didn't update them.

--

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



[issue23644] swig compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

_Atomic was added by the issue #22038.

--
nosy: +gustavotemple, haypo

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



[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

Note: test_signal will have to be modified again when select will also retry on 
EINTR :-) See issue #23485. For example, test_signal.test_wakeup_fd_early() can 
register a signal handler which raises an exception and catch InterruptedError.

--

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



[issue23649] tarfile not re-entrant for multi-threading

2015-03-12 Thread Srdjan Grubor

New submission from Srdjan Grubor:

When running tarfile.extract through multiple threads, the archive reading 
pointer is not protected from simultaneous seeks and causes various convoluted 
bugs:

  some code
self.archive_object.extract(member, extraction_path)
  File /usr/lib/python3.4/tarfile.py, line 2019, in extract
set_attrs=set_attrs)
  File /usr/lib/python3.4/tarfile.py, line 2088, in _extract_member
self.makefile(tarinfo, targetpath)
  File /usr/lib/python3.4/tarfile.py, line 2127, in makefile
source.seek(tarinfo.offset_data)
  File /usr/lib/python3.4/gzip.py, line 573, in seek
self.read(1024)
  File /usr/lib/python3.4/gzip.py, line 365, in read
if not self._read(readsize):
  File /usr/lib/python3.4/gzip.py, line 449, in _read
self._read_eof()
  File /usr/lib/python3.4/gzip.py, line 485, in _read_eof
hex(self.crc)))
OSError: CRC check failed 0x1036a2e1 != 0x0

--
messages: 237960
nosy: sgnn7
priority: normal
severity: normal
status: open
title: tarfile not re-entrant for multi-threading
type: behavior
versions: Python 3.4

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



[issue22038] Implement atomic operations on non-x86 platforms

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb48295e1f8b by Victor Stinner in branch 'default':
Issue #23644, #22038: Move #include stdatomic.c inside the extern C { ... }
https://hg.python.org/cpython/rev/eb48295e1f8b

--

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



[issue23644] swig compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

Can you please try with the latest development version?

--

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



[issue23644] swig compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +Vitor.de.Lima

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



[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

The patch includes a unit test for POSIX.

For Windows, you can test manually using the attached sleep.py program: press 
CTRL+c to send SIGINT signals.

--
Added file: http://bugs.python.org/file38455/sleep.py

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



[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-12 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch changes time.sleep() to retry select() when select() is 
interrupted by a signal or retry WaitForSingleObjectEx() when the signal SIGINT 
is received on Windows.

The patch drops support for EMX, sorry! I didn't know EMX, I had to Google it: 
EMX is a free 32-bit DOS extender which adds some properties of Unix to 
MS-compatible DOS and IBM's OS/2 operating systems. (OS/2 support was dropped 
in Python 3.4  by the PEP 11.)

The patch also drops support for Watcom C compiler. I guess that it's also 
something specific to MS-DOS or very old (and unsupported) Windows versions.

select.select() is available on all platforms according to the doc, so I don't 
understand why we would not use it on all platforms for time.sleep() in 2015!
https://docs.python.org/dev/library/select.html#select.select

--
files: sleep_eintr.patch
keywords: patch
messages: 237948
nosy: haypo, neologix, pitrou
priority: normal
severity: normal
status: open
title: PEP 475: handle EINTR in the time module, retry sleep()
versions: Python 3.5
Added file: http://bugs.python.org/file38454/sleep_eintr.patch

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



[issue23647] imaplib.py MAXLINE value is too low for 2015 (patch attached)

2015-03-12 Thread Arnt Gulbrandsen

New submission from Arnt Gulbrandsen:

http://stackoverflow.com/q/28923997 and various other SO questions point out 
that imaplib's _MAXLINE value is a bit behind the times. Fine for 1997, when 
people had 10MB mailbox quotas, not so fine for the age of gmail.

I'm tired of seeing those questions, so the attached patch increases the limit 
without abolishing it completely.

There are also other issues in imaplib, but I fix just this one now, to test 
the waters so to speak.

FWIW, I've signed the contributor form, just in case.

--
components: Library (Lib)
files: 0001-Increase-IMAP-line-length-limit.patch
keywords: patch
messages: 237950
nosy: arnt
priority: normal
severity: normal
status: open
title: imaplib.py MAXLINE value is too low for 2015 (patch attached)
type: enhancement
Added file: 
http://bugs.python.org/file38456/0001-Increase-IMAP-line-length-limit.patch

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



[issue23648] PEP 475 meta issue

2015-03-12 Thread STINNER Victor

New submission from STINNER Victor:

I created this issue to group all issues related to the implementation of the 
PEP 475 Retry system calls failing with EINTR.
https://www.python.org/dev/peps/pep-0475/

- Issue #23646: the time module, retry sleep()
- Issue #23618: the socket module
- Issue #23285: the io and the os modules, and open()
- Issue #23485: the select and selectors module

--
messages: 237954
nosy: haypo
priority: normal
severity: normal
status: open
title: PEP 475 meta issue
versions: Python 3.5

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



[issue23648] PEP 475 meta issue

2015-03-12 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +neologix

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



[issue23644] swig compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread Gustavo Frederico Temple Pedrosa

Gustavo Frederico Temple Pedrosa added the comment:

@haypo, @lbianc will investigate this issue.

--

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



[issue23647] imaplib.py MAXLINE value is too low for gmail

2015-03-12 Thread R. David Murray

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


--
stage:  - commit review

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



[issue23649] tarfile not re-entrant for multi-threading

2015-03-12 Thread Srdjan Grubor

Changes by Srdjan Grubor sg...@sgnn7.org:


--
type: behavior - enhancement

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



[issue23649] tarfile not re-entrant for multi-threading

2015-03-12 Thread Srdjan Grubor

Srdjan Grubor added the comment:

Also, extract_member in tarfile.py is not thread-safe since the check for 
folder existence might occur during another thread's creation of that same dir 
causing the code to error out.

  File /usr/lib/python3.4/concurrent/futures/thread.py, line 54, in run
result = self.fn(*self.args, **self.kwargs)
  File ./xdelta3-dir-patcher, line 499, in _apply_file_delta
archive_object.expand(patch_file, staging_dir)
  File ./xdelta3-dir-patcher, line 284, in expand
self.archive_object.extract(member, extraction_path)
  File /usr/lib/python3.4/tarfile.py, line 2019, in extract
set_attrs=set_attrs)
  File /usr/lib/python3.4/tarfile.py, line 2080, in _extract_member
os.makedirs(upperdirs)
  File /usr/lib/python3.4/os.py, line 237, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: 
'/tmp/XDelta3DirPatcher_is0y4_5f/xdelta/updated folder'

Code causing problems:
2065 def _extract_member(self, tarinfo, targetpath, set_attrs=True):
...
2075 # Create all upper directories.
2076 upperdirs = os.path.dirname(targetpath)
2077 if upperdirs and not os.path.exists(upperdirs):
...
2080 os.makedirs(upperdirs)  # Fails since the dir might be already 
created between lines 2077 and 2080

--

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



[issue23649] tarfile not re-entrant for multi-threading

2015-03-12 Thread Srdjan Grubor

Changes by Srdjan Grubor sg...@sgnn7.org:


--
type: enhancement - behavior

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



[issue20617] test_ssl does not use mock

2015-03-12 Thread Berker Peksag

Berker Peksag added the comment:

Thanks Xavier and Mark.

--
components: +Tests -Library (Lib)
nosy: +berker.peksag
resolution:  - fixed
stage:  - resolved
status: open - closed
versions: +Python 3.4

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



[issue23649] tarfile not re-entrant for multi-threading

2015-03-12 Thread Srdjan Grubor

Srdjan Grubor added the comment:

The code around tarfile multi-threading was fixed for me on the user-side with 
threading.Lock() usage so it might work to use this within the library and the 
directory creation could be improved by probably doing a try/except around the 
makedirs() call with ignoring of the exception if it's FileExistsError - my 
code I use elsewhere fixes this with:
def _safe_makedirs(self, dir_path):
try:
makedirs(dir_path)
# Concurrency problems need to be handled. If two threads create
# the same dir, there might be a race between them checking and
# doing makedirs so we handle that as gracefully as possible here.
except FileExistsError as fee:
if not os.path.isdir(dir_path):
raise fee 

If I get time, I'll submit a patch but it seems like I probably won't for this.

--

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



[issue23649] tarfile not re-entrant for multi-threading

2015-03-12 Thread R. David Murray

R. David Murray added the comment:

If you want to use an object that has state in more than one thread you 
generally have to put some locking around it.  Unless I'm missing something 
(which I might be) I don't think it is tarfile's responsibility to do this.

--
nosy: +r.david.murray

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



[issue23650] xml.etree.ElementTreee.write can't parse its own output

2015-03-12 Thread François-Michel L'Heureux

New submission from François-Michel L'Heureux:

Using TreeBuilder to put data into XML tree.
Convert that tree to a string.
Parse that string.
XML parser error.

I expect XML library to be able to parse its own output.

Reference example: 
https://github.com/FinchPowers/python_xml_builder_bug/blob/d98b2422d9ecadbee37e2896a5098abf82b1d7a4/python_xml_builder_bug.py

--
components: XML
files: python_xml_builder_bug.py
messages: 237965
nosy: François-Michel L'Heureux
priority: normal
severity: normal
status: open
title: xml.etree.ElementTreee.write can't parse its own output
versions: Python 2.7
Added file: http://bugs.python.org/file38459/python_xml_builder_bug.py

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



[issue23647] imaplib.py MAXLINE value is too low for gmail

2015-03-12 Thread R. David Murray

R. David Murray added the comment:

Gmail breaks the standards again, eh?  I suppose we'll have to accommodate them 
;)

--
components: +email
nosy: +barry, r.david.murray
title: imaplib.py MAXLINE value is too low for 2015 (patch attached) - 
imaplib.py MAXLINE value is too low for gmail
versions: +Python 3.5

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



[issue20617] test_ssl does not use mock

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2b7cf33ccd74 by Berker Peksag in branch '3.4':
Issue #20617: Remove unused import in test_ssl.
https://hg.python.org/cpython/rev/2b7cf33ccd74

New changeset 07e8c0ae232c by Berker Peksag in branch 'default':
Issue #20617: Remove unused import in test_ssl.
https://hg.python.org/cpython/rev/07e8c0ae232c

--
nosy: +python-dev

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



[issue23649] tarfile not re-entrant for multi-threading

2015-03-12 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo, lars.gustaebel
versions: +Python 3.5

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



[issue23650] xml.etree.ElementTreee.write can't parse its own output

2015-03-12 Thread François-Michel L'Heureux

Changes by François-Michel L'Heureux fm.lheur...@gmail.com:


--
type:  - behavior

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



[issue23650] xml.etree.ElementTreee.write can't parse its own output

2015-03-12 Thread François-Michel L'Heureux

François-Michel L'Heureux added the comment:

Note that you cannot copy paste the code and expect to reproduce the issue 
because it contains special characters that cannot be copy pasted via a web 
browser.

Here is the output when run.

?xml version='1.0' encoding='utf-8'?
topline2015-03-12 09:44:54.560 script runner plugin Hello, 
world/line/top
Traceback (most recent call last):
  File python_xml_builder_bug.py, line 17, in module
ElementTree.fromstring(io.getvalue())
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py,
 line 1300, in XML
parser.feed(text)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py,
 line 1642, in feed
self._raiseerror(v)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py,
 line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 2, 
column 35

--

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



[issue23649] tarfile not re-entrant for multi-threading

2015-03-12 Thread Srdjan Grubor

Srdjan Grubor added the comment:

I don't know if that's true of core libraries. Why complicate things for end 
users when those issues could be done in the library itself and be completely 
transparent to the devs? A simple RLock latch wouldn't pose almost any speed 
degradation but would work in both threaded and non-threaded situations as 
expected.

--
versions:  -Python 3.5

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



[issue23650] xml.etree.ElementTreee.write can't parse its own output

2015-03-12 Thread R. David Murray

R. David Murray added the comment:

Use \x escapes to construct your example, then.

--
nosy: +r.david.murray

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



[issue23651] Typo in argparse allow_abrev

2015-03-12 Thread Berker Peksag

Berker Peksag added the comment:

Good catch, Nathan. Thanks!

--
nosy: +berker.peksag
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue23650] xml.etree.ElementTreee.write can't parse its own output

2015-03-12 Thread François-Michel L'Heureux

François-Michel L'Heureux added the comment:

Updated file where copy/pasting works.

--
Added file: http://bugs.python.org/file38460/python_xml_builder_bug.py

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



[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-12 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/issue23644
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23647] imaplib.py MAXLINE value is too low for gmail

2015-03-12 Thread R. David Murray

R. David Murray added the comment:

Sorry, I was being a facetious, but despite the smiley that wasn't clear.  I 
*have* run into a number of cases where gmail violates the standard, but I 
wasn't really serious about this case.

--

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



[issue23652] ifdef uses of EPOLLxxx macros so we can compile on systems that don't have them

2015-03-12 Thread Matt Frank

New submission from Matt Frank:

With the LSB (Linux Standard Base) headers for libc Modules/selectmodule.c 
fails to compile because we have code that uses EPOLLRDNORM, EPOLLRDBAND, 
EPOLLWRNORM and EPOLLMSG without first checking that they are defined.

The patch wraps the five uses of PyModule_AddIntMacro in #ifdefs, following 
exactly the same pattern that is used for the POLLRDNORM, POLLRDBAND, 
POLLWRNORM, POLLMSG macros 30 lines earlier in selectmodule.c.

The only documentation I can find for these five macros from Linux is (a) in 
the Python documentation for the select module!  
(https://docs.python.org/3.4/library/select.html#edge-and-level-trigger-polling-epoll-objects)
 and (b) on this StackOverflow answer: 
http://stackoverflow.com/a/27143672/2209313.

They are not described on http://man7.org/linux/man-pages/man2/epoll_ctl.2.html 
(where the rest of the EPOLL macros are defined), nor at 
http://linux.die.net/man/4/epoll.  As explained by the StackOverflow answer 
they actually are described (indirectly) by 
http://man7.org/linux/man-pages/man2/poll.2.html.

Nor are these macros in the Linux Foundation's LSB database: 
http://www.linuxbase.org/navigator/browse/headgroup.php?cmd=list-byheadgroupHGid=1398.

Obviously almost all modern Linuxes have these macros, so we should keep them, 
but we should also compile with the LSB headers (since compiling and linking 
against the LSB SDK 
(http://www.linuxfoundation.org/collaborate/workgroups/lsb/group) is one of the 
easiest ways to produce a Python binary that will actually run on most 
important supported Linux distros (e.g., RHEL 5).

http://man7.org/linux/man-pages/man7/epoll.7.html,

--
components: Build
files: epoll-macros-patch.diff
keywords: patch
messages: 237984
nosy: WanderingLogic
priority: normal
severity: normal
status: open
title: ifdef uses of EPOLLxxx macros so we can compile on systems that don't 
have them
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file38461/epoll-macros-patch.diff

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



[issue23653] Make inspect._empty test to False

2015-03-12 Thread Nathan West

New submission from Nathan West:

A common Python idiom is to test objects by value in an if. This includes 
container emptiness and regular expression matches, or using 'or' to specify a 
default value:

if my_list:
# list isn't empty
if regex.match(string):
# string matched the regex
my_list = arg or [1,2,3]

It'd be nice if we could use this idiom with inspect.Signature._empty or 
inspect.Parameter.empty:

sig = signature(func)
for param in sig.parameters.values():
if param.annotation:
...

or, to use a the example that motivated this idea:

def arg_type(param):
return param.annotation or str

The only issue I can think of is that, if an annotation or default value is 
some False value, like None, than the test will fail even if the value isn't 
_empty. However, this issue already exists for other uses of this idiom, and I 
think this is a perfect extension of the form.

--
components: Library (Lib)
messages: 237987
nosy: Lucretiel
priority: normal
severity: normal
status: open
title: Make inspect._empty test to False
type: enhancement
versions: Python 3.5

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



[issue23652] ifdef uses of EPOLLxxx macros so we can compile on systems that don't have them

2015-03-12 Thread Matt Frank

Changes by Matt Frank matthew.i.fr...@intel.com:


--
type:  - compile error

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



[issue23647] imaplib.py MAXLINE value is too low for gmail

2015-03-12 Thread Arnt Gulbrandsen

Arnt Gulbrandsen added the comment:

The RFC in question is 2683, which isn't a standard, it's just advice.

What gmail breaks is the expectation that mailboxes and seach results are 
smallish. If you run a python script on gmail and it runs a search, the result 
can be a great deal bigger than the author of RFC2683 foresaw.

--

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



[issue23652] ifdef uses of EPOLLxxx macros so we can compile on systems that don't have them

2015-03-12 Thread Ned Deily

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


--
nosy: +neologix

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



[issue23649] tarfile not re-entrant for multi-threading

2015-03-12 Thread Srdjan Grubor

Srdjan Grubor added the comment:

After some thinking, for the makedirs it should only need 
makedirs(exist_ok=True)

--

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



[issue22038] Implement atomic operations on non-x86 platforms

2015-03-12 Thread Leonardo Bianconi

Changes by Leonardo Bianconi leonardo.bianc...@eldorado.org.br:


--
nosy: +lbianc

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



[issue23644] swig compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread Leonardo Bianconi

Changes by Leonardo Bianconi leonardo.bianc...@eldorado.org.br:


--
nosy: +lbianc

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



[issue23650] xml.etree.ElementTreee.write can't parse its own output

2015-03-12 Thread Ned Deily

Ned Deily added the comment:

This is a duplicate of Issue5166.  Note that in your example, you are not 
serializing valid XML 1.0: \x1b (ESC) is not a valid XML character, it has to 
be escaped and, as the discussion in Issue5166 points out, etree does not 
automatically do that for you.

--
nosy: +ned.deily
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - ElementTree and minidom don't prevent creation of not 
well-formed XML

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



[issue23641] Got rid of bad dunder names

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Committed all except changes to multiprocessing.sharedctypes (remove 
__getslice__ and __setslice__) and unittest.mock (remove __div__, add 
__getnewargs_ex__).

--

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



[issue23635] Python won't install correctly.

2015-03-12 Thread Alex Zhang

Alex Zhang added the comment:

Never mind, I used ccleaner and revo uninstaller to delete traces, then 
reinstalled using the msi. Thanks for help, it's all good now!

--
resolution:  - fixed
status: open - closed

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



[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-12 Thread STINNER Victor

STINNER Victor added the comment:

Le jeudi 12 mars 2015, Charles-François Natali rep...@bugs.python.org a
écrit :

 As for the change to select/poll/etc, IIRC Guido was opposed to it,
 that's why I didn't update them.


Wait what? can you elaborate? I'm not aware of that.

--

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



[issue23641] Got rid of bad dunder names

2015-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7522bb14e36a by Serhiy Storchaka in branch '3.4':
Issue #23641: Cleaned out legacy dunder names from tests and docs.
https://hg.python.org/cpython/rev/7522bb14e36a

New changeset 9332a545ad85 by Serhiy Storchaka in branch 'default':
Issue #23641: Cleaned out legacy dunder names from tests and docs.
https://hg.python.org/cpython/rev/9332a545ad85

--
nosy: +python-dev

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



[issue23641] Got rid of bad dunder names

2015-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Do you want first commit the patch in issue23581 Berker?

--

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



[issue23650] xml.etree.ElementTreee.write can't parse its own output

2015-03-12 Thread François-Michel L'Heureux

Changes by François-Michel L'Heureux fm.lheur...@gmail.com:


Removed file: http://bugs.python.org/file38459/python_xml_builder_bug.py

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



[issue23641] Got rid of bad dunder names

2015-03-12 Thread Berker Peksag

Berker Peksag added the comment:

 Do you want first commit the patch in issue23581 Berker?

I just committed it. Thanks for the review :)

--

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



[issue23651] Typo in argparse allow_abrev

2015-03-12 Thread Nathan West

New submission from Nathan West:

The documentation for the new argparse feature allow_abrev contains a typo:

 parser.add_argument('--foobar', action='store_true')
 parser.add_argument('--foonley', action='store_false')
 parser.parse_args([--foon])
usage: PROG [-h] [--foobar] [--foonley]
PROG: error: unrecognized arguments: --foon

The --foon should be quoted:

 parser.parse_args(['--foon'])

--
assignee: docs@python
components: Documentation
messages: 237971
nosy: Lucretiel, docs@python
priority: normal
severity: normal
status: open
title: Typo in argparse allow_abrev
versions: Python 3.5

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



  1   2   >