[issue4652] IDLE does not work with Unicode

2009-08-03 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

I can't seem to reproduce that, maybe it could be a tk issue ?

Can you try writing anything (that doesn't work on IDLE) on a
tkinter.Text widget to see if it shows there ? You could use this code
below:

from tkinter import Text

text = Text()
print(text.tk.call('info', 'patchlevel'))
text.focus_set()
text.pack()
text.mainloop()

--

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



[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-08-03 Thread Nir Soffer

Nir Soffer nir...@gmail.com added the comment:

handle_expt is documented to be called when there is OOB data. However,
handle_expt_event is not documented, and according the framework design
as I see it, it simply means socket has exceptional condition when
select returns. On unix, this means there is oob data, and on Windows,
it means there is some error.

This works exactly the same for handle_read_event and handle_write_event
- they may be called on connection refused error. Checking for errors in
handle_expt_event is the right thing to do, and allow you to avoid the
ugly checks and double try..except in _exception.

If you want handle_foo_event to be called only on foo events, then they
will not have anything to do except calling handle_foo. This is actually
the case now in handle_expt_event. I don't see any advantage of this
design change.

--

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



[issue4691] IDLE Code Caching Windows

2009-08-03 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Amaury, from what I remember your suggestion has been applied some time
ago. Can you check if the newest Windows installer still adds an '-n' by
default ?

--

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



[issue6609] zipfile: WindowsError [267] The directory name is invalid

2009-08-03 Thread Ezio Melotti

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

See also #481171.

--
nosy: +ezio.melotti

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



[issue6630] string.Template custom pattern not working

2009-08-03 Thread Javier

New submission from Javier javier.coll...@gmail.com:

In the string.Template documentation
(http://docs.python.org/library/string.html) it's explained that if a
custom regular expression for pattern substitution is needed, it's
possible to override idpattern class attribute (whose default value is
[_a-z][_a-z0-9]*).

However, if the custom pattern that is needed is just uppercase
letters, something like [A-Z]+ won't work because of the following line
in the _TemplateMetaclass class __init__ method:
cls.pattern = _re.compile(pattern, _re.IGNORECASE | _re.VERBOSE)

I would say that this is an error (IGNORECASE just shouldn't be there)
and that the line above should be:
cls.pattern = _re.compile(pattern, _re.VERBOSE)
and the default value for idpattern:
[_a-zA-Z][_a-zA-Z0-9]*

Do you agree on this? Is there any reason for the IGNORECASE option to
be passed to re.compile?

--
components: IO, Regular Expressions
messages: 91217
nosy: jcollado
severity: normal
status: open
title: string.Template custom pattern not working
type: behavior
versions: Python 2.6, Python 3.0

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



[issue6589] smtpd.SMTPServer can cause asyncore.loop to enter infinite event loop

2009-08-03 Thread Gabriel Genellina

Changes by Gabriel Genellina gagsl-...@yahoo.com.ar:


--
nosy: +gagenellina

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



[issue6631] urlparse.urlunsplit() can't handle relative files (for urllib*.open()

2009-08-03 Thread albert Mietus

New submission from albert Mietus alb...@mietus.nl:

The functions urlparse.url{,un}split() and urllib{,2}.open() do not work 
together for relative, local files, due a bug in urlunsplit.

Given a file f='./rel/path/to/file.html' it can be open directly by 
urllib.open(f), but not in urllib2! as the later needs a scheme.
We can create a sound url with spilt/unspilt and a default scheme:
f2=urlparse.urlunsplit(urlparse.urlsplit(f,'file')); which works most 
cases, HOWEVER a bogus netloc is added for relative filepaths.

If have isolated this  buggy function, added some local testcode and 
made patch/workaround in my file 'unsplit.py' Which is included. Hope 
this will contribute to a real patch.


--Groetjes, Albert

ALbert Mietus
Don't send spam mail!
Mijn missie: http://SoftwareBeterMaken.nl  product, proces  imago.
Mijn leven in het kort:
http://albert.mietus.nl/Doc/CV_ALbert.html

--
components: Library (Lib)
files: unsplit.py
messages: 91222
nosy: albert
severity: normal
status: open
title: urlparse.urlunsplit() can't handle relative files (for urllib*.open()
type: performance
Added file: http://bugs.python.org/file14637/unsplit.py

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



[issue4691] IDLE Code Caching Windows

2009-08-03 Thread Brandon Dixon

Brandon Dixon brandon.s.di...@gmail.com added the comment:

Can you guys let me know when this is fixed or thought to be fixed. I would
like to test from my end just to ensure.

On Sun, Aug 2, 2009 at 11:27 PM, Guilherme Polo rep...@bugs.python.orgwrote:


 Guilherme Polo ggp...@gmail.com added the comment:

 Amaury, from what I remember your suggestion has been applied some time
 ago. Can you check if the newest Windows installer still adds an '-n' by
 default ?

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue4691
 ___


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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4691
___Can you guys let me know when this is fixed or thought to be fixed. I would 
like to test from my end just to ensure. brbrdiv class=gmail_quoteOn 
Sun, Aug 2, 2009 at 11:27 PM, Guilherme Polo span dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span 
wrote:br

blockquote class=gmail_quote style=border-left: 1px solid rgb(204, 204, 
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;br
Guilherme Polo lt;a href=mailto:ggp...@gmail.com;ggp...@gmail.com/agt; 
added the comment:br
br
Amaury, from what I remember your suggestion has been applied some timebr
ago. Can you check if the newest Windows installer still adds an #39;-n#39; 
bybr
default ?br
br
--br
divdiv/divdiv class=h5br
___br
Python tracker lt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br
lt;a href=http://bugs.python.org/issue4691; 
target=_blankhttp://bugs.python.org/issue4691/agt;br
___br
/div/div/blockquote/divbrbr clear=allbr-- brBrandon Dixon - 
CCNA, OSCP, WebSphere DataPower Solution DeveloperbrInformation Systems 
Security Engineerbra 
href=http://www.dueyesterday.net;www.dueyesterday.net/a - Documentation for 
the massesbr


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



[issue3926] Idle doesn't obey the new improved warnings arguements

2009-08-03 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

This looks good Scott, I'm just attaching the .diff here with real minor
changes and will be applying if no one is against it.

--
keywords: +patch
Added file: http://bugs.python.org/file14638/idle_fixwarnings.diff

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



[issue1175686] add reload function to IDLE

2009-08-03 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Closing this in favour of issue1721083.

--
resolution:  - duplicate
status: open - closed
superseder:  - Add File - Reload

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



[issue1721083] Add File - Reload

2009-08-03 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

I have done a very initial patch in an attempt to define where we should
go with this feature. There are several different proposals around this
issue and the superseded one, I opted to implement the simplest one
which is to add a 'Revert' entry in the file menu which re-reads the
file currently open.

There are at least two problems with this patch. First, I don't think
there is a non-hacky way to place a command on a menu in a specific
place by using an idle extension, so, the 'Revert' entry is the last
entry in the file menu right now. I guess this would be solved by not
making this an extension and then proceed to manually remove the menu
entry while creating the shell window (similarly to what it is done when
running under mac osx). The second problem happens when reverting the
file, I'm not sure if it should be done differently but this seems to
cause some problem with Multicall.

--
keywords: +patch
Added file: http://bugs.python.org/file14635/idle_filerevert.diff

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



[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments

2009-08-03 Thread Gabriel Genellina

Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:

I'll try to rephrase the section.

--
nosy: +gagenellina

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



[issue6609] zipfile: WindowsError [267] The directory name is invalid

2009-08-03 Thread Gabriel Genellina

Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:

You're right, aux is a reserved name on Windows (like prn, con, and a 
few others). There is a way to force the OS to actually create such 
files, but not every tool can handle them correctly.

If the zip file is intended to be Windows-compatible, it should not use 
such names; ask the project developers.

--
nosy: +gagenellina

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



[issue6629] seek doesn't properly handle file buffer, leads to silent data corruption

2009-08-03 Thread Karoly Lorentey

New submission from Karoly Lorentey kar...@lorentey.hu:

The new io.BufferedRandom implementation in Python 3.1 has a broken seek 
that seems not to properly handle the case when the target of the seek 
lies inside the contents of the file buffer.  It leaves the file object 
in a confused state, such that the next write operation applies after 
the end of the buffer(!) instead of the specified target.

I could reproduce the following symptoms on both Debian Lenny and Mac OS 
X Leopard.  I downloaded the Python 3.1 tarball from python.org, and 
built it by hand using './configure  make'.

$ ./python.exe
Python 3.1 (r31:73572, Aug  3 2009, 02:32:10) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type help, copyright, credits or license for more information.
 open(test, wb).write(bA * 1)
1
 file = open(test, rb+)
 file.read(10)   # Reads 4096 bytes into file buffer
b'AA'
 file.tell()
10
 file.seek(0)
0
 file.tell()
0
 file.write(bB * 1)  # This should overwrite the whole file
1
 file.tell()
14096  # Hmm, 0 + 1 == 14096?
 file.close()
 d = open(test, rb).read()
 len(d)
14096  # ?!
 d[0:10]  # The file should now consist of 1 Bs...
b'AA'
 d[4090:4100]
b'AA'# ... but the Bs only start after a buffer's worth of 
As.

This bug has actually caused me some subtle, silent data corruption that 
went undetected for quite a while.  Hurray for backups!

The above code works fine in Python 3.0, and its Python 2.5 port also 
produces correct results.

A workaround for 3.1 is to call flush before every seek.

--
components: IO
messages: 91211
nosy: lorentey
severity: normal
status: open
title: seek doesn't properly handle file buffer, leads to silent data corruption
type: behavior
versions: Python 3.1

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



[issue6630] string.Template custom pattern not working

2009-08-03 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Better to add a flags argument and leave the default flag as-is.

--
assignee:  - barry
components: +Library (Lib) -IO, Regular Expressions
nosy: +barry, rhettinger
type: behavior - feature request
versions: +Python 2.7, Python 3.2 -Python 2.6, Python 3.0

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



[issue6632] Include more fullwidth chars in the decimal codec

2009-08-03 Thread Ezio Melotti

New submission from Ezio Melotti ezio.melo...@gmail.com:

The decimal codec only handles characters in the Nd (Number, decimal)
Unicode category and whitespaces [a]. It is used by int(), float(),
complex() and indirectly by Decimal(), Fraction() and possibly others.
This works well only for plain digits (e.g. int(u'123')) but it
doesn't work for all the other characters used to represent numbers, like:
1. plus or minus sign, e.g. int(u'+123') or int(u'-123')
2. decimal point, e.g. float(u'1.23')
   2.1 some languages/alphabets use other chars (e.g. a comma or other
   symbols) instead of the decimal point.
3. exponential notation, e.g. float(u'1e5')
4. the 'j' in complex numbers, e.g. complex(u'3j')
5. the 'x' and 'p' in hexadecimal floats, e.g.
float.fromhex(u'0x1.7p3')
   5.1 hex floats also uses hexadecimal digits, see 6.3
6. digits  9 for numbers with a base  10, e.g. int(u'7F', 16)
6.1 not all the alphabets have the equivalent of the letters a-z
6.2 afaik there are no standards that specify how to deal with
digits 9
6.3 in the Unicode FAQ [b] there's a link to a table [c] that says
Code points not listed in this file are not hexadecimal
digits. This is not a standard though, and even if in the
UCD [d] there's a file [e] where the numbers with the Hex_Digit
property are defined, it doesn't say that *only* these numbers
are valid hex digits. Also it doesn't say anything about
different bases.
Python currently accepts int(u'10', 16), int(u'७', 16)
(U+096D - DEVANAGARI DIGIT SEVEN) and even int(u'7F', 16)
(with a normal F it works, with a fullwidth F it fails).
6.4 UTS #18 [f] includes in the property 'xdigit' [g] (hexadecimal
digit) all the chars defined in [c] and also all the chars with
a Nd category. This also is not a standard, and it doesn't
give indications about the valid hex digits and how int()
should behave.
6.5 if possible re and int() should agree. Any string that matches
/^[[:xdigit:]]+$/ should work fine with int(s, 16) and vice 
versa. See also #6561 [h] and #2636 [i].
7. possibly others


For all the chars listed in the points 1-5 there's no way, AFAIK, to
know their equivalents in other alphabets (if they exist at all) and
since (apparently) there's no standard that specifies how to handle
them, they should be kept out.
This will also avoid a number of problems, e.g. 2.1.

The fullwidth forms are an exception though: they seem to be the only
set of characters with a direct equivalent for all these chars, and they
are also the only non-ascii chars included in the list of chars with the
Unicode Hex_Digits property.

Including all the necessary chars from this range in the decimal codec
seems to me the best thing to do. The chars listed in the points 1-5
should all be implemented and they should work everywhere. The regex
used by Decimal/Fraction should be updated as well, since the decimal
codec is not accessible from Python (maybe it should be accessible, but
this is another issue).

Point 6 is a slightly different issue, even if it can be partially
solved if the fullwidth forms will be included. One of the possible
options is to limit the valid chars used by int() with bases  10 only
to the characters listed in [c], but this won't be backward-compatible
with existing code and forward-compatible with [[:xdigit:]].
OTOH if we keep the current behavior it will be possible to express the
digits from 0 to 9 using several alphabets, but all the digits  9 will
be limited to [a-fA-F] (and possibly [a-fA-F]).
For example, '7F' in the devanagari alphabet will result in a mix of
devanagari numbers and ascii letters, i.e. int(u'७F', 16) (this already
works in Python).


[a]:
http://svn.python.org/view/python/trunk/Objects/unicodeobject.c?view=markup
under 'Decimal Encoder'
[b]: http://unicode.org/faq/casemap_charprop.html#13
[c]: http://unicode.org/faq/hex-digit-values.txt - [0-9a-fA-
F0-9a-fA-F]
[d]: http://unicode.org/Public/UNIDATA/UCD.html#UCD_Files - PropList.txt
section
[e]: http://unicode.org/Public/UNIDATA/PropList.txt
[f]: http://unicode.org/reports/tr18/ - UTS #18: Unicode Regular Expressions
[g]: http://unicode.org/reports/tr18/#Compatibility_Properties - xdigit row
[h]: http://bugs.python.org/issue6561#msg90878 point (1) about int() and re
[i]: http://bugs.python.org/issue2636#msg65513 point 8) will introduce
[[:xdigit:]]

(Thanks to Mark Dickinson and Adam Olsen for pointing out some of these
issues.)

--
components: Interpreter Core, Unicode
messages: 91225
nosy: ezio.melotti
priority: normal
severity: normal
status: open
title: Include more fullwidth chars in the decimal codec
type: feature request
versions: Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6632
___

[issue6596] urllib2 bug on CentOS

2009-08-03 Thread Francesco Del Degan

Francesco Del Degan f.delde...@ngi.it added the comment:

I don't think that this is a python issue, because of this:

[r...@localhost ~]# curl -O http://wm.exchanger.ru/asp/XMLWMList.asp?exchtype=1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0
[r...@localhost ~]# curl -O http://wm.exchanger.ru/asp/XMLWMList.asp?exchtype=1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100  9299  100  92990 0  15471  0 --:--:-- --:--:-- --:--:-- 22134


I done two request in rapid succession and into first i got a redirect to

0x:  4500 008f 3abb  3206 1d98 d49e ad94  E...:...2...
0x0010:  ac10 01d3 0050 b220 47ee 6cdb 8b3d 6233  .P..G.l..=b3
0x0020:  5011 0001 edc2  4854 5450 2f31 2e31  P...HTTP/1.1
0x0030:  2033 3032 204d 6f76 6564 2054 656d 706f  .302.Moved.Tempo
0x0040:  7261 7269 6c79 0d0a 436f 6e74 656e 742d  rarily..Content-
0x0050:  4c65 6e67 7468 3a20 300d 0a4c 6f63 6174  Length:.0..Locat
0x0060:  696f 6e3a 202f 6173 702f 584d 4c57 4d4c  ion:./asp/XMLWML
0x0070:  6973 742e 6173 703f 6578 6368 7479 7065  ist.asp?exchtype
0x0080:  3d31 3f34 6430 3266 3136 380d 0a0d 0a=1?4d02f168

as you can see, the ?4d02f168 part comes from the site, hence the 500 error 
from second request.

In the second try, i got correct response.

The weird thing is that into other systems, no curl request triggers a redirect 
from the site,
and in centOS only we have this weird behaviour.

--
nosy: +pr0gg3d

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



[issue6632] Include more fullwidth chars in the decimal codec

2009-08-03 Thread Ezio Melotti

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


--
nosy: +lemburg, loewis, marketdickinson

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



[issue6596] urllib2 bug on CentOS

2009-08-03 Thread Francesco Del Degan

Francesco Del Degan f.delde...@ngi.it added the comment:

Update: Now into the same system (CentOS) without any mod:

 import urllib2
 url = 'http://wm.exchanger.ru/asp/XMLWMList.asp?exchtype=1'
 t = urllib2.urlopen(url).read()

 t
'?xml version=1.0?.

i thinks that you should try to look for some bugs into CentOS 
distribution.

--

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



[issue6596] urllib2 bug on CentOS

2009-08-03 Thread Senthil

Senthil orsent...@gmail.com added the comment:

Thanks for the update. I am closing this as Invalid.

--
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6596
___
___
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-03 Thread Francesco Del Degan

Francesco Del Degan f.delde...@ngi.it added the comment:

urllib2 does escape spaces (and other characters too):

In [20]: 
u=urllib2.urlopen(http://sourceforge.net/project/showfiles.php?
group_id=16847package_id=13374)

In [21]: u.url
Out[21]: 'http://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-
c%20Super%20Stable/'

In [22]: u.read()[0:100]
Out[22]: '\n\n!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 
Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xh'

--
nosy: +pr0gg3d

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



[issue6630] string.Template custom pattern not working

2009-08-03 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

I agree with Raymond. I think it should either take a string and flags,
or a compiled regex object.

--
nosy: +eric.smith

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



[issue6632] Include more fullwidth chars in the decimal codec

2009-08-03 Thread Eric Smith

Changes by Eric Smith e...@trueblade.com:


--
nosy: +eric.smith

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



[issue6633] No handlers could be found for logger

2009-08-03 Thread James

New submission from James purplei...@gmail.com:

I was trying to suppress the error message as shown in the title, when I
found out (by searching through the source) that there is a NullHandler
for precisely this purpose.

http://svn.python.org/view/python/trunk/Lib/logging/__init__.py?r1=66211r2=67511

do you think that:
1) this could be documented maybe here (
http://docs.python.org/library/logging.html#handler-objects ) i suppose?
and:
2) this null handler doesn't seem to exist in:
Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49) 
[GCC 4.3.2] on linux2
is this likely to get backported to 2.5? at the moment i've just
included the simple NullHandler class into my code.
3) also not my business really, but should it belong in the handlers.py
file?

