[issue13695] "type specific" to "type-specific"

2012-01-01 Thread Boštjan Mejak

New submission from Boštjan Mejak :

Please visit the following link and fix the below text:

http://docs.python.org/library/unittest.html#unittest.TestCase.assertEqual

Changed in version 2.7: Added the automatic calling of >>>type-specific<<< 
equality function.

Just add the hyphen. Thanks.

--
assignee: docs@python
components: Documentation
messages: 150451
nosy: Retro, docs@python
priority: normal
severity: normal
status: open
title: "type specific" to "type-specific"
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue2481] locale.strxfrm does not work with Unicode strings

2012-01-01 Thread Jay Freeman (saurik)

Jay Freeman (saurik)  added the comment:

I have attached a tested patch against Python-2.7.2.tgz (as I do not know how 
to use hg currently). It should be noted that I also am not 100% certain how 
the Python build environment works, but the way I added the wcsxfrm test was to 
add it to configure.in, then run autoheader and autoconf.

It also should be noted that the original code called strxfrm and did not check 
for an error result: neither does my new code (which is mostly based on 
formulaic modifications of the existing code in addition to educated guesses 
with regards to coding and formatting standards: feel free to change, 
obviously).

Finally, I noticed while working on this that --enable-unicode=no does not work 
(there is a check that enforces that it must be either ucs2 or ucs4): seems 
like an easy fix. That said, I ran into numerous other issues trying to make a 
non-Unicode build, and in the end gave up. My code looks like it should work, 
however, were someone to figure out how to build a non-Unicode Python 2.7.

--
keywords: +patch
Added file: http://bugs.python.org/file24125/wcsxfrm.diff

___
Python tracker 

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



[issue13694] asynchronous connect in asyncore.dispatcher does not set addr

2012-01-01 Thread Matt Joiner

New submission from Matt Joiner :

Patch attached

--
components: Library (Lib)
files: dispatcher_connect_addr.patch
keywords: patch
messages: 150449
nosy: anacrolix
priority: normal
severity: normal
status: open
title: asynchronous connect in asyncore.dispatcher does not set addr
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file24124/dispatcher_connect_addr.patch

___
Python tracker 

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



[issue2481] locale.strxfrm does not work with Unicode strings

2012-01-01 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

saurik: can you propose a patch?

--

___
Python tracker 

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



[issue13302] Clarification needed in C API arg parsing

2012-01-01 Thread Sandro Tosi

Sandro Tosi  added the comment:

Thanks Antoine for the pointer.

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
versions:  -Python 3.2, Python 3.3

___
Python tracker 

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



[issue13302] Clarification needed in C API arg parsing

2012-01-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b2b7104691c9 by Sandro Tosi in branch '2.7':
Issue #13302: backport part of 3ed28f28466f
http://hg.python.org/cpython/rev/b2b7104691c9

--
nosy: +python-dev

___
Python tracker 

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



[issue13641] decoding functions in the base64 module could accept unicode strings

2012-01-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thanks for the patch, Berker. It seems a bit too simple, though. You should add 
some tests in Lib/test/test_base64.py and run them (using "./python -m test -v 
test_base64"), this will allow you to see if your changes are correct.

--

___
Python tracker 

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



[issue13676] sqlite3: Zero byte truncates string contents

2012-01-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Attached an updated patch. The custom text_factory case is now fixed,
> and bytes, bytearray and custom factory are all tested.

Thanks, looks good to me.

> Antoine: Do you happen to know what's the status of the
> OptimizeUnicode thingie? Has it been changed for a reason or is it
> just an error that happened during the py3k transition?

It looks obsolete in 3.x to me. If you look at the 2.7 source code, it
had a real meaning there. Probably we could simplify the 3.x source code
by removing that option (but better to do it in a separate patch).

--

___
Python tracker 

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



[issue13594] Aifc markers write fix

2012-01-01 Thread Sandro Tosi

Changes by Sandro Tosi :


--
nosy: +sandro.tosi
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue13594] Aifc markers write fix

