[issue12850] [PATCH] stm.atomic

2011-09-03 Thread Armin Rigo

Armin Rigo ar...@users.sourceforge.net added the comment:

:-)

--

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



[issue12889] struct.pack('d'... problem

2011-09-03 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

I agree with you on the correct 8 output bytes.  And those expected bytes are 
exactly what struct.pack is producing here:

Python 2.7.2 |EPD 7.1-1 (32-bit)| (default, Jul  3 2011, 15:40:35) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type packages, demo or enthought for more information.
 import struct
 struct.pack('!d', 1.2345)
'?\xf3\xc0\x83\x12n\x97\x8d'
 len(struct.pack('!d', 1.2345))
8
 struct.pack('!d', 1.2345).encode('hex')
'3ff3c083126e978d'

I suspect that the confusion arises from the way the output string is 
displayed:  the 8 bytes in the output string are escaped if they're not 
printable ASCII characters, and are displayed directly otherwise (notice the 
'?' and the 'n', with codes 0x3f and 0x63 respectively).

--
nosy: +mark.dickinson
resolution:  - invalid
status: open - closed

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



[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I've updated 3.2 docs in e11b4c945f7e (currently in the release clone, will be 
merged to upstream after the release of 3.2.2.)

Please commit a similar change to the 2.7 branch.

--

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



[issue12889] struct.pack('d'... problem

2011-09-03 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 with codes 0x3f and 0x63 respectively

Whoops:  that should be '... 0x3f and 0x6e ...'.

--

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



[issue12888] html.parser.HTMLParser.unescape works only with the first 128 entities

2011-09-03 Thread Yves Dorfsman

Yves Dorfsman y...@zioup.com added the comment:

Added a test case:
http://hg.zioup.org/cpython/rev/4accd3181061

If you set the loop  128 then the test passes (set at 1000 right now).

--
hgrepos: +65

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



[issue12889] struct.pack('d'... problem

2011-09-03 Thread Dr . Georg Ströhlein

Dr. Georg Ströhlein schorsch_mc...@yahoo.de added the comment:

Thank you, Mark, for explaining the details of how to correctly format the 
output of that command to me... Regards, Schorsch

--

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



[issue12888] html.parser.HTMLParser.unescape works only with the first 128 entities

2011-09-03 Thread Peter Otten

Peter Otten __pete...@web.de added the comment:

The unescape() method uses re.sub(regex, sub, re.ASCII), but the third argument 
is count, not flags. Fix is easy: use

re.sub(regex, sub, flags=re.ASCII).

--
keywords: +patch
nosy: +potten
Added file: http://bugs.python.org/file23092/unescape_bug.patch

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



[issue5876] __repr__ returning unicode doesn't work when called implicitly

2011-09-03 Thread Nam Nguyen

Changes by Nam Nguyen bits...@gmail.com:


--
nosy: +Nam.Nguyen

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



[issue12888] html.parser.HTMLParser.unescape works only with the first 128 entities

2011-09-03 Thread Ezio Melotti

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


--
assignee:  - ezio.melotti
nosy: +ezio.melotti
stage:  - commit review
type:  - behavior

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



[issue12878] io.StringIO doesn't provide a __dict__ field

2011-09-03 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 8ec8a4579788 by Benjamin Peterson in branch '3.2':
add a __dict__ descr for IOBase (closes #12878)
http://hg.python.org/cpython/rev/8ec8a4579788

New changeset fe0497bd7354 by Benjamin Peterson in branch 'default':
merge 3.2 (#12878)
http://hg.python.org/cpython/rev/fe0497bd7354

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

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-03 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I have a patch that needs testing on Cpython Windows and if possible IPython.  
The test makes sure that the error message contains the path to the file (which 
the incomplete error message you report also does, BTW), and an explanation of 
the error (to address the OP’s concern that the message must be helpful): it 
looks for the string 'denied'; if this is not cross-platform, I won’t commit 
this line.  (Antoine, I’ve made you nosy because I think you may have expertise 
on that last point.)

(BTW, I have tracked down the source of the mysterious None (I’m getting better 
at these things, but my mental sanity takes a toll each time): core.setup 
catches the exception and wants to display exc.filename and exc.strerror.)

--
assignee: tarek - eric.araujo
components: +Distutils, Distutils2
keywords: +needs review, patch
nosy: +alexis, higery, pitrou
stage: needs patch - patch review
versions: +3rd party, Python 3.3 -Python 3.1
Added file: http://bugs.python.org/file23093/fix-7219.diff

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



[issue12891] Clean up traces of manifest template in packaging

2011-09-03 Thread Éric Araujo

New submission from Éric Araujo mer...@netwok.org:

With distutils2/packaging, extra files to be included in sdists are defined in 
setup.cfg, no more in a manifest template.  However, the Manifest class and the 
sdist command still have code to deal with manifest templates.  I propose to 
remove it.

--
assignee: tarek
components: Distutils2
messages: 143462
nosy: alexis, eric.araujo, tarek
priority: normal
severity: normal
stage: needs patch
status: open
title: Clean up traces of manifest template in packaging
versions: 3rd party, Python 3.3

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



[issue12862] ConfigParser does not implement comments need to be preceded by a whitespace character correctly

2011-09-03 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Éric, the docs clearly state that currently only full-line comments
 are enabled by default.

Wow, I missed that.  I use such comments in some config files or config file 
examples in documentation :(

--

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



[issue10914] Python sub-interpreter test

2011-09-03 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

BTW, about this comment in the code:
# XXX only tested under Unix checkouts
It is possible to install the _testembed.c file alongside xxmodule.c and 
compile it at test time.  To test under Windows, I’ve re-read your first patch 
using distutils and it’s not that long or hard to read after all.

--

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



[issue12386] packaging fails in install_distinfo when writing RESOURCES

2011-09-03 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 I also noticed that your latest comment 
 All text is bytes, so we can do all I/O in bytes when writing
 resources and avoid special-casing.
 contradicts your earlier position:
 I agree about the nonsense of opening in binary mode.

It does :)  My earlier position was wrong.

--

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



[issue12881] ctypes: segfault with large structure field names

2011-09-03 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

Here is a patch that replaces the 'alloca' call with 'PyMem_Malloc'.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file23094/issue12881.patch

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



[issue2636] Adding a new regex module (compatible with re)

2011-09-03 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs timeho...@users.sourceforge.net added the comment:

Although V1, V2 is less wordy, technically the current behavior is version 
2.2.2, so logically this should be re.VERSION222 vs. re.VERSION3 vs. 
re.VERSIONn, with corresponding (?V222), (?V3) and future (?Vn).  But 
that said, I think 2.2.2 can be shorthanded to 2, so basically start counting 
from there.

--

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-03 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 The test makes sure that the error message contains the path to the
 file (which the incomplete error message you report also does, BTW),
 and an explanation of the error (to address the OP’s concern that the
 message must be helpful): it looks for the string 'denied'; if this is
 not cross-platform, I won’t commit this line. 

I really don't think C error messages are portable, so you shouldn't
test for them :)

--

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



[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-03 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

Please delete Lib/plat-linux3 directories on 2.7 and 3.2 branches.

--

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



[issue12815] Coverage of smtpd.py

2011-09-03 Thread Antoine Pitrou

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


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

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



[issue2636] Adding a new regex module (compatible with re)

2011-09-03 Thread Vlastimil Brom

Vlastimil Brom vlastimil.b...@gmail.com added the comment:

Not that it matters in any way, but if the regex semantics has to be 
distinguished via non-standard custom flags; I would prefer even less wordy 
flags, possibly such that the short forms for the in-pattern flag setting would 
be one-letter (such as all the other flags) and preferably some with underlying 
plain English words as base, to get some mnemotechnics (which I don't see in 
the numbered versions requiring one to keep track of the rather internal 
library versioning).
Unfortunately, it might be difficult to find suitable names, given the 
objections expressed against the already discussed ones. (FOr what it is worth, 
I thought e.g. of [t]raditional and [e]nhanced, but these also suffer from some 
of the mentioned disadvantages... 
vbr

--

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



[issue12008] HtmlParser non-strict goes wrong with unquoted attributes

2011-09-03 Thread Piet van Oostrum

Piet van Oostrum p...@cs.uu.nl added the comment:

I was bitten by this bug today. Hope it will be solved in the next release of 
Python 3.

It is also possible to use the third argument of search in line 285:

m = attrfind_tolerant.search(rawdata, k, endpos)

This seems to me to be a more `natural' solution.

--
nosy: +pietvo

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



[issue12508] Codecs Anomaly

2011-09-03 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

IIUC this happens because StreamReader calls codecs.utf_8_decode without 
passing final=1 [0], so when the decoder finds the trailing F4 it doesn't 
decode it yet because it waits from the other 3 bytes (F4 is the start byte of 
a 4-bytes UTF-8 sequence):

 b = b'A\xf5BC\xf4'
 chars, decnum = codecs.utf_8_decode(b, 'replace', 0)  # final=0
 chars, decnum
('A�BC', 4)  # F4 not decoded yet
 b = b[decnum:]
 b
b'\xf4'  # F4 still here
 chars, decnum = codecs.utf_8_decode(b, 'replace', 0)
 chars, decnum
('', 0)  # additional calls keep waiting for the other 3 bytes
 chars, decnum = codecs.utf_8_decode(b, 'replace', 1)  # final=1
 chars, decnum
('�', 1)  # when final=1 is passed F4 is decoded, but it never happens

While passing 1 makes the attached script work as expected, it breaks several 
other test in test_codecs (apparently not all the decoders accept the 'final' 
argument).
Also passing 1 should be done only for the last call: read can be called 
several times with a specific size, and it shouldn't use final=1 until the last 
call to avoid errors mid-stream.

[0]: see Lib/codecs.py:482

--

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