[issue15081] No documentation for PyState_FindModule()

2012-06-16 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

It's in PEP 3121, but it never made it to the documentation.

--

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



[issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection in certain unknown cases.

2012-06-16 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I can reproduce this, and it seems to stem from the openssl version used 
(0.9.8l). Running openssl s_client -connect grooveshark.com:443 with 0.9.8l 
gives

CONNECTED(0003)
depth=3 /L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 
Policy Validation 
Authority/CN=http://www.valicert.com//emailAddress=i...@valicert.com
verify error:num=19:self signed certificate in certificate chain
verify return:0
22456:error:0407006A:rsa routines:RSA_padding_check_PKCS1_type_1:block type is 
not 01:rsa_pk1.c:100:
22456:error:04067072:rsa routines:RSA_EAY_PUBLIC_DECRYPT:padding check 
failed:rsa_eay.c:697:
22456:error:1408D07B:SSL routines:SSL3_GET_KEY_EXCHANGE:bad 
signature:s3_clnt.c:1448:

With 1.0.1c, it gives


CONNECTED(0003)
depth=3 L = ValiCert Validation Network, O = ValiCert, Inc., OU = ValiCert 
Class 2 Policy Validation Authority, CN = http://www.valicert.com/, 
emailAddress = i...@valicert.com
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
 0 s:/C=US/ST=FL/L=Gainesville/O=Grooveshark/CN=*.grooveshark.com
   i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, 
Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure 
Certification Authority/serialNumber=07969287
 1 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, 
Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure 
Certification Authority/serialNumber=07969287
   i:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification 
Authority
 2 s:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification 
Authority
   i:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy 
Validation Authority/CN=http://www.valicert.com//emailAddress=i...@valicert.com
 3 s:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy 
Validation Authority/CN=http://www.valicert.com//emailAddress=i...@valicert.com
   i:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy 
Validation Authority/CN=http://www.valicert.com//emailAddress=i...@valicert.com
---
Server certificate
...

i.e. the connection gets established.

The next bug fix release of Python 2.7 will include OpenSSL 0.9.8x, which is 
the latest OpenSSL 0.9.8 bug fix. It still shows the error in connecting, so I 
wonder whether this is a bug that just doesn't get fixed for 0.9.8, or whether 
it's a bug in the server (that 1.0.1 somehow avoids).

--
nosy: +loewis

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



[issue15084] Add option to os.makefile to not raise an exception for existing directories

2012-06-16 Thread Raymond Hettinger

New submission from Raymond Hettinger raymond.hettin...@gmail.com:

I commonly see the code pattern:

try:
os.mkdir(dirname)
except OSError:
pass

It would be nice to have this instead:

   os.mkdir(dirname, ignore_if_existing=True)

There's probably a better name for the keyword argument, but it communicates 
the idea clearly enough.

--
messages: 162956
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Add option to os.makefile to not raise an exception for existing 
directories
type: enhancement
versions: Python 3.4

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



[issue15075] XincludeTest failure in test_xml_etree

2012-06-16 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

   File /home/eliben/python-src/33/Lib/test/regrtest.py, line 710 in main
   File /home/eliben/python-src/33/Lib/test/regrtest.py, line 1829 in 
 module
   File /home/eliben/python-src/33/Lib/runpy.py, line 75 in _run_code
   File /home/eliben/python-src/33/Lib/runpy.py, line 162 in 
 _run_module_as_main
 Segmentation fault (core dumped)

Even if the ET tests are hacking sys.modules, I assume that the Python 
interpreter should not crash so badly.
It reveals probably a flaw somewhere else.

I suggest to re-open this to track the Segmentation fault.

--

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



[issue15084] Add option to os.makefile to not raise an exception for existing directories

2012-06-16 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

Agree. First, the use of parameter is shorter (1 line instead of 4). Second, 
try/except idiom hides possible real OS errors (no rights to create the 
directory, a non-directory file with the same name already exists, illegal 
filename, too long patch, etc.).

But ignore_if_existing is not good name for my taste.

--
components: +Library (Lib)
nosy: +storchaka

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



[issue15084] Add option to os.makefile to not raise an exception for existing directories

2012-06-16 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

+1.

Raymond, is there a reason you put that for 3.4? I'd try to get it in before 
beta1 next week, it's trivial enough.

Regarding the name: os.makedirs() uses exist_ok, we shouldn't invent new ones.

--
assignee:  - hynek
nosy: +hynek

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



[issue15084] Add option to os.mkdir to not raise an exception for existing directories

2012-06-16 Thread Hynek Schlawack

Changes by Hynek Schlawack h...@ox.cx:


--
title: Add option to os.makefile to not raise an exception for existing 
directories - Add option to os.mkdir to not raise an exception for existing 
directories

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



[issue15026] Faster UTF-16 encoding

2012-06-16 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

Thank you for pushing. :-)  Are you interested in a faster UTF-32 codec?

