[issue6562] OverflowError in RLock.acquire()

2009-07-25 Thread Gabriel Genellina

Changes by Gabriel Genellina :


--
nosy: +gagenellina

___
Python tracker 

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



[issue6570] Documentation Clarity

2009-07-25 Thread Mark du Preez

New submission from Mark du Preez :

Hi

In section 4.7.2 of the tutorial documentation, we suddenly find the
following paragraph:

"In general, an argument list must have any positional arguments
followed by any keyword arguments, where the keywords must be chosen
from the formal parameter names. It’s not important whether a formal
parameter has a default value or not. No argument may receive a value
more than once — formal parameter names corresponding to positional
arguments cannot be used as keywords in the same calls. Here’s an
example that fails due to this restriction:"

To a beginner who is reading a tutorial to learn how to use this
language for the first time, it is completely overwhelming. What is a
"positional argument" vs a "keyword argument" and what is a "formal
parameter name"?

None of these things have been explained up until this point and an
understanding of their meaning is required to make sense of this paragraph.

Please consider revising this section.

Thank you.

Mark

--
assignee: georg.brandl
components: Documentation
messages: 90910
nosy: StMark, georg.brandl
severity: normal
status: open
title: Documentation Clarity
type: feature request
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



[issue6562] OverflowError in RLock.acquire()

2009-07-25 Thread David Roberts

David Roberts  added the comment:

thread.get_ident() returns 1192 and 1560 in the cases where there is no
error, and 1316 in the case where the error is thrown. Doesn't seem
particularly unusual, and shows get_ident() isn't throwing the error itself.

I also noticed that there is a warning right before the exception is raised:

C:\Python26\lib\threading.py:803: RuntimeWarning: tp_compare didn't
return -1 or -2 for exception
  return _active[_get_ident()]

I've attached the relevant snippets of code. As you can see
OSMTileProvider (the class that is triggering the exception) doesn't
actually do all that much, and the two other classes derived from
DynamicTileProvider function correctly so I don't understand what it is
about this specific class.

--
Added file: http://bugs.python.org/file14564/tileproviders.py

___
Python tracker 

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



[issue6562] OverflowError in RLock.acquire()

2009-07-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Could you provide a complete example for us to reproduce the issue?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue6525] string.lowercase/uppercase/letters not affected by locale changes on linux

2009-07-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

I reproduced the issue on my Linux machine. Regardless of the locale I
use, string.lowercase/uppercase/letters is always equal to
string.ascii_lowercase.
On windows instead, other letters are added.

--
resolution: wont fix -> 
status: closed -> open
title: Problem with string.lowercase in Windows XP -> 
string.lowercase/uppercase/letters not affected by locale changes on linux

___
Python tracker 

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



[issue6525] string.lowercase/uppercase/letters not affected by locale changes on linux

2009-07-25 Thread Georg Brandl

Georg Brandl  added the comment:

This seems to be normal when using an UTF-8 locale. For (e.g.) 'de_DE'
string.lowercase is changed here, for 'de_DE.utf-8' it isn't.

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

___
Python tracker 

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



[issue6562] OverflowError in RLock.acquire()

2009-07-25 Thread David Roberts

David Roberts  added the comment:

I haven't been able to isolate the issue. Could someone provide some
insight into what the error could possibly mean so that I have a better
idea of what I'm trying to isolate?

--

___
Python tracker 

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



[issue6562] OverflowError in RLock.acquire()

2009-07-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I also noticed that there is a warning right before the exception is raised:
> 
> C:\Python26\lib\threading.py:803: RuntimeWarning: tp_compare didn't
> return -1 or -2 for exception
>   return _active[_get_ident()]

Right, it probably means the exception was raised before this very code
line, but wasn't properly signalled to the Python runtime.
Does the error disappear if you comment out the "with self.__lock" line?

--

___
Python tracker 

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



[issue6571] Help index

2009-07-25 Thread Colin J. Williams

New submission from Colin J. Williams :

Shift operators.  It would be good if "<<" and ">>" could be included 
in the index.

Incidentally, the usage seems counter-intuitive.

One would expect ">>" to be a shift to the right and 
"<<" to be a shift to the left.

--
assignee: georg.brandl
components: Documentation
messages: 90917
nosy: cjw, georg.brandl
severity: normal
status: open
title: Help index
versions: Python 2.6

___
Python tracker 

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



[issue6571] Help index

2009-07-25 Thread Skip Montanaro

Skip Montanaro  added the comment:

Seems to work as expected for me:

>>> 7 >> 1
3
>>> 7 << 1
14

--
nosy: +skip.montanaro

___
Python tracker 

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



[issue6562] OverflowError in RLock.acquire()

2009-07-25 Thread David Roberts

David Roberts  added the comment:

If I comment out all occurrences of "with self.__lock:" I then get the
same error in another part of the code:

C:\Python26\lib\threading.py:803: RuntimeWarning: tp_compare didn't
return -1 or -2 for exception
  return _active[_get_ident()]
Exception in thread Thread-4:
Traceback (most recent call last):
  File "C:\Python26\lib\threading.py", line 525, in __bootstrap_inner
self.run()
  File "C:\Documents and Settings\David\My
Documents\pyzui\pyzui\tileprovider.py", line 82, in run
self.__tasks_available.acquire()
  File "C:\Python26\lib\threading.py", line 115, in acquire
me = current_thread()
  File "C:\Python26\lib\threading.py", line 803, in currentThread
return _active[_get_ident()]
OverflowError: can't convert negative value to unsigned long

Where self.__tasks_available is a threading.Condition.

If I comment out that bit, I then get the following error:

Traceback (most recent call last):
  File "C:\Documents and Settings\David\My
Documents\pyzui\pyzui\tileprovider.py", line 91, in run
tile = self._load(tile_id)
  File "C:\Documents and Settings\David\My
Documents\pyzui\pyzui\dynamictileprovider.py", line 55, in _load
tile_id, True, filext=self.filext)
  File "C:\Documents and Settings\David\My
Documents\pyzui\pyzui\tilestore.py", line 72, in get_tile_path
prefix = get_media_path(media_id)
  File "C:\Documents and Settings\David\My
Documents\pyzui\pyzui\tilestore.py", line 46, in get_media_path
media_dir = os.path.join(tile_dir, media_hash)
  File "C:\Python26\lib\ntpath.py", line 97, in join
if path[-1] in "/\\":
IndexError: cannot fit 'int' into an index-sized integer

I'm not sure if this error is related to the other errors, but similarly
this error only occurs in this specific thread.

--

___
Python tracker 

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



[issue6562] OverflowError in RLock.acquire()

2009-07-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le samedi 25 juillet 2009 à 12:35 +, David Roberts a écrit :
>   File "C:\Python26\lib\ntpath.py", line 97, in join
> if path[-1] in "/\\":
> IndexError: cannot fit 'int' into an index-sized integer

This is definitely fishy and shouldn't happen in such a line of code.
Perhaps there is some deficient exception handling in one of the
extension modules you are using.

What if you remove calls to Image.open() (I assume it is the PIL
library?) and simply return filenames instead of Image objects?

--

___
Python tracker 

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



[issue6567] Make inf be almost equal to inf

2009-07-25 Thread Lucas Prado Melo

Lucas Prado Melo  added the comment:

I would like to ask as a feature request that "inf" be almost equal to
"inf".
I wrote a program with a timeline class that had a method to tell the
time of the last event registered into it such that some events would be
positioned at the infinite when they wouldn't occur. I did generic tests
that would receive any output from this method and compare to the
expected result through unittest.TestCase.assertAlmostEqual(). Notice,
though, that I couldn't just pick assertEqual() to do this job because
the time of the last event would be defined through a series of
calculations.
Despite that, I believe that everything which is equal to anything else
would definitely be almost equal too. Thus, it would be nice to check
for equality before checking for almost-equality to define whether two
objects are almost equal.

--
status: closed -> open
title: Isn't inf  almost equal to inf? -> Make inf be almost equal to inf
type: behavior -> feature request

___
Python tracker 

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



[issue6571] Help index

2009-07-25 Thread Georg Brandl

Georg Brandl  added the comment:

Added index entries in r74200.

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



[issue6567] Make inf be almost equal to inf

2009-07-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +marketdickinson

___
Python tracker 

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



[issue6567] Make inf be almost equal to inf

2009-07-25 Thread Michael Foord

Michael Foord  added the comment:

Hmm... I guess equality does imply almost-equals. I'll make and document
the change that objects that compare equal will also compare almost equal.

--

___
Python tracker 

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



[issue6518] Enable 'with' statement in ossaudiodev module

2009-07-25 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
versions:  -Python 2.6, Python 3.1

___
Python tracker 

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



[issue6572] Manas Thapliyal wants to chat

2009-07-25 Thread Manas

New submission from Manas :

---

Manas Thapliyal wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-6dec705464-1ad2ad81d2-c136c6a2ca2ffe8f
You'll need to click this link to be able to chat with Manas Thapliyal.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Manas Thapliyal, visit:
http://mail.google.com/mail/a-6dec705464-1ad2ad81d2-c136c6a2ca2ffe8f

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

Gmail and Google Talk are still in beta. We're working hard to add new features
and make improvements, so we might also ask for your comments and suggestions
periodically. We appreciate your help in making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

--
messages: 90924
nosy: gravitywarrior1
severity: normal
status: open
title: Manas Thapliyal wants to chat

___
Python tracker 

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



[issue6572] Manas Thapliyal wants to chat

2009-07-25 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue6573] set union method ignores arguments appearing after the original set

