[issue19776] Provide expanduser() on Path objects

2013-12-05 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Thanks, Vajrasky! Here's the new version of the patch.

--
Added file: http://bugs.python.org/file32980/pathlib1.patch

___
Python tracker 

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



[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2013-12-05 Thread Wim

Wim added the comment:

I have run into this a few times although it is only recently that I've 
convinced myself I understood the XML namespace spec well enough to know what 
the right behavior was. (I came to the same interpretation as silverbacknet.)

I have attached a patch which I believe fixes (and tests) the problem.

--
keywords: +patch
nosy: +wiml
Added file: http://bugs.python.org/file32981/bug17088_1.patch

___
Python tracker 

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



[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-05 Thread Vajrasky Kok

Changes by Vajrasky Kok :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue19881] Fix bigmem pickle tests

2013-12-05 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


Added file: http://bugs.python.org/file32982/fix_bigmem_pickle_2.patch

___
Python tracker 

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



[issue19343] Expose FreeBSD-specific APIs in resource module

2013-12-05 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Should this be tagged for Python 3.5?

--

___
Python tracker 

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



[issue19893] Python cApi memory problem. Py_Initialize memory leak

2013-12-05 Thread Roman

New submission from Roman:

I wrote small test program using Python cApi, and found some memory issues 
while working on it. I checked it with valgrind. (test code and valgrind output 
appended)
Maybe I'm doing something wrong, but most of the problem occurs durring 
Py_Initialize. I've checked python3.2.5 and 3.3.3 version. The latest version 
is much less confusing, but I can still see there something nasty. 
I would be grateful if you could look at this, and tell me If I'm doing 
something wrong, or if I can do something to prevent this memory issues.

--
files: pytest.tgz
messages: 205283
nosy: rstarostecki
priority: normal
severity: normal
status: open
title: Python cApi memory problem. Py_Initialize memory leak
type: resource usage
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file32983/pytest.tgz

___
Python tracker 

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



[issue19894] zipfile ignores deflate level settings in zipinfo object

2013-12-05 Thread Richard Milne

New submission from Richard Milne:

Reading the pkzip APPNOTE and the documentation for the zipfile module, I was 
under the impression that I could set the DEFLATE compression level, on a 
per-file basis, for each file added to an archive, by setting the appropriate 
bits in zipinfo.flag_bits.

You can't. Hence the attached patch, which updates the docs, tests and module 
source to enables this ability and makes the user aware of it.

--
assignee: docs@python
components: Documentation, Library (Lib), Tests
files: zipfileinfo.diff
keywords: patch
messages: 205284
nosy: docs@python, rmilne
priority: normal
severity: normal
status: open
title: zipfile ignores deflate level settings in zipinfo object
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file32984/zipfileinfo.diff

___
Python tracker 

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



[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2013-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 03fcc12282fc by Kristján Valur Jónsson in branch '2.7':
Issue #7105:  weak dict iterators are fragile because of unpredictable GC runs
http://hg.python.org/cpython/rev/03fcc12282fc

--
nosy: +python-dev

___
Python tracker 

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



[issue19895] Cryptic error when subclassing multiprocessing classes

2013-12-05 Thread Antony Lee

New submission from Antony Lee:

Classes defined in the multiprocessing module are in fact functions that call 
the internally defined class constructor with the "ctx" argument properly set; 
because of that, trying to subclass them yields a (very?) cryptic error message:

>>> import multiprocessing as m, multiprocessing.queues as q
>>> class Q(m.Queue): pass # normal attempt fails
... 
Traceback (most recent call last):
  File "", line 1, in 
TypeError: function() argument 1 must be code, not str
>>> class Q(q.Queue): pass # that one works fine
... 

I guess the error message here could be improved, and the limitation and the 
workaround should be mentioned in the docs.  Even better would be to  have real 
classes directly in the multiprocessing module rather than wrappers, although I 
believe that would require sorting out some circular import issues.

--
components: Library (Lib)
messages: 205286
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Cryptic error when subclassing multiprocessing classes
versions: Python 3.4

___
Python tracker 

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



[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2013-12-05 Thread Antony Lee

New submission from Antony Lee:

multiprocessing.sharedctypes was not updated after the "q" (c_longlong) and "Q" 
(c_ulonglong) typecodes were added to the array module (the docs claim that the 
typecode can be "one character typecode of the kind used by the array module"). 
 The attached patch (just adding an entry to the typecode-to-type dict, as well 
as some more tests) fixes the issue.

--
components: Library (Lib)
files: multiprocessing-longlong.patch
keywords: patch
messages: 205287
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Exposing "q" and "Q" to multiprocessing.sharedctypes
versions: Python 3.4
Added file: http://bugs.python.org/file32985/multiprocessing-longlong.patch

___
Python tracker 

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



[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2013-12-05 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +sbt
stage:  -> patch review

___
Python tracker 

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



[issue19895] Cryptic error when subclassing multiprocessing classes

2013-12-05 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +sbt

___
Python tracker 

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



[issue19893] Python cApi memory problem. Py_Initialize memory leak

2013-12-05 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo, skrah

___
Python tracker 

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



[issue19893] Python cApi memory problem. Py_Initialize memory leak

2013-12-05 Thread Stefan Krah

Stefan Krah added the comment:

Did you use --suppressions=Misc/valgrind-python.supp?

--

___
Python tracker 

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



[issue19893] Python cApi memory problem. Py_Initialize memory leak

2013-12-05 Thread Stefan Krah

Stefan Krah added the comment:

Also, you have zero "definitely lost". "possibly lost" is not
particularly informative in the context of running Python:
These are almost certainly false positives.

--

___
Python tracker 

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



[issue19893] Python cApi memory problem. Py_Initialize memory leak

2013-12-05 Thread Roman

Roman added the comment:

I didn't use --suppressions=Misc/valgrind-python.supp before . (But I've done 
it now). Nothing important has changed.
I understand that "possibly lost is not particularly informative". I'm  rather 
worried about "Invalid read of size 4" etc. Isn't it potentially dangerous? I 
thought it is some kind of memory corruption, isn't it?

--

___
Python tracker 

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



[issue19893] Python cApi memory problem. Py_Initialize memory leak

2013-12-05 Thread Stefan Krah

Stefan Krah added the comment:

Did you compile Python --with-valgrind?

--

___
Python tracker 

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



[issue19893] Python cApi memory problem. Py_Initialize memory leak

2013-12-05 Thread Roman

Roman added the comment:

I've just done it. Python 3.3.3 --with-valgrind. I can't see the difference. 
Output appended.

--
Added file: http://bugs.python.org/file32986/vgrind3.3.3vc.out

___
Python tracker 

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



[issue19884] Importing readline produces erroneous output

2013-12-05 Thread Bohuslav "Slavek" Kabrda

Bohuslav "Slavek" Kabrda added the comment:

I can also reproduce it on Arch Linux. It seems that the bad characters are 
only output if env variable TERM starts with "xterm".

--

___
Python tracker 

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



[issue19887] Path.resolve() ENAMETOOLONG on pathologic symlinks

2013-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Path.resolve() also fails when last link is absolute.

mkdir testdir
ln -s 0/0 testdir/1
ln -s 1/1 testdir/2
ln -s "$(readlink -f testdir)" testdir/0

Path('testdir/2').resolve() fails:

Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/pathlib.py", line 1017, in resolve
s = self._flavour.resolve(self)
  File "/home/serhiy/py/cpython/Lib/pathlib.py", line 273, in resolve
raise RuntimeError("Symlink loop from %r" % cur)
RuntimeError: Symlink loop from '/home/serhiy/py/cpython/testdir/0'

Here is a patch which implements an algorithm similar to the algorithm used in 
posixpath.realpath().

--
keywords: +patch
priority: low -> high
stage:  -> patch review
Added file: http://bugs.python.org/file32987/pathlib_resolve.patch

___
Python tracker 

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



[issue19894] zipfile ignores deflate level settings in zipinfo object

2013-12-05 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +alanmcintyre, serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue19897] Use python as executable instead of python3 in Python 2 docs

2013-12-05 Thread Berker Peksag

Changes by Berker Peksag :


--
assignee: docs@python
components: Documentation
files: fix-example-site.diff
keywords: patch
nosy: berker.peksag, docs@python
priority: normal
severity: normal
stage: patch review
status: open
title: Use python as executable instead of python3 in Python 2 docs
versions: Python 2.7
Added file: http://bugs.python.org/file32988/fix-example-site.diff

___
Python tracker 

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



[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-05 Thread R. David Murray

R. David Murray added the comment:

This is presumably due to the new default enabling of readline, where it is 
trying to save the history file when it exits.

--
nosy: +pitrou, r.david.murray

___
Python tracker 

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



[issue19687] Fixes for elementtree integer overflow

2013-12-05 Thread Eli Bendersky

Eli Bendersky added the comment:

Thanks. I left some comments in the code review tool

--

___
Python tracker 

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



[issue18235] _sysconfigdata.py wrong on AIX installations

2013-12-05 Thread Michael Haubenwallner

Michael Haubenwallner added the comment:

Kindly ping. Do you prefer another report for the aix-absbuilddir patch as this 
one is already closed?

--

___
Python tracker 

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



[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

For the record, why did you close as invalid?

--

___
Python tracker 

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



[issue19893] Python cApi memory problem. Py_Initialize memory leak

2013-12-05 Thread STINNER Victor

STINNER Victor added the comment:

You shoud configure --with-valgrind *and* use the suppression list, or
disable pymalloc using configure.

Victor

--

___
Python tracker 

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



[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-05 Thread R. David Murray

R. David Murray added the comment:

Not sure who you meant by 'you', but just in case you meant me, Vajrasky was 
the one who closed it.

--

___
Python tracker 

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



[issue19893] Python cApi memory problem. Py_Initialize memory leak

2013-12-05 Thread Roman

Roman added the comment:

I compiled python --with-valgrind --without-pymalloc, and used valgrind with 
suppressions. 

valgrind --suppressions=../Misc/valgrind-python.supp --leak-check=full 
--show-reachable=no --show-possibly-lost=no --track-origins=yes 
--log-file=vgrindNext.out ./test

--
Added file: http://bugs.python.org/file32989/vgrindNext.out

___
Python tracker 

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



[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2013-12-05 Thread Brett Cannon

Brett Cannon added the comment:

First, sorry about the noise in the patch.

Second, the patch should contain just three pragma lines:

  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  ...
  #pragma clang diagnostic pop

Now I don't think that's unreadable at all, nor runs any risk of breaking 
anything. And since the majority of Clang users are probably on OS X that would 
suggest that the suppression of the warning will only affect those where the 
warning is superfluous and won't lead to unneeded suppressions (if people are 
really worried about unneeded suppressions I can try to break the 'if' guard up 
to only suppress on the one part).

I just don't want to perpetually be ignoring a single warning in the code. That 
leads to me ignoring any warnings that come during compilation, which is 
unfortunate as some warnings are actually useful and should be rectified.

--

___
Python tracker 

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



[issue19887] Path.resolve() ENAMETOOLONG on pathologic symlinks

2013-12-05 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Whoa, Serhiy, your patch won't fly on Windows Vista.

For starter, the patch does not use target_is_directory=True option in 
os.symlink. It needs that option when creating symlink to the directory on 
Windows Vista.

The maximum depth that pathlib can do on Windows Vista is 4 (Remember, this 
line: "for depth in 0, 1, 2, 3, 10, 100"?).

More than that:
OSError: [WinError 1921] The name of the file cannot be resolved by the system:
'C:\\Users\\vajrasky\\Code\\cpython\\@test_4220_tmp\\testdir\\link5'

Not sure whether the bug is in pathlib.py or _getfinalpathname (from nt module).

--
nosy: +vajrasky

___
Python tracker 

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



[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-05 Thread Vajrasky Kok

Vajrasky Kok added the comment:

I closed it because I could not reproduce it anymore.

I think, it worked again after

$ ./python -S

I will open it again if I can consistently reproduce this bug.

--

___
Python tracker 

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



[issue19898] No tests for dequereviter_new

2013-12-05 Thread Christian Heimes

New submission from Christian Heimes:

According to LCOV the dequereviter_new is never called by any test.

http://tiran.bitbucket.org/python-lcov/Modules/_collectionsmodule.c.gcov.html#1408

--
components: Library (Lib), Tests
messages: 205305
nosy: christian.heimes, rhettinger
priority: low
severity: normal
stage: needs patch
status: open
title: No tests for dequereviter_new
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue19899] No test for thread.interrupt_main()

2013-12-05 Thread Christian Heimes

New submission from Christian Heimes:

Accoring to LCOV thread_PyThread_interrupt_main() is never called by any test. 
It's only referenced by some idle code.

http://tiran.bitbucket.org/python-lcov/Modules/_threadmodule.c.gcov.html#1110

--
messages: 205306
nosy: christian.heimes
priority: low
severity: normal
stage: needs patch
status: open
title: No test for thread.interrupt_main()
type: behavior

___
Python tracker 

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



[issue19887] Path.resolve() ENAMETOOLONG on pathologic symlinks

2013-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Vajrasky. Here is a patch with fixed tests.

--
Added file: http://bugs.python.org/file32990/pathlib_resolve_2.patch

___
Python tracker 

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



[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2013-12-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

On jeu., 2013-12-05 at 14:40 +, Brett Cannon wrote:
> 
> I just don't want to perpetually be ignoring a single warning in the
> code. That leads to me ignoring any warnings that come during
> compilation, which is unfortunate as some warnings are actually useful
> and should be rectified.

I guess my annoyance is that people reading the code will think "what is
this here for?". Perhaps you could add a comment.

--

___
Python tracker 

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



[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2013-12-05 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules

2013-12-05 Thread Christian Heimes

Christian Heimes added the comment:

The new patch splits the test into three separate test cases.

Guido, Python 3.3 doesn't have the necessary CA and server cert files. The 
files were added to 3.4 for some other tests. The patch tries to load the files 
from 3.4's test directory and falls back to local copies. You have to 
copy/delete these files to test the patch:

$ hg rm Lib/test/test_asyncio/sample.*
$ hg cp Lib/test/ssl_key.pem Lib/test/ssl_cert.pem Lib/test/pycacert.pem 
Lib/test/keycert3.pem  Lib/test/test_asyncio/

--
Added file: http://bugs.python.org/file32991/asyncio_ssl_verify2.patch

___
Python tracker 

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



[issue18235] _sysconfigdata.py wrong on AIX installations

2013-12-05 Thread David Edelsohn

David Edelsohn added the comment:

Do you want me to open a new issue or do you want to open a new issue?

--

___
Python tracker 

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



[issue19343] Expose FreeBSD-specific APIs in resource module

2013-12-05 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +larry

___
Python tracker 

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



[issue19887] Path.resolve() ENAMETOOLONG on pathologic symlinks

2013-12-05 Thread Vajrasky Kok

Vajrasky Kok added the comment:

It works. Just a coding nitpick, instead of hardcoding os.symlink(src, dst, 
target_is_directory=True) in the test, you can use helper function in the test 
itself, self.dirlink.

--

___
Python tracker 

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



[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2013-12-05 Thread David Watson

David Watson added the comment:

Looking again at cmsg_min_space(), I see that it already returns
false when msg_controllen is less than cmsg_len_end, so you could
do a (signed) comparison against that, rather than 0.  Patch
attached.

--
Added file: http://bugs.python.org/file32992/socket-compare-cmsg_len_end.diff

___
Python tracker 

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



[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Christian Heimes

Christian Heimes added the comment:

Here is a patch that strncpy() the filename to a char[].

--
nosy: +christian.heimes
stage:  -> needs patch
type:  -> compile error
Added file: http://bugs.python.org/file32993/dbm_const_filename.patch

___
Python tracker 

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



[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-12-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a modified patch. The changes are:
- pickle is deemphasized a lot more (it's moved into a "seealso")
- I replaced the terms "encoding" and "decoding" with "serializing" and 
"deserializing" (the former may be confusing for people who are already 
struggling to understand the bytes / unicode gap)
- I added a glossary entry for "text file" and pointed to it

--
Added file: http://bugs.python.org/file32994/tutjson.patch

___
Python tracker 

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



[issue18235] _sysconfigdata.py wrong on AIX installations

2013-12-05 Thread Michael Haubenwallner

Michael Haubenwallner added the comment:

Erm, question target was the python committers. And I'd create the new issue if 
they prefer.

--

___
Python tracker 

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



[issue19900] improve pickle intro

2013-12-05 Thread Antoine Pitrou

New submission from Antoine Pitrou:

This patch improved the generalities at the top of the pickle module docs.

--
assignee: docs@python
components: Documentation
files: pickintro.patch
keywords: patch
messages: 205316
nosy: alexandre.vassalotti, docs@python, ncoghlan, pitrou, tim.peters
priority: normal
severity: normal
stage: patch review
status: open
title: improve pickle intro
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32995/pickintro.patch

___
Python tracker 

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



[issue16669] Docstrings for namedtuple

2013-12-05 Thread Guido van Rossum

Guido van Rossum added the comment:

On Wed, Dec 4, 2013 at 10:25 PM, Terry J. Reedy  wrote:
> I am familiar with running Sphinx on .rst files, but not on docstrings.
> It looks like the docstrings use .rst markup. (Is this allowed in the  
> stdlib?)

I'm not sure if it is allowed, but it is certainly used plenty in some
modules (perhaps those that started life as 3rd party packages).

> (The output looks good enough for a first draft of a tkinter class/method 
> reference, which I would like to work on.)

I won't stop you -- having *any* kind of docs for Tkinter sounds good to me!

>> I understand that part of this [signature after class name] is due to the 
>> latter class having an __init__ with a reasonable docstring
>
> If dropbox.client is written in Python, as I presume,

It is.

> then I strongly suspect that the signature part of
>   class dropbox.client.DropboxClient(
> oauth2_access_token, locale=None, rest_client=None)
> comes from an inspect module method that examines the function attributes 
> other than .__doc__.

Indeed.

> If so, DropboxClient.__init__ docstring is irrelevant to the above. You could 
> test by commenting it out and rerunning the doc build.

Yes.

> The inspect methods do not work on C-coded functions (unless Argument Clinic 
> has fixed this for 3.4), which is why signatures are put in the docstrings 
> for C-coded objects. For C-coded classes, it is put in the class docstring 
> rather than the class.__init__ docstring.

Perhaps it doesn't understand __new__? namedtuple actually generates
Python code for a class definition using a template and then uses
exec() on the filled-in template; the template defines only __new__
though.

>> but the fact remains that namedtuple's default docstring produces 
>> poorly-looking documentation.
>
> 'x.__init__(...) initializes x; see help(type(x)) for signature'
>
> This is standard boilerplate for C-coded .__init__.__doc__.
> Raymond just copied it.

He didn't (it's not in the template). It is the dummy __init__ that
tuple inherits from object (the docstring is in the __init__ wrapper
in typeobject.c).

 int.__init__.__doc__
> 'x.__init__(...) initializes x; see help(type(x)) for signature'
 list.__init__.__doc__
> 'x.__init__(...) initializes x; see help(type(x)) for signature'

--

___
Python tracker 

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



[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Larry Hastings

Larry Hastings added the comment:

Why wouldn't "dbm_open((char *)file, flags, mode)" work?

--

___
Python tracker 

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



[issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules

2013-12-05 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks Christian, this is almost right.  I'm uploading a patch that covers all 
bases:

- Works on Python 3.3 (TEST_HOME_DIR isn't defined there)
- Works on older Python 3.4 versions (check_hostname may not exist)
- Works on latest Python 3.4 version

--
Added file: http://bugs.python.org/file32996/asyncio_ssl_verify3.patch

___
Python tracker 

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



[issue19901] tests fail due to unsupported SO_REUSEPORT when building Python 3.3.2-r2

2013-12-05 Thread Reuben Garrett

New submission from Reuben Garrett:

When building Python 3.3.2-r2 from Gentoo's Portage tree [1], I encountered two 
failed tests which probably should not have been attempted on my OS (Gentoo 
3.7.10): test_bind_port and test_find_unused_port both use the SO_REUSEPORT 
socket option which, to the best of my knowledge is only available since kernel 
version 3.9. I was able to build by skipping the tests — but I believe the 
tests are there for a reason, and it would be best if a test that is known to 
fail should be skipped (or replaced with a fallback that is likely to succeed). 
Issue # 16594 [3] may be related (not sure).

Is it possible to detect the kernel version and skip (or modify) these tests if 
SO_REUSEPORT is not available? Better yet (since even a 3.9 kernel could have 
it disabled) — try the test with SO_REUSEPORT, but trap the exception for lack 
of OS support, print a warning, and try again without SO_REUSEPORT. 

+=== excerpt of portage build log:
==
ERROR: test_bind_port (test.test_support.TestSupport)
--
Traceback (most recent call last):
  File 
"/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/test_support.py",
 line 87, in test_bind_port
support.bind_port(s)
  File 
"/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/support.py",
 line 548, in bind_port
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
OSError: [Errno 92] Protocol not available

==
ERROR: test_find_unused_port (test.test_support.TestSupport)
--
Traceback (most recent call last):
  File 
"/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/test_support.py",
 line 80, in test_find_unused_port
port = support.find_unused_port()
  File 
"/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/support.py",
 line 522, in find_unused_port
port = bind_port(tempsock)
  File 
"/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/support.py",
 line 548, in bind_port
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
OSError: [Errno 92] Protocol not available
===+

[1]: https://packages.gentoo.org/package/dev-lang/python
[2]: https://lwn.net/Articles/542629/
[3]: http://bugs.python.org/issue16594

--
components: Build
messages: 205320
nosy: RubyTuesdayDONO
priority: normal
severity: normal
status: open
title: tests fail due to unsupported SO_REUSEPORT when building Python 3.3.2-r2
versions: Python 3.3

___
Python tracker 

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



[issue19901] tests fail due to unsupported SO_REUSEPORT when building Python 3.3.2-r2

2013-12-05 Thread Guido van Rossum

Changes by Guido van Rossum :


--
keywords: +easy

___
Python tracker 

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



[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Christian Heimes

Christian Heimes added the comment:

Yes, a cast to char* silences the error. But it could potentially brea contract 
because dbm_open() could alter the content of the string. I'm just paranoid 
(again). *g*

--

___
Python tracker 

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



[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 546cad3627e2 by Charles-François Natali in branch 'default':
Issue #19850: asyncio: Set SA_RESTART when registering a signal handler to
http://hg.python.org/cpython/rev/546cad3627e2

--
nosy: +python-dev

___
Python tracker 

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



[issue16669] Docstrings for namedtuple

2013-12-05 Thread Phil Connell

Changes by Phil Connell :


--
nosy: +pconnell

___
Python tracker 

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



[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-12-05 Thread Nick Coghlan

Nick Coghlan added the comment:

Antoine's latest draft looks good to me.

--

___
Python tracker 

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



[issue19419] Use abc.ABC in the collections ABC

2013-12-05 Thread Éric Araujo

Éric Araujo added the comment:

Agreed.

--
nosy: +eric.araujo
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue19842] selectors: refactor BaseSelector implementation

2013-12-05 Thread Éric Araujo

Éric Araujo added the comment:

Do I understand right that BaseSelector.register means something else entirely 
than ABC.register?  Is it a concern?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue15968] Incorporate Tcl/Tk/Tix into the Windows build process

2013-12-05 Thread Zachary Ware

Zachary Ware added the comment:

Here's a new patch based on Jeremy's that addresses all of my review comments 
and includes the update to Tcl/Tk 8.6.1.

Also, I'll be attaching a patch to tix-8.4.3.x which allows it to be built in 
debug configuration and removes many warnings about unrecognized command line 
options.

--
Added file: http://bugs.python.org/file32997/issue15968.v2.diff

___
Python tracker 

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



[issue15968] Incorporate Tcl/Tk/Tix into the Windows build process

2013-12-05 Thread Zachary Ware

Changes by Zachary Ware :


--
stage:  -> patch review
type:  -> enhancement
Added file: http://bugs.python.org/file32998/issue15968_tix.svndiff

___
Python tracker 

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



[issue19842] selectors: refactor BaseSelector implementation

2013-12-05 Thread Guido van Rossum

Guido van Rossum added the comment:

Well, registration is a very common pattern and you can't really require 
everyone to use an inferior word just because ABCMeta uses it.

There's a simple work-around:

abc.ABCMeta.register(selectors.BaseSelector, C)

--

___
Python tracker 

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



[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-12-05 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I like Antoine's tutjson.patch.  commit it.  Thanks for noticing this Donald!

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-12-05 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 90cf299dcf9b by Antoine Pitrou in branch '3.3':
Issue #18840: Introduce the json module in the tutorial, and deemphasize the 
pickle module.
http://hg.python.org/cpython/rev/90cf299dcf9b

New changeset 1009b77f59fd by Antoine Pitrou in branch 'default':
Issue #18840: Introduce the json module in the tutorial, and deemphasize the 
pickle module.
http://hg.python.org/cpython/rev/1009b77f59fd

--
nosy: +python-dev

___
Python tracker 

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



[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Larry Hastings

Larry Hastings added the comment:

I suspect dbm_open predates the common availability of "const".  I assert we 
can safely assume it won't overwrite the contents of the buffer.  (Barring 
spectacular memory corruption bugs that "const" would be powerless to prevent.)

--

___
Python tracker 

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



[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 481b30bfe496 by Antoine Pitrou in branch '2.7':
Issue #18840: Introduce the json module in the tutorial, and deemphasize the 
pickle module.
http://hg.python.org/cpython/rev/481b30bfe496

--

___
Python tracker 

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



[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-12-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, I've committed it. Thanks!

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 2.7

___
Python tracker 

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



[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-05 Thread Guido van Rossum

Guido van Rossum added the comment:

Here's a tentative change to selectors.py that ignores the OSError in various 
unregister() methods (but not in register()).

--
keywords: +patch
Added file: http://bugs.python.org/file32999/unregister.diff

___
Python tracker 

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



[issue19902] logging docs don't document integer constants

2013-12-05 Thread follower

New submission from follower:

The logging module documentation 
 makes reference to the levels 
DEBUG, INFO etc (e.g. in 
) but 
AFAICT these constants are not documented in the module itself.

e.g I would expect a section like this

Level Constants
logging.DEBUG 10
logging.INFO  20
etc etc

(Although the actual values may not be listed depending on what your policy is 
for documenting "magic numbers".)

--
assignee: docs@python
components: Documentation
messages: 205334
nosy: docs@python, follower
priority: normal
severity: normal
status: open
title: logging docs don't document integer constants
type: enhancement
versions: Python 2.7, Python 3.5

___
Python tracker 

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



[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3068ff3d9d1e by Christian Heimes in branch 'default':
Issue #19296: Silence compiler warning in dbm_open.
http://hg.python.org/cpython/rev/3068ff3d9d1e

--
nosy: +python-dev

___
Python tracker 

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



[issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules

2013-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1605eda93392 by Christian Heimes in branch 'default':
Issue #19509: Finish implementation of check_hostname
http://hg.python.org/cpython/rev/1605eda93392

--

___
Python tracker 

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



[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Christian Heimes

Christian Heimes added the comment:

You are probably right. Let's not get too fancy with compiler warnings.

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules

2013-12-05 Thread Guido van Rossum

Guido van Rossum added the comment:

With the latest (revision 1605eda93392) I get four failures on OS X.  Three are 
like this (in all three selector types -- kqueue, select, poll):

==
ERROR: test_create_ssl_connection (test_events.SelectEventLoopTests)
--
Traceback (most recent call last):
  File "tests/test_events.py", line 532, in test_create_ssl_connection
tr, pr = self.loop.run_until_complete(f)
  File "/Users/guido/tulip/asyncio/base_events.py", line 177, in 
run_until_complete
return future.result()
  File "/Users/guido/tulip/asyncio/futures.py", line 221, in result
raise self._exception
  File "/Users/guido/tulip/asyncio/tasks.py", line 276, in _step
result = coro.throw(exc)
  File "/Users/guido/tulip/asyncio/base_events.py", line 388, in 
create_connection
yield from waiter
  File "/Users/guido/tulip/asyncio/futures.py", line 320, in __iter__
yield self  # This tells Task to wait for completion.
  File "/Users/guido/tulip/asyncio/tasks.py", line 329, in _wakeup
value = future.result()
  File "/Users/guido/tulip/asyncio/futures.py", line 221, in result
raise self._exception
  File "/Users/guido/tulip/asyncio/selector_events.py", line 618, in 
_on_handshake
self._sock.do_handshake()
  File "/usr/local/lib/python3.4/ssl.py", line 748, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:599)

The last is similar in test_streams.py:

==
ERROR: test_open_connection_no_loop_ssl (test_streams.StreamReaderTests)
--
Traceback (most recent call last):
  File "tests/test_streams.py", line 58, in test_open_connection_no_loop_ssl
reader, writer = self.loop.run_until_complete(f)
  File "/Users/guido/tulip/asyncio/base_events.py", line 177, in 
run_until_complete
return future.result()
  File "/Users/guido/tulip/asyncio/futures.py", line 221, in result
raise self._exception
  File "/Users/guido/tulip/asyncio/tasks.py", line 276, in _step
result = coro.throw(exc)
  File "/Users/guido/tulip/asyncio/streams.py", line 43, in open_connection
lambda: protocol, host, port, **kwds)
  File "/Users/guido/tulip/asyncio/base_events.py", line 388, in 
create_connection
yield from waiter
  File "/Users/guido/tulip/asyncio/futures.py", line 320, in __iter__
yield self  # This tells Task to wait for completion.
  File "/Users/guido/tulip/asyncio/tasks.py", line 329, in _wakeup
value = future.result()
  File "/Users/guido/tulip/asyncio/futures.py", line 221, in result
raise self._exception
  File "/Users/guido/tulip/asyncio/selector_events.py", line 618, in 
_on_handshake
self._sock.do_handshake()
  File "/usr/local/lib/python3.4/ssl.py", line 748, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:599)


I get the same failures when I copy the changes to the Tulip repo.

--

___
Python tracker 

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



[issue18144] FD leak in urllib2

2013-12-05 Thread Alexander Boyd

Changes by Alexander Boyd :


--
nosy: +javawizard

___
Python tracker 

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



[issue12955] urllib.request example should use "with ... as:"

2013-12-05 Thread Alexander Boyd

Changes by Alexander Boyd :


--
nosy: +javawizard

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2013-12-05 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Change idlelib.CallTips.get_argspec to use inspect.signature, new in 3.3, 
instead of inspect.getfullargspec and inspect.formatargspec. One thing it 
handles better is a namedtuple class, which has a C-coded __init__ inherited 
from object a Python-coded __new__ written by namedtuple. Signature() will also 
handle C-coded functions if and when Argument Clinic (new in 3.4) adds 
signature information.

from collections import namedtuple
from inspect import signature

Point = namedtuple('Point', 'x y')
print(signature(Point.__new__))
# '(_cls, x, y)'
print(signature(Point))
# '(x, y)'

Note that str (called by print) is needed to get the desired string form.

There are tests in CallTips.py, but they should be converted to unittest, moved 
to idle_test/test_calltips.py, changed to match new output detail, and expanded 
to include new examples.

--
assignee: terry.reedy
components: IDLE
messages: 205339
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Idle: Use inspect.signature for calltips
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue16669] Docstrings for namedtuple

2013-12-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think we can now agree that docstrings other than the class docstring (used 
as a fallback) are not relevant to signature detection. And Raymond gave 
namedtuple classes the docstring needed as a fallback.

We are off-issue here, but idlelib.CallTips.get_argspec() is also ignorant that 
it may need to look at  .__new__. An object with a C-coded .__init__ and 
Python-coded .__new__ is new to new-style classes. The new inspect.signature 
function handles such properly. Starting with a namedtuple Point (without the 
default docstring):

>>> from inspect import signature
>>> str(signature(Point.__new__))
'(_cls, x, y)'
>>> str(signature(Point))
'(x, y)'

The second is what autodoc should use. I just opened #19903 to update Idle to 
use signature.

--

___
Python tracker 

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



[issue16669] Docstrings for namedtuple

2013-12-05 Thread Guido van Rossum

Guido van Rossum added the comment:

It was never about signature detection for me -- what gave you that idea?  I 
simply want to have the option to put individual docstrings on the properties 
generated by namedtuple.

--

___
Python tracker 

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



[issue19888] Three argument type() super call sets __name__ but not __qualname__

2013-12-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


Added file: http://bugs.python.org/file33000/qualname-19888.py

___
Python tracker 

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



[issue19888] Three argument type() super call sets __name__ but not __qualname__

2013-12-05 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I don't see the value in opening a new bug.  Now that we understand what's 
going on, let's just repurpose and retitle this one.

Run qualname-19888.py with Python 3.3 and you'll get:

Obj.__name__ foo
Obj.__qualname__ Obj
repr(Obj) 

And with 3.2:

Obj.__name__ foo
repr(Obj) 

The primary discrepancy (and relevant visible regression) is in the repr of Obj.

--
nosy: +ncoghlan
resolution: invalid -> 
status: closed -> open
title: type.__new__() name argument is ignored -> Three argument type() super 
call sets __name__ but not __qualname__
versions:  -Python 2.7, Python 3.2

___
Python tracker 

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



[issue19901] tests fail due to unsupported SO_REUSEPORT when building Python 3.3.2-r2

2013-12-05 Thread Dave Malcolm

Dave Malcolm added the comment:

[FWIW, this looks similar to an issue I ran into on Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=913732
which was due to a mismatch between the kernel headers on the system vs the 
actually running kernel.  I patched around it there with a downstream-only 
patch (our builds are done on chroots on RHEL-5 boxes, so such mismatches tend 
to occur)]

--
nosy: +dmalcolm

___
Python tracker 

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



[issue19904] Add 128-bit integer support to struct

2013-12-05 Thread Fil Mackay

New submission from Fil Mackay:

I've been looking at adding 128-bit support to the struct module. Currently 
only named integer types are supported, which vary in implementation. These 
include:

short
int
long
long long

Depending on the platform, none may translate to 128-bit integer (the case with 
all platforms today?).

One approach would be to make a new type that relates specifically to 128-bit 
integer, side-stepping the naming approaches to integer in C.

The other, would be to make new types for all integer sizes that relate to 
specific sizes, instead of relying on C namings. Much bigger implications?

I propose creating new types:

"o": __int128_t
"O": __uint128_t
"t": __int256_t (why not?)
"T": __uint256_t
"v": __int512_t (what, too far?)
"V": __int512_t

What implications are there here in killing the connection between a C named 
type and a specific size?

--
components: ctypes
messages: 205344
nosy: fil
priority: normal
severity: normal
status: open
title: Add 128-bit integer support to struct
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue19905] Add 128-bit integer support to ctypes

2013-12-05 Thread Fil Mackay

New submission from Fil Mackay:

This depends on struct issue #19904, and involves adding the following types:

c_int128
c_uint128
c_int256 (maybe?)
c_uint256
c_int512 (too much?)
c_uint512

After resolution of the struct issue, this implementation will become clearer.

--
components: ctypes
messages: 205345
nosy: fil
priority: normal
severity: normal
status: open
title: Add 128-bit integer support to ctypes
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue19881] Fix bigmem pickle tests

2013-12-05 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


Added file: http://bugs.python.org/file33001/fix_bigmem_pickle_3.patch

___
Python tracker 

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



[issue19881] Fix bigmem pickle tests

2013-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2612ea573ff7 by Alexandre Vassalotti in branch 'default':
Issue #19881: Fix bad pickling of large bytes in cpickle.
http://hg.python.org/cpython/rev/2612ea573ff7

--
nosy: +python-dev

___
Python tracker 

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



[issue19881] Fix bigmem pickle tests

2013-12-05 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-05 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Could you provide a single patch with the implementation and the tests 
together? I will try to find some time this week to review this.

--
assignee: docs@python -> alexandre.vassalotti
priority: normal -> high
stage:  -> patch review
versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue19858] Make pickletools.optimize aware of the MEMOIZE opcode.

2013-12-05 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Ah, I almost forgot! I did implement the verification in pickletools.dis() for 
MEMOIZE:

http://hg.python.org/cpython/file/2612ea573ff7/Lib/pickletools.py#l2420

--

___
Python tracker 

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



[issue19900] improve pickle intro

2013-12-05 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Looks good to me!

--

___
Python tracker 

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



[issue19900] improve pickle intro

2013-12-05 Thread Nick Coghlan

Nick Coghlan added the comment:

Looks good to me, although I'm not sure the specific note about the C
accelerator is needed.

--

___
Python tracker 

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



[issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules

2013-12-05 Thread Guido van Rossum

Guido van Rossum added the comment:

That's fixed by revision ec1e7fc9b5a4.

Christian, can this bug be closed now, or is there more?

--

___
Python tracker 

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



[issue18015] python 2.7.5 fails to unpickle namedtuple pickled by 2.7.3 or 2.7.4

2013-12-05 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue10701] Error pickling objects with mutating __getstate__

2013-12-05 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


--
title: Error pickling a dict -> Error pickling objects with mutating 
__getstate__

___
Python tracker 

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



[issue18400] Minor increase to Pickle test coverage

2013-12-05 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


--
nosy: +alexandre.vassalotti
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue19703] Upate pydoc to PEP 451

2013-12-05 Thread Eric Snow

New submission from Eric Snow:

Here are the functions that should (?) be updated:

synopsis()
importfile()
safeimport()?
HTMLDoc.docmodule()
HTMLDoc.index()
TextDoc.docmodule()
ModuleScanner.run()?

--

___
Python tracker 

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



[issue19701] Update multiprocessing for PEP 451

2013-12-05 Thread Eric Snow

Eric Snow added the comment:

In Lib/multiprocessing/spawn.py the following need changing:

get_preparation_data()
import_main_path()

--
dependencies: +refactor pythonrun.c to make use of specs (__main__.__spec__)

___
Python tracker 

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



[issue19703] Update pydoc to PEP 451

2013-12-05 Thread Eric Snow

Changes by Eric Snow :


--
title: Upate pydoc to PEP 451 -> Update pydoc to PEP 451

___
Python tracker 

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



[issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__)

2013-12-05 Thread Eric Snow

Changes by Eric Snow :


--
dependencies: +Update runpy for PEP 451

___
Python tracker 

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



[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-05 Thread Charles-François Natali

Charles-François Natali added the comment:

Thanks!

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2013-12-05 Thread Eric Snow

Eric Snow added the comment:

Is the problem here that builtins (and extension modules) don't necessarily 
obey the rules to the letter?  load_module() is supposed to use whatever is in 
sys.modules. [1]  (BuiltinImporter.load_module() is essentially a synonym for 
_imp.init_builtin(), right?)

So in each PyInit_*() the code should be using the module out of sys.modules... 
 That sounds like a bug and I expect that the builtin modules and most 
extension modules don't comply.

That said, I realize the spirit of the load_module() rule is to support 
reloading, which is mostly not applicable to builtins and extension modules.  
The code you reverted would rely on enforcing the rule outside the implicit 
applicability.

I'll be glad when we've resolved the extension module API changes that support 
exec_module()!

[1] 
http://docs.python.org/dev/library/importlib.html#importlib.abc.Loader.load_module

--

___
Python tracker 

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



[issue19700] Update runpy for PEP 451

2013-12-05 Thread Eric Snow

Eric Snow added the comment:

_run_module_as_main() is particularly related to #19697.

--

___
Python tracker 

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



  1   2   >