--

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



[issue15026] Faster UTF-16 encoding

2012-06-16 Thread Antoine Pitrou

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

 Thank you for pushing. :-)  Are you interested in a faster UTF-32 codec?

Not much :) I know you posted issues on that, but I think UTF-32 is
quite low priority.

--

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



[issue15068] fileinput requires two EOF when reading stdin

2012-06-16 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +flox

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



[issue15085] set.union accepts not set iterables for all but the first argument.

2012-06-16 Thread Stefan Krastanov

New submission from Stefan Krastanov krastanov.ste...@gmail.com:

 set.union(set([1,2]), [3])
set([1, 2, 3])

 set.union([1,2], [3])
TypeError: descriptor 'union' requires a 'set' object but received a 'list'


It seems a bit inconsistent. Is it justified somehow?

--
components: None
messages: 162962
nosy: krastanov-stefan
priority: normal
severity: normal
status: open
title: set.union accepts not set iterables for all but the first argument.
versions: Python 2.7

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



[issue15084] Add option to os.mkdir to not raise an exception for existing directories

2012-06-16 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

I looked into the code. Assuming it should be added, we're facing the fact that 
os.mkdir() is C code ATM and the handling of the error would require to 
implement it for NT and Unix separately.

Therefore it would make sense to add a Python os.mkdir() that handles this 
(basically try: _mkdir(dirname) except FileExistsError: pass) and make the C 
implementation private.

OTOH you could argue that if you just want to ensure that that a directory 
exists, you could just as well use os.makedirs() with exists_ok so I'm kind of 
-0 on the whole thing.

--
assignee: hynek - 
nosy: +loewis

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



[issue15084] Add option to os.mkdir to not raise an exception for existing directories

2012-06-16 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I agree that this is already covered by the exist_ok parameter (which is new to 
3.2). Existing code just hasn't been ported to this API.

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

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



[issue15050] Python 3.2.3 fail to make

2012-06-16 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Martin, do I understand that you are saying that this is not a Python
 problem, and should be closed?

No. I'm saying that I don't know whether it's a Python problem.
It hasn't been fully analyzed. I actually only suspect that it's
a misconfiguration.

--

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



[issue15075] XincludeTest failure in test_xml_etree

2012-06-16 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

No need, the cause for the segfault is known. What happens is that Element 
objects from the Python module get intermixed with Element objects from the C 
module, and these are incompatible. The C module traversal functions assume 
they can cast Elements to a known structure (ElementObject), and when they get 
the invalid Elements they crash. Adding runtime checks everywhere is too 
costly. This situation cannot arise in a valid way.

--

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Ezio Melotti

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


--
nosy: +ezio.melotti
stage:  - needs patch

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

Here is a patch (for Python 3.3).

--
keywords: +patch
nosy: +storchaka
Added file: http://bugs.python.org/file26025/tokenize_bytes.patch

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



[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-16 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

See also issue 13498.

--
nosy: +r.david.murray

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

Here is a patch for Python 2.

--
Added file: http://bugs.python.org/file26026/tokenize_bytes_py2.patch

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka

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


Removed file: http://bugs.python.org/file26025/tokenize_bytes.patch

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

And here is a better patch for Python 3.

--
Added file: http://bugs.python.org/file26027/tokenize_bytes_py3.patch

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



[issue15084] Add option to os.mkdir to not raise an exception for existing directories

2012-06-16 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Note that the implementation of makedirs exist_ok has a significant bug (issue 
13498) which renders it mostly useless in practice.  Parties interested in this 
issue might be interested in figuring out how to fix that bug :)

--
nosy: +r.david.murray

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



[issue15085] set.union accepts not set iterables for all but the first argument.

2012-06-16 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

By calling 'set.union' you are calling the method on the class.  When you call 
a method directly on a class object, you have to explicitly pass in 'self'.  
Thus the first argument when you call it like that must be a set object.

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue9679] unicode DNS names in urllib, urlopen

2012-06-16 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

The werkzeug.urls module has examples of such conversion IRI-to-URI:
https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/urls.py#L109,L205

--

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka

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


Removed file: http://bugs.python.org/file26027/tokenize_bytes_py3.patch

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

And here is an even better patch for Python 3.

--
Added file: http://bugs.python.org/file26028/tokenize_bytes_py3.patch

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



[issue805255] remove/discard method for dict objects.

2012-06-16 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +flox

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



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-06-16 Thread Hynek Schlawack

Changes by Hynek Schlawack h...@ox.cx:


--
nosy: +hynek

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



