[issue5723] Incomplete json tests

2011-04-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

Some tests for py_make_scanner have been added in c3ad883b940b.

I agree that having the tested method as an attribute of the class and changing 
it on a different subclass is the best approach, but it's not currently done by 
the json tests.
Do you think the test should be refactored to use this approach?  This will 
also make easier to skip _json-specific tests when _json is not available and 
for other Python implementations.

--

___
Python tracker 

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



[issue10976] json.loads() throws TypeError on bytes object

2011-04-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

Now it's too late for 3.2, should this be done for 3.3?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue9101] reference json format in file formats chapter

2011-04-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

The json module is listed in the Internet Data Handling section[0], and the 
description says:
"""
This chapter describes modules which support handling data formats commonly 
used on the Internet.
"""
This seems OK for json.


The File Format section[1] says:
"""
The modules described in this chapter parse various miscellaneous file formats 
that aren’t markup languages and are not related to e-mail.
"""
And this description might work for json too.

I'm not sure it's worth moving it though.


[0]: http://docs.python.org/py3k/library/netdata.html
[1]: http://docs.python.org/py3k/library/fileformats.html

--
nosy: +ezio.melotti, georg.brandl

___
Python tracker 

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



[issue11806] Missing 2 hyphens in the docs

2011-04-13 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

Georg Brandl, please fix this typos. You would understand. Thank you.

--
Added file: http://bugs.python.org/file21643/unnamed

___
Python tracker 

___Georg Brandl, please fix this typos. You would understand. Thank you.
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10332] Multiprocessing maxtasksperchild results in hang

2011-04-13 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

This problem arises because the pool's close method is called before all the 
tasks have completed. Putting a sleep(1) before pool.close() won't exhibit this 
lockup.
The root cause is that close makes the workers handler thread exit: since the 
maxtasksperchild argument is used, workers exit when they've processed their 
max number of tasks. But since the workers handler thread exited, it doesn't 
maintain the pool of workers anymore, and thus the remaining tasks are not 
treated anymore, and the task handler thread waits indefinitely (since it waits 
until the cache is empty).
The solution is to prevent the worker handler thread from exiting until the 
cache has been drained (unless the pool is terminated in which case it must 
exit right away).
Attached is a patch and relevant test.

Note: I noticed that there are some thread-unsafe operations (the cache that 
can be modified from different threads, and thread states are modified also 
from different threads). While this isn't an issue with the current cPython 
implementation (GIL), I wonder if this should be fixed.

--
keywords: +patch
nosy: +neologix
Added file: http://bugs.python.org/file21644/pool_lifetime_close.diff

___
Python tracker 

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



[issue9101] reference json format in file formats chapter

2011-04-13 Thread anatoly techtonik

anatoly techtonik  added the comment:

JSON is not file format, it is data-interchange format.

--

___
Python tracker 

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



[issue4783] document that json.load/dump can’t be used twice on the same stream

2011-04-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

Attached patch adds a note about the effects of using dump several times on the 
same file.

--
keywords: +easy, needs review, patch
nosy: +ezio.melotti
stage:  -> patch review
Added file: http://bugs.python.org/file21645/issue4783.diff

___
Python tracker 

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



[issue9101] reference json format in file formats chapter

2011-04-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

We don't have a "Data-interchange Formats" section, so the "Internet Data 
Handling" section seems more appropriate than the "File Formats" one, right?

--

___
Python tracker 

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



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

2011-04-13 Thread Ezio Melotti

Changes by Ezio Melotti :


Removed file: http://bugs.python.org/file21135/unnamed

___
Python tracker 

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



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

2011-04-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue9101] reference json format in file formats chapter

2011-04-13 Thread anatoly techtonik

anatoly techtonik  added the comment:

Right.

--

___
Python tracker 

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



[issue9101] reference json format in file formats chapter

2011-04-13 Thread anatoly techtonik

anatoly techtonik  added the comment:

But having a reference from File Formats will help people find this information 
easier.

--

___
Python tracker 

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



[issue8426] multiprocessing.Queue fails to get() very large objects

2011-04-13 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

It's documented in 
http://docs.python.org/library/multiprocessing.html#multiprocessing-programming 
:
"""
Joining processes that use queues

Bear in mind that a process that has put items in a queue will wait before 
terminating until all the buffered items are fed by the “feeder” thread to the 
underlying pipe. (The child process can call the Queue.cancel_join_thread() 
method of the queue to avoid this behaviour.)

This means that whenever you use a queue you need to make sure that all items 
which have been put on the queue will eventually be removed before the process 
is joined. Otherwise you cannot be sure that processes which have put items on 
the queue will terminate. Remember also that non-daemonic processes will be 
automatically be joined.
"""

Suggesting to close.

--

___
Python tracker 

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



[issue6766] Cannot modify dictionaries inside dictionaries using Managers from multiprocessing

2011-04-13 Thread Darío Suárez Gracia

Darío Suárez Gracia  added the comment:

Hello,
Trying to share a dictionary of dictionaries of lists with a manager I get the 
same problem with the patch applied in Python 2.7 (r27:82500, Nov 24 2010, 
18:24:29) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2.

The shared variable in results and what I'm trying to do is simultaneously 
parsing multiple files.

The quality of the code is not very good because I'm a newbie python programmer.