thanks for all your hard work, i hope the comments are useful!

--
components: Library (Lib)
messages: 91231
nosy: purpleidea
severity: normal
status: open
title: No handlers could be found for logger
versions: Python 2.5

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



[issue6632] Include more fullwidth chars in the decimal codec

2009-08-03 Thread Mark Dickinson

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

The bit that most convinces me that *some* change is desirable is that
(with py3k notation), int('7', 16) is legal but int('F', 16) is not.

In an ideal world one might hope that the set of characters accepted by 
int(s, 16) would be the same as those characters with the Unicode 
Hex_Digits property, but currently there's a mismatch for two different 
reasons... (1) fullwidth hex digits have property 'Hex_Digit' but aren't 
accepted, and (2) non-European decimal digits (e.g. Devanagari digits, 
etc.) don't have property 'Hex_Digit' but are accepted by int.

It's tempting to suggest that int and float should be modified to reject 
*any* decimal digits other than '0' through '9', and possibly their 
fullwidth variants.  (Jean-Paul Calderone already advanced this argument 
on #python-dev a few days ago;  essentially saying, if I understood him 
correctly, that dealing with localization shouldn't be part of the job 
of int or float.)

--

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



[issue834351] Mouse wheel crashes program

2009-08-03 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

This is a tk issue, so the best way to fix this (if you don't want to
install something newer than Python 2.4 on Windows) is to install a
newer tcl/tk version.