[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Serhiy Storchaka

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


--
nosy: +storchaka

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



[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Antoine Pitrou

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


--
nosy: +eli.bendersky

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



[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-06-16 Thread Éric Araujo

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


--
nosy: +eric.araujo

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



[issue15048] Manually Installed Python Includes System Wide Paths

2012-06-16 Thread Éric Araujo

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


--
nosy: +eric.araujo

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



[issue14850] The inconsistency of codecs.charmap_decode

2012-06-16 Thread Antoine Pitrou

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


--
nosy: +ezio.melotti

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



[issue15063] Source code links for JSON documentation

2012-06-16 Thread Éric Araujo

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

The source links were added by Raymond for selected modules that he judged 
readable, well-written and useful companions to the documentation.  For the 
json.encoder and decoder modules, I don’t think this is the case: the rst doc 
should explain well the behavior of the default encoder/decoder and how to 
subclass to change this behavior.  Did you see something interesting in the 
code?  I only had a look through it quickly, and saw the mix of C and Python 
code (which can be non-trivial to follow) and a dubious idiom (binding globals 
as locals to optimize access on CPython—doesn’t work on PyPy).  My opinion is 
-1; what do other people think?

--
nosy: +eric.araujo, rhettinger
versions: +Python 2.7, Python 3.2

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



[issue15062] argparse: option for a positional argument

2012-06-16 Thread Éric Araujo

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

I wouldn’t use the syntax used by find, dd or other very old and peculiar 
commands as an example for anything new :)

--
nosy: +eric.araujo

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



[issue14874] Faster charmap decoding

2012-06-16 Thread Antoine Pitrou

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


--
nosy: +loewis

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



[issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection in certain unknown cases.

2012-06-16 Thread George Stephanos

George Stephanos gaf.stepha...@gmail.com added the comment:

I can confirm that. I built a 1.0.1c version of both _ssl.pyd and _ssl.lib  and 
now the problem's solved (they're attached if ever needed). Thanks!
Can't the next Python 2.7 release include 1.0.1c instead ?

--
Added file: http://bugs.python.org/file26029/_ssl.zip

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Éric Araujo

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


--
nosy: +meador.inge
stage: needs patch - test needed

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



[issue15008] PEP 362 Signature Objects reference implementation

2012-06-16 Thread Éric Araujo

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

One small thing: can we find a name for the function that starts with a verb?  
It’s the recommended naming style for functions, and would help making a 
difference between the class and the function.  I also expect people to use 
“signature” and “sig” for their instances.

--

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



[issue15063] Source code links for JSON documentation

2012-06-16 Thread Ezio Melotti

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


--
nosy: +ezio.melotti
resolution:  - rejected

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



[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

Out of curiosity, why don't the constituents of Element (i.e. the tag, the 
attributes dict, etc.) count for its size?

--

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



[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Stefan Krah

New submission from Stefan Krah stefan-use...@bytereef.org:

The Ubuntu shared buildbot fails to run the tests:

 using PTY: True
./python: error while loading shared libraries: libpython3.3dm.so.1.0: cannot 
open shared object file: No such file or directory
make: *** [Python/importlib.h] Error 127



034c814eb187 was O.K., as far as the logs are still visible the error
first appears in 240b7467e65c .

--
components: Tests
keywords: buildbot
messages: 162981
nosy: skrah
priority: normal
severity: normal
stage: needs patch
status: open
title: Ubuntu bot: error while loading shared libraries
type: behavior
versions: Python 3.3

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



[issue15036] mailbox.mbox fails to pop two items in a row, flushing in between

2012-06-16 Thread Petri Lehtinen

Petri Lehtinen pe...@digip.org added the comment:

Yes, this is what I tried to say. It's hard for me to find a good
wording, so what would you suggest?

I also noticed now that there's a typo in the commit messages. But
those cannot be fixed anymore.

--

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



[issue15062] argparse: option for a positional argument

2012-06-16 Thread Georg Brandl

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

What alternate syntax would you suggest for a find type command then (other 
than replacing -long by --long)?

--
nosy: +georg.brandl

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



[issue14657] Avoid two importlib copies

2012-06-16 Thread Antoine Pitrou

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

Unless someone plans to do further work on this, I'd like to commit 
unique_importlib3.patch. A working solution is better than nothing.

--

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



[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

__sizeof__ is supposed to account for just the object, not for the size of any 
object it refers to. If you want to compute total memory consumption, you 
should get a list of all objects, and then sum up __sizeof__. If some object 
would also include some of its referents, there would be a danger of accounting 
some memory twice.

--

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



[issue15036] mailbox.mbox fails to pop two items in a row, flushing in between

2012-06-16 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Mailbox no longer throws an error if a flush is done between operations when 
removing or changing multiple items in mbox, MMDF, or Babyl mailboxes.

--

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



[issue14928] Fix importlib bootstrapping issues

2012-06-16 Thread Antoine Pitrou

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

Here is a patch for the separate C executable approach. There are a couple of 
small complications in order to avoid any circular dependency (either at the 
Makefile level, or at the _frozen_importlib / Py_Initialize level).

The proposed -X or BOOTSTRAP_PY approaches would be difficult, since there 
doesn't appear to be an easy way to generate a given file (the Python 
interpreter) twice in a Makefile dependency chain: the first time using the 
stale importlib, the second with the fresh importlib.

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

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

Patches updated with tests.

--
Added file: http://bugs.python.org/file26031/tokenize_bytes_py2-2.patch
Added file: http://bugs.python.org/file26032/tokenize_bytes_py3-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15054
___diff -r 412c7daed0db Lib/test/test_tokenize.py
--- a/Lib/test/test_tokenize.py Thu Jun 14 00:36:54 2012 +0200
+++ b/Lib/test/test_tokenize.py Sat Jun 16 23:28:52 2012 +0300
@@ -278,6 +278,31 @@
 OP '+'   (1, 32) (1, 33)
 STRING 'URABC' (1, 34) (1, 41)
 
+ dump_tokens(b'abc' + B'abc')
+STRING b'abc'  (1, 0) (1, 6)
+OP '+'   (1, 7) (1, 8)
+STRING B'abc'  (1, 9) (1, 15)
+ dump_tokens('babc + Babc')
+STRING 'babc'  (1, 0) (1, 6)
+OP '+'   (1, 7) (1, 8)
+STRING 'Babc'  (1, 9) (1, 15)
+ dump_tokens(br'abc' + bR'abc' + Br'abc' + BR'abc')
+STRING br'abc' (1, 0) (1, 7)
+OP '+'   (1, 8) (1, 9)
+STRING bR'abc' (1, 10) (1, 17)
+OP '+'   (1, 18) (1, 19)
+STRING Br'abc' (1, 20) (1, 27)
+OP '+'   (1, 28) (1, 29)
+STRING BR'abc' (1, 30) (1, 37)
+ dump_tokens('brabc + bRabc + Brabc + BRabc')
+STRING 'brabc' (1, 0) (1, 7)
+OP '+'   (1, 8) (1, 9)
+STRING 'bRabc' (1, 10) (1, 17)
+OP '+'   (1, 18) (1, 19)
+STRING 'Brabc' (1, 20) (1, 27)
+OP '+'   (1, 28) (1, 29)
+STRING 'BRabc' (1, 30) (1, 37)
+
 Operators
 
  dump_tokens(def d22(a, b, c=2, d=2, *k): pass)
diff -r 412c7daed0db Lib/tokenize.py
--- a/Lib/tokenize.py   Thu Jun 14 00:36:54 2012 +0200
+++ b/Lib/tokenize.py   Sat Jun 16 23:28:52 2012 +0300
@@ -70,10 +70,10 @@
 Single3 = r[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''
 # Tail end of  string.
 Double3 = r'[^\\]*(?:(?:\\.|(?!))[^\\]*)*'
-Triple = group([uU]?[rR]?''', '[uU]?[rR]?')
+Triple = group([uUbB]?[rR]?''', '[uUbB]?[rR]?')
 # Single-line ' or  string.
-String = group(r[uU]?[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*',
-   r'[uU]?[rR]?[^\n\\]*(?:\\.[^\n\\]*)*')
+String = group(r[uUbB]?[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*',
+   r'[uUbB]?[rR]?[^\n\\]*(?:\\.[^\n\\]*)*')
 
 # Because of leftmost-then-longest match semantics, be sure to put the
 # longest operators first (e.g., if = came before ==, == would get
@@ -91,9 +91,9 @@
 Token = Ignore + PlainToken
 
 # First (or only) line of ' or  string.
-ContStr = group(r[uU]?[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)* +
+ContStr = group(r[uUbB]?[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)* +
 group(', r'\\\r?\n'),
-r'[uU]?[rR]?[^\n\\]*(?:\\.[^\n\\]*)*' +
+r'[uUbB]?[rR]?[^\n\\]*(?:\\.[^\n\\]*)*' +
 group('', r'\\\r?\n'))
 PseudoExtras = group(r'\\\r?\n', Comment, Triple)
 PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name)
diff -r f6463dc5ead6 Lib/test/test_tokenize.py
--- a/Lib/test/test_tokenize.py Sat Jun 16 16:38:26 2012 +0200
+++ b/Lib/test/test_tokenize.py Sat Jun 16 23:28:44 2012 +0300
@@ -289,6 +289,82 @@
 OP '+'   (1, 29) (1, 30)
 STRING 'RABC'  (1, 31) (1, 37)
 
+ dump_tokens(u'abc' + U'abc')
+ENCODING   'utf-8'   (0, 0) (0, 0)
+STRING u'abc'  (1, 0) (1, 6)
+OP '+'   (1, 7) (1, 8)
+STRING U'abc'  (1, 9) (1, 15)
+ dump_tokens('uabc + Uabc')
+ENCODING   'utf-8'   (0, 0) (0, 0)
+STRING 'uabc'  (1, 0) (1, 6)
+OP '+'   (1, 7) (1, 8)
+STRING 'Uabc'  (1, 9) (1, 15)
+ dump_tokens(ur'abc' + uR'abc' + Ur'abc' + UR'abc')
+ENCODING   'utf-8'   (0, 0) (0, 0)
+STRING ur'abc' (1, 0) (1, 7)
+OP '+'   (1, 8) (1, 9)
+STRING uR'abc' (1, 10) (1, 17)
+OP '+'   (1, 18) (1, 19)
+STRING Ur'abc' (1, 20) (1, 27)
+OP '+'   (1, 28) (1, 29)
+STRING UR'abc' (1, 30) (1, 37)
+ dump_tokens('urabc + uRabc + Urabc + URabc')
+ENCODING   'utf-8'   (0, 0) (0, 0)
+STRING 'urabc' (1, 0) (1, 7)
+OP '+'   (1, 8) (1, 9)
+STRING 'uRabc' (1, 10) (1, 17)
+OP '+'   (1, 18) (1, 19)
+STRING 'Urabc' (1, 20) (1, 27)
+OP '+'   (1, 28) (1, 29)
+STRING 'URabc' (1, 30) (1, 37)
+
+ dump_tokens(b'abc' + B'abc')
+ENCODING   'utf-8'   (0, 0) (0, 0)
+STRING b'abc'  (1, 0) (1, 6)
+OP '+'   (1, 7) (1, 8)
+STRING B'abc'  (1, 9) (1, 15)
+ dump_tokens('babc + Babc')
+ENCODING   'utf-8'   (0, 0) (0, 0)
+STRING 'babc'  (1, 0) (1, 6)
+OP '+'   (1, 7) (1, 

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Antoine Pitrou

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


--
stage: test needed - patch review

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



[issue14874] Faster charmap decoding

2012-06-16 Thread Antoine Pitrou

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

Thank you for the patch! Now pushed to 3.3.

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

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



[issue14874] Faster charmap decoding

2012-06-16 Thread Roundup Robot

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

New changeset 8f3a5308f50b by Antoine Pitrou in branch 'default':
Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels.
http://hg.python.org/cpython/rev/8f3a5308f50b

--
nosy: +python-dev

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Meador Inge

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

The Python 3 patch looks OK, except that several of the tests are duplicated.  
I am looking at the Python 2 patch now.

--

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Meador Inge

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

Nevermind, the tests are OK.  I missed the swapped quotes.

--

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 The Python 3 patch looks OK, except that several of the tests are duplicated.

What tests?

--

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



[issue1229239] optionally allow mutable builtin types

2012-06-16 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Greg, I am closing this because you seem to have found an alternate solution 
and have dropped the issue. If you do want to pursue a change for 3.4, I 
suggest you refresh your patch and post to python-ideas (new list since you 
posted this). As a limited resource, flags are not casually added, and I know 
another request was recently denied on pydev.

--
nosy: +terry.reedy
resolution:  - out of date
stage: patch review - committed/rejected
status: open - closed

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



[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-16 Thread Serhiy Storchaka

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


--
nosy: +storchaka

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



[issue730473] Add Py_AtInit() startup hook for extenders

2012-06-16 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Patrick, its been 5 years since you promised a 2nd patch (which would now have 
to be against the current 3.3 tip). If you have lost interested, perhaps we 
should close this.

--
nosy: +terry.reedy
versions: +Python 3.4 -Python 3.2

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Meador Inge

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

Python 2 patch looks OK too.  I will commit these later today.  Thanks for the 
patches!

--

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

LGTM too. Thanks.

--

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



[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Antoine Pitrou

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


--
nosy: +brett.cannon

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



[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Rebuilding importlib.h fails:

--
Python/importlib.h needs to be rebuilt, but no interpreter
is available to do so. Leaving the previous version in
place. You may want to run ''make'' a second time after
this build is complete.
--


Is there an easy way to change the buildmaster to run 'make'
twice on this slave?

--
nosy: +pitrou

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



[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Roundup Robot

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

New changeset 3680b3423aa3 by Antoine Pitrou in branch 'default':
Try to fix issue #15086: build failure on Ubuntu shared buildbot.
http://hg.python.org/cpython/rev/3680b3423aa3

--
nosy: +python-dev

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



[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Antoine Pitrou

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

Looks fixed.

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

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



[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-16 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
assignee: rhettinger - loewis

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



[issue730473] Add Py_AtInit() startup hook for extenders

2012-06-16 Thread Patrick Miller

Patrick Miller patmil...@users.sourceforge.net added the comment:

Just languishing for lo on these 5 years

--
resolution:  - out of date
status: open - closed

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




[issue14657] Avoid two importlib copies

2012-06-16 Thread Eric Snow

Eric Snow ericsnowcurren...@gmail.com added the comment:

It's actually at the top of my list, but may still be a week or two until I can 
get to it.

--

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



[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-16 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
nosy: +larry

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



[issue14769] Add test to automatically detect missing format units in skipitem()

2012-06-16 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

Ping.  Benjamin, should I find another reviewer?

--

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



[issue15087] Add gzip function to read gzip'd strings

2012-06-16 Thread Raymond Hettinger

New submission from Raymond Hettinger raymond.hettin...@gmail.com:

The API for the gzip module is convenient for reading gzipped file but is 
rather awkward for reading bytes downloaded from a socket:

   import gzip, io
   from urllib.request import urlopen, Request
   u = urlopen(Request('http://www.nytimes.com', headers={'Accept-Encoding': 
'gzip'}))
   content = gzip.GzipFile(fileobj=io.BytesIO(u.read()), mode='rb').read()

It would be better if the last line could be written:

   content = gzip.decompress_file(u)

--
components: Library (Lib)
messages: 163004
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Add gzip function to read gzip'd strings
type: enhancement
versions: Python 3.3

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



[issue15087] Add gzip function to read gzip'd strings

2012-06-16 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

There is already such a function, gzip.decompress() - it was added in 3.2.

--
nosy: +nadeem.vawda
resolution:  - invalid
stage:  - committed/rejected
status: open - pending

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



[issue15078] Change os.sendfile so its arguments are stable

2012-06-16 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

I'm -0 about unifying the function signature and raise NotImplementedError 
where an arg is not supported.

I'm -1 about os.sendfile(..., diskio=True, wait=True, sync=False).

In both cases users willing to use these 3 args are already supposed to know 
what they're doing and that the code they're writing is not portable hence in 
practical terms I can't see a real gain in making a change.

--

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Roundup Robot

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

New changeset 35d3a8ed7997 by Meador Inge in branch '2.7':
Issue #15054: Fix incorrect tokenization of 'b' and 'br' string literals.
http://hg.python.org/cpython/rev/35d3a8ed7997

New changeset 115b0cb52c6c by Meador Inge in branch 'default':
Issue #15054: Fix incorrect tokenization of 'b' string literals.
http://hg.python.org/cpython/rev/115b0cb52c6c

--
nosy: +python-dev

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



[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


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

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



[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

Martin, thanks for the explanation. The patch LGTM, then.

Could it be useful to document this a bit more explicitly in the description of 
sys.getsizeof? The most intuitive thing to expect from it is to compute the 
*total* size including contained objects. So this is somewhat surprising:

 import sys
 sys.getsizeof([1, 2, 3])
96
 sys.getsizeof([1, 2, [10] * 500])
96

The last sentence in the doc of sys.getsizeof says: See recursive sizeof 
recipe for an example of using getsizeof() recursively to find the size of 
containers and all their contents., which can be taken as a hint, but maybe it 
could be just said straightforwardly. I.e before it, add: Note that getsizeof 
returns just the memory occupied by the object itself, not any contained 
objects it holds references to.

--
nosy: +ncoghlan

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



[issue1767933] Badly formed XML using etree and utf-16

2012-06-16 Thread Eli Bendersky

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


--
nosy: +eli.bendersky

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



[issue9458] xml.etree.ElementTree.ElementTree.write(): encoding handling problems

2012-06-16 Thread Eli Bendersky

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


--
nosy: +eli.bendersky

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



[issue13823] xml.etree.ElementTree.ElementTree.write - argument checking

2012-06-16 Thread Eli Bendersky

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


--
nosy: +eli.bendersky

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



[issue14928] Fix importlib bootstrapping issues

2012-06-16 Thread Meador Inge

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

Nice patch Antoine!  The method of partitioning the object sets into frozen and
non-frozen is nice.

 The proposed -X or BOOTSTRAP_PY approaches would be difficult, since there
 doesn't appear to be an easy way to generate a given file (the Python
 interpreter) twice in a Makefile dependency chain: the first time using the
 stale importlib, the second with the fresh importlib.

I experimented with the env var approach and came to the exact same conclusion
-- you would have to build the interpreter twice.

This patch looks good to me (I did have to rebase it against trunk, though;
it doesn't apply cleanly right now).  I did some basic regression testing and 
ran
it through the original scenario from issue12370 that got us thinking this 
problem.
I saw no issues.  Nice work.

--

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



[issue14657] Avoid two importlib copies

2012-06-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

+1 Antoine - your patch is better than the status quo, so it makes sense to 
apply it.

If Eric can make the other way work in time for 3.3, great, but at least we'll 
have a solid fallback position without it.

--

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



[issue14928] Fix importlib bootstrapping issues

2012-06-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Looks like a solid improvement to me.

One minor naming quibble is that FROZENLESS_LIBRARY_OBJS hurts my brain - 
would you mind switching it to something like LIBRARY_OBJS_OMIT_FROZEN?

--

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



[issue15088] PyGen_NeedsFinalizing is public, but undocumented

2012-06-16 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

Currently undocumented: http://docs.python.org/py3k/c-api/gen.html
Public API in a released version of Python: 
http://hg.python.org/cpython/file/3.2/Include/genobject.h

--
messages: 163012
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: PyGen_NeedsFinalizing is public, but undocumented

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



[issue15088] PyGen_NeedsFinalizing is public, but undocumented

2012-06-16 Thread Nick Coghlan

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


--
assignee:  - docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 3.2, Python 3.3

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



[issue13783] Clean up PEP 380 C API additions

2012-06-16 Thread Roundup Robot

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

New changeset cfbf6aa5c9e3 by Nick Coghlan in branch 'default':
Issue #13783: the PEP 380 implementation no longer expands the public C API
http://hg.python.org/cpython/rev/cfbf6aa5c9e3

--
nosy: +python-dev

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



[issue14215] http://www.python.org/dev/peps/ title is python.org

2012-06-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

This is actually related to the integration between the PEP formatting tools 
and the python.org build system (that is, pep2pyramid.py, rather than 
genpepindex.py)

I'm inclined to close it as won't fix and maybe pass it to the psf-redesign 
list to look into as part of the python.org RFP.

--
nosy: +michael.foord

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



[issue14991] Option for regex groupdict() to show only matching names

2012-06-16 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

Just a thought--how about a new constant in the re module:
SUPPRESSED=object()
and have the interface be
mo.groupdict(default=re.SUPPRESSED)

--
nosy: +larry

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



[issue13783] Clean up PEP 380 C API additions

2012-06-16 Thread Roundup Robot

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

New changeset 438b861e2edb by Nick Coghlan in branch 'default':
Issue #13783: PEP 380 cleanup part 2, using the new identifier APIs in the 
generator implementation
http://hg.python.org/cpython/rev/438b861e2edb

--

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



[issue13783] Clean up PEP 380 C API additions

2012-06-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

I left the name of the new private API as _PyGen_FetchStopIterationValue. If 
anyone wants to make it public, they can raise a new issue to give it a more 
appropriate name (and move the definition accordingly).

PyStopIteration_Create is simply gone, replaced by the underlying call.

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

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



[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2012-06-16 Thread Nick Coghlan

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


--
assignee: ncoghlan - 

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



[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2012-06-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Given the imminent 3.3 beta 1 feature freeze and the fact I would like to 
explore Ron's suggestion of a higher level ByteCode object to encapsulate a 
sequence of instructions (along with additional information from the code 
object), postponing this one.

--
assignee: ncoghlan - 
versions: +Python 3.4 -Python 3.3

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