Best regards,
Darío

--
nosy: +dariosg
Added file: http://bugs.python.org/file21646/test_dict_dict_arrays.py

___
Python tracker 

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



[issue11841] Bug in the verson comparison

2011-04-13 Thread Tarek Ziadé

New submission from Tarek Ziadé :

The NormalizedVersion class is not correctly sorting rc1:

>>> from packaging.version import NormalizedVersion
>>> NormalizedVersion('0.7.0') < NormalizedVersion('0.7.0rc1')
True
>>> NormalizedVersion('0.7.0rc1')
NormalizedVersion('0.7rc1')
>>> NormalizedVersion('0.7.0') < NormalizedVersion('0.7.0a1')
False
>>> NormalizedVersion('0.7.0') < NormalizedVersion('0.7.0c1')
False

--
assignee: tarek
components: Distutils2
messages: 133656
nosy: alexis, brett.cannon, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: Bug in the verson comparison
type: behavior
versions: Python 3.3

___
Python tracker 

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



[issue10121] test_multiprocessing stuck in test_make_pool if run in a loop

2011-04-13 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

It's probably a duplicate of http://bugs.python.org/issue8428
It would be nice if you could try to reproduce it with a py3k snapshot though, 
just to be sure.

--
nosy: +neologix

___
Python tracker 

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



[issue9101] reference json format in file formats chapter

2011-04-13 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr.  added the comment:

And what are these people looking for?  "json"?  If so, there's
already an entry in the module index.  That seems sufficient.

--
nosy: +fdrake

___
Python tracker 

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



[issue11701] email.parser.BytesParser().parse() closes file argument

2011-04-13 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

This patch fixes the problem.
It was introduced in e727cf35.

David Murray, i've looked into test_email.py to add tests
for this, and i found TestIdempotent().
What i would do is try to split that thing up so that it covers
str() as well as bytes(), rewriting ._msgobj() to use a xy
parser instance so that the file-argument-is-not-closed test
could be embedded in there as a side-effect.

This is however your area, so please let me know if i may
touch this or if you have local modifications to this one
which will make my snail-slow work on it pointless.
Thanks.

--
keywords: +patch
nosy: +brett.cannon
title: email.parser.BytesParser() uses TextIOWrapper -> 
email.parser.BytesParser().parse() closes file argument
Added file: http://bugs.python.org/file21647/11701.1.diff

___
Python tracker 

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



[issue11700] mailbox.py proxy updates

2011-04-13 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Amaury Forgeot d'Arc wrote:
> mbf.close() should not fail when called twice. The close() method in the > io 
> module states that "This method has no effect if the file is already > 
> closed."
> But then, is "close=False" necessary?

I see you've detached.

--

___
Python tracker 

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



[issue11806] Missing 2 hyphens in the docs

2011-04-13 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

Also, please fix the main title of the argparse section...

from
15.4. argparse
—
Parser for command line options, arguments and sub-commands
to
15.4. argparse
—
Parser for command-line options, arguments and sub-commands
Please note the added hyphen (-) for the word command-line. Since this is
actually one word, it needs the hyphen. This is not Python related, but is
orthology related. Please fix all this documentation imprecisions in the
section argparse. Won't take a minute.

--
Added file: http://bugs.python.org/file21648/unnamed

___
Python tracker 

___Also, please fix the main title of the argparse 
section...from
15.4. http://docs.python.org/dev/library/argparse.html#module-argparse"; 
title="argparse: Command-line option and argument parsing library." 
style="color: rgb(53, 95, 124); text-decoration: none; ">argparse — 
Parser for command line options, arguments and sub-commands
to
15.4. http://docs.python.org/dev/library/argparse.html#module-argparse"; 
title="argparse: Command-line option and argument parsing library." 
style="color: rgb(53, 95, 124); text-decoration: none; ">argparse — 
Parser for command-line options, arguments and sub-commands
Please note the added hyphen (-) for the word command-line. Since 
this is actually one word, it needs the hyphen. This is not Python related, but 
is orthology related. Please fix all this documentation imprecisions in the 
section argparse. Won't take a minute.

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



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

2011-04-13 Thread STINNER Victor

STINNER Victor  added the comment:

print(repr(json.loads(json.dumps({u"my_key": u'\uda00'}))['my_key'])):
 - displays u'\uda00' in Python 2.7, 3.2 and 3.3
 - raises a ValueError('Invalid \u escape: ...') on loads() in Python 2.6
 - raises a ValueError('Unpaired high surrogate: ...') on loads() in Python 3.1

json version changed in Python 2.7: see the issue #4136.

See also this important change in simplejson:
http://code.google.com/p/simplejson/source/detail?r=113

We only fix security bugs in Python 2.6, not bugs. I don't think that this 
issue is a security bug in Python 2.6.

We might change Python 3.1 behaviour.

--

___
Python tracker 

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



[issue11806] Missing 2 hyphens in the docs

2011-04-13 Thread Eli Bendersky

Eli Bendersky  added the comment:

On Wed, Apr 13, 2011 at 14:54, Boštjan Mejak  wrote:
>
> Boštjan Mejak  added the comment:
>
> Also, please fix the main title of the argparse section...
>
> from
> 15.4. 
> argparse
> —
> Parser for command line options, arguments and sub-commands
> to
> 15.4. 
> argparse
> —
> Parser for command-line options, arguments and sub-commands
> Please note the added hyphen (-) for the word command-line. Since this is
> actually one word, it needs the hyphen. This is not Python related, but is
> orthology related. Please fix all this documentation imprecisions in the
> section argparse. Won't take a minute.
>