Unfortunately the proposed workaround is way too specific, imagine if
other bindings had similar problems with different binding substitutions.

If we want to be safe, Tkinter should be passing only valid
substitutions for a given sequence but this is very awkward. But check
what the bind manual says .. Some of the substitutions are only valid
for certain types of events; if they are used for other types of events
the value substituted is undefined., note how it doesn't say .. if
they are used for other types of events a segfault ensues.

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

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



[issue6618] Typo in a listing in 5.2.9 of language reference

2009-08-03 Thread Georg Brandl

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

Thanks, fixed in r74297, backported to 3.1 in r74298.

--
resolution:  - fixed
status: open - closed

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



[issue2710] error: (10035, 'The socket operation could not complete without blocking')

2009-08-03 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Hi Don,

I don't think this is an issue about idle competing for tkinter
resources (or idle and tkinter competing for resources -- the other
meaning I got when reading your message).
From what I remember this WSAEWOULDBLOCK is just a way for Windows to
tell try to send this data again later, so this is actually related to
networking and not Tkinter vs. IDLE. If someone can confirm this then it
would be better to check for this specific error and ignore (pass) 
instead of always raising any socket.error.

--

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



[issue5712] tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release

2009-08-03 Thread Guilherme Polo

Changes by Guilherme Polo ggp...@gmail.com:


--
nosy: +gpolo

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



[issue6632] Include more fullwidth chars in the decimal codec

2009-08-03 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Ezio Melotti wrote:
 
 New submission from Ezio Melotti ezio.melo...@gmail.com:
 
 The decimal codec only handles characters in the Nd (Number, decimal)
 Unicode category and whitespaces [a]. It is used by int(), float(),
 complex() and indirectly by Decimal(), Fraction() and possibly others.
 This works well only for plain digits (e.g. int(u'123')) but it
 doesn't work for all the other characters used to represent numbers, like:
 [...]

In general, Python has always stuck to the Unicode standard
for these things (as well as others like casing, etc.).

If the Unicode standard adopts a scheme for dealing with these
issues, we should include support for it.

Implementing something based on non-standards now and breaking
that support later on in order to implement the true standards
is not such a good idea.

There is work underway to define a standard for locale specific
formatting of numbers, dates, etc.:

http://cldr.unicode.org/

Here's the TR with the data format specification:

http://www.unicode.org/reports/tr35/tr35-12.html

I'm sure that the information gathered in that project will
sooner or later be folded back into the standard Unicode character
database. Once that's done we can then use that information to
e.g. determine the characters that make up a sign, decimal
point, etc.

--

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2009-08-03 Thread Jan-Philip Gehrcke

