[issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit

2013-10-31 Thread Vajrasky Kok

Vajrasky Kok added the comment:

So msg.as_string() =
   cte - base64
   message - 0JDQkdCS # base64 encoded string

What about msg.as_bytes()? Should it be:
   cte - 8bit
   message - \\u0410\\u0411\\u0412 (raw-unicode-escape) or 
\xd0\x90\xd0\x91\xd0\x92 (utf-8)?

or message - 0JDQkdCS (base64) as well?

--

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



[issue19413] Reload semantics changed unexpectedly in Python 3.3

2013-10-31 Thread Eric Snow

Eric Snow added the comment:

I'm fine with not fixing this for 3.3.  Does this need to wait on PEP 451 
acceptance?

--
versions:  -Python 3.3

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



[issue19450] Bug in sqlite in Windows binaries

2013-10-31 Thread Martin v . Löwis

Martin v. Löwis added the comment:

It's certainly possible to update SQLite without rebuilding Python. Just 
replace sqlite3.dll with a newer version.

--

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



[issue19172] selectors: add keys() method

2013-10-31 Thread Berker Peksag

Berker Peksag added the comment:

+   .. method:: get_map()
+
+  Return a mapping of file objects to selector keys.

I kind of feel like a walking linter though I think this needs a versionadded 
tag :)

--
keywords:  -needs review
nosy: +berker.peksag

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



[issue19418] audioop.c giving signed/unsigned warnings on Windows

2013-10-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0848c90a5dd1 by Tim Golden in branch 'default':
Issue #19418 Fix some warnings on Win64
http://hg.python.org/cpython/rev/0848c90a5dd1

--
nosy: +python-dev

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



[issue19459] Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS

2013-10-31 Thread Caolán McNamara

New submission from Caolán McNamara:

LANG=ka_GE.georgianps /usr/bin/python3
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: unknown encoding: GEORGIAN-PS
Aborted (core dumped)

but with python-2.7.5 no crash...
LANG=ka_GE.georgianps /usr/bin/python2
Python 2.7.5 (default, Oct  8 2013, 12:19:40) 
[GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2
Type help, copyright, credits or license for more information.


(fedora 19)

--
components: Unicode
messages: 201800
nosy: Caolán.McNamara, ezio.melotti
priority: normal
severity: normal
status: open
title: Fatal Python error: Py_Initialize: Unable to get the locale encoding: 
GEORGIAN-PS
type: crash
versions: Python 3.3

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



[issue19172] selectors: add keys() method

2013-10-31 Thread Charles-François Natali

Charles-François Natali added the comment:

 Berker Peksag added the comment:

 +   .. method:: get_map()
 +
 +  Return a mapping of file objects to selector keys.

 I kind of feel like a walking linter though I think this needs a versionadded 
 tag :)