2012-01-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c7a4405835e8 by Sandro Tosi in branch '3.2':
Issue #13594: various fixes to aifc module; patch by Oleg Plakhotnyuk
http://hg.python.org/cpython/rev/c7a4405835e8

--
nosy: +python-dev

___
Python tracker 

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



[issue13676] sqlite3: Zero byte truncates string contents

2012-01-01 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

(Whoops, I didn't mean to change the magic source coding comment. Updating the 
patch once again.)

--
Added file: http://bugs.python.org/file24123/sqlite3_zero_byte_v3.patch

___
Python tracker 

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



[issue13676] sqlite3: Zero byte truncates string contents

2012-01-01 Thread Petri Lehtinen

Changes by Petri Lehtinen :


Removed file: http://bugs.python.org/file24122/sqlite3_zero_byte_v3.patch

___
Python tracker 

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



[issue13676] sqlite3: Zero byte truncates string contents

2012-01-01 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

Attached an updated patch. The custom text_factory case is now fixed, and 
bytes, bytearray and custom factory are all tested.

I also added back the pysqlite_unicode_from_string() function, as this makes 
the patch a bit smaller. It also seems to me (only by looking at the code) that 
the sqlite3.OptimizedUnicode factory isn't currently working as documented.

Antoine: Do you happen to know what's the status of the OptimizeUnicode 
thingie? Has it been changed for a reason or is it just an error that happened 
during the py3k transition?

--
Added file: http://bugs.python.org/file24122/sqlite3_zero_byte_v3.patch

___
Python tracker 

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



[issue13693] email.Header.Header incorrect/non-smart on international charset address fields

2012-01-01 Thread kxroberto

kxroberto  added the comment:

now I tried to render this address field header 

u'Name , abc@ewf, "Nameß" '

with 
h = email.Header.Header(continuation_ws='')
h.append ... / email.Header.make_header via these chunks:

[('Name <', us-ascii), ('abc\xce\xa3', utf-8), ('@xy>, abc@ewf, "', us-ascii), 
('Name\xc3\x9f', utf-8), ('" ', us-ascii)]

the outcome is:

'Name < =?utf-8?b?YWJjzqM=?= @xy>, abc@ewf, " =?utf-8?b?TmFtZcOf?=\n " 
'


(note: local part of email address can be utf too)

It seems to be impossible to avoid the erronous extra spaces from outside 
within that email.Header framework.
Thus I guess it was not possible up to now to decently format a beyond-ascii 
MIME message using the official email.Header mechanism? - even when 
pre-digesting things

--

___
Python tracker 

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



[issue13645] import machinery vulnerable to timestamp collisions

2012-01-01 Thread Charles-François Natali

Charles-François Natali  added the comment:

The patch looks good to me.

--

___
Python tracker 

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



[issue2481] locale.strxfrm does not work with Unicode strings

2012-01-01 Thread Jay Freeman (saurik)

Jay Freeman (saurik)  added the comment:

Given that Python 3.x is still not ready for general use (and when this is 
discussed people make it quite clear that this is to be expected, and that a 
many year timeline was originally proposed for the Python 3.0 transition), it 
seems like this bug fix should have been backported to 2.x at some point in the 
last four years it has been open. :(

--
nosy: +saurik

___
Python tracker 

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



[issue10839] email module should not allow some header field repetitions

2012-01-01 Thread kxroberto

kxroberto  added the comment:

I think really ill/strange is that kind of item _assignments_  do _add_ 
multiple.

If   msg[field] = xywould just add-first/replace-frist , and only 
msg.add_/.append(field, xy)  would  add multiples that would be clear and 
understandable/readable. 
(The sophisticated check dictionary is unnecessary IMHO, I don't expect the 
class to be ever smart enough for a full RFC checklist.)

e.g. I remember a bug like

msg[field] = xy
if special_condition:
 msg[field] = abc   # just wanted a alternative


Never ever expected a double header here!

"="  with adding behavior is absurd IMHO. Certainly doesn't allow readable code.

--
nosy: +kxroberto

___
Python tracker 

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



[issue13640] add mimetype for application/vnd.apple.mpegurl

2012-01-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 7926f594e333 by Sandro Tosi in branch 'default':
Issue #13640: add application/vnd.apple.mpegurl MIME type; (partial) patch by 
Hiroaki Kawai
http://hg.python.org/cpython/rev/7926f594e333

--
nosy: +python-dev

___
Python tracker 

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



[issue13640] add mimetype for application/vnd.apple.mpegurl

2012-01-01 Thread Sandro Tosi

Sandro Tosi  added the comment:

I've also added 'm3u' which is the companion of 'm3u8'.

--
nosy: +sandro.tosi
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue13693] email.Header.Header incorrect/non-smart on international charset address fields

2012-01-01 Thread kxroberto

New submission from kxroberto :

the email.* package seems to over-encode international charset address fields - 
resulting even in display errors in the receivers reader - , 
when message header composition is done as recommended in 
http://docs.python.org/library/email.header.html 

Python 2.7.2
>>> e=email.Parser.Parser().parsestr(getcliptext())
>>> e['From']
'=?utf-8?q?Martin_v=2E_L=C3=B6wis?= '
# note the par
>>> email.Header.decode_header(_)
[('Martin v. L\xc3\xb6wis', 'utf-8'), ('', None)]
# unfortunately there is no comfortable function for this:
>>> u='Martin v. L\xc3\xb6wis'.decode('utf8') + ' '
>>> u
u'Martin v. L\xf6wis '
>>> msg=email.Message.Message()
>>> msg['From']=u
>>> msg.as_string()
'From: =?utf-8?b?TWFydGluIHYuIEzDtndpcyA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?=\n\n'
>>> msg['From']=str(u)
>>> msg.as_string()
'From: 
=?utf-8?b?TWFydGluIHYuIEzDtndpcyA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?=\nFrom: 
Martin v. L\xf6wis \n\n'
>>> msg['From']=email.Header.Header(u)
>>> msg.as_string()
'From: 
=?utf-8?b?TWFydGluIHYuIEzDtndpcyA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?=\nFrom: 
Martin v. L\xf6wis \nFrom: 
=?utf-8?b?TWFydGluIHYuIEzDtndpcyA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?=\n\n'
>>> 

(BTW: strange is that multiple msg['From']=... _assignments_ end up as multiple 
additions !???   also msg renders 8bit header lines without warning/error or 
auto-encoding, while it does auto on unicode!??)

Whats finally arriving at the receiver is typically like:

From: "=?utf-8?b?TWFydGluIHYuIEzDtndpcyA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?=" 


because the servers seem to want the address open, they extract the address and 
_add_ it (duplicating) as ASCII. => error

I have not found any emails in my archives where address header fields are so 
over-encoded like python does. Even in non-address fields mostly only those 
words/groups are encoded which need it.

I assume the sophisticated/high-level looking email.* package doesn't expect 
that the user fiddles things together low-level? with parseaddr, re.search, 
make_header Header.encode , '.join ... Or is it indeed (undocumented) so? IMHO 
it should be auto-smart enough.

Note: there is a old deprecated function mimify.mime_encode_header which seemed 
to try to cautiously auto-encode correct/sparsely (but actually fails too on 
all examples tried).

--
components: Library (Lib)
messages: 150434
nosy: kxroberto
priority: normal
severity: normal
status: open
title: email.Header.Header incorrect/non-smart on international charset address 
fields
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue13680] Aifc comptype write fix

2012-01-01 Thread Sandro Tosi

Changes by Sandro Tosi :


--
nosy: +sandro.tosi
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue13680] Aifc comptype write fix

2012-01-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a9cdc3ff2b8e by Sandro Tosi in branch '3.2':
Issue #13680: add lowecase compression type to write header; patch by Oleg 
Plakhotnyuk
http://hg.python.org/cpython/rev/a9cdc3ff2b8e

--
nosy: +python-dev

___
Python tracker 

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



[issue13645] import machinery vulnerable to timestamp collisions

2012-01-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> You could add the requisite path_size() method to get the value, and
> assume 0 means unsupported

I thought:
- calling two methods means two stat calls per file, this could be slightly 
inefficient
- if future extensions of the import mechanism require yet more stat 
information (for example owner or chmod), it will be yet another bunch of 
stat'ing methods to create

(besides, calling int() on the timestamp is a loss of information, I don't 
understand why this must be done in path_mtime() rather than let the consumer 
do whatever it wants with the higher-precision timestamp)

--

___
Python tracker 

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



[issue13692] 2to3 mangles from . import frobnitz

2012-01-01 Thread Thomas Kluyver

Thomas Kluyver  added the comment:

A couple of things to note:

- This was with the Python 3.1 implementation of 2to3 - the problem doesn't 
appear with the Python 3.2 version.
- The import statement in question was inside a method definition. I wonder if 
the extra two dots correspond to the class and method scopes.

--
nosy: +takluyver

___
Python tracker 

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



[issue13692] 2to3 mangles from . import frobnitz

2012-01-01 Thread Henrik Holmboe

New submission from Henrik Holmboe :

It seems that 2to3 mangles::

 from . import frobnitz

into::

 from ... import frobnitz

This was noticed in the port of ipython to py3k. See 
https://github.com/ipython/ipython/issues/1197

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 150430
nosy: holmbie
priority: normal
severity: normal
status: open
title: 2to3 mangles from . import frobnitz

___
Python tracker 

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



[issue13690] Add DEBUG flag to documentation of re.compile

2012-01-01 Thread Sandro Tosi

Changes by Sandro Tosi :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, sandro.tosi
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue13690] Add DEBUG flag to documentation of re.compile

2012-01-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 9aebb4d07ddf by Sandro Tosi in branch '2.7':
Issue #13690: add re.DEBUG; patch by Filip Gruszczyński
http://hg.python.org/cpython/rev/9aebb4d07ddf

New changeset f4a9c7cf98dd by Sandro Tosi in branch '3.2':
Issue #13690: add re.DEBUG; patch by Filip Gruszczyński
http://hg.python.org/cpython/rev/f4a9c7cf98dd

--
nosy: +python-dev

___
Python tracker 

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



[issue13683] Docs in Python 3:raise statement mistake

2012-01-01 Thread Sandro Tosi

Changes by Sandro Tosi :


--
nosy: +sandro.tosi
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue13683] Docs in Python 3:raise statement mistake

2012-01-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 420e01156272 by Sandro Tosi in branch '3.2':
Issue #13683: raise with no exception in scope throws a RuntimeError; fix by 
Ramchandra Apte
http://hg.python.org/cpython/rev/420e01156272

--
nosy: +python-dev

___
Python tracker 

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



[issue13691] pydoc help (or help('help')) claims to run a help utility; does nothing

2012-01-01 Thread Devin Jeanpierre

New submission from Devin Jeanpierre :

What follows is a copy-paste of a shell session. Notice that at the end, rather 
than being inside the online help utility, I'm still in the interactive 
interpreter. I was able to duplicate this on python3.2, python2.7, and 
python2.6 (verifying it on other versions would have required installing them). 
Reading the source in trunk, there is nothing that looks like it actually 
should run this interactive help session. It's just missing.

I guess nobody used this, eh? I've attached a patch that should fix it. I'm not 
sure how you want to handle adding a test for this, so please advise me on that.

-

>>> help('help')

Welcome to Python 3.2!  This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics".  Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

>>>

--
components: Library (Lib)
files: r74214.diff
keywords: patch
messages: 150427
nosy: Devin Jeanpierre
priority: normal
severity: normal
status: open
title: pydoc help (or help('help')) claims to run a help utility; does nothing
versions: Python 2.6, Python 2.7, Python 3.2
Added file: http://bugs.python.org/file24121/r74214.diff

___
Python tracker 

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