New submission from Jan-Philip Gehrcke jgehr...@gmail.com:

Hey there,

hopefully I fill out this form in an adequate way!

I ran into some problems while using sys.exit('msg') together with
threads, which could have been avoided with slightly more information in
the docs here: http://docs.python.org/library/sys.html#sys.exit 

Maybe the following two statements should not stay as they are:

(1) Exit from Python.
---
This is not true when called from a thread other than the main one. We
could add a hint, saying that sys.exit() then actually behaves like
thread.exit(), which causes only the calling thread to exit, but not the
main program.

2) [...] and any other object is printed to sys.stderr

This is also not true when called from a thread other than the main one.
Calling sys.exit('msg') then doesn't print anything to stderr. That was
annoying in my case and required debugging a bug that would have
discovered itself via stderr, if the message would have been printed..
:-) After some research, I think this behaviour is described in the
documentation for thread.exit(): [...] this will cause the thread to
exit *silently*.


Okay, now that I am aware of this behaviour, I won't run into these
problems again. But the next one?

I think (1) is clearly a documentation thing. Regarding (2): first of
all, the documentation should say that the message is suppressed in
special cases (child threads). But: what argues against printing to
stderr here? I don't get the point and only see a lost feature,
affording a quick way to kill a thread while dropping an error message.
Was this kicked out intentionally? Maybe someone could help me with a
good argument here :-)