Well, selectors have been added to 3.4 - which hasn't been released
yet - so no versionadded is needed (there's one at the module-level).

--

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



[issue19459] Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

This bug was initially reported in LibreOffice:
https://bugs.freedesktop.org/show_bug.cgi?id=68850

--
nosy: +haypo

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



[issue19459] Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

I found three georgian encodings:

https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/charmaps/GEORGIAN-PS;h=64615ff4344d74ea0c70cfd7a6c6c8019afb884e;hb=HEAD

https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/charmaps/GEORGIAN-ACADEMY;h=9dc1bc9e782e9fe6092a00daf1a75274fd6dd738;hb=HEAD

http://tools.ietf.org/html/draft-giasher-geostd8-00

The first one (GEORGIAN-PS) is probably the most accurate because it is the 
one included in the GNU libc.

Could you please try to copy attached georgian_ps.py file into 
/usr/lib64/python3.3/encodings/ (or /usr/lib/python3.3/encodings/ for 32-bit 
Linux)?

Then try to print georgian letters using:

   print(bytes(range(0xc0, 0xe6)).decode(GEORGIAN-PS))

Please give me also your locale encoding:

   import locale; print(locale.getpreferredencoding())

@Caolán: Do you know the GEORGIAN-ACADEMY encoding? It doesn't look to be used 
by any glibc locale.

On my Fedora 18, I have 3 georgian locales:

* ka_GE.georgianps: locale encoding GEORGIAN-PS
* ka_GE: locale encoding GEORGIAN-PS
* ka_GE.utf8: locale encoding UTF-8

You can workaround this issue by switching your locale from ka_GE.georgianps to 
ka_GE.utf8.

--
Added file: http://bugs.python.org/file32431/georgian_ps.py

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



[issue19459] Python does not support the GEORGIAN-PS charset

2013-10-31 Thread STINNER Victor

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


--
title: Fatal Python error: Py_Initialize: Unable to get the locale encoding: 
GEORGIAN-PS - Python does not support the GEORGIAN-PS charset
versions: +Python 3.4

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



[issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail wi

2013-10-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This issue is not release blocker because it affects only testing.

Here is a patch which should fix tests.

--
components: +Tests
keywords: +patch
priority: release blocker - normal
stage:  - patch review
type:  - behavior
Added file: http://bugs.python.org/file32432/issue19457.patch

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



[issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail wi

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

+if u'\ud83d\udc9d' != u'\U0001f49d':

If would prefer a test on sys.maxunicode, something like:

   if sys.maxunicode == 0x:

Oh, I didn't remember that Python supports surrogate pairs, but not always. 
Support of non-BMP characters in Python 2 is ugly :-)

--

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



[issue19459] Python does not support the GEORGIAN-PS charset

2013-10-31 Thread Serhiy Storchaka

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


--
nosy: +lemburg, loewis, serhiy.storchaka

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



[issue19413] Reload semantics changed unexpectedly in Python 3.3

2013-10-31 Thread Nick Coghlan

Nick Coghlan added the comment:

Failing test case showing that Python 3.3 can't reload a module that is 
converted to a package behind importlib's back (I like this better than the 
purely introspection based tests, since it shows a real, albeit obscure, 
regression due to this behavioural change):

$ ./broken_reload.py 
E
==
ERROR: test_module_to_package (__main__.TestBadReload)
--
Traceback (most recent call last):
  File ./broken_reload.py, line 28, in test_module_to_package
imp.reload(mod)
  File /usr/lib64/python3.3/imp.py, line 271, in reload
return module.__loader__.load_module(name)
  File frozen importlib._bootstrap, line 586, in _check_name_wrapper
  File frozen importlib._bootstrap, line 1024, in load_module
  File frozen importlib._bootstrap, line 1005, in load_module
  File frozen importlib._bootstrap, line 562, in module_for_loader_wrapper
  File frozen importlib._bootstrap, line 855, in _load_module
  File frozen importlib._bootstrap, line 950, in get_code
  File frozen importlib._bootstrap, line 1043, in path_stats
FileNotFoundError: [Errno 2] No such file or directory: 
'/tmp/tmp_n48mm/to_be_reloaded.py'

--
Ran 1 test in 0.002s

FAILED (errors=1)

Interactive session showing that import.c didn't have this problem, since it 
reran the whole search (foo is just a toy module I had lying around in my play 
directory):

$ python
Python 2.7.5 (default, Oct  8 2013, 12:19:40) 
[GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2
Type help, copyright, credits or license for more information.
 import foo
Hello
 foo.__file__
'foo.py'
 import os
 os.mkdir(foo)
 os.rename('foo.py', 'foo/__init__.py')
 reload(foo)
Hello
module 'foo' from 'foo/__init__.py'
 foo.__file__
'foo/__init__.py'


--
Added file: http://bugs.python.org/file32433/broken_reload.py

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



[issue4331] Add functools.partialmethod

2013-10-31 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
stage: needs patch - commit review

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



[issue4331] Add functools.partialmethod

2013-10-31 Thread Matt Joiner

Changes by Matt Joiner anacro...@gmail.com:


--
nosy:  -anacrolix

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



[issue19406] PEP 453: add the ensurepip module

2013-10-31 Thread Nick Coghlan

Nick Coghlan added the comment:

Added most of the nosy list from the tracking issue 19347.

Updated draft docs. I believe this version of the module docs should be 
complete (since the installation guide updates are covered by issue 19407).

While Donald's attached patch is incomplete, the version on GitHub looks 
basically ready to go (aside from --root not working when running pip from a 
wheel file): https://github.com/dstufft/cpython/compare/ensurepip

Shall we proceed with the commit based on the currently available pip, so 
Martin and Ned can get started on the installer updates?

--
nosy: +loewis, ned.deily, tshepang
Added file: http://bugs.python.org/file32434/pep453_ensurepip_docs_v2.diff

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



[issue19406] PEP 453: add the ensurepip module

2013-10-31 Thread Donald Stufft

Donald Stufft added the comment:

For what it's worth I can get --root ready to go shortly, I have a patch 
against pip for it (https://github.com/pypa/pip/pull/1272) I just need to write 
some tests to ensure it keeps working. Let me go off and do that right now.

--

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



[issue19406] PEP 453: add the ensurepip module

2013-10-31 Thread Donald Stufft

Donald Stufft added the comment:

I also need to update the bundled Wheel to one that was created with Python 3.4 
instead of 2.7 (which matters until the fix for 
https://github.com/pypa/pip/issues/1067 which is 
https://github.com/pypa/pip/pull/1251 lands). That fixes the issue where the 
wheel will have pip2, and pip2.7 baked into it.

--

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



[issue19437] More failures found by pyfailmalloc

2013-10-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d191d22a9d23 by Victor Stinner in branch 'default':
Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an
http://hg.python.org/cpython/rev/d191d22a9d23

--

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



[issue19452] ElementTree iterparse documentation

2013-10-31 Thread Eli Bendersky

Eli Bendersky added the comment:

Thanks for the report, Peter. This is indeed a documentation fix for Python 
3.3; note that in 3.4 (default branch), the restriction was lifted and 
iterparse now accepts any iterable sequence. The documentation also reflects 
that (saying that 'events' is a sequence).

I'll update the 3.3 docs to address this issue.

--

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



[issue19452] ElementTree iterparse documentation

2013-10-31 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
stage:  - needs patch

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



[issue19452] ElementTree iterparse documentation

2013-10-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e6941225e014 by Eli Bendersky in branch '3.3':
Issue #19452: Clarify the documentation of iterparse w.r.t. events argument.
http://hg.python.org/cpython/rev/e6941225e014

New changeset 2a996cecf762 by Eli Bendersky in branch 'default':
Null merge for issue #19452
http://hg.python.org/cpython/rev/2a996cecf762

--
nosy: +python-dev

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



[issue19452] ElementTree iterparse documentation

2013-10-31 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


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

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



[issue16425] minidom replaceChild(new_child, old_child) removes new_child even if in another document

2013-10-31 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
nosy:  -eli.bendersky

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2013-10-31 Thread Eli Bendersky

Eli Bendersky added the comment:

Thanks for the report, Martin. I'll take a look once I get some time

--

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



[issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail wi

2013-10-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 +if u'\ud83d\udc9d' != u'\U0001f49d':

 If would prefer a test on sys.maxunicode, something like:

if sys.maxunicode == 0x:

No. 1. The check is true only on wide build. 2. It depends on how test module 
was loaded, true if it loaded from .py-file and false if it loaded from 
.py[co]-file.

--

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



[issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail wi

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

 2. It depends on how test module was loaded, true if it loaded from .py-file 
 and false if it loaded from .py[co]-file.

I tested with Python compiled in narrow or wide build: len(u'\ud83d\udc9d') 
value changes depending if the file is compiled to PYC in narrow or wide build. 
Oh, I have a headache. I didn't remember that Python 2 was so much broken with 
non-BMP characters :-p

--

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



[issue19406] PEP 453: add the ensurepip module

2013-10-31 Thread Donald Stufft

Donald Stufft added the comment:

Ok, merged in the --root fix to pip and created a Wheel using Python 3.4 (which 
I installed the Wheel distribution using an ensurepip installed pip ;) ).

Updated on github and a patch added, all outstanding issues that affect this 
patch exist on the pip side of things. Primarily 
https://github.com/pypa/pip/issues/1067 which, since I created the new pip 
wheel using 3.4, only affects this patch in that setuptools is still version 
specific. This'll be fixed soon in pip.

--
Added file: http://bugs.python.org/file32435/ensurepip.diff

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



[issue4331] Add functools.partialmethod

2013-10-31 Thread Nick Coghlan

Nick Coghlan added the comment:

Updated patch based on Alon's last patch.

The major functional change is to ensure __self__ is set appropriately on any 
bound methods returned by the descriptor.

I also updated the docs and docstring, and added a What's New entry (as well as 
rewording the existing entry for functools.singledispatch)

There were a few other cosmetic changes, with the most noticeable being moving 
the partialmethod implementation and tests adjacent to the existing ones for 
functools.partial.

Assuming nobody pokes any significant holes in this idea and implementation in 
the meantime, I'll commit this before beta 1.

--
Added file: http://bugs.python.org/file32436/issue4331_partialmethod.diff

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



[issue19413] Reload semantics changed unexpectedly in Python 3.3

2013-10-31 Thread Brett Cannon

Brett Cannon added the comment:

No, the fix can go into Python 3.4 right now.

--

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



[issue19282] dbm.open should be a context manager

2013-10-31 Thread Nick Coghlan

Nick Coghlan added the comment:

Patch looks reasonable to me - if nobody beats me to it, I'll commit this 
before beta 1 :)

--

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



[issue19385] dbm.dumb should be consistent when the database is closed

2013-10-31 Thread Nick Coghlan

Nick Coghlan added the comment:

Patch looks good to me, I'll apply it when I apply issue 19282.

--
assignee:  - ncoghlan
nosy: +ncoghlan

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



[issue19450] Bug in sqlite in Windows binaries

2013-10-31 Thread Marc Schlaich

Marc Schlaich added the comment:

Ah that's great. The issue is resolved with SQLite 3.8.1.

However, would be great if a newer SQLite version comes already bundled with 
Python.

--

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



[issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit

2013-10-31 Thread Eric Hanchrow

Changes by Eric Hanchrow eric.hanch...@gmail.com:


--
nosy:  -Eric.Hanchrow

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



[issue17016] _sre: avoid relying on pointer overflow

2013-10-31 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue17405] Add _Py_memset_s() to securely clear memory

2013-10-31 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail wi

2013-10-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d5df9602a72 by Serhiy Storchaka in branch '2.7':
Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are
http://hg.python.org/cpython/rev/8d5df9602a72

--
nosy: +python-dev

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



[issue10685] trace does not ignore --ignore-module

2013-10-31 Thread Tom Hines

Tom Hines added the comment:

The trace module ignores the --ignore-dir option for both the --listfuncs and 
--trackcalls modes.  I have attached a patch.

--
keywords: +patch
nosy: +tomhines
Added file: http://bugs.python.org/file32437/trace.diff

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



[issue19385] dbm.dumb should be consistent when the database is closed

2013-10-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Additional checks can slowdown the code. It doesn't matter in some operations, 
but not on __len__, __contains__, etc. EAFP approach is to catch AttributeError 
and raise appropriate dbm.dumb.error exception.

--
nosy: +serhiy.storchaka

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



[issue17405] Add _Py_memset_s() to securely clear memory

2013-10-31 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think I still don't understand the use case within Python. Why would you want 
to clear the internal state of a hash object?
If you can read the computer's memory, you probably have access to sensitive 
data already?

--

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



[issue19385] dbm.dumb should be consistent when the database is closed

2013-10-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yet one nitpick. I think that closing check should be after argument type check 
and key encoding.

--

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



[issue19457] test.test_codeccallbacks.CodecCallbackTest.test_xmlcharrefreplace_with_surrogates() and test.test_unicode.UnicodeTest.test_encode_decimal_with_surrogates() loaded from *.pyc files fail wi

2013-10-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Arfrever for your report. And please describe a problem in the body 
of the issue, not in its title.

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

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



[issue19460] Add test for MIMENonMultipart

2013-10-31 Thread Vajrasky Kok

New submission from Vajrasky Kok:

Apparently there is no test for MIMENonMultipart.

[sky@localhost cpython]$ grep -R MIMENonMultipart Lib/test/*
[sky@localhost cpython]$

Attached the patch to add test for MIMENonMultipart.

--
components: Tests
files: add_test_non_multipart.patch
keywords: patch
messages: 201827
nosy: r.david.murray, vajrasky
priority: normal
severity: normal
status: open
title: Add test for MIMENonMultipart
versions: Python 3.4
Added file: http://bugs.python.org/file32438/add_test_non_multipart.patch

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



[issue6157] Tkinter.Text: changes for bbox, debug, and edit methods.

2013-10-31 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue6159] Tkinter.PanedWindow: docstring fixes, change in paneconfigure and removed some returns

2013-10-31 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue6160] Tkinter.Spinbox: fix for bbox and removed some uninteresting returns

2013-10-31 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue4350] Remove dead code from Tkinter.py

2013-10-31 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue6181] Tkinter.Listbox several minor issues

2013-10-31 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure

2013-10-31 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args

2013-10-31 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue18684] Pointers point out of array bound in _sre.c

2013-10-31 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue19437] More failures found by pyfailmalloc

2013-10-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9b37fbda9043 by Victor Stinner in branch 'default':
Issue #19437: Fix get_filter() from _warnings, don't call PyObject_IsSubclass()
http://hg.python.org/cpython/rev/9b37fbda9043

New changeset e035b4656088 by Victor Stinner in branch 'default':
Issue #19437: Fix show_warning() of _warnings, stop at the first error to not
http://hg.python.org/cpython/rev/e035b4656088

New changeset 1181fcc02fe7 by Victor Stinner in branch 'default':
Issue #19437: Fix fill_and_set_sslerror() of _ssl, handle Py_BuildValue()
http://hg.python.org/cpython/rev/1181fcc02fe7

New changeset ae4bdd4b7240 by Victor Stinner in branch 'default':
Issue #19437: Fix PyCArrayType constructor, raise MemoryError on PyMem_Malloc()
http://hg.python.org/cpython/rev/ae4bdd4b7240

New changeset a0e2c2cb60f6 by Victor Stinner in branch 'default':
Issue #19437: Fix PyCFuncPtrType constructor, handle
http://hg.python.org/cpython/rev/a0e2c2cb60f6

New changeset 8f58e57e0d59 by Victor Stinner in branch 'default':
Issue #19437: Fix newPySSLSocket(), handle PyWeakref_NewRef() failure
http://hg.python.org/cpython/rev/8f58e57e0d59

New changeset 985f8762ee3e by Victor Stinner in branch 'default':
Issue #19437: Fix r_PyLong() of marshal module, stop immediatly at first
http://hg.python.org/cpython/rev/985f8762ee3e

New changeset 9e836a945ea9 by Victor Stinner in branch 'default':
Issue #19437: Fix r_object() of marshal module, handle r_byte() failure for
http://hg.python.org/cpython/rev/9e836a945ea9

New changeset fc54e2848c98 by Victor Stinner in branch 'default':
Issue #19437: Fix r_object() of marshal module, handle PyDict_SetItem() failure
http://hg.python.org/cpython/rev/fc54e2848c98

New changeset 995173ed248a by Victor Stinner in branch 'default':
Issue #19437: Cleanup r_ref() of the marshal module
http://hg.python.org/cpython/rev/995173ed248a

--

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



[issue19461] RawConfigParser modifies empty strings unconditionally

2013-10-31 Thread Nacsa Kristóf

New submission from Nacsa Kristóf:

http://hg.python.org/cpython/file/8d5df9602a72/Lib/ConfigParser.py#l529

RawConfigParser has a special case of replacing '' with '' in reader.
However the writer does not do the same.

This may cause problems, for example if you merge multiple ini files into one 
and the 3rd party program that should use the output segfaults on an ini that 
has `key=` instead of `key=value`, as it is in my case. :)

I think that the reasoning with the reader maybe was that an empty string must 
be an empty python string. 
However there is no option to control how it gets written back to the output. 
One can of course walkaround it by replacing the '' values with '', but I 
think the standard library is ought to be consistent, walkarounds are 
unpythonic, a raw parser should be transparent either way, and there should 
preferrably be one obvious way to do it.

I think this is not just unintuitive (especially in a parser called raw), but 
goes against the philosophy of refusing the temptation to guess. 

As I know, the syntax of .ini files is not exactly well-defined, so the best 
option in my opinion would be allowing to configure the parser how to treat 
these values.

Whether or not adding this option is viable, I think the problem still remains 
that the writer now works inconsistently of the reader.

--
components: Library (Lib)
messages: 201829
nosy: Nacsa.Kristóf
priority: normal
severity: normal
status: open
title: RawConfigParser modifies empty strings unconditionally
type: behavior
versions: Python 2.7

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



[issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit

2013-10-31 Thread R. David Murray

R. David Murray added the comment:

as_bytes should be producing the raw utf8 bytes with cte 8bit.

--

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



[issue19461] RawConfigParser modifies empty strings unconditionally

2013-10-31 Thread Nacsa Kristóf

Nacsa Kristóf added the comment:

typo: 
`key=` instead of `key=value` 
was meant as
`key=` instead of `key=`

--

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



[issue19460] Add test for MIMENonMultipart

2013-10-31 Thread R. David Murray

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


--
components: +email
nosy: +barry

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



[issue19462] Add remove_argument() method to argparse.ArgumentParser

2013-10-31 Thread Artem Ustinov

New submission from Artem Ustinov:

In order to migrate from optparse to argparse we need to have an ability to 
substitute anguments, e.g. remove and then create.

In our framework we use the command line utility base class and then inherit 
the particular tools from it. The parser in base class uses add_argument() to 
populate the general argument list but for some tools it is needed to modify 
the inherited arguments set and make some arguments to have the modified 
meaning.

With optparse we've just used remove_option() and then added the modified one 
with add_option() but argparse currently does not have this functionality.

For the purpose above we just need to have remove_argument() or 
modify_argument() methods in orgparse

--
components: Library (Lib)
messages: 201832
nosy: ustinov
priority: normal
severity: normal
status: open
title: Add remove_argument() method to argparse.ArgumentParser
type: enhancement
versions: Python 3.2

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



[issue19418] audioop.c giving signed/unsigned warnings on Windows

2013-10-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 54bf7b5ec3b6 by Tim Golden in branch '3.3':
Issue #19418 Fix some warnings on Win64
http://hg.python.org/cpython/rev/54bf7b5ec3b6

--

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



[issue19461] RawConfigParser modifies empty strings unconditionally

2013-10-31 Thread R. David Murray

R. David Murray added the comment:

A configurable option is probably the only way forward, due to backward 
compatibility reasons, but Łukasz will know for sure.  If so, it can only go in 
the *next* version of Python, and while we haven't hit beta yet on 3.4 it may 
be too late for anyone to have time to get it in before then.

Also, I was under the impression that 'key=' was the canonical way to indicate 
an empty value in an ini file.  As you say, the format is not well defined (no 
surprise).

--
keywords: +easy
nosy: +lukasz.langa, r.david.murray
stage:  - needs patch
type: behavior - enhancement
versions: +Python 3.5 -Python 2.7

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



[issue19418] audioop.c giving signed/unsigned warnings on Windows

2013-10-31 Thread Tim Golden

Tim Golden added the comment:

Fixed in 3.3 / 3.4

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed
versions:  -Python 2.7

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



[issue19462] Add remove_argument() method to argparse.ArgumentParser

2013-10-31 Thread R. David Murray

R. David Murray added the comment:

Does conflict_handler='resolve' address your use case?  It sounds like it 
should.

--
nosy: +r.david.murray

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



[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2013-10-31 Thread Derek Wilson

Derek Wilson added the comment:

this would still be nice to have fixed ... any progress?

--
nosy: +underrun
versions: +Python 3.4, Python 3.5

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



[issue19462] Add remove_argument() method to argparse.ArgumentParser

2013-10-31 Thread Artem Ustinov

Artem Ustinov added the comment:

We need argparse to raise an error for conflicting options and that's why
we need to implicitly substitute an option when we need it
On 31 Oct 2013 19:54, R. David Murray rep...@bugs.python.org wrote:


 R. David Murray added the comment:

 Does conflict_handler='resolve' address your use case?  It sounds like it
 should.

 --
 nosy: +r.david.murray

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


--

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



[issue19462] Add remove_argument() method to argparse.ArgumentParser

2013-10-31 Thread Artem Ustinov

Artem Ustinov added the comment:

Explicitly substitute, excuse me
On 31 Oct 2013 20:11, Artem Ustinov rep...@bugs.python.org wrote:


 Artem Ustinov added the comment:

 We need argparse to raise an error for conflicting options and that's why
 we need to implicitly substitute an option when we need it
 On 31 Oct 2013 19:54, R. David Murray rep...@bugs.python.org wrote:

 
  R. David Murray added the comment:
 
  Does conflict_handler='resolve' address your use case?  It sounds like it
  should.
 
  --
  nosy: +r.david.murray
 
  ___
  Python tracker rep...@bugs.python.org
  http://bugs.python.org/issue19462
  ___
 

 --

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


--

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



[issue19349] Not so correct exception message when running venv

2013-10-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 731bdec35fdd by Vinay Sajip in branch '3.3':
Issue #19349: Corrected error message.
http://hg.python.org/cpython/rev/731bdec35fdd

New changeset e97d9926da83 by Vinay Sajip in branch 'default':
Closes #19349: Merged fix from 3.3.
http://hg.python.org/cpython/rev/e97d9926da83

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue19463] assertGdbRepr depends on hash randomization / endianess

2013-10-31 Thread Christian Heimes

New submission from Christian Heimes:

I'm seeing some unrelated test failures on PPC Linux (big endian) in my PEP-456 
branch.

http://buildbot.python.org/all/builders/PPC64%20PowerLinux%20custom/builds/17/steps/test/logs/stdio

==
FAIL: test_frozensets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of frozensets
--
Traceback (most recent call last):
  File 
/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/test_gdb.py,
 line 331, in test_frozensets
self.assertGdbRepr(frozenset(['a', 'b']), frozenset({'a', 'b'}))
  File 
/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/test_gdb.py,
 line 231, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: frozenset({'b', 'a'}) != frozenset({'a', 'b'})
- frozenset({'b', 'a'})
? ^^
+ frozenset({'a', 'b'})
? ^^


==
FAIL: test_sets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of sets
--
Traceback (most recent call last):
  File 
/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/test_gdb.py,
 line 316, in test_sets
self.assertGdbRepr(set(['a', 'b']), {'a', 'b'})
  File 
/home/shager/cpython-buildarea/custom.edelsohn-powerlinux-ppc64/build/Lib/test/test_gdb.py,
 line 231, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: {'b', 'a'} != {'a', 'b'}
- {'b', 'a'}
+ {'a', 'b'}

--
components: Tests
messages: 201841
nosy: christian.heimes
priority: low
severity: normal
stage: needs patch
status: open
title: assertGdbRepr depends on hash randomization / endianess
type: behavior
versions: Python 3.4

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



[issue6157] Tkinter.Text: changes for bbox, debug, and edit methods.

2013-10-31 Thread Serhiy Storchaka

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


--
dependencies: +Add tkinter basic options tests
versions:  -Python 2.7, Python 3.3

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



[issue6839] zipfile can't extract file

2013-10-31 Thread Adam Polkosnik

Adam Polkosnik added the comment:

Just tested my patch on mac, and it appears that it didn't work on OSX (and 
likely on other unix platforms too).

Conclusion... os.path.basename() will not do anything to windows paths when 
running on unix.

I'm thinking that instead of bailing at 'File name in directory %s and header 
%s differ.', the library should just print a warning, and continue.

--

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



[issue6157] Tkinter.Text: changes for bbox, debug, and edit methods.

2013-10-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Issue19085 adds test file in which test for this issue should be placed.

--

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



[issue19462] Add remove_argument() method to argparse.ArgumentParser

2013-10-31 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue19453] pydoc.py doesn't detect IronPython, help(foo) can hang

2013-10-31 Thread Jeff Hardy

Changes by Jeff Hardy jdha...@gmail.com:


--
nosy: +jeff.hardy

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



[issue19464] Remove warnings from Windows buildbot clean script

2013-10-31 Thread Zachary Ware

New submission from Zachary Ware:

Here's a patch to remove the compiler warning raised during the clean step on 
the Windows buildbots.  The warning is about the fact that ssl.vcxproj doesn't 
have an NMakeCleanCommandLine command; the patch adds such a command that 
simply echos OpenSSL must be cleaned manually if you want to rebuild it.

Since Tools/buildbot/clean.bat is also called by Tools/buildbot/build.bat, this 
also removes 4 warnings from the compile step as well.

--
components: Build, Windows
files: mask_ssl_clean_warnings.diff
keywords: patch
messages: 201844
nosy: brian.curtin, pitrou, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Remove warnings from Windows buildbot clean script
type: enhancement
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32439/mask_ssl_clean_warnings.diff

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



[issue19141] Windows Launcher fails to respect PATH

2013-10-31 Thread Vinay Sajip

Vinay Sajip added the comment:

Closing, as no activity following Mark's comment.

--
resolution:  - wont fix
status: open - closed

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



[issue17933] format str bug in urllib request.py

2013-10-31 Thread R. David Murray

R. David Murray added the comment:

This was changed to %r by Benjamin Peterson in 27e470952085.

--
resolution:  - out of date
stage: needs patch - committed/rejected
status: open - closed

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



[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-31 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


Added file: http://bugs.python.org/file32440/fb2f9c0bbca9.diff

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



[issue19443] add to dict fails after 1,000,000 items on py 2.7.5

2013-10-31 Thread Milton Mobley

Milton Mobley added the comment:

I now believe the problem of slow execution is caused by performance of the 
Windows 7 page file, and not by a Python bug. Others reported that similar 
tests worked on Windows 8.1 and various Linux systems. So I request to close or 
withdraw the Python bug.

--

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



[issue17883] Fix buildbot testing of Tkinter

2013-10-31 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


Removed file: http://bugs.python.org/file30080/2.7_rt.bat_tcltk_fix.diff

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



[issue17883] Fix buildbot testing of Tkinter

2013-10-31 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


Removed file: http://bugs.python.org/file30156/issue17883.diff

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



[issue17883] Fix buildbot testing of Tkinter

2013-10-31 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


Removed file: http://bugs.python.org/file30196/issue17883-tmp-test.diff

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



[issue19443] add to dict fails after 1,000,000 items on py 2.7.5

2013-10-31 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
resolution:  - invalid
status: open - closed

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



[issue19464] Remove warnings from Windows buildbot clean script

2013-10-31 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee:  - tim.golden

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



[issue17883] Fix buildbot testing of Tkinter

2013-10-31 Thread Zachary Ware

Zachary Ware added the comment:

Buildbots are still hanging on test_ttk_guionly and failing test_tcl and both 
patches still apply cleanly.

Is there anything I can do to help move this forward again?

--

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



[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-31 Thread Christian Heimes

Christian Heimes added the comment:

I had to add the conversion from LE to host endianess. The missing conversion 
was affecting and degrading hash value dispersion.

--

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



[issue19085] Add tkinter basic options tests

2013-10-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch addresses Ezio's comments.

--
Added file: http://bugs.python.org/file32441/tkinter_options_tests_3.patch

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



[issue18985] Improve the documentation in fcntl module

2013-10-31 Thread R. David Murray

R. David Murray added the comment:

Here's my suggestion.

--
Added file: http://bugs.python.org/file32442/fcntl-doc.patch

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



[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

 this would still be nice to have fixed ... any progress?

Python 3.4 behaves a little bit better: all files and sockets are 
non-inheritable by default. It does not fix the issue if you fork without exec.

To fix this issue, we need a patch. Nobody proposed something to fix the issue.

--

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



[issue17405] Add _Py_memset_s() to securely clear memory

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

Some comments:

- I don't have small files which just contain one function. Do you expect that 
we may add other security-related functions? You may add a pysecurity.c file. 
(It's maybe a stupid idea.)

- Why only a few hash functions (sha1, sha3)? We must use the same policy for 
all hash functions: always force memset() or never use memset().

- Why not touching the ssl module? PySSL_dealloc() and context_dealloc() for 
example.

- Would it be possible to use a custom memory allocator which would memset() 
the memory before releasing it for security related objects? If yes, would it 
be possible to switch it on or off at runtime? It may be interesting if 
memset() has a visible overhead on performances.

Antoine wrote:

I think I still don't understand the use case within Python. Why would you 
want to clear the internal state of a hash object? If you can read the 
computer's memory, you probably have access to sensitive data already?

Data are usually duplicated in many places. I'm also dubious that memset() adds 
any security. If it has no impact on performance, why not using memset() for 
hash functions and security modules like ssl.

But for example, ssl.RAND_bytes() stores its result in a common bytes object. 
The bytes type doesn't use a custom memory allocator, and so the secret random 
bytes will still be present in memory after the bytes object has been 
deleted. If you really care of security, you may need a security allocator 
which reset all memory blocks on free(), not only a few modules.

And what happens when you pass data to a C module which copies the data 
somewhere. Does it later reset correctly the memory when data becomes useless?

@Christian: Do you have examples of other projects clearing the memory when 
objects are destroyed?

--

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



[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

 Robert, want to submit a patch?

If someone wants to work on a patch, here is the code of Python 3.4 to 
duplicate a file descriptor and make it non-inheritable.
  http://hg.python.org/cpython/file/e97d9926da83/Python/fileutils.c#l978
and
  http://hg.python.org/cpython/file/e97d9926da83/Python/fileutils.c#l618

The code is complex because it has optimized versions for each operating 
system. Only supporting Windows and fcntl() is enough for Python 2.

--

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



[issue19465] selectors: provide a helper to choose a selector using constraints

2013-10-31 Thread STINNER Victor

New submission from STINNER Victor:

multiprocess, telnetlib (and subprocess in a near future, see #18923) use the 
following code to select the best selector:

# poll/select have the advantage of not requiring any extra file descriptor,
# contrarily to epoll/kqueue (also, they require a single syscall).
if hasattr(selectors, 'PollSelector'):
_TelnetSelector = selectors.PollSelector
else:
_TelnetSelector = selectors.SelectSelector

I don't like the principle of a default selector, selectors.DefaultSelector 
should be removed in my opinion.

I would prefer a function returning the best selector using constraints. 
Example:

def get_selector(use_fd=True) - BaseSelector:
  ...

By default, it would return the same than the current DefaultSelector. But if 
you set use_fd=False, the choice would be restricted to select() or poll().

I don't want to duplicate code like telnetlib uses in each module, it's harder 
to maintain. The selectors module may get new selectors in the future, see for 
example #18931.

Except use_fd, I don't have other ideas of constraints. I read somewhere that 
differenet selectors may have different limits on the number of file 
descriptors. I don't know if it's useful to use such constraint?

--
messages: 201855
nosy: gvanrossum, haypo, neologix
priority: normal
severity: normal
status: open
title: selectors: provide a helper to choose a selector using constraints
versions: Python 3.4

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



[issue19465] selectors: provide a helper to choose a selector using constraints

2013-10-31 Thread Guido van Rossum

Guido van Rossum added the comment:

What's the use case for not wanting to use an extra FD?

Nevertheless I'm fine with using a function to pick the default selector (but 
it requires some changes to asyncio too, which currently uses DefaultSelector).

Something I would find useful would be a way to override the selector choice on 
the command line.  I currently have to build this into the app's arg parser and 
main(), e.g. http://code.google.com/p/tulip/source/browse/examples/sink.py#64

--

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



[issue19465] selectors: provide a helper to choose a selector using constraints

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

 What's the use case for not wanting to use an extra FD?

A selector may be used a few millisecond just to check if a socket is ready, 
and then destroyed. For such use case, select() is maybe enough (1 syscall). 
Epoll requires more system calls: create the epoll FD, register the socket, 
poll, destroy the epoll FD (4 syscalls).

--

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



[issue19465] selectors: provide a helper to choose a selector using constraints

2013-10-31 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm... I'm trying to understand how you're using the selector in
telnetlib.py (currently the only example outside asyncio). It seems you're
always using it with a single file/object, which is always 'self' (which
wraps a socket), except one place where you're also selecting on stdin.
Sometimes you're using select(0) to check whether I/O is possible right
now, using select(0), and then throw away the selector; other times you've
got an actual loop.

I wonder if you could just create the selector when the Telnet class is
instantiated (or the first time you need the selector) and keep the socket
permanently registered; IIUC selectors are level-triggered, and no
resources are consumed when you're not calling its select() method. (I
think this means that if the socket was ready at some point in the past,
but you already read those bytes, and now you're calling select(), it won't
be considered ready even though it was registered the whole time.)

It still seems to me that this is pretty atypical use of selectors; the
extra FD used doesn't bother me much, since it doesn't really scale anyway
(that would require hooking multiple Telnet instances into the the same
selector, probably using an asyncio EventLoop).

If you insist on having a function that prefers poll and select over kqueue
or epoll, perhaps we can come up with a slightly higher abstraction for the
preference order? Maybe faster startup time vs. better scalability? (And I
wouldn't be surprised if on Windows you'd still be better off using
IocpProactor instead of SelectSelector -- but that of course has a
different API altogether.)

--

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



[issue19466] Clear state of threads earlier in Python shutdown

2013-10-31 Thread STINNER Victor

New submission from STINNER Victor:

Each Python thread holds references to objects, in its current frame for 
example. At Python shutdown, clearing threads state happens very late: the 
import machinery is already dead, types are finalized, etc. If a thread has an 
object with a destructor, bad things may happen.

For example, when open files are destroyed, a warning is emitted. The problem 
is that you cannot emits warnings because the warnings module has been 
unloaded, and so you miss warnings. See the issue #19442 for this specific case.

It is possible to clear the Python threads earlier since Python 3.2, because 
Python threads will now exit cleanly when they try to acquire the GIL: see 
PyEval_RestoreThread(). The value of the tstate pointer is used in 
PyEval_RestoreThread(), but the pointer is not dereferenced (the content of a 
Python state is not read). So it is even possible to free the memory of the 
threads state (not only to clear the threads state).

Attached patch implements destroy the all threads except the current thread, 
and clear the state of the current thread.

The patch calls also the garbage collector before flushing stdout and stderr, 
and disable signal handlers just before PyImport_Cleanup(). The main idea is to 
reorder functions like this:

- clear state of all threads to release strong references - may call 
destructores
- force a garbage collector to release more references - may call destructores
- flush stdout and stderr - write pending warnings and any other buffered 
messages
- disable signal handler - only at the end so previous steps can still be 
interrupted by CTRL+c

The side effect of the patch is that the destructor of destroyed objects are 
now called, especially for daemon threads. If you try the warn_shutdown.py 
script attached to #19442, you now get the warning with the patch! As a result, 
test_threading.test_4_daemon_threads() is also modified by my patch to ignore 
warnings :-)

If I understood correctly, the patch only has an impact on daemon threads, the 
behaviour of classic threads is unchanged.

--
files: finalize_threads.patch
keywords: patch
messages: 201860
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: Clear state of threads earlier in Python shutdown
versions: Python 3.4
Added file: http://bugs.python.org/file32443/finalize_threads.patch

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



[issue19442] Python crashes when a warning is emitted during shutdown

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

warn_shutdown.py does not emit warnings because the thread states are destroyed 
too late, when the modules have been destroyed.

I opened a new issue #19466 Clear state of threads earlier in Python shutdown 
which would permit to emit properly warnings, at least for the specific case of 
warn_shutdown.py.

 The changeset 1787277915e9 is closer to a workaround than a real fix: ...

If the module is None, it's too late: modules have been destroyed, so it's 
safer to not call warn_explicit() and do nothing.

I tested to fail with an assertion error if a warning is emitted too late (ie. 
when module is None). test_threading.test_4_daemon_threads() does fail in this 
case. Using the patch attached to #19466, the full test suite pass correctly.

--

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



[issue19442] Python crashes when a warning is emitted during shutdown

2013-10-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 13a05ed33cf7 by Victor Stinner in branch 'default':
Close #19442: warn_explicit() does nothing when called late during Python 
shutdown
http://hg.python.org/cpython/rev/13a05ed33cf7

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

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



[issue19465] selectors: provide a helper to choose a selector using constraints

2013-10-31 Thread STINNER Victor

STINNER Victor added the comment:

 It still seems to me that this is pretty atypical use of selectors

I already implemented something similar to subprocess.Popen.communicate() when 
I was working on old Python versions without the timeout parameter of 
communicate().
http://ufwi.org/projects/edw-svn/repository/revisions/master/entry/trunk/src/nucentral/nucentral/common/process.py#L222

IMO calling select with a few file descriptors (between 1 and 3) and destroying 
quickly the selector is no a rare use case.

If I would port my code to selectors, I don't want to rewrite it to keep the 
selector alive longer, just because selectors force me to use the 
super-powerful fast epoll/kqueue selector.

(To be honest, I will probably not notice any performance impact. But I like 
reducing the number of syscalls, not the opposite :-))

--

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



[issue19466] Clear state of threads earlier in Python shutdown

2013-10-31 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/issue19466
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19435] Directory traversal attack for CGIHTTPRequestHandler

2013-10-31 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/issue19435
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19462] Add remove_argument() method to argparse.ArgumentParser

2013-10-31 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/issue19462
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >