[issue19661] Python: RuntimeError: invalid slot offset when importing a module

2013-11-20 Thread dellair jie

New submission from dellair jie:

Dear all,

I am getting above error when trying to import ssl module. In fact, the error 
showed up during the build and _ssl module was added to the failed module list. 
However, the compilation and link went well. 

There was no error on compilation and link phases, only some warnings. However, 
during Python build, there is an import phase right after the link, which shows 
the same error as stated.
building '_ssl' extension 
xlc_r -DNDEBUG -O -IInclude -I. -I/usr/local/include -c /aix/Modules/_ssl.c -o 
build/temp.aix-6.1-3.3/aix/Modules/_ssl.o
 /aix/Modules/_ssl.c, line 262.17: 1506-196 (W) Initialization between types 
void* and struct _object*(*)(struct {...}*) is not allowed.
 /aix/Modules/ld_so_aix xlc_r -bI:/aix/Modules/python.exp 
build/temp.aix-6.1-3.3/aix/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o 
build/lib.aix-6.1-3.3/_ssl.so
 ld: 0711-224 WARNING: Duplicate symbol: .bcopy 
ld: 0711-224 WARNING: Duplicate symbol: .memcpy 
ld: 0711-224 WARNING: Duplicate symbol: .memmove 
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. 
*** WARNING: importing extension _ssl failed with 
build/lib.aix-6.1-3.3/_ssl.so: class 'RuntimeError': invalid slot offset: 
traceback object at 0x3017e9e0

I went through google to search for similar issue/solution however no succeeds. 
Hence I suppose it is a bug.

Env: Python: 3.3.2 
OpenSSL: 0.9.8y (also tried 0.9.7) 
OS: AIX 6.1 (also tried on HPUX_1131_IA, same problem)

--
components: Build
messages: 203465
nosy: dellair.jie
priority: normal
severity: normal
status: open
title: Python: RuntimeError: invalid slot offset when importing a module
type: compile error
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19661
___
___
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-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset adb471b9cba1 by Christian Heimes in branch 'default':
ssue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.
http://hg.python.org/cpython/rev/adb471b9cba1

--

___
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



[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread Leslie P. Polzer

New submission from Leslie P. Polzer:

http://hg.python.org/cpython/file/3.3/Lib/smtpd.py#l289

as of now decodes incoming bytes as UTF-8.

An SMTP server must not attempt to interpret characters beyond ASCII, however. 
Originally mail servers were not 8-bit clean, meaning they would only guarantee 
the lower 7 bits of each octet to be preserved.
However even then they were not expected to choke on any input because of 
attempts to decode it into a specific extended charset. Whenever a mail server 
does not need to interpret data (like base64-encoded auth information) it is 
simply left alone and passed through.

I am not aware of the reasons that caused the current state, but to correct 
this behavior and make it possible to support the 8BITMIME feature I suggest 
decoding received bytes as latin1, leaving it to the user to reinterpret it as 
UTF-8 or whatever charset they need. Any other simple extended encoding could 
be used for this, but latin1 is the default in asynchat.

The documentation should also mention charset handling. I'll be happy to submit 
a patch for both code and docs.

--
components: Library (Lib)
messages: 203467
nosy: skypher
priority: normal
severity: normal
status: open
title: smtpd.py should not decode utf-8
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue12816] smtpd uses library outside of the standard libraries

2013-11-20 Thread Leslie P. Polzer

Changes by Leslie P. Polzer pol...@port-zero.com:


--
nosy: +lpolzer

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



[issue16462] smtpd should return greeting

2013-11-20 Thread Leslie P. Polzer

Changes by Leslie P. Polzer pol...@port-zero.com:


--
nosy: +lpolzer

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



[issue8503] smtpd SMTPServer does not allow domain filtering

2013-11-20 Thread Leslie P. Polzer

Changes by Leslie P. Polzer pol...@port-zero.com:


--
nosy: +lpolzer

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



[issue3802] smtpd.py __getaddr insufficient handling

2013-11-20 Thread Leslie P. Polzer

Changes by Leslie P. Polzer pol...@port-zero.com:


--
nosy: +lpolzer

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3802
___
___
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-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 422ed27b62ce by Christian Heimes in branch 'default':
Issue #19183: test_gdb's test_dict was failing on some machines as the order or 
dict keys has changed again.
http://hg.python.org/cpython/rev/422ed27b62ce

--

___
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



[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-11-20 Thread Christian Heimes

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


--
assignee: ncoghlan - christian.heimes
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
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



[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 11cb1c8faf11 by Victor Stinner in branch 'default':
Issue #19183: Fix repr() tests of test_gdb, hash() is now platform dependent
http://hg.python.org/cpython/rev/11cb1c8faf11

--

___
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



[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I there are no objections I'll commit this patch soon.

--
assignee:  - serhiy.storchaka
Added file: 
http://bugs.python.org/file32718/json_decode_lone_surrogates_3-3.4.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11489
___
___
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-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 961d832d8734 by Christian Heimes in branch 'default':
Issue #19183: too many tests depend on the sort order of repr().
http://hg.python.org/cpython/rev/961d832d8734

--

___
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



[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

Not only test_gdb relies on repr() exact value, there is also test_functools:

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

==
FAIL: test_repr (test.test_functools.TestPartialC)
--
Traceback (most recent call last):
  File 
/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_functools.py,
 line 174, in test_repr
repr(f))
AssertionError: 'func[51 chars]88, b=object object at 0xdd7fff790440, 
[36 chars]00)' != 'func[51 chars]88, a=object object at 0xdd7fff790400, 
[36 chars]40)'
- functools.partial(function capture at 0xdd7ffe64d788, b=object object 
at 0xdd7fff790440, a=object object at 0xdd7fff790400)
+ functools.partial(function capture at 0xdd7ffe64d788, a=object object 
at 0xdd7fff790400, b=object object at 0xdd7fff790440)


==
FAIL: test_repr (test.test_functools.TestPartialCSubclass)
--
Traceback (most recent call last):
  File 
/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_functools.py,
 line 174, in test_repr
repr(f))
AssertionError: 'Part[49 chars]88, b=object object at 0xdd7fff790540, 
[36 chars]00)' != 'Part[49 chars]88, a=object object at 0xdd7fff790500, 
[36 chars]40)'
- PartialSubclass(function capture at 0xdd7ffe64d788, b=object object at 
0xdd7fff790540, a=object object at 0xdd7fff790500)
+ PartialSubclass(function capture at 0xdd7ffe64d788, a=object object at 
0xdd7fff790500, b=object object at 0xdd7fff790540)

--
resolution: fixed - 
status: closed - open

___
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



[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-11-20 Thread Serhiy Storchaka

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


--
stage:  - committed/rejected
status: pending - closed

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



[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread Leslie P. Polzer

Leslie P. Polzer added the comment:

Patch attached. This also adds some more charset clarification to the docs and 
corrects a minor spelling issue.

It is also conceivable that we add a charset attribute to the class. This 
should have the safe default of latin1, and some notes in the docs that setting 
this to utf-8 (and probably other utf-* encodings) is not really 
standards-compliant.

--
keywords: +patch
Added file: http://bugs.python.org/file32719/smtpd_charset_latin1.diff

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



[issue19518] Add new PyRun_xxx() functions to not encode the filename

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

 PyRun_FileObject() looks misleading, because it works with FILE*, not with a 
 file object.

I simply replaced the current suffix with Object(). Only filename is converted 
from char* to PyObject*. Do you have a better suggestion for the new name?

--

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

 What is a performance for small chunks?

I have no idea. Does it matter?

--

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



[issue19518] Add new PyRun_xxx() functions to not encode the filename

2013-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No I have not a better suggestion. But I afraid that one day you will wanted to 
extend PyRun_File*() function to work with a general Python file object 
(perhaps there is such issue already) and then you will encountered a problem.

--

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



[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +haypo

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



[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread R. David Murray

R. David Murray added the comment:

This bug was apparently introduced as part of the work from issue 4184 in 
python 3.2.  My guess, looking at the code, is that the module simply didn't 
work before that patch, since it would have been attempting to join binary data 
using a string join (''.join(...)).  Richard says in the issue that he wrote 
tests, so he probably figured out it wasn't working and fixed it.  It looks 
like there was no final review of his patch (at least not via the tracker...the 
patch uploaded to the tracker did not include the decode).  Not that a final 
review would necessarily have caught the bug...

The problem here is backward compatibility.

In terms of the API, it really ought to be producing binary data, and not 
decoding at all.  But, at the time he wrote the patch the email package 
couldn't handle binary data (Richard's patch landed in July 2010, binary 
support in the email package landed in October), so presumably nobody was 
thinking about binary emails.

I'm really not sure what to do here, I'll have to give it some thought.

--
components: +email
nosy: +barry, r.david.murray, richard
versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't know. But a function call have a cost.

--

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

New patch without the unwanted change in listobject.c.

--
Added file: http://bugs.python.org/file32720/subprocess_memoryview-2.patch

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




[issue19506] subprocess.communicate() should use a memoryview

2013-11-20 Thread STINNER Victor

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


Removed file: http://bugs.python.org/file32714/subprocess_memoryview.patch

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



[issue19518] Add new PyRun_xxx() functions to not encode the filename

2013-11-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Perhaps we could we use the suffix Unicode rather than Object? These don't 
work with arbitrary objects, they expect a unicode string.

PyRun_InteractiveOneObject would be updated to use the new suffix as well.

That would both be clearer for the user, and address Serhiy's concern about the 
possible ambiguity: PyRun_FileUnicode still isn't crystal clear, but it's 
clearer than PyRun_FileObject.

--

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



[issue19518] Add new PyRun_xxx() functions to not encode the filename

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

FYI I already added a bunch of new functions with Object suffix when I replaced 
char* with PyObject*.

Example:

http://hg.python.org/cpython/rev/df2fdd42b375
http://bugs.python.org/issue11619

--

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



[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread R. David Murray

R. David Murray added the comment:

Benjamin: the patch looks pretty good to me, for fixing the problem of 
docstrings that are explicitly unicode.  But before I go to the trouble of a 
full review and test, is this a level of change you think is acceptable in 2.7 
at this point it its lifecycle?

--
nosy: +benjamin.peterson

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



[issue6490] os.popen documentation is probably wrong

2013-11-20 Thread Martin Panter

Martin Panter added the comment:

Please apply Neil Muller’s documentation patch. It is certainly better than the 
current state.

If you want to improve it further, maybe get rid of the trailing comma, and 
mention that the close() method returns the exit status encoded like the wait() 
function.

--
nosy: +vadmium
versions: +Python 3.3, Python 3.4

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-20 Thread Charles-François Natali

Charles-François Natali added the comment:

 Serhiy Storchaka added the comment:

 I don't know. But a function call have a cost.

I'm with Serhiy here.
Writing a performance optimization without benchmark is generally a
bad idea (I won't quote Knuth :-).

--

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-20 Thread Charles-François Natali

Charles-François Natali added the comment:

I made a review at http://bugs.python.org/review/18874/#ps9860 (not sure you 
got notified).

--

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



[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread Akira Kitada

Akira Kitada added the comment:

Added meta charset=utf-8 to html pydoc generates.

--
Added file: http://bugs.python.org/file32721/issue1065986-4.patch

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



[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Okay with me.

--

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



[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread Leslie P. Polzer

Leslie P. Polzer added the comment:

Since this is my first contribution I'm not entirely sure about the fine 
details of backwards compatibility in Python, so please forgive me if I'm 
totally missing the mark here.

There are facilities in smtpd's parent class asynchat that perform the 
necessary conversions automatically if the user sets an encoding, so smtpd 
should be adjusted to rely on that and thus give the user the opportunity to 
choose for themselves.

Then it boils down to breaking backwards compatibility by setting a default 
encoding, which could be none as you suggest or latin1 as I suggest; either 
will probably be painful for current users.

My take here is that whoever is using this code for their SMTP server and 
hasn't given the encoding issues any thought will need to take a look at their 
code in that respect anyway, so IMHO a break with compatibility might be a bit 
painful but necessary.

If you agree then I will gladly rework the patch to have smtpd work with an 
underlying byte stream by default, rejecting anything non-ASCII where necessary.

Later patches could bring 8BITMIME support to smtpd, with charset conversion as 
specified by the MIME metadata.

--

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



[issue19518] Add new PyRun_xxx() functions to not encode the filename

2013-11-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Hmm, reading more of those and I think Serhiy is definitely right -
Object is the wrong suffix. Unicode isn't right either, since the main
problem is that ambiguity around *which* parameter is a Python Unicode
object. The API names that end in *StringObject or *FileObject don't
give the right idea at all.

The shortest accurate suffix I can come up with at the moment is the
verbose WithUnicodeFilename:

PyParser_ParseStringObject vs
PyParser_ParseStringWithUnicodeFilename

Other possibilities:

PyParser_ParseStringUnicode # Huh?
PyParser_ParseStringDecodedFilename # Slight fib on Windows, but
mostly accurate
PyParser_ParseStringAnyFilename

Inserting an underscore before the suffix is another option (although
I don't think it much matters either way).

--

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



[issue19518] Add new PyRun_xxx() functions to not encode the filename

2013-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 FYI I already added a bunch of new functions with Object suffix when I 
 replaced char* with PyObject*.

Most of them were added in 3.4. Unfortunately several functions were added 
earlier (e.g. PyImport_ExecCodeModuleObject, 
PyErr_SetFromErrnoWithFilenameObject).

--

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



[issue19653] Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter()

2013-11-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Why would you want to speed up repr()? I'm -1 unless there's an use case.

--
nosy: +pitrou

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



[issue19653] Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter()

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

After writing the patch, I realized that it adds a lot of new functions and add 
more code. Then I asked myself if repr() is really an important function or not 
:-)

3 other developers ask the same question, so it's probably better to reject 
this huge patch :-)

--
resolution:  - invalid
status: open - closed

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



[issue19654] test_tkinter sporadic failures on x86 Tiger 3.x buildbot

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

The failures are sporadic, I don't understand how the tests can pass 
sometimes...

--

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



[issue18391] socket.fromfd()'s API is difficult or impossible to use correctly in general

2013-11-20 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue9246] os.getcwd() hardcodes max path len

2013-11-20 Thread Zachary Ware

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


--
nosy: +zach.ware

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



[issue19572] Report more silently skipped tests as skipped

2013-11-20 Thread Zachary Ware

Zachary Ware added the comment:

pickletester issue opened at #19648.  The test_posix issue already has an open 
issue at #9246.

--

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



[issue19654] test_tkinter sporadic failures on x86 Tiger 3.x buildbot

2013-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74b76a726285 by Serhiy Storchaka in branch '3.3':
Print Tk patchlevel in test_tcl in verbose mode (issue19654).
http://hg.python.org/cpython/rev/74b76a726285

New changeset 1b58f14f5d60 by Serhiy Storchaka in branch 'default':
Print Tk patchlevel in test_tcl in verbose mode (issue19654).
http://hg.python.org/cpython/rev/1b58f14f5d60

New changeset 78c906600183 by Serhiy Storchaka in branch '2.7':
Print Tk patchlevel in test_tcl in verbose mode (issue19654).
http://hg.python.org/cpython/rev/78c906600183

--
nosy: +python-dev

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-20 Thread Andy Dirnberger

Changes by Andy Dirnberger d...@dirnonline.com:


--
nosy: +dirn

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



[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread R. David Murray

R. David Murray added the comment:

I think the only backward compatible solution is to add a switch of *some* sort 
(exact API TBD), whose default is to continue to decode using utf-8, and 
document it as wrong.

Conversion of an email to unicode should be handled by the email package, not 
by smtpd, which is why I say smtpd should be emitting binary.

As I say, I need to find time to look at the current API in more detail before 
I'll be comfortable discussing the new API.  I've put it on my list, but likely 
I won't get to it until the weekend.

--
versions: +Python 3.5 -Python 3.3, Python 3.4

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



[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread R. David Murray

R. David Murray added the comment:

Oh, and to clarify: the backward compatibility is that if code works with 
X.Y.Z, it should work with X.Y.Z+1.  So even though correctly handling binary 
mail would indeed require someone to reexamine their code, if things happen to 
be working OK for them (eg: their program only needs to handle utf-8 email), we 
don't want to break their working program.

--

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



[issue17276] HMAC: deprecate default hash

2013-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 86107e7e6ee5 by Christian Heimes in branch 'default':
Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
http://hg.python.org/cpython/rev/86107e7e6ee5

--
nosy: +python-dev

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



[issue17276] HMAC: deprecate default hash

2013-11-20 Thread Christian Heimes

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


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

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



[issue19663] Not so correct error message when initializing defaultdict

2013-11-20 Thread Vajrasky Kok

New submission from Vajrasky Kok:

 from collections import defaultdict
 defaultdict('')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: first argument must be callable
 defaultdict(None)
defaultdict(None, {})
 None()
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: 'NoneType' object is not callable

After patch:

 from collections import defaultdict
 defaultdict('')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: first argument must be callable or None

--
components: Extension Modules
files: fix_error_message_default_dict.patch
keywords: patch
messages: 203500
nosy: rhettinger, vajrasky
priority: normal
severity: normal
status: open
title: Not so correct error message when initializing defaultdict
type: behavior
versions: Python 3.3, Python 3.4
Added file: 
http://bugs.python.org/file32722/fix_error_message_default_dict.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19663
___
___
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-11-20 Thread Artem Ustinov

Artem Ustinov added the comment:

It does the trick with optionals but not the positionals.
How the positional arguments can be removed/hidden?

--

___
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



[issue18775] name attribute for HMAC

2013-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 71f4a805d262 by Christian Heimes in branch 'default':
Issue #18775: Add name and block_size attribute to HMAC object. They now
http://hg.python.org/cpython/rev/71f4a805d262

--
nosy: +python-dev

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



[issue18775] name attribute for HMAC

2013-11-20 Thread Christian Heimes

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


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

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



[issue17791] PC/pyconfig.h defines PREFIX macro

2013-11-20 Thread Christian Heimes

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


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

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



[issue16632] Enable DEP and ASLR

2013-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cb1691d42101 by Christian Heimes in branch 'default':
Issue #16632: Enable DEP and ASLR on Windows.
http://hg.python.org/cpython/rev/cb1691d42101

--
nosy: +python-dev

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



[issue16632] Enable DEP and ASLR

2013-11-20 Thread Christian Heimes

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


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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16632
___
___
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-11-20 Thread Christian Heimes

Christian Heimes added the comment:

The problems have been resolved.

--
resolution:  - fixed
status: open - closed

___
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



[issue16595] Add resource.prlimit

2013-11-20 Thread Christian Heimes

Christian Heimes added the comment:

Tests are passing on all buildbots for quite some time now.

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

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



[issue17791] PC/pyconfig.h defines PREFIX macro

2013-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fbd856e817a1 by Christian Heimes in branch 'default':
Issue #17791: Drop PREFIX and EXEC_PREFIX definitions from PC/pyconfig.h
http://hg.python.org/cpython/rev/fbd856e817a1

--
nosy: +python-dev

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



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-11-20 Thread Christian Heimes

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


--
assignee:  - christian.heimes

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



[issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates

2013-11-20 Thread Christian Heimes

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


--
assignee:  - christian.heimes

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



[issue18233] SSLSocket.getpeercertchain()

2013-11-20 Thread Christian Heimes

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


--
assignee:  - christian.heimes

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



[issue1208730] expat binding for XML_ParserReset

2013-11-20 Thread Christian Heimes

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


--
assignee: christian.heimes - 
versions: +Python 3.5 -Python 3.4

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-20 Thread STINNER Victor

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


Removed file: http://bugs.python.org/file32549/3bf73dcd0b42.diff

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



[issue14621] Hash function is not randomized properly

2013-11-20 Thread Christian Heimes

Christian Heimes added the comment:

The issue has been solved for Python 3.4 with the integration of PEP 456.

--
stage:  - committed/rejected
status: open - pending

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-20 Thread STINNER Victor

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


Removed file: http://bugs.python.org/file32547/69fd2d766005.patch

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

Patch updated for Charles François's comments.

--
Added file: http://bugs.python.org/file32724/4430e893d89f.patch

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



[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread Larry Hastings

New submission from Larry Hastings:

If you run Lib/test/test_userdict.py enough times, sooner or later it'll 
produce a spurious error.  I wrote a shell script that ran ./python -m test 
test_userdict a zillion times; here's a snippet of output from running that 
script:

[...]
1 test OK.
[1/1] test_userdict
1 test OK.
[1/1] test_userdict
1 test OK.
[1/1] test_userdict
test test_userdict failed -- Traceback (most recent call last):
  File /home/larry/src/python/clinic/Lib/test/test_userdict.py, line 48, in 
test_all
self.assertEqual(repr(u2), repr(d2))
AssertionError: {'one': 1, 'two': 2} != {'two': 2, 'one': 1}
- {'one': 1, 'two': 2}
+ {'two': 2, 'one': 1}


1 test failed:
test_userdict
[1/1] test_userdict
1 test OK.
[1/1] test_userdict
1 test OK.
[...]

Line 48 reads as follows:
self.assertEqual(repr(u2), repr(d2))

I realize this code is ancient--but it seems to rely on repr of a dict 
producing consistent output, which is silly and has always been wrong.

Raymond, you want to take this?

--
components: Library (Lib)
messages: 203509
nosy: larry, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: UserDict test assumes ordered dict repr
type: behavior
versions: Python 3.4

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



[issue13477] tarfile module should have a command line

2013-11-20 Thread Berker Peksag

Berker Peksag added the comment:

Attached an updated patch that addresses Serhiy's comments. Thanks!

--
Added file: http://bugs.python.org/file32725/issue13477_v6.diff

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



[issue19474] Argument Clinic causing compiler warnings about uninitialized variables

2013-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4f0f496e482e by Larry Hastings in branch 'default':
Issue #19474: Argument Clinic now always specifies a default value for
http://hg.python.org/cpython/rev/4f0f496e482e

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19474
___
___
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-11-20 Thread paul j3

paul j3 added the comment:

f.nargs = '?'
f.default = argparse.SUPPRESS
f.help = argparse.SUPPRESS

may be best set of tweaks to a positional Action `f`.  In quick tests it 
removes `f` from the help, suppresses any complaints about a missing string, 
and does not put anything in the namespace.

But if there is a string in the input that could match this positional, it will 
be use.

f.nargs = 0

is another option.  This puts a `[]` (empty list) in the namespace, since 
'nothing' matches `f`.  If there is an input string that might have matched it 
before, you will not get an 'unrecognized argument' error.  `parse_known_args` 
can be used to get around that issue.

I should stress, though, that fiddling with `nargs` like this is not part of 
the API.  Tweak this at your own risk.

--

___
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



[issue19474] Argument Clinic causing compiler warnings about uninitialized variables

2013-11-20 Thread Larry Hastings

Larry Hastings added the comment:

Sigh.  If dataflow analysis could inline the static _impl function, it would 
notice that there are no code paths where the variable is uninitialized and 
gets used.  But I'm not surprised compilers aren't that sophisticated.

So I beat the problem to death with a shoe: now, variables that are in option 
groups that don't otherwise have a default value always get one.

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

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



[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

In test_set, I fixed the issue by parsing repr() output, sorting items and then 
compare sorted items :-)

--
nosy: +haypo

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



[issue19665] test_logging fails with SMTPHandler timeout

2013-11-20 Thread Mark Wolf

New submission from Mark Wolf:

Similar to http://bugs.python.org/issue14644 but with Arch Linux instead of OS 
X. I built python according the dev guide then ran the test suite with 
`./python -m test -vj3 test_logging` and failed in the SMTPHandlerTest. 
`self.handled.is_set()` returns false after a 5 second timeout. In one of the 
comments in the OS X bug linked above, it suggests changing the timeout to 15 
seconds. This causes the test to pass (actually anything slightly over 5 sec 
seems to be okay). Not sure if this is a fragile test or a bug in Lib.logging. 
The patch ups the timeout by a second, which passes on my machine but might 
still fail on others if it actually is a fragile test issue. The failing test 
runner output for test_logging can be found here: 
https://gist.github.com/m3wolf/7563541

I'm just jumping into python dev for the first time; any constructive comments 
are appreciated.

--
components: Tests
files: test_logging.patch
keywords: patch
messages: 203515
nosy: canisdirus
priority: normal
severity: normal
status: open
title: test_logging fails with SMTPHandler timeout
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file32726/test_logging.patch

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



[issue19666] Format string for ASCII unicode or bytes-like object as readonly buffer

2013-11-20 Thread Christian Heimes

New submission from Christian Heimes:

I could use a format string for either ASCII unicode or bytes buffer in a few 
places, e.g. 

a* (bytes, bytearray, bytes-like object or ASCII unicode) [Py_buffer]

Like y* it should handle PyBUF_SIMPLE with 'C' contiguous but it should only 
accept one dimensional buffers. In case the object is an ASCII PyUnicode_Object 
it should return its ASCII data as Py_buffer.

--
components: Interpreter Core
messages: 203516
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: Format string for ASCII unicode or bytes-like object as readonly buffer
type: enhancement
versions: Python 3.4

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



[issue19667] Add the htmlcharrefreplace error handler

2013-11-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch adds the htmlcharrefreplace_errors() function which 
implements the htmlcharrefreplace error handler in the html module. This 
error handler is almost same as the xmlcharrefreplace error handler, but 
first try to replace an unencodable character to HTML named character 
reference. Result is a little more human-readable than with xmlcharrefreplace.

See also a discussion on Python-Ideas: 
http://comments.gmane.org/gmane.comp.python.ideas/21307 .

--
components: Library (Lib)
files: htmlcharrefreplace.patch
keywords: patch
messages: 203517
nosy: ezio.melotti, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add the htmlcharrefreplace error handler
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32727/htmlcharrefreplace.patch

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



[issue19666] Format string for ASCII unicode or bytes-like object as readonly buffer

2013-11-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

It seems this would add a dependency to the unicode implementation (other 
unicode representations may not allow you to take a Py_buffer to the ASCII 
data).

--
nosy: +pitrou

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



[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I realize this code is ancient--but it seems to rely on repr of a dict 
 producing consistent output, which is silly

Well, it sounds a bit weird to me... If you're building the dict always in the 
same way, intuitively it should always produce the same repr() during the same 
interpreter session. Do you know why it doesn't?

--
nosy: +pitrou

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



[issue19572] Report more silently skipped tests as skipped

2013-11-20 Thread Zachary Ware

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


Added file: 
http://bugs.python.org/file32728/skiptest_not_return_or_pass.v4-3.3.diff

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



[issue13633] Handling of hex character references in HTMLParser.handle_charref

2013-11-20 Thread Ezio Melotti

Ezio Melotti added the comment:

Here is a patch.
It might be also be a good idea to add warning when the option is not 
explicitly set to False, and change the default to True in 3.5/3.6.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: test needed - patch review
Added file: http://bugs.python.org/file32729/issue13633.diff

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



[issue13633] Automatically convert character references in HTMLParser

2013-11-20 Thread Ezio Melotti

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


--
title: Handling of hex character references in HTMLParser.handle_charref - 
Automatically convert character references in HTMLParser

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-20 Thread Peyton Sherwood

Changes by Peyton Sherwood peyt...@gmail.com:


--
nosy: +peyton

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19660
___
___
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-11-20 Thread R. David Murray

R. David Murray added the comment:

Vajrasky: thanks for taking a crack at this, but, well, there are a lot of 
subtleties involved here, due to the way the organic growth of the email 
package over many years has led to some really bad design issues.

It took me a lot of time to boot back up my understanding of how all this stuff 
hangs together (answer: badly).  After wandering down many blind alleys, the 
problem turns out to be yet one more disconnect in the model.  We previously 
fixed the issue where if set_payload was passed binary data bad things would 
happen.  That made the model more consistent, in that _payload was now a 
surrogateescaped string when the payload was specified as binary data.

But what the model *really* needs is that _payload *always* be an 
ascii+surrogateescape string, and never a full unicode string.  (Yeah, this is 
a sucky model...it ought to always be binary instead, but we are dealing with 
legacy code here.)

Currently it can be a unicode string.  If it is, set_charset turns it into an 
ascii only string by encoding it with the qp or base64 CTE.  This is pretty 
much just by luck, though.

If you set body_encode to None what happens is that the encode_7or8bit encoder 
thinks the string is 7bit because it does get_payload(decode=True) which, 
because the model invariant was broken, turns into a raw-unicode-escape string, 
which is a 7bit representation.  That doesn't affect the payload, but it does 
result in wrong CTE being used.

The fix is to fix the model invariant by turning a unicode string passed in to 
set_payload into an ascii+surrogateescape string with the escaped bytes being 
the unicode encoded to the output charset.

Unfortunately it is also possible to call set_payload without a charset, and 
*then* call set_charset.  To keep from breaking the code of anyone currently 
doing that, I had to allow a full unicode _payload, and detect it in 
set_charset.

My plan is to fix that in 3.4, causing a backward compatibility break because 
it will no longer be possible to call set_payload with a unicode string 
containing non-ascii if you don't also provide a character set.  I believe this 
is an acceptable break, since otherwise you *must* leave the model in an 
ambiguous state, and you have the possibility leaking unicode characters out 
into your wire-format message, which would ultimately result in either an 
exception at serialization time or, worse, mojibake.

Patch attached.

--
stage:  - patch review
type:  - behavior
versions:  -Python 3.2
Added file: http://bugs.python.org/file32730/support_8bit_charset_cte.patch

___
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



[issue18138] ssl.SSLContext.add_cert()

2013-11-20 Thread Christian Heimes

Christian Heimes added the comment:

I think the patch in #16487 does too many things at once. The new patch is a 
draft for a new patch that adds SSLContext.load_verify_locations(cadata) to the 
SSL module. cadata can be a bunch of PEM encoded certs (ASCII) or DER encoded 
certs (bytes-like). The patch may contain bugs as I haven't verified all error 
paths yet.

--
Added file: http://bugs.python.org/file32731/ssl_cadata.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18138
___
___
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-11-20 Thread R. David Murray

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


Removed file: http://bugs.python.org/file32730/support_8bit_charset_cte.patch

___
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



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

2013-11-20 Thread R. David Murray

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


Added file: http://bugs.python.org/file32732/support_8bit_charset_cte.patch

___
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



[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread Larry Hastings

Larry Hastings added the comment:

I don't know for sure--I haven't stepped through it--but here's an informed 
guess.  It relies on key collision.

The first dict is created the normal way.  It contains two values, one (set 
to 1) and two (set to 2), inserted in that order.

The second dict is created by calling dict.update(), passing in the first dict. 
 update() iterates over the keys of the dict's hash table with a simple for(;;) 
loop, copying the key and value each time.  The order is effectively random.

The repr() then iterates over the keys using the same simple for(;;) loop, 
spitting out key=value strings.

Let's assume that the keys collide.  one is inserted first, so it gets its 
first choice.  two is inserted second so it must probe.  Let's assume that 
its second choice is a key slot *lower* (nearer to [0]) than one.

Now when we use update(), the for(;;) loop sees two first.  So two gets its 
first choice, which means one must now probe.  If one's second choice is a 
key slot *higher* (further from [0]) than two, we'll see the behavior.

(Why does this only happen sometimes?  Because we're using hash 
randomization.)

--

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



[issue19668] Add support of the cp1125 encoding

2013-11-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch adds support of the CP1125 encoding.

The CP1125 encoding (also known as IBM866, CP866U (in Microsoft), 866nav (in 
TeX), RUSCII) is standard DOS encoding for Ukrainian language. It is only one 
DOS encoding (or at least most popular) suitable for Ukrainian. It is Ukrainian 
government standard for DOS. The CP1125 encoding differs from CP866 encoding 
only in 6 codes for Ukrainian letters.

http://www-03.ibm.com/systems/resources/systems_i_software_globalization_pdf_cp01125z.pdf
http://cp866u.codeplex.com/
ftp://tug.org/texlive/Contents/live/texmf-dist/tex/latex/cyrillic/cp866nav.def
http://segfault.kiev.ua/cyrillic-encodings/#ruscii

--
components: Unicode
files: encoding_cp1125.patch
keywords: patch
messages: 203523
nosy: doerwalter, ezio.melotti, haypo, lemburg, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add support of the cp1125 encoding
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32733/encoding_cp1125.patch

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



[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I don't know for sure--I haven't stepped through it--but here's an
 informed guess.  It relies on key collision.

Ok, I see. The frequency of the errors then depends on the frequency of
collisions for two fixed keys and a varying hash seed...

--

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



[issue19572] Report more silently skipped tests as skipped

2013-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

skiptest_not_return_or_pass.v4-3.3.diff LGTM.

--

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



[issue19669] remove mention of the old LaTeX docs

2013-11-20 Thread Antoine Pitrou

New submission from Antoine Pitrou:

The devguide mentions the old LaTeX doc format:
http://docs.python.org/devguide/documenting.html#differences-to-the-latex-markup

This doesn't really sound useful anymore, so many years later.

--
assignee: docs@python
components: Devguide, Documentation
messages: 203527
nosy: docs@python, ezio.melotti, fdrake, georg.brandl, pitrou
priority: low
severity: normal
status: open
title: remove mention of the old LaTeX docs

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



[issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies

2013-11-20 Thread Patrick Bogen

New submission from Patrick Bogen:

SimpleCookie uses _quote to quote cookie values, which converts special 
characters to \OCTAL notation. This is not RFC6265 compliance, which requires- 
in part- that cookie values do not contain backslashes:

 cookie-value  = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
 cookie-octet  = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
   ; US-ASCII characters excluding CTLs,
   ; whitespace DQUOTE, comma, semicolon,
   ; and backslash

--
components: Library (Lib)
messages: 203529
nosy: pdbogen
priority: normal
severity: normal
status: open
title: SimpleCookie Generates Non-RFC6265-Compliant Cookies
type: behavior
versions: Python 2.7

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



[issue19669] remove mention of the old LaTeX docs

2013-11-20 Thread Ezio Melotti

Ezio Melotti added the comment:

SGTM.

--
keywords: +easy
stage:  - needs patch
type:  - enhancement

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



[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread Éric Araujo

Éric Araujo added the comment:

LGTM.

One thing: did you mean assertEqual in Lib/test/test_pydoc.py:466: 
self.assertTrue(open('pipe').read(), pydoc._encode(doc))
?

--

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-20 Thread Éric Araujo

Éric Araujo added the comment:

Thanks for this!  Tests should exercise the now-valid syntaxes, which also need 
documentation.

--
nosy: +eric.araujo

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-20 Thread Éric Araujo

Éric Araujo added the comment:

On second thought, as this patch allows one form that Guido doesn’t want 
(bar().foo()), maybe there should be a discussion on python-ideas.

--
nosy: +nick

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-20 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +ncoghlan -nick

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



[issue19671] Option to select the optimization level on compileall

2013-11-20 Thread Sworddragon

New submission from Sworddragon:

Currently on calling one of the compileall functions it is not possible to pass 
the optimization level as argument. The bytecode will be created depending of 
the optimization level of the current script instance. But if a script wants to 
compile .pyc files for one destination and .pyo files for another destination 
this will be a little tricky.

--
components: Library (Lib)
messages: 203533
nosy: Sworddragon
priority: normal
severity: normal
status: open
title: Option to select the optimization level on compileall
type: enhancement
versions: Python 2.7, Python 3.3

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



[issue13633] Automatically convert character references in HTMLParser

2013-11-20 Thread Eli Bendersky

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


--
nosy:  -eli.bendersky

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

Charles-François doesn't like packed structure (frame_t) because he fears crash 
on architectures not supporting non-aligned memory access or bad performances. 
Antoine and me want them to reduce the memory footprint of the tracemalloc 
module (tracemalloc.get_tracemalloc_memory()).

I think that the memory footprint has an higher price than the performances for 
tracemalloc: I can wait longer for a result, whereas I may not be able to use 
tracemalloc if it uses too much memory.

I propose to pack frame_t structure, and only disable it explicitly on 
architectures where tracemalloc does crash. What do you think?

--

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



[issue19672] Listing of all exceptions for every function

2013-11-20 Thread Sworddragon

New submission from Sworddragon:

Currently the documentation does sometimes say about specific exceptions but 
most times not. As I'm often catching exceptions to ensure a high stability 
this gets a little difficult. For example print() can trigger a BrokenPipeError 
and the most file functions like flush() can trigger other related IOError's.

So I would like to see something like a listing on every function which 
contains all exceptions that may appear. Also there are some special cases like 
close(). For example it can trigger an IOError too if there are pending write 
operations due to an implicit call of flush(). But if the file object is opened 
in read-only mode or there are no write operations this can't happen. Maybe 
such additional information can be added too.

--
assignee: docs@python
components: Documentation
messages: 203535
nosy: Sworddragon, docs@python
priority: normal
severity: normal
status: open
title: Listing of all exceptions for every function
type: enhancement
versions: Python 2.7, Python 3.3

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-20 Thread STINNER Victor

STINNER Victor added the comment:

pack.patch: Patch to pack frame_t structure.

I tested tracemalloc with packed structure on Linux/AMD64, FreeBSD/AMD64, 
OpenBSD/AMD64, OpenIndiana/AMD64, Windows/x86 (Windows 7 64-bit with Python 
compiled in 32-bit). I don't have access to SPARC.

--
Added file: http://bugs.python.org/file32734/pack.patch

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



  1   2   >