Thank you for your work,

Jan-Philip Gehrcke

--
assignee: georg.brandl
components: Documentation
messages: 91237
nosy: georg.brandl, jgehrcke
severity: normal
status: open
title: sys.exit() called from threads other than the main one: undocumented 
behaviour
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1

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



[issue6630] string.Template custom pattern not working

2009-08-03 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

I agree w/Raymond.  string + flags

--

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



[issue6596] urllib2 bug on CentOS

2009-08-03 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

10x for closing. It seems to me python is not mature as http client.

--
nosy: +rpetrov

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



[issue6635] Profiler doesn't print usage (indexError instead)

2009-08-03 Thread Francesco Del Degan

New submission from Francesco Del Degan f.delde...@ngi.it:

$ python -m profile
Usage: profile.py [-o output_file_path] [-s sort] scriptfile [arg] ...

$ python -m profile -s calls
Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py, 
line 122, in _run_module_as_main
__main__, fname, loader, pkg_name)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py, 
line 34, in _run_code
exec code in run_globals
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/profile.py, 
line 619, in module
main()
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/profile.py, 
line 614, in main
parser.print_usage()
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py, 
line 1584, in print_usage
print file, self.get_usage()
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py, 
line 1570, in get_usage
self.expand_prog_name(self.usage))
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py, 
line 1547, in expand_prog_name
return s.replace(%prog, self.get_prog_name())
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py, 
line 1542, in get_prog_name
return os.path.basename(sys.argv[0])
IndexError: list index out of range


This is triggered by an early override of sys.argv when usage() is called 
(Lib/profile.py:603):

if not sys.argv[1:]:
parser.print_usage()
sys.exit(2)

(options, args) = parser.parse_args()
sys.argv[:] = args

if (len(sys.argv)  0):
sys.path.insert(0, os.path.dirname(sys.argv[0]))
run('execfile(%r)' % (sys.argv[0],), options.outfile, options.sort)
else:
parser.print_usage()
return parser




In the else branch it tries to print usage but sys.argv[] were already 
overwritten.

Attached is the proposed patch (tested with 2.5, 2.6, 3.1).

--
components: Library (Lib)
files: python-profile-sysargv.patch
keywords: patch
messages: 91240
nosy: pr0gg3d
severity: normal
status: open
title: Profiler doesn't print usage (indexError instead)
type: behavior
versions: Python 2.5, Python 2.6, Python 3.1
Added file: http://bugs.python.org/file14639/python-profile-sysargv.patch

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



[issue6636] Non-existant directory in sys.path prevents further imports

2009-08-03 Thread Charles Mason

New submission from Charles Mason cemaso...@gmail.com:

Steps to reproduce:

1) Add to sys.path a path that does not exist
2) Import a module, any module.  This invokes get_path_importer over
every element of sys.path.  The NullImporter __init__ method is called
and an instance created for each non-existing path element in sys.path.
3) Create the path and put a valid module in said path
4) Try to import that module.

Behavior is that the interpreter fails to import.  This behavior seems
local to import.c only.

Attached a test case that shows failed for 2.5, 2.6, 3.0. 3.1rc1+.  I
have yet to test on the trunk but I can/will do that if necessary.

I believe I can fix this myself but I want to verify this is incorrect
behavior (a bug) and not an Undocumented Feature (or hell, maybe it
*is* documented somewhere).  I've skimmed over PEP 302 and didn't see
any relevant information.

If someone gives me the go ahead (or at least doesn't give me reason not
to), I'll get a patch put together, perhaps for several different fixes.

--
components: Interpreter Core
files: test.py
messages: 91241
nosy: cemasoniv
severity: normal
status: open
title: Non-existant directory in sys.path prevents further imports
type: behavior
versions: Python 2.5, Python 2.6, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file14640/test.py

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



[issue6637] non-empty defaultdict .copy() fails returning empty dict

2009-08-03 Thread Tom Clarke

New submission from Tom Clarke t.cla...@ic.ac.uk:

The enclosed script when run under 2.6.2 IDLE standard distribution on
x86 shows that shallow copy (.copy()) of a non-empty defaultdict object
returns an empty defaultdict!

Other ways to copy, e.g. defaultdict(none, d.items()), work fine.

Bug appears under:
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)] on win32

I have tested it on two different computers. They both also have the
visual installed from a v2.6 binary - but I can't see why this would
change standard libraries.

Hope I am not being stupid - this seems to big a bug to be real!

