[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread Mark Summerfield

Mark Summerfield  added the comment:

Hi,

I've noticed 3 differences between the re and regex engines. 
I don't know if they are intended or not, but thought it best to mention
them. (I used the issue2636-20090810#3.zip version.)

Python 2.6.2 (r262:71600, Apr 20 2009, 09:25:38) 
[GCC 4.3.2 20081105 (Red Hat 4.3.2-7)] on linux2
IDLE 2.6.2  
>>> import re, regex
>>>  1 of 3
>>> re1= re.compile(r"""
(?!<\w)(?P[-\w]+)=
(?P(?P')|(?P"))?
(?P(?(single)[^']+?|(?(double)[^"]+?|\S+)))
(?(quote)(?P=quote))
""", re.VERBOSE)
>>> re2= regex.compile(r"""
(?!<\w)(?P[-\w]+)=
(?P(?P')|(?P"))?
(?P(?(single)[^']+?|(?(double)[^"]+?|\S+)))
(?(quote)(?P=quote))
""", re.VERBOSE)
>>> text = ""
>>> re1.findall(text)
[('border', "'", "'", '', '1')]
>>> re2.findall(text)
[]
>>> text = ""
>>> re1.findall(text)
[('border', '', '', '', '1>')]
>>> re2.findall(text)
[]
>>>  2 of 3
>>> re1 = re.compile(r"""^[ \t]*
 (?P\()?
 [- ]?
 (?P\d{3})
 (?(parenthesis)\))
 [- ]?
 (?P\d{3})
 [- ]?
 (?P\d{4})
 [ \t]*$
 """, re.VERBOSE)
>>> re2 = regex.compile(r"""^[ \t]*
 (?P\()?
 [- ]?
 (?P\d{3})
 (?(parenthesis)\))
 [- ]?
 (?P\d{3})
 [- ]?
 (?P\d{4})
 [ \t]*$
 """, re.VERBOSE)
>>> data = ("179-829-2116", "(187) 160 0880", "(286)-771-3878",
"(291) 835-9634", "353-896-0505", "(555) 555 ", "(555) 555-",
"(555)-555-", "555 555 ", "555 555-", "555-555-",
"601 805 3142", "(675) 372 3135", "810 329 7071", "(820) 951 3885",
"942 818-5280", "(983)8792282")
>>> for d in data:
ans1 = re1.findall(d)
ans2 = re2.findall(d)
print "re=%s rx=%s %d" % (ans1, ans2, ans1 == ans2)

re=[('', '179', '829', '2116')] rx=[('', '179', '829', '2116')] 1
re=[('(', '187', '160', '0880')] rx=[] 0
re=[('(', '286', '771', '3878')] rx=[('(', '286', '771', '3878')] 1
re=[('(', '291', '835', '9634')] rx=[] 0
re=[('', '353', '896', '0505')] rx=[('', '353', '896', '0505')] 1
re=[('(', '555', '555', '')] rx=[] 0
re=[('(', '555', '555', '')] rx=[] 0
re=[('(', '555', '555', '')] rx=[('(', '555', '555', '')] 1
re=[('', '555', '555', '')] rx=[] 0
re=[('', '555', '555', '')] rx=[] 0
re=[('', '555', '555', '')] rx=[('', '555', '555', '')] 1
re=[('', '601', '805', '3142')] rx=[] 0
re=[('(', '675', '372', '3135')] rx=[] 0
re=[('', '810', '329', '7071')] rx=[] 0
re=[('(', '820', '951', '3885')] rx=[] 0
re=[('', '942', '818', '5280')] rx=[] 0
re=[('(', '983', '879', '2282')] rx=[('(', '983', '879', '2282')] 1
>>>  3 of 3
>>> re1 = re.compile(r"""
]*?src=(?:(?P["'])(?P[^\1>]+?)   
(?P=quote)|(?P[^"' >]+))[^>]*?>""", re.VERBOSE)
>>> re2 = regex.compile(r"""
]*?src=(?:(?P["'])(?P[^\1>]+?)   
(?P=quote)|(?P[^"' >]+))[^>]*?>""", re.VERBOSE)
>>> data = """  
  
  
  """
>>> data = data.split("\n")
>>> data = [x.strip() for x in data]
>>> for d in data:
ans1 = re1.findall(d)
ans2 = re2.findall(d)
print "re=%s rx=%s %d" % (ans1, ans2, ans1 == ans2)

re=[("'", 'a.png', '')] rx=[("'", 'a.png', '')] 1
re=[('"', 'b.png', '')] rx=[('"', 'b.png', '')] 1
re=[('"', 'Big C.png', '')] rx=[('"', 'Big C.png', '')] 1
re=[('', '', 'icon.png')] rx=[('', '', 'icon.png alt=icon')] 0
re=[('"', "I'm here!.jpg", '')] rx=[('"', "I'm here!.jpg", '')] 1

I'm sorry I haven't had the time to try to minimize the examples, but I
hope that at least they will prove helpful.

Number 3 looks like a problem with non-greedy matching; I don't know
about the others.

--

___
Python tracker 

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



[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Chris Withers

Chris Withers  added the comment:

Why not allow True or an integer as values for a buffer_size parameter 
to the HTTPConnection constructor. False would be the default, which 
would mean "no buffering" as currently is the case. True would mean use 
buffering of the default size and an integer value would mean use 
buffering of that size?

Out of interest, has any of the proposed patching from this issue, 
[issue4336] or [issue4879] been marged to the 2.6 branch?

PS: As I said, for me, changing the buffer size made no difference, so I 
may have to open up a separate issue once I figure out what's going 
on...

--

___
Python tracker 

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



[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Thomas Heller

Thomas Heller  added the comment:

> I agree that the C type 'char' is a byte, not a character. So Python3
> should creates a Python bytes object for the ctypes "c_char_p" type.
> Since Python 3.1 is out, is it too late to change it in the 3.x branch?
> :-) Maybe for Python 3.2?

I think the current behaviour is clearly a bug, so I would apply
this patch to Python 3.1 as well.  Any comments?  Who will decide that?

--

___
Python tracker 

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



[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2009-08-15 Thread Mark Dickinson

Mark Dickinson  added the comment:

srid, I'm not sure why you added your comment;  a couple of sentences 
explaining where the output you posted comes from (what machine, what 
version of Python, under what circumstances) would be really useful.

If you're able to reproduce this failure and have time to figure out where 
it's coming from, that would be fantastic.

--

___
Python tracker 

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



[issue1023290] proposed struct module format code addition

2009-08-15 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks for this patch, Alexandre!

I'm +1 on applying a version of this patch.

I'm not convinced that the variable-length part (i.e., fixed_length=None) of 
int.as_bytes is all that useful;  the choices that need to be made about how to 
represent integers seem too arbitrary to standardize in this function.  In 
effect, the 
non-fixed-length version provides yet another serialization mechanism for 
integers, 
and there's no shortage of existing mechanisms.  As I see it, the purpose of 
the 
as_bytes and frombytes methods is lower-level:  providing a basic operation 
that will 
be used by various serialization methods.  So I'd suggest making fixed_length a 
required argument;  code requiring non-fixed-length conversions can use 
int.bit_length 
to help calculate the length they want.



I'm also not convinced by the defaults for the other two arguments:  
personally, I'd 
expect to need unsigned more often than signed, and little-endian more often 
than big-
endian.

Perhaps the byteorder should default to the native byteorder when not 
explicitly 
given?  That would bring the conversions more closely in line with the struct 
module.

Another possibility:  instead of 'little_endian', have a parameter 'byteorder' 
taking 
the value 'big' or 'little';  this would enable use of byteorder=sys.byteorder 
to 
explicitly specify native byteorder, and avoids bias towards one particular 
byte 
order.

Can we use 'length' instead of 'fixed_length'?


There's a typo in the test_long part of the patch: aserrtRaises -> 
assertRaises;  
apart from that, all tests pass on OS X 10.5/Intel with this patch applied.

I'm in the process of looking at the code more thoroughly.

See related Python-ideas thread at:

http://mail.python.org/pipermail/python-ideas/2009-August/005489.html

--

___
Python tracker 

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



[issue1023290] proposed struct module format code addition

2009-08-15 Thread Eric Eisner

Eric Eisner  added the comment:

Is there some pre-existing naming convention of as_X and fromX? It seems 
strange that two related functions would have a different use of 
underscores.

--
nosy: +ede

___
Python tracker 

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



[issue1023290] proposed struct module format code addition

2009-08-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I agree with the comments which were made on the following points:
- please use consistent naming (`as_bytes` / `from_bytes`, or `asbytes`
/ `frombytes`; my preference goes to the former, especially now that we
have `bit_length`)
- default byteorder should be native, certainly not big endian which is
a small minority amongst today's computers
- you should synchronize with the python-ideas discussion, so that the
final API gets validated more publicly; it would not be very pleasant
for a patch to be committed if discussion were still in flux, and
perhaps with different conclusions as to the API which should be adopted

Besides, your patch has indentation problems (mixed spaces and tabs).

--

___
Python tracker 

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



[issue1424148] urllib.FancyURLopener.redirect_internal looses data on POST!

2009-08-15 Thread John J Lee

John J Lee  added the comment:

If you have a feature request, please open a separate ticket.  This one 
is about an alleged bug.

--

___
Python tracker 

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



[issue6707] dir() on __new__'d module w/o dict crashes 2.6.2

2009-08-15 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Thanks for the report! Fixed in r74457.

--
nosy: +benjamin.peterson
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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread John Machin

John Machin  added the comment:

Simplification of mark's first two problems:

Problem 1: looks like regex's negative look-head assertion is broken
>>> re.findall(r'(?!a)\w', 'abracadabra')
['b', 'r', 'c', 'd', 'b', 'r']
>>> regex.findall(r'(?!a)\w', 'abracadabra')
[]


Problem 2: in VERBOSE mode, regex appears to be ignoring spaces inside
character classes

>>> import re, regex
>>> pat = r'(\w)([- ]?)(\w{4})'
>>> for data in ['a', 'a-', 'a ']:
...print re.compile(pat).findall(data), regex.compile(pat).findall(data)
...print re.compile(pat, re.VERBOSE).findall(data),
regex.compile(pat,regex.
VERBOSE).findall(data)
...
[('a', '', '')] [('a', '', '')]
[('a', '', '')] [('a', '', '')]
[('a', '-', '')] [('a', '-', '')]
[('a', '-', '')] [('a', '-', '')]
[('a', ' ', '')] [('a', ' ', '')]
[('a', ' ', '')] []

HTH,
John

--

___
Python tracker 

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



[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Georg Brandl

Georg Brandl  added the comment:

I agree that it's a bug.  Letting Benjamin decide whether to put it in
3.1.1 :)

--
assignee: theller -> benjamin.peterson
nosy: +benjamin.peterson

___
Python tracker 

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



[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Sounds ok to me.

2009/8/15 Georg Brandl :
>
> Georg Brandl  added the comment:
>
> I agree that it's a bug.  Letting Benjamin decide whether to put it in
> 3.1.1 :)
>
> --
> assignee: theller -> benjamin.peterson
> nosy: +benjamin.peterson
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread Matthew Barnett

Matthew Barnett  added the comment:

issue2636-20090815.zip fixes the bugs found in msg91598 and msg91607.

The regex engine currently lacks some of the optimisations that the re
engine has, but I've concluded that even with them the extra work that
the engine needs to do to make it easy to switch to breadth-wise
matching when needed is slowing it down too much (if it's matching only
depth-first then it can save only the changes to the 'context', but if
it's matching breadth-wise then it needs to duplicate the entire 'context').

I'm therefore seeing whether I can have 2 engines internally, one
optimised for depth-first and the other for breadth-wise, and switch
from the former to the latter if matching is taking too long.

--
Added file: http://bugs.python.org/file14733/issue2636-20090815.zip

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



[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread STINNER Victor

STINNER Victor  added the comment:

> I agree that it's a bug.
> Letting Benjamin decide whether to put it in 3.1.1 :)

And what about 3.0.x? Is this branch still alive or not?

--

___
Python tracker 

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



[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2009/8/15 STINNER Victor :
>
> STINNER Victor  added the comment:
>
>> I agree that it's a bug.
>> Letting Benjamin decide whether to put it in 3.1.1 :)
>
> And what about 3.0.x? Is this branch still alive or not?

No, it's as dead as a doornail.

--

___
Python tracker 

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



[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The reason is that users expect gc.collect() to make its best to
diminish memory use. Clearing free lists can allow deallocting some
arenas which otherwise would still contain some used memory blocks. As
the comment says:

/* Clear all free lists
 * All free lists are cleared during the collection of the highest
generation.
 * Allocated items in the free list may keep a pymalloc arena occupied.
 * Clearing the free lists may give back memory to the OS earlier.
 */

Full collections (collections of the oldest generation) are rather rare,
so the performance impact is probably minimal, and it helps reduce
memory fragmentation from time to time (which can produce significant
effect as shown in Matthias' example).

--
nosy: +pitrou

___
Python tracker 

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



[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2009-08-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

It's certainly possible to do so, do you have a patch?

--
nosy: +pitrou, rhettinger
priority:  -> normal
stage:  -> needs patch
type:  -> performance

___
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-08-15 Thread Senthil

Senthil  added the comment:

Fixed and Committed revision 74462

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



[issue1023290] proposed struct module format code addition

2009-08-15 Thread Josiah Carlson

Josiah Carlson  added the comment:

I'm not a big fan of the names, but as long as the functionality exists, 
people can easily alias them as necessary.

I've not actually looked at the patch, but as long as it does what it 
says it does, it looks good.

My only question, does it makes sense to backport this to trunk so we 
get this in 2.7?  I personally would like to see it there, and would 
even be ok with a limitation that it only exists as part of longs.  If 
someone has the time to backport it; cool.  If not, I understand, and 
could live with it only being in 3.x .

Thank you for taking the time and making the effort in getting this into 
a recent Python :)

--

___
Python tracker 

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



[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Anything that adds a new parameter can not be backported to 2.6 as that
counts as an API change / feature addition.

--

___
Python tracker 

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



[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-15 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> The reason is that users expect gc.collect() to make 
> its best to diminish memory use.

I thought GC was expected to eliminate reference cycles.
Perhaps there ought to be a separate API, such as 
sys.clear_freelists(), to eliminate other memory use when 
needed.  Putting this in GC seems like feature creep and
has negative performance implications (long running programs
will likely find an immediate need to reallocate the freed
members).


> Allocated items in the free list may keep a pymalloc arena occupied.
> * Clearing the free lists may give back memory to the OS earlier.

These are both good reasons to expose the functionality somewhere.

--

___
Python tracker 

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



[issue6710] hotshot stats load causes TypeError when multiple files are loaded

2009-08-15 Thread Jim Fulton

New submission from Jim Fulton :

I've attached a script that demonstrates the problem.  When run with
Python 2.5, it outputs statistics.  When run with Python 2.6.2 it
generates a TypeError:

python2.6 hotshotbug.py
Traceback (most recent call last):
  File "hotshotbug.py", line 5, in 
stats.add(hotshot.stats.load('p2'))
  File "/usr/local/python/2.6/lib/python2.6/pstats.py", line 171, in add
self.stats[func] = add_func_stats(old_func_stat, stat)
  File "/usr/local/python/2.6/lib/python2.6/pstats.py", line 516, in
add_func_stats
add_callers(t_callers, callers))
  File "/usr/local/python/2.6/lib/python2.6/pstats.py", line 526, in
add_callers
zip(caller, new_callers[func])])
TypeError: zip argument #1 must support iteration

--
components: Library (Lib)
files: hotshotbug.py
messages: 91619
nosy: j1m
severity: normal
status: open
title: hotshot stats load causes TypeError when multiple files are loaded
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file14734/hotshotbug.py

___
Python tracker 

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



[issue6710] hotshot stats load causes TypeError when multiple files are loaded

2009-08-15 Thread Jim Fulton

Jim Fulton  added the comment:

Fred might be interested. :)

--
nosy: +fdrake

___
Python tracker 

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



[issue4879] Allow buffering for HTTPResponse

2009-08-15 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

trunk r74463 now forces the HTTPResponse to close afterwards when
buffering=True to avoid the issue.

--

___
Python tracker 

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



[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

trunk r74463 now forces the HTTPResponse with buffering=True to close
afterwards using a HTTPResponse._must_close flag similar to what was
suggested in buffered_socket.diff in this issue.

--

___
Python tracker 

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



[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le samedi 15 août 2009 à 22:06 +, Raymond Hettinger a écrit :
> Raymond Hettinger  added the comment:
> 
> > The reason is that users expect gc.collect() to make 
> > its best to diminish memory use.
> 
> I thought GC was expected to eliminate reference cycles.

Of course, but it's also the de facto API when wanting to reclaim
memory. The face that a single function call is sufficient is a good
thing in itself.

> Perhaps there ought to be a separate API, such as 
> sys.clear_freelists(), to eliminate other memory use when 
> needed.  Putting this in GC seems like feature creep and
> has negative performance implications (long running programs
> will likely find an immediate need to reallocate the freed
> members).

Performance claims should be substanstiated with actual numbers,
otherwise it's too easy to clutter the API with gratuitous
complications. The impact of reallocating may be negligible, or it might
even be positive if it improves cache locality.

--

___
Python tracker 

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



[issue6704] better col_offset for AST in statements like "for a, b in ..."

2009-08-15 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Thanks for the patch! Commited in r74464.

--
nosy: +benjamin.peterson
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

I am also unable to reproduce the reported problem using the
pastebin.ca/973578 code.  The time to download 400mb from localhost
remains the same regardless of buffering=False (default) or True.

The problem still exists but it is better described in issue1542407 and
should only effect the performance of reading the HTTP headers (a lot if
you're writing an application doing small/medium RPC requests over HTTP).

--
priority: high -> normal

___
Python tracker 

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



[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2009-08-15 Thread Alex

Alex  added the comment:

Antoine, I hope to have some time to write a patch for this in the
coming week.

--

___
Python tracker 

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



[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2009-08-15 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue6711] macurl2path has typos that raise AttributeError

2009-08-15 Thread Joe Amenta

New submission from Joe Amenta :

In a few spots, "urllib.parse" misses a "." after the package name.

e.g., "urllib.parse.quote" is spelled "urllib.parsequote", which
generates an AttributeError when run.

To reproduce, open up a python3.x interpreter and execute:
from macurl2path import *
url2pathname('doesnt_matter_what')
pathname2url('some_string')
_pncomp2url('something_else')

Attaching a patch that will fix the issue.

--
components: Library (Lib)
files: py3k_url2path.patch
keywords: patch
messages: 91627
nosy: joe.amenta
severity: normal
status: open
title: macurl2path has typos that raise AttributeError
type: crash
versions: Python 3.0, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14735/py3k_url2path.patch

___
Python tracker 

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



[issue6711] macurl2path has typos that raise AttributeError

2009-08-15 Thread Senthil

Senthil  added the comment:

Thanks for the patch. 

Fixed it and 

Committed revision 74469 - py3.2
Committed revision 74470 - py3.1 maint.

I wonder how it got unnoticed so far.

--
assignee:  -> orsenthil
nosy: +orsenthil
resolution:  -> fixed

___
Python tracker 

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