2009-07-25 Thread Shawn Smout

New submission from Shawn Smout :

When calling the union method of a set with several arguments, if one of
those sets is the original set, all arguments appearing after it are
ignored.  For example:

x = set()
x.union(set([1]), x, set([2]))

evaluates to set([1]), not set([1, 2]) as expected.  As another example,
since all empty frozensets are the same,

frozenset().union(frozenset([1]), frozenset(), frozenset([2]))

also evaluates to just frozenset([1]).

The fix is trivial, so I'm attaching a patch.

--
files: set_union.patch
keywords: patch
messages: 90925
nosy: ssmout
severity: normal
status: open
title: set union method ignores arguments appearing after the original set
Added file: http://bugs.python.org/file14565/set_union.patch

___
Python tracker 

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



[issue6573] set union method ignores arguments appearing after the original set

2009-07-25 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-25 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

*Rereads latest patch*

I'm happy with this being backported as a bugfix to 3.1 and 2.6 so long
as the set_tunnel method is hidden.  Call it _set_tunnel() in the
backport (and don't document its existence).

--

___
Python tracker 

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



[issue6565] improper use of __setitem__ in ElementTree for Python 3.1

2009-07-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> effbot
nosy: +effbot
priority:  -> high
stage:  -> needs patch
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



[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This sounds reasonable to me.

--
nosy: +pitrou

___
Python tracker 

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



[issue6567] Make inf be almost equal to inf

2009-07-25 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

good catch.  thanks!

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement

2009-07-25 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> ezio.melotti

___
Python tracker 

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



[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

This seems to me quite redundant:
+  Matches any Unicode decimal digit; more specifically, matches
+  any character in Unicode category [Nd] (Number, Decimal Digit).
+  This includes ``[0-9]``, and also many other digit characters.
I suggest something like:
Matches the decimal digits ``[0-9]`` and all the characters that belong
to the Unicode category Nd (Number, Decimal Digit).

Two more minor details: instead of '\d', I'd use '^\d$' and instead of
self.assertEqual(re.match('\d', x), None)
self.assertIsNone(re.match('\d', x)).

--
keywords: +needs review
priority:  -> normal
stage: test needed -> patch review

___
Python tracker 

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



[issue6567] Make inf be almost equal to inf

2009-07-25 Thread Mark Dickinson

Mark Dickinson  added the comment:

[lucaspmelo]
> I would like to ask as a feature request that "inf" be almost equal to
> "inf".

Sounds reasonable to me.  Just so long as float('-inf') isn't almost equal 
to float('inf');  that would be weird.

One could almost make a case for values very close to the upper limit of 
the floating-point range being almost equal to float('inf'), but I think 
that's taking things a bit too far.

--

___
Python tracker 

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



[issue6567] Make inf be almost equal to inf

2009-07-25 Thread Michael Foord

Michael Foord  added the comment:

All I'm proposing to do is add a short circuit equality test to
assertAlmostEquals.

--

___
Python tracker 

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



[issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement

2009-07-25 Thread Brian Curtin

Brian Curtin  added the comment:

Attached is a patch containing the fix, the updated tests, and the doc
change. Let me know if you have any questions, suggestions, etc.

--
Added file: http://bugs.python.org/file14566/issue5511_complete.patch

___
Python tracker 

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



[issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement

2009-07-25 Thread Brian Curtin

Changes by Brian Curtin :


Removed file: http://bugs.python.org/file14554/zipfile_issue_5511.patch

___
Python tracker 

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



[issue6562] OverflowError in RLock.acquire()

2009-07-25 Thread David Roberts

David Roberts  added the comment:

Yes, it is the PIL library. Removing calls to Image.open() still results
in the same error - the exception is thrown before it even reaches that
bit of the code anyway.

Another odd thing is that the exception is only thrown on some of the
calls to get_tile_path, every second call to be exact - see the attached
log file.

I'm also attaching the relevant code from tilestore.py.

--
Added file: http://bugs.python.org/file14567/osm.log

___
Python tracker 

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



[issue6562] OverflowError in RLock.acquire()

2009-07-25 Thread David Roberts

Changes by David Roberts :


Added file: http://bugs.python.org/file14568/tilestore.py

___
Python tracker 

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



[issue6557] urllib.urlopen creates bad requests when location header of 301 redirects contain spaces

2009-07-25 Thread Senthil

Changes by Senthil :


--
assignee:  -> orsenthil
nosy: +orsenthil

___
Python tracker 

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



[issue6566] json.dumps converts None to "null" (not null)

2009-07-25 Thread Bob Ippolito

Bob Ippolito  added the comment:

JP is correct, this is how JSON works. The behavior of coercing keys to 
strings is often desirable, although I agree it could be confusing if you 
aren't familiar with the JSON spec.

--
components: +Documentation -Library (Lib)

___
Python tracker 

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