**Documentation on defaultdict states (nearly all) methods are same as
dict, and on dict defines copy() as returning a shallow copy.

**replace defaultdict by dict and this example works as expected

Best wishes, Tom

PS - I am new to python so forgive any stupidity!

--
components: Library (Lib)
messages: 91242
nosy: tomcl
severity: normal
status: open
title: non-empty defaultdict .copy()  fails returning empty dict
type: behavior
versions: Python 2.6

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



[issue6637] non-empty defaultdict .copy() fails returning empty dict

2009-08-03 Thread Tom Clarke

Changes by Tom Clarke t.cla...@ic.ac.uk:


Added file: http://bugs.python.org/file14641/bug.py

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



[issue1230540] sys.excepthook doesn't work in threads

2009-08-03 Thread Ian Beaver

Ian Beaver undercoverid...@gmail.com added the comment:

I found that the workaround suggested doesn't work when you have a
subclass of threading.Thread and you want to catch everything in the
module that contains the class to a common log.

Say you have a module with a socket server that spawns a thread on
accept and you want to log anything that tracebacks in the module. This
seems to work:

import sys
import logging
from functools import wraps

def myExceptHook(type, value, tb):
 Redirect tracebacks to error log 
import traceback
rawreport = traceback.format_exception(type, value, tb)
report = '\n'.join(rawreport)
log.error(report)

sys.excepthook = myExceptHook

def use_my_excepthook(view):
 Redirect any unexpected tracebacks  
@wraps(view)
def run(*args, **kwargs):
try:
return view(*args, **kwargs)
except:
sys.excepthook(*sys.exc_info())
return run


Then in your thread subclass:


class MyThread(threading.Thread):
def __init__(self, socket_conn):
threading.Thread.__init__(self)
self.my_conn = socket_conn

@use_my_excepthook
def run(self):
 Do stuff 

--
nosy: +undercoveridiot

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



[issue1230540] sys.excepthook doesn't work in threads

2009-08-03 Thread Ian Beaver

Ian Beaver undercoverid...@gmail.com added the comment:

Instead of using decorators, this is a slightly simpler modification to
the proposed workaround that allows for any subclassed run method to
also be caught.


def installThreadExcepthook():

Workaround for sys.excepthook thread bug
From
http://spyced.blogspot.com/2007/06/workaround-for-sysexcepthook-bug.html
   
(https://sourceforge.net/tracker/?func=detailatid=105470aid=1230540group_id=5470).
Call once from __main__ before creating any threads.
If using psyco, call psyco.cannotcompile(threading.Thread.run)
since this replaces a new-style class method.

init_old = threading.Thread.__init__
def init(self, *args, **kwargs):
init_old(self, *args, **kwargs)
run_old = self.run
def run_with_except_hook(*args, **kw):
try:
run_old(*args, **kw)
except (KeyboardInterrupt, SystemExit):
raise
except:
sys.excepthook(*sys.exc_info())
self.run = run_with_except_hook
threading.Thread.__init__ = init

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1230540
___
___
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-03 Thread John Machin

John Machin sjmac...@users.sourceforge.net added the comment:

Problem is memory leak from repeated calls of e.g.
compiled_pattern.search(some_text). Task Manager performance panel shows
increasing memory usage with regex but not with re. It appears to be
cumulative i.e. changing to another pattern or text doesn't release memory.

Environment: Python 2.6.2, Windows XP SP3, latest (29 July) regex zip file.

Example:

8-- regex_timer.py
import sys
import time
if sys.platform == 'win32':
timer = time.clock
else:
timer = time.time
module = __import__(sys.argv[1])
count = int(sys.argv[2])
pattern = sys.argv[3]
expected = sys.argv[4]
text = 80 * '~' + 'qwerty'
rx = module.compile(pattern)
t0 = timer()
for i in xrange(count):
assert rx.search(text).group(0) == expected
t1 = timer()
print %d iterations in %.6f seconds % (count, t1 - t0)
8---

Here are the results of running this (plus observed difference between
peak memory usage and base memory usage):

dos-prompt\python26\python regex_timer.py regex 100 ~ ~
100 iterations in 3.811500 seconds [60 Mb]

dos-prompt\python26\python regex_timer.py regex 200 ~ ~
200 iterations in 7.581335 seconds [128 Mb]

dos-prompt\python26\python regex_timer.py re 200 ~ ~
200 iterations in 2.549738 seconds [3 Mb]

This happens on a variety of patterns: w, wert, [a-z]+, [a-z]+t,
...

--
nosy: +sjmachin

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



[issue6629] seek doesn't properly handle file buffer, leads to silent data corruption

2009-08-03 Thread Antoine Pitrou

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

I'll look into this as soon as possible.

--
assignee:  - pitrou
nosy: +pitrou
priority:  - critical
stage:  - needs patch
versions: +Python 3.2

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



[issue6638] optparse parse_args argument references wrong

2009-08-03 Thread Kevin Quick

New submission from Kevin Quick kq1qu...@gmail.com:

In optparse description of 16.4.3.7. Parsing arguments (http://
docs.python.org/library/optparse.html#parsing-arguments) the keyword 
argument to parse_args is values=None but in the description of the 
options return value and in the second sentence of the Most common 
usage... paragraph following, it is referred to as the options 
argument.

--
assignee: georg.brandl
components: Documentation
messages: 91247
nosy: georg.brandl, kq1quick
severity: normal
status: open
title: optparse parse_args argument references wrong
type: resource usage
versions: Python 2.7

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



[issue6639] turtle: _tkinter.TclError: invalid command name .10170160

2009-08-03 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar sridh...@activestate.com:

I tried the following turtle program; it was taking some time to 
draw .. so I pressed C-c after which I saw the exception traceback.

 cat play.py 
from turtle import *

def f(length, depth):
   if depth == 0:
 forward(length)
   else:
 f(length/3, depth-1)
 right(60)
 f(length/3, depth-1)
 left(120)
 f(length/3, depth-1)
 right(60)
 f(length/3, depth-1)

f(500, 4)

 python play.py
Traceback (most recent call last):
  File /Users/sridharr/as/pypm/bin/python, line 41, in module
execfile(sys.argv[0])
  File play.py, line 15, in module
f(500, 4)
  File play.py, line 11, in f
f(length/3, depth-1)
  File play.py, line 7, in f
f(length/3, depth-1)
  File play.py, line 9, in f
f(length/3, depth-1)
  File play.py, line 10, in f
left(120)
  File string, line 1, in left
  File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
lib-tk/turtle.py, line 1612, in left
self._rotate(angle)
  File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
lib-tk/turtle.py, line 3107, in _rotate
self._update()
  File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
lib-tk/turtle.py, line 2562, in _update
self._update_data()
  File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
lib-tk/turtle.py, line 2553, in _update_data
self._pencolor, self._pensize)
  File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
lib-tk/turtle.py, line 569, in _drawline
self.cv.coords(lineitem, *cl)
  File string, line 1, in coords
  File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
lib-tk/Tkinter.py, line 2136, in coords
self.tk.call((self._w, 'coords') + args)))
_tkinter.TclError: invalid command name .10170160