Boštjan, please stop this trolling. You were told by two core-devs
that it won't be fixed. There's no use keeping spamming the mailing
list.

A short googling shows that the jury is still out on the question of
whether command-line is more correct than command line. Some places
use a hyphen, some don't. This really isn't important enough to call
for hunting out hyphen-less spellings throughout the docs.

If you want to contribute to Python, please find issues with substance
to raise. As it is now, you're only harming Python by wasting the time
of core developers.

Eli

--
nosy: +eli.bendersky

___
Python tracker 

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



[issue11701] email.parser.BytesParser().parse() closes file argument

2011-04-13 Thread R. David Murray

R. David Murray  added the comment:

For easy reference, here's a hash for that changeset that roundup will turn 
into a link: e727cf354720.

TestIdempotent is already run for both the bytes and str cases (they are widely 
separated in the test file...I'll fix that at some point).

--

___
Python tracker 

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



[issue8809] smtplib should support SSL contexts

2011-04-13 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +r.david.murray

___
Python tracker 

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



[issue11701] email.parser.BytesParser().parse() closes file argument

2011-04-13 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

On Wed, Apr 13, 2011 at 01:07:28PM +, R. David Murray wrote:
> TestIdempotent is already run for both the bytes and str cases

(*^.^*)
Ouch.  Searching is only for the experienced.

--

___
Python tracker 

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



[issue11701] email.parser.BytesParser().parse() closes file argument

2011-04-13 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

So i'll changed the existing message_from_(binary_)?file() tests
to also test the file closing.

--
Added file: http://bugs.python.org/file21649/11701.2.diff

___
Python tracker 

___diff --git a/Lib/email/parser.py b/Lib/email/parser.py
--- a/Lib/email/parser.py
+++ b/Lib/email/parser.py
@@ -100,9 +100,9 @@
 meaning it parses the entire contents of the file.
 """
 fp = TextIOWrapper(fp, encoding='ascii', errors='surrogateescape')
-with fp:
-return self.parser.parse(fp, headersonly)
-
+msg = self.parser.parse(fp, headersonly)
+fp.detach()
+return msg
 
 def parsebytes(self, text, headersonly=False):
 """Create a message structure from a byte string.
diff --git a/Lib/test/test_email/test_email.py 
b/Lib/test/test_email/test_email.py
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -2268,16 +2268,18 @@
 self.assertEqual(text, s.getvalue())
 
 def test_message_from_file(self):
-with openfile('msg_01.txt') as fp:
-text = fp.read()
-fp.seek(0)
-msg = email.message_from_file(fp)
-s = StringIO()
-# Don't wrap/continue long headers since we're trying to test
-# idempotency.
-g = Generator(s, maxheaderlen=0)
-g.flatten(msg)
-self.assertEqual(text, s.getvalue())
+fp = openfile('msg_01.txt')
+text = fp.read()
+fp.seek(0)
+msg = email.parser.Parser().parse(fp)
+self.assertFalse(fp.closed)
+fp.close()
+s = StringIO()
+# Don't wrap/continue long headers since we're trying to test
+# idempotency.
+g = Generator(s, maxheaderlen=0)
+g.flatten(msg)
+self.assertEqual(text, s.getvalue())
 
 def test_message_from_string_with_class(self):
 unless = self.assertTrue
@@ -3181,9 +3183,11 @@
 self.addCleanup(unlink, fn)
 with open(fn, 'wb') as testfile:
 testfile.write(self.non_latin_bin_msg)
-with open(fn, 'rb') as testfile:
-m = email.parser.BytesParser().parse(testfile)
+fp = open(fn, 'rb')
+m = email.parser.BytesParser().parse(fp)
+self.assertFalse(fp.closed)
 self.assertEqual(str(m), self.non_latin_bin_msg_as7bit)
+fp.close()
 
 latin_bin_msg = textwrap.dedent("""\
 From: f...@bar.com
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10332] Multiprocessing maxtasksperchild results in hang

2011-04-13 Thread Jesse Noller

Jesse Noller  added the comment:

> Note: I noticed that there are some thread-unsafe operations (the cache that 
> can be modified from different threads, and thread states are modified also 
> from different threads). While this isn't an issue with the current cPython 
> implementation (GIL), I wonder if this should be fixed.
>

Yes. We should fix those.

--

___
Python tracker 

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



[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-04-13 Thread Éric Araujo

Éric Araujo  added the comment:

The wording “pydoc ignores a module” is confusing to me: I can’t tell whether 
it is a description of the bug (“pydoc ignored a module”) or the new, correct 
behavior (“pydoc now ignores a module”).

Regarding the problem and fix itself, I’m wondering.  If a user unknowingly 
creates such a module with an unencodable filename, will they understand why 
pydoc does not display it?

--
nosy: +eric.araujo, lemburg, loewis

___
Python tracker 

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



[issue11828] startswith and endswith don't accept None as slice index

2011-04-13 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Some comments posted in the review.

Could you possibly post a patch for 2.7 too?.

Thanks.

If any other reviewer agree, I will commit the patch.

--

___
Python tracker 

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



[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-04-13 Thread STINNER Victor

STINNER Victor  added the comment:

> If a user unknowingly creates such a module with an unencodable
> filename, will they understand why pydoc does not display it?

It is really a bad idea to choose an *undecodable* name for a module. You will 
not be able to write its name using "import name" syntax.

(It is possible to import such module using __import__, but it is just ugly)

For the changelog, feel free to rephrase it.

--

___
Python tracker 

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



[issue3051] heapq change breaking compatibility

2011-04-13 Thread Éric Araujo

Éric Araujo  added the comment:

The global docs index has one entry for “comparison”, which is 
http://docs.python.org/dev/reference/expressions#not-in
This other page says that “in general, __lt__() and __eq__() are sufficient, if 
you want the conventional meanings of the comparison operators”: 
http://docs.python.org/dev/library/stdtypes.html#comparisons

Other useful bits:
http://docs.python.org/dev/reference/datamodel#object.__lt__
http://docs.python.org/dev/library/functions#sorted
http://docs.python.org/dev/library/functools#functools.cmp_to_key
http://docs.python.org/dev/howto/sorting#odd-and-ends

It may be useful to add more cross-links between those places (especially 
pointing to the first link).

--
nosy: +eric.araujo

___
Python tracker 

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



[issue10976] json.loads() throws TypeError on bytes object

2011-04-13 Thread Éric Araujo

Éric Araujo  added the comment:

If you’re talking about deprecating the obsolete encoding argument (maybe it’s 
time for a new bug report), +1.

--
versions:  -Python 3.1

___
Python tracker 

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



[issue11827] mention of list2cmdline() in docs of subprocess.Popen

2011-04-13 Thread Éric Araujo

Éric Araujo  added the comment:

LGTM.

--
versions: +Python 2.7, Python 3.1, Python 3.3

___
Python tracker 

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



[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

2011-04-13 Thread Éric Araujo

Éric Araujo  added the comment:

Can someone explain how it can happen that a user has no home directory?

--

___
Python tracker 

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



[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

2011-04-13 Thread Brian Bi

Brian Bi  added the comment:

I discovered this while I was implementing and testing a sandbox for automatic 
evaluation of programs.

--

___
Python tracker 

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



[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

2011-04-13 Thread Éric Araujo

Éric Araujo  added the comment:

Can you be more precise?  IOW, why is this a Python bug rather than a system 
misconfiguration?  Note that I don’t know a lot about POSIX, so I’m open to 
change my mind.

--
stage: needs patch -> 
versions: +Python 3.3

___
Python tracker 

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



[issue10399] AST Optimization: inlining of function calls

2011-04-13 Thread Armin Rigo

Changes by Armin Rigo :


--
nosy:  -arigo

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-13 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

> By the way, at this point I think we could simply skip the test on BSDs
> and OS X. The tested functionality is cross-platform, so testing under
> a limited set of systems should be ok.

Another solution would be to rewrite the test to not use mmap() at all:

@precisionbigmemtest(size=_4G + 4, memuse=1)
def test_big_buffer(self, size):
if size < _4G + 4:
self.skipTest("not enough free memory, need at least 4 GB")
data = bytearray(_4G + 4)
data[-4:] = b"asdf"
self.assertEqual(zlib.crc32(data), 3058686908)
self.assertEqual(zlib.adler32(data), 82837919)

This is more consistent with the other bigmem tests in test_zlib, but
I'm guessing it will mean that the test gets run much less often (since a
lot of machines won't have enough memory). If that's OK, then I'd prefer
doing it this way (since it keeps things simpler). Otherwise, skipping
the test on OS X sounds fine to me.

--

___
Python tracker 

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



[issue11841] Bug in the verson comparison

2011-04-13 Thread Filip Gruszczyński

Filip Gruszczyński  added the comment:

Here is a patch that I made against distutils2 tip. I have changed 
_FINAL_MARKER from 'f' to 'z', which works with rc. Also I have added constant 
_FINAL_MARKER_CHAR, since later in the code you make a check against 'f' and it 
surprised me a little at first. There are also tests in the patch. I hope it's 
good to make patch against the distutils2, since I couldn't yet find packaging 
in cpython default branch.

--
keywords: +patch
nosy: +gruszczy
Added file: http://bugs.python.org/file21650/11841.patch

___
Python tracker 

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



[issue11828] startswith and endswith don't accept None as slice index

2011-04-13 Thread Torsten Becker

Torsten Becker  added the comment:

> Some comments posted in the review.

I'm not sure if my review reply got mailed as I did not get a copy and nothing 
showed up here.  I added some responses/follow up questions in the review.

> Could you possibly post a patch for 2.7 too?.

Sure, I'll write the next version against 3.3 and 2.7

--

___
Python tracker 

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



[issue11828] startswith and endswith don't accept None as slice index

2011-04-13 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

I got your comments, Torsten. I finds funny too that the tracker is not 
notified.

I wrote new comments too, but not using "the right way", so now I am the one 
not sure you got them... :-)

Go for the 3.3/2.7 patch. Thanks.

--

___
Python tracker 

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



[issue11828] startswith and endswith don't accept None as slice index

2011-04-13 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Better to have a 3.1/2.7 patch. The current workflow requires to patch the old 
version first (3.1), and up-port the change to 3.2 and 3.3.

So, 2.7 and 3.1 would be more useful. Al least if the patch applies to 3.2 and 
3.3 easily. If major surgery is needed, let me know.

PS: If you use mercurial, try to upload the patch directly from it. See the 
"Remote hg repo" box.

--

___
Python tracker 

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



[issue3051] heapq change breaking compatibility

2011-04-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 103a2eb61069 by Raymond Hettinger in branch '2.7':
Issue 3051: make pure python code pass the same tests as the C version.
http://hg.python.org/cpython/rev/103a2eb61069

--
nosy: +python-dev

___
Python tracker 

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



[issue3051] heapq change breaking compatibility

2011-04-13 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Maciek, I added the compatability code to the Python version as requested.  Now 
the tests pass for both versions.  There is still work to be done to 
automatically run both versions against the test suite.

--

___
Python tracker 

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



[issue7484] smtplib: verify breaks with Postfix servers

2011-04-13 Thread Felipe Cruz

Felipe Cruz  added the comment:

David..

I extracted quoteaddr code to _addrformat and now quoteaddr and _addronly call 
_addrformat passing a format (<%s> or %s).

I've also created quoteaddr and _addronly test functions as well modified VRFY 
and EXPN tests to make sure they call _addronly and pointed brackets aren't 
added.

Let me know if those patches still need improvements.

--
Added file: http://bugs.python.org/file21651/issue7484-py3k_2.diff

___
Python tracker 

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



[issue7484] smtplib: verify breaks with Postfix servers

2011-04-13 Thread Felipe Cruz

Changes by Felipe Cruz :


Added file: http://bugs.python.org/file21652/issue7484-27_2.diff

___
Python tracker 

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



[issue3051] heapq change breaking compatibility

2011-04-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 83e4765ec4cb by Raymond Hettinger in branch '3.2':
Issue 3051: make pure python code pass the same tests as the C version.
http://hg.python.org/cpython/rev/83e4765ec4cb

--

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-13 Thread R. David Murray

R. David Murray  added the comment:

OK, so when I went to apply this, I figured out that the patch isn't quite 
right.  I've redone the doc updates, and am attaching a version of the patch 
containing them.

The issue is that the place that the IDNA decode support needs to be added 
isn't in parseaddr, it's in _parseaddr.py's AddresslistClass.  Tests are then 
needed to make sure that the IDNA decoding gets done both when parseaddr and 
getaddresslist are used.

Do you want to tackle this, Torsten?

--
Added file: http://bugs.python.org/file21653/email_address_idna.patch

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-13 Thread Stefan Krah

Stefan Krah  added the comment:

Just to give another data point: A couple of days ago I reduced the
memory on the AMD64 FreeBSD bot to (375MB RAM, 2GB swap) and the zlib
tests still pass.

--

___
Python tracker 

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



[issue4783] document that json.load/dump can’t be used twice on the same stream

2011-04-13 Thread Bryce Verdier

Bryce Verdier  added the comment:

Not to nitpick, but what about the wording used in the simplejson documentation 
that Bob wrote almost 3 years ago? 

Note
JSON is not a framed protocol so unlike pickle or marshal it does not make 
sense to serialize more than one JSON document without some container protocol 
to delimit them

I also feel that it sounds a little bit cleaner.

http://simplejson.github.com/simplejson/#simplejson.dump

--
nosy: +louiscipher

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Another solution would be to rewrite the test to not use mmap() at all:
> 
> @precisionbigmemtest(size=_4G + 4, memuse=1)
> def test_big_buffer(self, size):
> if size < _4G + 4:
> self.skipTest("not enough free memory, need at least 4 GB")
> data = bytearray(_4G + 4)
> data[-4:] = b"asdf"
> self.assertEqual(zlib.crc32(data), 3058686908)
> self.assertEqual(zlib.adler32(data), 82837919)
> 
> This is more consistent with the other bigmem tests in test_zlib, but
> I'm guessing it will mean that the test gets run much less often (since a
> lot of machines won't have enough memory). If that's OK, then I'd prefer
> doing it this way (since it keeps things simpler).

I think there's basically noone and nothing (even among the buildbots)
that runs bigmem tests on a regular basis, so I'd much rather keep the
mmap() solution, even if that means it must be skipped on OS X.

--

___
Python tracker 

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



[issue11684] Add email.parser.BytesHeaderParser

2011-04-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a95d936ce8eb by R David Murray in branch 'default':
#11684: Complete parser bytes interface by adding BytesHeaderParser
http://hg.python.org/cpython/rev/a95d936ce8eb

--
nosy: +python-dev

___
Python tracker 

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



[issue11782] email.generator.Generator.flatten() fails

2011-04-13 Thread R. David Murray

R. David Murray  added the comment:

I applied this as part of #11684.  Thanks.

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue11806] Missing 2 hyphens in the docs

2011-04-13 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

If you'd look into the English dictionary, you'd find words like
coffee-table and command-line and built-in and user-friendly. The main
bother in this issue is the inconsistency with the wording "command-line".
Somewhere under the argparse section of the docs it is "command line" and
then shortly after it is "command-line". Make up your mind and be consistent
with one wording. I propose to let it be "command-line" as the major
dictionary of English language writes it, with a hyphen that is. Thank you.

--
Added file: http://bugs.python.org/file21654/unnamed

___
Python tracker 

___If you'd look into the English dictionary, you'd find words like 
coffee-table and command-line and built-in and user-friendly. The main bother 
in this issue is the inconsistency with the wording "command-line". 
Somewhere under the argparse section of the docs it is "command line" 
and then shortly after it is "command-line". Make up your mind and be 
consistent with one wording. I propose to let it be "command-line" as 
the major dictionary of English language writes it, with a hyphen that is. 
Thank you.
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11684] Add email.parser.BytesHeaderParser

2011-04-13 Thread R. David Murray

R. David Murray  added the comment:

Thanks for correcting my oversight :)

--
resolution:  -> accepted
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



[issue11684] Add email.parser.BytesHeaderParser

2011-04-13 Thread R. David Murray

Changes by R. David Murray :


--
versions:  -Python 3.2

___
Python tracker 

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



[issue11842] slice.indices with negative step and default stop

2011-04-13 Thread Daniel Urban

New submission from Daniel Urban :

slice.indices behaves strangely with negative step and default stop values 
(note that the doc says that it "computes information about the slice that the 
slice object would describe if applied to a sequence of length items"):

>>> s = slice(None, None, -2)
>>> s.indices(10)
(9, -1, -2)
>>> list(range(10))[9:-1:-2]
[]
>>> list(range(10))[s]
[9, 7, 5, 3, 1]
>>> 

Also with start given:

>>> s = slice(8, None, -2)
>>> s.indices(10)
(8, -1, -2)
>>> list(range(10))[8:-1:-2]
[]
>>> list(range(10))[s]
[8, 6, 4, 2, 0]
>>> 

Strangely giving these indices to range works:

>>> s = slice(8, None, -2)
>>> s.indices(10)
(8, -1, -2)
>>> list(range(8, -1, -2))
[8, 6, 4, 2, 0]
>>>

--
components: Interpreter Core
messages: 133694
nosy: durban, mark.dickinson
priority: normal
severity: normal
status: open
title: slice.indices with negative step and default stop
type: behavior
versions: Python 3.1, Python 3.2

___
Python tracker 

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



[issue11828] startswith and endswith don't accept None as slice index

2011-04-13 Thread Torsten Becker

Torsten Becker  added the comment:

> I got your comments, Torsten. I finds funny too that the tracker is
> not notified.
> I wrote new comments too, but not using "the right way", so now I am
> the one not sure you got them... :-)

That time I actually got a separate mail. :)

> Better to have a 3.1/2.7 patch. The current workflow requires to
> patch the old version first (3.1), and up-port the change to 3.2 and
> 3.3.
> So, 2.7 and 3.1 would be more useful. Al least if the patch applies
> to 3.2 and 3.3 easily. If major surgery is needed, let me know.

I uploaded an improved v4 patch against 2.7 and 3.1.  patch does not apply it 
cleanly in the 3.2 and 3.3 branches, though.

This is mostly because Objects/stringlib/find.h has changed too much and the 
#define STRINGLIB_IS_UNICODE (3.3, 3.2) is called FROM_UNICODE in 3.1.  The 
other files work fine.

It should be no problem to merge this up by hand, though.

> PS: If you use mercurial, try to upload the patch directly from it.
> See the "Remote hg repo" box.

I'm using Mercurial, but unfortunately hg hangs forever when trying to push to 
bitbucket, so I am just sticking with patches for now.

--
Added file: http://bugs.python.org/file21655/issue-11828-v4-3.1.patch

___
Python tracker 

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



[issue11828] startswith and endswith don't accept None as slice index

2011-04-13 Thread Torsten Becker

Changes by Torsten Becker :


Added file: http://bugs.python.org/file21656/issue-11828-v4-2.7.patch

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-13 Thread Torsten Becker

Torsten Becker  added the comment:

> OK, so when I went to apply this, I figured out that the patch isn't quite 
> right.  I've redone the doc updates, and am attaching a version of the patch 
> containing them.
>
> The issue is that the place that the IDNA decode support needs to be added 
> isn't in parseaddr, it's in _parseaddr.py's AddresslistClass.  Tests are then 
> needed to make sure that the IDNA decoding gets done both when parseaddr and 
> getaddresslist are used.
>
> Do you want to tackle this, Torsten?

I would like to, but I probably will not get to it before Monday.  So
if anybody wants to work on this before that time, please feel free to
fix it properly. :)

Just two questions for the implementation:
  1. Would it be fine to move the helper _encode_decode_addr() into
_parseaddr.py and then import it in util.py, so it can be shared
between the two?
  2. Would line 232 in _parseaddr.py (AddrlistClass.getaddrlist) be a
good place to integrate it?

--

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-13 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

> I think there's basically noone and nothing (even among the buildbots)
> that runs bigmem tests on a regular basis, so I'd much rather keep the
> mmap() solution, even if that means it must be skipped on OS X.

Fair enough.

(As an aside, if it is preferable to use an mmap() hack for this sort of
test, it would be good to add some machinery to test.support to make it
easier to use. But that's something for a separate issue.)

--

___
Python tracker 

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



[issue11840] Improvements to c-api/unicode documentation

2011-04-13 Thread Sandro Tosi

Sandro Tosi  added the comment:

On Tue, Apr 12, 2011 at 23:56, Marc-Andre Lemburg
 wrote:
> Marc-Andre Lemburg  added the comment:
> I think you misunderstood: when reorganizing the contents of
> a file, it's better to apply the patch to all branches, rather
> than just the current, since otherwise future patches that do
> have to be merged to all branches would cause lots of merge
> conflicts.

the problem is: the file Doc/c-api/unicode.rst is already different
between all the "open" branches. I'll provide patches for each of
them, or specify where the patch can be merged (and from where).

> Ezio Melotti  added the comment:
>
> Rewrapping the paragraphs you are changing is fine, the others can be left as 
> they are.

Once I was told not to, since in this case it will hide the changes I
made in between the rewrap.

> Patches should be against the oldest branch where they can be applied, and 
> since this is a doc patch it can go in 2.7 and 3.1 too.

I'm just about to prepare patches for all the supported branches
(where a merge is not possible).

--

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-13 Thread R. David Murray

R. David Murray  added the comment:

Yes, putting the function in _parseaddr is fine.  And yes, 232 looks like a 
good place.  The alternative would be understanding the rfc822 parser, which is 
pretty mind bending, and of doubtful additional benefit.  (At most it would 
save a pair of split/join calls.)

--

___
Python tracker 

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



[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2011-04-13 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

This doesn't really make sense, since XDR doesn't seem to say anything about 
unicode strings, just bytes.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue9101] reference json format in file formats chapter

2011-04-13 Thread anatoly techtonik

anatoly techtonik  added the comment:

These people look for alternative configuration format to .ini, for example.

--

___
Python tracker 

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



[issue11840] Improvements to c-api/unicode documentation

2011-04-13 Thread Sandro Tosi

Changes by Sandro Tosi :


Added file: http://bugs.python.org/file21657/unicode_doc-2.7.patch

___
Python tracker 

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



[issue11840] Improvements to c-api/unicode documentation

2011-04-13 Thread Sandro Tosi

Changes by Sandro Tosi :


Added file: http://bugs.python.org/file21658/unicode_doc-3.1.patch

___
Python tracker 

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



[issue11840] Improvements to c-api/unicode documentation

2011-04-13 Thread Sandro Tosi

Sandro Tosi  added the comment:

The status of the patches is this:

unicode_doc-2.7.patch - to be applied on 2.7
unicode_doc-3.1.patch - to be applied on 3.1
unicode_doc-default.patch - to be applied on 3.2 and then merged on default

I had to prepare multiple patches since the files are very different between 
supported branches.

--

___
Python tracker 

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



[issue2771] Test issue

2011-04-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Added file: http://bugs.python.org/file21659/sometext.txt

___
Python tracker 

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



[issue11842] slice.indices with negative step and default stop

2011-04-13 Thread João Sebastião de Oliveira Bueno

João Sebastião de Oliveira Bueno  added the comment:

I don't see this as a bug. The indices returned in both cases are exactly what 
you need to feed to range, in order to get the correct indices for the provided 
slice parameters.

Perceive that if for 
s = slice(None, None, -2)

It would return anything different from
(9, -1, -2)
It would be impossible to properly generate the desired indices. (With a 0 
instead of -1, we would be missing the last index).

When you pass these numbers with the "[" "]" notation for being used as 
indices, the negative index is interpreted as "len(sequence) - index". In the 
case of "-1" in your example it is the same as "9" not the same as "one before 
zero".

I recommend closing this as not a bug.

--
nosy: +João.Sebastião.de.Oliveira.Bueno

___
Python tracker 

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



[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-04-13 Thread Dirk Pranke

Changes by Dirk Pranke :


--
nosy: +dpranke

___
Python tracker 

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



[issue11701] email.parser.BytesParser().parse() closes file argument

2011-04-13 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue4537] webbrowser.UnixBrowser should use builtins.open

2011-04-13 Thread ackounts

ackounts  added the comment:

This problem is happening in my linux box:

Python 3.2 (r32:88445, Feb 21 2011, 01:55:53) 
[GCC 4.5.2 20110127 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import antigravity
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.2/antigravity.py", line 5, in 
webbrowser.open("http://xkcd.com/353/";)
  File "/usr/lib/python3.2/webbrowser.py", line 62, in open
if browser.open(url, new, autoraise):
  File "/usr/lib/python3.2/webbrowser.py", line 276, in open
success = self._invoke(args, True, autoraise)
  File "/usr/lib/python3.2/webbrowser.py", line 239, in _invoke
stderr=inout, preexec_fn=setsid)
  File "/usr/lib/python3.2/subprocess.py", line 736, in __init__
restore_signals, start_new_session)
  File "/usr/lib/python3.2/subprocess.py", line 1330, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 9] Bad file descriptor
>>>

--
nosy: +ackounts
versions: +Python 3.2 -Python 3.0

___
Python tracker 

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



[issue4783] document that json.load/dump can’t be used twice on the same stream

2011-04-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

I saw that and found it not clear, that's why I rephrased it.
In order to understand that one has to know what is a "framed protocol", what 
can be considered a "JSON document" (is a single object a JSON document? or 
does it need to be serialized first?), what is a "container protocol" (can I 
use one? where can I find it? is there a default one for JSON?).

I think it's clearer to just say that you can't do json.dump(obj1, f); 
dump(obj2, f).
I also omitted the note on `load`, because if you can't add more objects to the 
same file using json.dump you won't even try to use json.load to extract them 
one by one.

--

___
Python tracker 

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



[issue9101] reference json format in file formats chapter

2011-04-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset d0ada1e369cd by Ezio Melotti in branch '3.1':
#9101: backport json reference in configparser doc.
http://hg.python.org/cpython/rev/d0ada1e369cd

New changeset 5a09a335e8e7 by Ezio Melotti in branch '2.7':
#9101: backport json reference in configparser doc.
http://hg.python.org/cpython/rev/5a09a335e8e7

--
nosy: +python-dev

___
Python tracker 

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



[issue9101] reference json format in file formats chapter

2011-04-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
status: open -> closed

___
Python tracker 

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



[issue11840] Improvements to c-api/unicode documentation

2011-04-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 11c72a305eb5 by Ezio Melotti in branch '3.1':
#11840: Improve c-api/unicode documentation. Patch by Sandro Tosi.
http://hg.python.org/cpython/rev/11c72a305eb5

New changeset 62679f2ca9e5 by Ezio Melotti in branch '3.2':
#11840: Merge with 3.1.
http://hg.python.org/cpython/rev/62679f2ca9e5

New changeset 1f767f834e67 by Ezio Melotti in branch 'default':
#11840: Merge with 3.2.
http://hg.python.org/cpython/rev/1f767f834e67

--
nosy: +python-dev

___
Python tracker 

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



[issue11840] Improvements to c-api/unicode documentation

2011-04-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 7f873729484c by Ezio Melotti in branch '2.7':
#11840: Improve c-api/unicode documentation. Patch by Sandro Tosi.
http://hg.python.org/cpython/rev/7f873729484c

--

___
Python tracker 

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



[issue11474] url2pathname() handling of '/C|/' on Windows

2011-04-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 4556f17356f2 by Senthil Kumaran in branch '2.7':
Fix Issue11474 - url2pathname() handling of '/C|/' on Windows
http://hg.python.org/cpython/rev/4556f17356f2

--
nosy: +python-dev

___
Python tracker 

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



[issue11840] Improvements to c-api/unicode documentation

2011-04-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed, thanks for the patch!

About the rewrapping:
  * rewrapping what you change is OK, because I know that you changed something 
and had to rewrap it;
  * leaving what you changed badly-wrapped is not OK, because it makes the doc 
a mess after a while;
  * rewrapping unrelated things with no changes in the same patch is not OK, 
because it's hard to see if it's just rewrapping or changes+rewrapping;
  * doing rewrap-only changes might be OK but usually not worth it, and if done 
it should be done on all the branches.

--
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



[issue11840] Improvements to c-api/unicode documentation

2011-04-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee: docs@python -> ezio.melotti

___
Python tracker 

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



[issue8326] Cannot import name SemLock on Ubuntu lucid

2011-04-13 Thread Buck Golemon

Buck Golemon  added the comment:

On Ubuntu 10.10 (maverick), python2.6 is functioning correctly, but python2.7 
is giving this error again.


$ /usr/bin/python2.7
>>> from multiprocessing.synchronize import Semaphore
ImportError: This platform lacks a functioning sem_open implementation, 
therefore, the required synchronization primitives needed will not function, 
see issue 3770.

--
nosy: +bukzor

___
Python tracker 

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



[issue11474] url2pathname() handling of '/C|/' on Windows

2011-04-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset de0da2759c8c by Senthil Kumaran in branch '3.1':
Fix Issue11474 - fix url2pathname() handling of '/C|/' on Windows
http://hg.python.org/cpython/rev/de0da2759c8c

--

___
Python tracker 

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



[issue1147] string exceptions inconsistently deprecated/disabled

2011-04-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 7563f10275a2 by Senthil Kumaran in branch 'default':
merge from 3.2.
http://hg.python.org/cpython/rev/7563f10275a2

--
nosy: +python-dev
stage:  -> committed/rejected

___
Python tracker 

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



[issue11474] url2pathname() handling of '/C|/' on Windows

2011-04-13 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Fixed in all the codelines. Thanks for the patch, Santoso.

--
assignee:  -> orsenthil
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue6191] HTMLParser attribute parsing - 2 test cases when it fails

2011-04-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

The first case has been fixed already in 1cbfeffea19f, the second case is not 
even handled by browsers, so I'm closing this.

--
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



[issue8326] Cannot import name SemLock on Ubuntu lucid

2011-04-13 Thread Stefan Krah

Stefan Krah  added the comment:

I cannot reproduce this on Lucid with:

$ uname -r
2.6.32-28-generic


Isn't this an Ubuntu problem if sem_open only works with some
specific kernels?

--
nosy: +skrah

___
Python tracker 

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



[issue11710] Landing pages in docs for standard library packages

2011-04-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

The packages without a landing page on 3.2 are:
  concurrent
  xml
  urllib
  http
  xmlrpc
  
In the concurrent case the problem could be solved with redirects too, since 
there's only one module in the package.  The other modules could provide a 
landing page that lists the modules in the package. (Note that the html page 
only lists html.escape, so the other modules could be added there too.)

--

___
Python tracker 

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