--
components: Library (Lib)
messages: 91248
nosy: srid
severity: normal
status: open
title: turtle: _tkinter.TclError: invalid command name .10170160
type: behavior
versions: Python 2.6

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



[issue6639] turtle: _tkinter.TclError: invalid command name .10170160

2009-08-03 Thread Sridhar Ratnakumar

Changes by Sridhar Ratnakumar sridh...@activestate.com:


--
components: +Tkinter

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



[issue6640] urlparse should parse mailto: URL headers as query parameters

2009-08-03 Thread Myk Melez

New submission from Myk Melez m...@mozilla.org:

RFC 2368 http://www.ietf.org/rfc/rfc2368.txt specifies mailto: URLs as
having the following syntax:

 mailtoURL  =  mailto:; [ to ] [ headers ]
 to =  #mailbox
 headers=  ? header *(  header )
 header =  hname = hvalue
 hname  =  *urlc
 hvalue =  *urlc

The header fields in these URLs are roughly analogous to query
parameters in other URLs, but urlparse treats them as part of the path
(along with the email address):

 import urlparse
 urlparse.urlparse(mailto:f...@example.com?subject=hi;)
ParseResult(scheme='mailto', netloc='',
path='f...@example.com?subject=hi', params='', query='', fragment='')

It should treat them as query parameters instead, which would not only
make it easier to access them but would also make it easier to access
the email address, since one would no longer have to parse headers, if
any, out of the path first.

--
components: Library (Lib)
messages: 91249
nosy: mykmelez
severity: normal
status: open
title: urlparse should parse mailto: URL headers as query parameters
type: behavior
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6640
___
___
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-03 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

issue2636-20090804.zip is a new version of the regex module.

The memory leak has been fixed.

--
Added file: http://bugs.python.org/file14642/issue2636-20090804.zip

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



[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2009-08-03 Thread Gabriel Genellina

Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:

This patch replaces the random part with an increasing sequence (in a 
thread safe way).
Also, added a test case for make_msgid (there was none previously)

--
keywords: +patch
nosy: +gagenellina
Added file: http://bugs.python.org/file14643/utils.diff

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



[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2009-08-03 Thread Gabriel Genellina

Changes by Gabriel Genellina gagsl-...@yahoo.com.ar:


Added file: http://bugs.python.org/file14644/test_email.diff

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



[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2009-08-03 Thread Gabriel Genellina

Changes by Gabriel Genellina gagsl-...@yahoo.com.ar:


--
versions:  -3rd party, Python 2.4, Python 2.5, Python 3.0

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