[issue3959] Add Google's ipaddr.py to the stdlib

2009-05-03 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

r72210 pep8-ified the test names.

--
status: open - closed

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



[issue5902] Stricter codec names

2009-05-03 Thread Ezio Melotti

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

Actually I'd like to have some kind of convention mainly when the user
writes the encoding as a string, e.g. s.encode('utf-8'). Indeed, if the
encoding comes from a webpage or somewhere else it makes sense to have
some flexibility.

I think that 'utf-8' is the most widely used name for the UTF-8 codec
and it's not even mentioned in the table of the standard encodings. So
someone will use 'utf-8', someone else 'utf_8' and some users could even
pick one of the aliases, like 'U8'.

Probably is enough to add 'utf-8', 'iso-8859-1' and similar as
preferred form and explain why and how the codec names are normalized
and what are the valid aliases.

Regarding the ambiguity of 'UTF', it is not the only one, there's also
'LATIN' among the aliases of ISO-8859-1.

--

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



[issue5559] IDLE Output Window 's goto fails when path has spaces

2009-05-03 Thread Claudio Canepa

Claudio Canepa ccanep...@gmail.com added the comment:

On Sat, May 2, 2009 at 11:31 PM, Kurt B. Kaiser rep...@bugs.python.orgwrote:


 Kurt B. Kaiser k...@shore.net added the comment:

 r72227.

 How's your test code coming?  A relative Win filename with leading
 spaces should be found even when there's a file of same name but no
 spaces.

 --

 keywords: +26backport

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


Sorry for the delay, Kurt.
Test with rev 72227 , ok.

test cases:
(one space betwwen a and b , one before second tmp, one before first x)
Searching 'hello' in d:\tmp\*.tmp ...
d:\tmp\ xx.tmp: 1: hello # see woot.py:24 :24
d:\tmp\a b\ tmp\ xx.tmp: 1: hello # see woot.py:24 :24
d:\tmp\a b\ xx.tmp: 1: hello # see woot.py:24 :24
Found 3 hits.
( all three opens the correct file)

Same changing the target lines to stress the regex:
d:\tmp\ xx.tmp: 1: hello # see woot.py: 24:24
d:\tmp\a b\ tmp\ xx.tmp: 1: hello # see woot.py: 24:24
d:\tmp\a b\ xx.tmp: 1: hello # see woot.py: 24:24
Found 3 hits.
( all three opens the correct file)

Non absolute path:
 xx.py: 1: hello # see woot.py: 24:24
xx.py: 1: hello # see woot.py: 24:24
Found 2 hits.
( both opens the correct file)

others; not listed: ok.

Thanks for taking care Kurt.

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5559
___brbr
div class=gmail_quoteOn Sat, May 2, 2009 at 11:31 PM, Kurt B. Kaiser span 
dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span 
wrote:br
blockquote class=gmail_quote style=PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 
0.8ex; BORDER-LEFT: #ccc 1px solid
div class=imbrKurt B. Kaiser lt;a 
href=mailto:k...@shore.net;k...@shore.net/agt; added the 
comment:brbr/divr72227.brbrHow#39;s your test code coming?  A 
relative Win filename with leadingbrspaces should be found even when 
there#39;s a file of same name but nobr
spaces.brbr--/blockquote
blockquote class=gmail_quote style=PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 
0.8ex; BORDER-LEFT: #ccc 1px solidspan id=/spanbrkeywords: 
+26backportbr
div
div/div
div class=h5br___brPython tracker 
lt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;brlt;a 
href=http://bugs.python.org/issue5559; 
target=_blankhttp://bugs.python.org/issue5559/agt;br
___br/div/div/blockquote/div
divbr /div
div /div
divSorry for the delay, Kurt./div
divTest with rev 72227 , ok./div
div /div
divtest cases:/div
div(one space betwwen a and b , one before second tmp, one before first 
x)/div
divSearching #39;hello#39; in d:\tmp\*.tmp ...brd:\tmp\ xx.tmp: 1: hello 
# see woot.py:24 :24 brd:\tmp\a b\ tmp\ xx.tmp: 1: hello # see woot.py:24 :24 
brd:\tmp\a b\ xx.tmp: 1: hello # see woot.py:24 :24 brFound 3 hits.br
( all three opens the correct file)/div
div /div
divSame changing the target lines to stress the regex:/div
divd:\tmp\ xx.tmp: 1: hello # see woot.py: 24:24 brd:\tmp\a b\ tmp\ xx.tmp: 
1: hello # see woot.py: 24:24 brd:\tmp\a b\ xx.tmp: 1: hello # see woot.py: 
24:24 brFound 3 hits.br( all three opens the correct file)/div

div /div
divNon absolute path:/div
div xx.py: 1: hello # see woot.py: 24:24 brxx.py: 1: hello # see woot.py: 
24:24 brFound 2 hits.br( both opens the correct file)/div
div /div
divothers; not listed: ok./div
div /div
divThanks for taking care Kurt./div
divspan lang=ES-MODERN/span /div
divspan lang=ES-MODERN--/span/div
divccanepa/div
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5908] I need to import the module in the same thread

2009-05-03 Thread tyoc

Changes by tyoc z...@alum.com:


--
title: I need to import the module in the same thread? - I need to import the 
module in the same thread

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread Georg Brandl

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

Interestingly, my setlocale(3p) man page says:


ERRORS
   No errors are defined.


So isn't it debatable if returning the NULL pointer really is an error?

--
nosy: +georg.brandl

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread Jeroen Ruigrok van der Werven

Jeroen Ruigrok van der Werven asmo...@in-nomine.org added the comment:

On the subject whether or not returning a null pointer should be
considered he said:

-

On the subject whether or not returning a null pointer should be
considered an error he said:

--

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread Jeroen Ruigrok van der Werven

Changes by Jeroen Ruigrok van der Werven asmo...@in-nomine.org:


Removed file: http://bugs.python.org/file13843/locale.diff

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread Jeroen Ruigrok van der Werven

Changes by Jeroen Ruigrok van der Werven asmo...@in-nomine.org:


Removed file: http://bugs.python.org/file13849/locale.diff

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread Jeroen Ruigrok van der Werven

Jeroen Ruigrok van der Werven asmo...@in-nomine.org added the comment:

Really correct this time.

--
Added file: http://bugs.python.org/file13850/locale.diff

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



[issue5909] Segfault in typeobject.c

2009-05-03 Thread Mark Dickinson

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

This doesn't look like a Python issue to me;  it also looks like it's 
nothing to do with ctypes, so I've unselected that from the components.

The bug may well be in gobjectmodule.c, which isn't part of core Python 
AFAIK.

Any chance you could narrow down the cause of the failure?

--
assignee: theller - 
components:  -ctypes
nosy: +marketdickinson -theller

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread Jeroen Ruigrok van der Werven

Jeroen Ruigrok van der Werven asmo...@in-nomine.org added the comment:

Georg pointed out a mistake I introduced in my patch, updated now.

--
Added file: http://bugs.python.org/file13849/locale.diff

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread Jeroen Ruigrok van der Werven

Jeroen Ruigrok van der Werven asmo...@in-nomine.org added the comment:

I asked that as well on the POSIX/SUS list and Don Cragun responded with:

If you make the last argument to setlocale() be a pointer to
unallocated memory, implementations would be allowed to set errno to
EFAULT and terminate the process with a core dump even when this section
says No errors are defined.  An implementation could also set errno to
ENOENT (e.g., if the B locale wasn't known) or to EINVAL (e.g., if the
B locale existed but the LC_CTYPE portion of the locale was not in the
proper format).  That wording just means that the standard doesn't
require implementations to detect errors like these nor to report
specific error values for different possible errors.

On the subject whether or not returning a null pointer should be
considered he said:

The standard is silent on this issue.
Why does it make any difference to an application?
If setlocale(LC_CTYPE, B) returns a null pointer, the LC_CTYPE portion
of the locale was not changed.  If setlocale(LC_CTYPE, B) does not
return a null pointer, the LC_CTYPE portion of the locale was
successfully changed.

I am just wondering why we want to be quite different from how many
other languages are approaching the issue. Sure enough, we can use a
try: construct, but it kind of defeats the principle of least
astonishment by being different from the rest on this issue.

--

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



[issue5907] repr of time.struct_time type does not eval

2009-05-03 Thread John Morton

John Morton j...@angrymonkey.net.nz added the comment:

While it's true that repr() methods cannot generally be expected to eval
back into an object of the same type, the old repr behaviour of the
struct_time object did effectively do so. Admittedly it was a kludge due
to the time module functions originally producing a tuple before the
advent of the struct_time type, but code that expected repr-eval
behaviour worked up to 2.5. It's also evident that who ever changed the
behaviour of time.struct_time.__repr__ intended that to sill be the
case, otherwise it would have produced a string of the form time_struct
...

So I would describe this as a bug, otherwise you'd have to call it an
undocumented behaviour change :-)

The question remains, how to fix it? Should the repr output change to
time.struct_time((tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec,
tm_wday, tm_yday, tm_isdst)) or implement the keyword argument form?

(Note: python3.0 shares this new behaviour)

--
versions: +Python 3.0

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



[issue5909] Segfault in typeobject.c

2009-05-03 Thread Gerald Britton

Gerald Britton gerald.brit...@gmail.com added the comment:

This bug reports corresponds to one opened on Gnome:

http://bugzilla.gnome.org/show_bug.cgi?id=578419

According to the devs there:

As far as I can tell this is a Python/C bug.  PyGObject is doing
everything by
the book, and it is Python that is giving us corrupted base objects.  I
debugged long and hard but was unable to fix a bug that just isn't
there, nor
was I able to figure out a workaround.

I sure don't want this to get into a finger-pointing battle!  All I know
is that I can reproduce this at will. If the backtrace is not enough to
narrow down the cause of failure, please let me know what you would
need.  I'll be glad to help solve the problem.

--

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



[issue5912] import deadlocks when using fork

2009-05-03 Thread ayal baron

New submission from ayal baron ayal.ba...@rocketier.com:

While running 2 or more threads, if one thread is importing anything
(i.e. has the import lock) and the other thread runs fork and then the
child process runs import then the child and parent will hang forever
(the child waits on the import lock but the parent receives the signal).
see Issue1590864 for another example of this.
Following is a simple way to reproduce this behavior:

mysleep.py:
import time
time.sleep(1)

run_me_and_hang.py:
import os
import threading
import subprocess
class F(threading.Thread):
def run(self):
import mysleep
print f is out
f = F()
f.start()
a = subprocess.call([echo, DONE])
print exit

--
components: None
messages: 87044
nosy: abaron
severity: normal
status: open
title: import deadlocks when using fork
type: crash
versions: Python 2.4, Python 2.5, Python 2.6

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



[issue5913] On Windows os.listdir('') - cwd and os.listdir(u'') - C:\

2009-05-03 Thread Ezio Melotti

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

On Windows, with Python2/Python3, os.listdir('')/os.listdir(b'') list
the content of the current working directory and
os.listdir(u'')/os.listdir('') the content of C:\.

On Linux the error OSError: [Errno 2] No such file or directory: '' is
raised.

I also noticed that os.listdir('C:') (without the \) lists the content
of the cwd too.

--
components: Library (Lib), Windows
messages: 87045
nosy: ezio.melotti
severity: normal
status: open
title: On Windows os.listdir('') - cwd and os.listdir(u'') - C:\
type: behavior
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/issue5913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4305] ctypes fails to build on mipsel-linux-gnu (detects mips instead of mipsel)

2009-05-03 Thread Thomas Heller

Thomas Heller thel...@ctypes.org added the comment:

Tested myself, on a mipsel debian qemu instance.

--
resolution: accepted - fixed
status: open - closed

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



[issue5379] Multicast example mcast.py is outdated and ugly

2009-05-03 Thread Philipp Hagemeister

Philipp Hagemeister phi...@phihag.de added the comment:

Updated patch to use the new ipaddr module instead of the
platform-specific socket.inet_pton (unavailable on some platforms,
including Windows XP)
Updated formatting

--
Added file: http://bugs.python.org/file13851/mcast-example.diff

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



[issue5379] Multicast example mcast.py is outdated and ugly

2009-05-03 Thread Philipp Hagemeister

Changes by Philipp Hagemeister phi...@phihag.de:


Removed file: http://bugs.python.org/file13198/mcast-example.diff

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



[issue5914] Add PyOS_string_to_double function to C API

2009-05-03 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

Here's a patch that adds a PyOS_string_to_double function to complement 
the recently added PyOS_double_to_string function.

This is supposed to be a more Pythonic version of PyOS_ascii_strtod.  It 
raises Python exceptions to correspond to the various possible errors 
(malformed string, overflowing number, malloc failure...) instead of 
requiring the caller to examine errno.

It's intended for both internal and external use;  if this goes in, I 
intend to use it in the Python core in places where PyOS_ascii_strtod or 
PyOS_ascii_atof are currently used.

--
assignee: marketdickinson
components: Interpreter Core
files: string_to_double.patch
keywords: patch
messages: 87048
nosy: eric.smith, marketdickinson
severity: normal
status: open
title: Add PyOS_string_to_double function to C API
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file13852/string_to_double.patch

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



[issue5914] Add PyOS_string_to_double function to C API

2009-05-03 Thread Eric Smith

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

This looks okay to me (although since it's not hooked up I haven't
tested it). I particularly like that it doesn't allow leading
whitespace, and that the caller no longer has to remember errno
(forgetting to set and/or test it have both caused me problems in the past).

Does the whitespace change cause any problems for any internal code? I
wouldn't think so, but I haven't looked at it.

As long as you're at it, I'd suggest deprecating PyOS_ascii_*.

--
stage:  - patch review

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



[issue3286] IDLE opens window too low on Windows

2009-05-03 Thread Kurt B. Kaiser

Kurt B. Kaiser k...@shore.net added the comment:

IDLE doesn't control window placement - that's left to Tk to handle.  
Hopefully it will get better with time.  Once you take control, you 
have to handle all the window placement, which is one of the things 
that window managers are expert at, supposedly.  You could try taking 
your issue to the Tcl/Tk devs.

I'm running 8.5 here on a netbook with XP and a 1024x800 screen.  I 
simply reduced the initial height to 33 using the Configure dialog.

Zooming the window height is also helpful.  Use the hotkey.  Some 
attempt to control position  by platform has been made in 
ZoomHeight.py, where you'll find some magic numbers.  

On Linux, some people have panels at the top, some at the bottom, some 
hide them, and some don't have any.  Maybe we'll look at this config 
again once we get the extension parameters on the Config dialog.  We 
could move some of those magic numbers to the config file.

--
assignee:  - kbk
nosy: +kbk
resolution:  - wont fix
status: open - closed

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread Martin v. Löwis

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

 
 ERRORS
No errors are defined.
 
 
 So isn't it debatable if returning the NULL pointer really is an error?

As Jeroen reports, this really means two different things
a) no errors really means no errno codes. Whether or not
   an error may occur is an independent issue.
b) are defined really means that POSIX doesn't define any
   standard errno codes; the system may indeed still set errno
   (C99, 7.5p3)

--

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread Martin v. Löwis

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

 I am just wondering why we want to be quite different from how many
 other languages are approaching the issue.

Because we have exceptions, and they don't. Would you also propose
that open() should return None, just because fopen(3) returns NULL?

While it may be debatable whether applications care about the error
when passing  as the locale, there is also the second case where
applications pass an explicit locale

  setlocale(locale.LC_ALL, de...@euro)

When they do that, they surely want to be told if this actually
worked.

 Sure enough, we can use a
 try: construct, but it kind of defeats the principle of least
 astonishment by being different from the rest on this issue.

There is also the backwards compatibility issue: your change
will break existing code.

--

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



[issue5907] repr of time.struct_time type does not eval

2009-05-03 Thread Martin v. Löwis

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

 The question remains, how to fix it? 

Or whether to change it at all. It's hard to imagine that
applications may rely on that aspect of the behavior - they
have to use eval, after all.

--

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



[issue5913] On Windows os.listdir('') - cwd and os.listdir(u'') - C:\

2009-05-03 Thread Antoine Pitrou

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

As for the C: behaviour, I think it is normal: you are not specifying
the path itself, only the drive letter, so it uses the current path in
the specified drive (which /is/ cwd if you are already running from C:,
but may be something else if running from another drive).

As for '' and b'', I think that ambiguity is bad and these values should
be prohibited by Python (ValueError comes to mind).

--
nosy: +loewis, pitrou
priority:  - high
stage:  - test needed
versions:  -Python 2.4, Python 2.5, Python 2.6, Python 3.0

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



[issue5910] kqueue for more than one event is broken.

2009-05-03 Thread Antoine Pitrou

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


--
nosy: +christian.heimes

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



[issue5914] Add PyOS_string_to_double function to C API

2009-05-03 Thread Mark Dickinson

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

Thanks for the feedback!

Here's an updated patch that also deprecates PyOS_ascii_strtod and 
PyOS_ascii_atof and hooks up PyOS_string_to_double everywhere.  The 
documentation still needs proper markup, and I'll add some C-API tests.

--
Added file: http://bugs.python.org/file13853/string_to_double_v2.patch

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



[issue5913] On Windows os.listdir('') - cwd and os.listdir(u'') - C:\

2009-05-03 Thread Martin v. Löwis

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

Before anything is changed, I would first like to understand where the
difference comes from.

If it gives ENOENT on Unix, it should also give ENOENT on Windows
(rather than giving ValueError). In addition, it should also give what
open()/open(b) gives - as it really is the request to open the
directory named . (disclaimer: I haven done any tests or code review yet)

--

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



[issue5914] Add PyOS_string_to_double function to C API

2009-05-03 Thread Eric Smith

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

This looks okay to me, and passes the tests.

In PyOS_string_to_double, you can simplify it by using PyErr_Format
instead of printing into a buffer and using PyErr_SetString. Sorry I
didn't catch this earlier.

--

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



[issue5809] No such file or directory with framework build under MacOS 10.4.11

2009-05-03 Thread Fazal Majid

Fazal Majid pyt...@sentfrom.com added the comment:

I am experiencing the same problem with 2.6.2, whether using parallel
make or not, but 2.6.1. builds just fine.

--
nosy: +majid

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



[issue5379] Multicast example mcast.py is outdated and ugly

2009-05-03 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

thanks!  committed in r72237  py3k r72238.

--
resolution:  - accepted
status: open - closed

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-05-03 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

A slightly improved patch, using DuplicateFile instead of storing a copy
of each file for each Python version. Should keep the size of the
resulting MSI similar to the size of the currently generated MSIs.

--
Added file: http://bugs.python.org/file13854/bdist_msi.patch

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-05-03 Thread Steven Bethard

Changes by Steven Bethard steven.beth...@gmail.com:


Removed file: http://bugs.python.org/file13847/bdist_msi.patch

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



[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-05-03 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

both the behavior change and PySys_SetArgvEx() with an additional
boolean parameter sounds good to me.

Some people may disagree about changing the default behavior.  So long
as its documented in the whatsnew I personally think it is fine.  But
would doing that require incrementing the API version number?

+1 on adding a PySys_SetArgvEx() in time for 3.1 (the clock is ticking
fast).

+0 on the existing API default change.

--
nosy: +gregory.p.smith

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



[issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10

2009-05-03 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
assignee: barry - marketdickinson

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-05-03 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

Ok, one last tiny update that makes sure TARGETDIR is always set to one
of the TARGETDIRX.Ys from a Feature that is actually selected.

I swear I'm done with this now. ;-)

--
Added file: http://bugs.python.org/file13855/bdist_msi.patch

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-05-03 Thread Steven Bethard

Changes by Steven Bethard steven.beth...@gmail.com:


Removed file: http://bugs.python.org/file13854/bdist_msi.patch

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



[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-05-03 Thread Antoine Pitrou

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

By the way, the advantage of a new function over a behaviour change is
that the new function could safely be backported to 2.6.3, since it is
also a security fix.

--

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



[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-05-03 Thread Antoine Pitrou

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


--
nosy: +barry, benjamin.peterson
priority: critical - release blocker
stage: test needed - needs patch
versions: +Python 2.6, Python 3.0

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



[issue5705] os.getpwent returns unsigned 32bit value, os.setuid refuses it

2009-05-03 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

release30-maint r72245 (its already been merged into py3k).

--
resolution:  - fixed
status: open - closed

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-05-03 Thread Martin v. Löwis

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

Can you kindly attach a demo MSI, to simplify review?

--

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-05-03 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

Here's an MSI generated for the argparse module.

--
Added file: http://bugs.python.org/file13856/argparse-0.9.1.win32.msi

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



[issue1684] CGIHTTPServer does not chdir prior to executing the CGI script

2009-05-03 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

yes the reporter is correct.

the suggested chdir happens in the subprocess.

however, that only works on posix systems:

windows currently uses popen2/3.  (see issue1535504 for another issue
with that).  switching to subprocess and passing in cwd would fix it.

and non-posix non-windows (what is that?) uses execfile to run the
script in process.  we can't fix that one, nor should be bother.  what
is a non-posix non-windows system that needs to run a cgi http server??

--
assignee: christian.heimes - gregory.p.smith
nosy: +gregory.p.smith

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



[issue5914] Add PyOS_string_to_double function to C API

2009-05-03 Thread Mark Dickinson

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

Thanks.  I've committed a version of this patch, with Eric's suggested 
PyErr_Format change, in r72248.

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

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



[issue5915] PEP 383 implementation

2009-05-03 Thread Martin v. Löwis

New submission from Martin v. Löwis mar...@v.loewis.de:

This is the implementation of PEP 383. Rietveld submission will follow.

--
assignee: benjamin.peterson
files: 383.diff
keywords: patch
messages: 87069
nosy: benjamin.peterson, loewis
priority: release blocker
severity: normal
status: open
title: PEP 383 implementation
Added file: http://bugs.python.org/file13857/383.diff

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



[issue5915] PEP 383 implementation

2009-05-03 Thread Martin v. Löwis

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

http://codereview.appspot.com/52095

--

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



[issue5915] PEP 383 implementation

2009-05-03 Thread Martin v. Löwis

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

Some notes, in addition to the PEP:

- the file system APIs have all stopped using et converters, and use O
converters, with a new API function PyUnicode_FSConverter. This outputs
a bytes or bytearray object which needs to be released when done; if it
is a bytearray, the bytes also need to be locked when the GIL is released.

- to convert the environment successfully, initialization of the
filesystemddefaultencoding had to be moved up in the code.

- conversion of the command line arguments can't use codecs. Instead, it
uses the C library, hoping that their encoding is the same as the one
that we later determine as the file system encoding. With C99 mbrtowc,
it is possible to put utf8b escapes in the output; without that
function, every non-ASCII byte gets escaped if the CRT fails to convert
the entire string successfully.

- in the unlikely case that listdir still fails (if the file system
encoding cannot convert ASCII bytes sometimes), listdir now raises an
exception, to be consistent with the failure mode in all other places
where this problem may occur.

--

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



[issue3286] IDLE opens window too low on Windows

2009-05-03 Thread Terry J. Reedy

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

When I shrank the initial height, tk starting randomizing the initial
placement so that it only occasionally puts the window too low.  I will
tolerate that.

It is a bug for a window manager to ignore the Taskbar; this is rare to
unique in my experience.  In fact, most Windows apps reopen at the size
and position closed.  But I am no longer bothered enough to find,
register with, and post to another tracker.  Thanks for explaining.

--

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



[issue3286] IDLE opens window too low on Windows

2009-05-03 Thread Guilherme Polo

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

 It is a bug for a window manager to ignore the Taskbar; this is rare to
 unique in my experience.  In fact, most Windows apps reopen at the size
 and position closed.  But I am no longer bothered enough to find,
 register with, and post to another tracker.  Thanks for explaining.

Actually we could change IDLE to tell Tk to display the window at the
last used position.

--

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



[issue5915] PEP 383 implementation

2009-05-03 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

The calls to bytes2str are not checked in posixmodule.c.


http://codereview.appspot.com/52095/diff/1/5
File Include/unicodeobject.h (right):

http://codereview.appspot.com/52095/diff/1/5#newcode1254
Line 1254: The function is intended to be used for paths and file names
only
If these are only meant to be used internally during bootstrap, should
they have the _Py prefix?

http://codereview.appspot.com/52095/diff/1/10
File Lib/test/test_pep383.py (right):

http://codereview.appspot.com/52095/diff/1/10#newcode1
Line 1: from test import support
I'm not sure this deserves a whole new file. Couldn't UtfbTest go in
test_codecs and FileTests go in test_os?

http://codereview.appspot.com/52095/diff/1/10#newcode2
Line 2: import unittest, shutil, os, sys
PEP 8 says these should be on separate lines.

http://codereview.appspot.com/52095/diff/1/10#newcode33
Line 33: if os.name != 'win32':
Isn't os.name nt on Windows?

Also, you could skip this whole class on Windows by decorating the class
with @unittest.skipIf(sys.platform.startswith(win)).

http://codereview.appspot.com/52095/diff/1/10#newcode47
Line 47: f = open(self.bdir + b/ + fn, w)
Looks like a good place for os.path.join.

http://codereview.appspot.com/52095/diff/1/13
File Modules/posixmodule.c (right):

http://codereview.appspot.com/52095/diff/1/13#newcode547
Line 547: else if(PyByteArray_Check(o)) {
There's a small white space problem here.

http://codereview.appspot.com/52095/diff/1/13#newcode548
Line 548: if (lock  o-ob_type-tp_as_buffer-bf_getbuffer(o, NULL, 0)
 0)
I believe you want PyObject_GetBuffer here.

http://codereview.appspot.com/52095/diff/1/13#newcode596
Line 596: bytes2str(name, 0));
What if byte2str returns NULL?

http://codereview.appspot.com/52095/diff/1/2
File Python/codecs.c (right):

http://codereview.appspot.com/52095/diff/1/2#newcode852
Line 852: if (!res)
This leaks object.

http://codereview.appspot.com/52095/diff/1/2#newcode895
Line 895: return NULL;
This leaks object.

http://codereview.appspot.com/52095

--

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



[issue1684] CGIHTTPServer does not chdir prior to executing the CGI script

2009-05-03 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

fyi - non-posix / non-windows platforms could include alternate python
VMs that don't support fork, popen2 or subprocess.

--
assignee: gregory.p.smith - 

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



[issue5916] Wrong function referenced in documentation of socket.inet_aton

2009-05-03 Thread Philipp Hagemeister

New submission from Philipp Hagemeister phi...@phihag.de:

From the documentation of socket.inet_aton (and socket.inet_ntoa):

inet_aton() does not support IPv6, and getnameinfo() should be used
instead for IPv4/v6 dual stack support.

socket.getnameinfo can not replace inet_aton/inet_ntoa at all. However,
inet_pton and inet_ntop can (and do support IPv6). Therefore, the
attached patch changes the getnameinfo references to inet_pton and
inet_ntop.

--
assignee: georg.brandl
components: Documentation
files: aton-doc.diff
keywords: patch
messages: 87076
nosy: georg.brandl, phihag
severity: normal
status: open
title: Wrong function referenced in documentation of socket.inet_aton
type: behavior
versions: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file13858/aton-doc.diff

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



[issue3066] FD leak in urllib2

2009-05-03 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

not reproducable in head as stated.

--
resolution:  - fixed
status: open - closed

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



[issue5917] Reference platform-independent alternative in socket.inet_ntop documentation

2009-05-03 Thread Philipp Hagemeister

New submission from Philipp Hagemeister phi...@phihag.de:

socket.inet_ntop is only available on some UNIX platforms, although for
example Windows users may want to use it. The new ipaddr module provides
a platform-independent conversion to the packed format on all platforms
and should therefore be used in platform-independent programs.

--
assignee: georg.brandl
components: Documentation
files: doc-packed-ref.diff
keywords: patch
messages: 87078
nosy: georg.brandl, phihag
severity: normal
status: open
title: Reference platform-independent alternative in socket.inet_ntop 
documentation
type: feature request
versions: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file13859/doc-packed-ref.diff

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



[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-05-03 Thread R. David Murray

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

On Sun, 3 May 2009 at 08:55, Jeroen Ruigrok van der Werven wrote:
 I am just wondering why we want to be quite different from how many
 other languages are approaching the issue. Sure enough, we can use a
 try: construct, but it kind of defeats the principle of least
 astonishment by being different from the rest on this issue.

Only if you imagine that the principal applies to expectations inherited
from other languages.  In a Python context, which is what the principle
actually refers to, it would be astonishing if the error were to be
silently ignored.

--
nosy: +r.david.murray

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



[issue5913] On Windows os.listdir('') - cwd and os.listdir(u'') - C:\

2009-05-03 Thread R. David Murray

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

On Sun, 3 May 2009 at 17:36, Antoine Pitrou wrote:
 As for the C: behaviour, I think it is normal: you are not specifying
 the path itself, only the drive letter, so it uses the current path in
 the specified drive (which /is/ cwd if you are already running from C:,
 but may be something else if running from another drive).

It is normal behavior for Windows.  Try it with the 'dir' command
in a command window.  (That said, I have no idea, not being a
Windows user, how Windows decides what the 'current' directory
is on any given drive from any given context).

--
nosy: +r.david.murray

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



[issue5108] Invalid UTF-8 (%s) length in PyUnicode_FromFormatV()

2009-05-03 Thread Walter Dörwald

Walter Dörwald wal...@livinglogic.de added the comment:

Checked in:
r72260 (trunk)
r72262 (release26-maint)
r72265 (py3k)
r72266 (release30-maint)

--
resolution:  - fixed
status: open - closed

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



[issue5108] Invalid UTF-8 (%s) length in PyUnicode_FromFormatV()

2009-05-03 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 The problem with your patch is that it calls PyUnicode_DecodeUTF8() 
twice

I read your patch: storing the decoded string is the right way to do 
that, but i didn't noticed the callresult stack.

 Could you test this new version to see if there's still a Valgrind 
report?

I will try to reproduce the crash using my Python fuzzer (Fusil). But 
it looks better (and valid).

Thanks.

--

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



[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-05-03 Thread Antoine Pitrou

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

Here is a patch for trunk.

--
Added file: http://bugs.python.org/file13860/setargvex.patch

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



[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-05-03 Thread Antoine Pitrou

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

Jan, would the new API be ok to you?

--

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



[issue1266570] PEP 349: allow str() to return unicode

2009-05-03 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

PEP 349 was rejected because it breaks backward compatibility, eg. it 
breaks the assomption that str(ux) converts unicode to byte string.

Python3 is the only good fix for all byte/character Python2 issues.

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

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



[issue1602] windows console doesn't print utf8 (Py30a2)

2009-05-03 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
components:  -Windows

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



[issue1602] windows console doesn't print utf8 (Py30a2)

2009-05-03 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
components: +Windows

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



[issue1602] windows console doesn't print utf8 (Py30a2)

2009-05-03 Thread Antoine Pitrou

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

Yes, it is a Windows problem. There simply doesn't seem to be a true
Unicode codepage for command-line apps. Recommend closing.

--
nosy: +pitrou

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



[issue5918] test_parser crashes when run after test_distutils

2009-05-03 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

This happens sometimes here on trunk, in non-debug mode:

$ ./python -m test.regrtest test_distutils test_parser
Could not find '/home/antoine/cpython/__svn__/Lib/test' in sys.path to
remove it
test_distutils
0 blocks
find:
`/home/antoine/tmp/tmpngdCYU/foo/build/bdist.linux-x86_64/rpm/BUILDROOT/foo-0.1-1.x86_64/usr/lib/debug':
Aucun fichier ou dossier de ce type
0 blocks
find:
`/home/antoine/tmp/tmp431p68/foo/build/bdist.linux-x86_64/rpm/BUILDROOT/foo-0.1-1.x86_64/usr/lib/debug':
Aucun fichier ou dossier de ce type
test_parser
Erreur de segmentation (core dumped)


Perhaps test_distutils sets something up which makes Python import the
wrong version of the parser module.

--
assignee: tarek
components: Distutils, Tests
messages: 87087
nosy: pitrou, tarek
priority: normal
severity: normal
stage: needs patch
status: open
title: test_parser crashes when run after test_distutils
type: crash
versions: Python 2.7, Python 3.1

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



[issue3130] In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4.

2009-05-03 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I like the idea of using uint16_t and uint32_t. Unicode 5.1 contains 
approximately 1 million of codes (and 100,000 characters), so 21 bits 
are already enough to use the full Unicode 5.1 standard (released in 
April 2009). Use more than 32 bits for an unicode character is wasting 
memory.

--

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



[issue5918] test_parser crashes when run after some other tests

2009-05-03 Thread Antoine Pitrou

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

Sorry, it also fails with ./python -m test.regrtest test_os
test_parser, so it's not caused by test_distutils.

--
assignee: tarek - 
title: test_parser crashes when run after test_distutils - test_parser crashes 
when run after some other tests

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



[issue1298813] sysmodule.c: realpath() is unsafe

2009-05-03 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

The patch introduces a memory leak, canonicalize_file_name() returns a 
new allocated string which is not freed later.

--

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



[issue4751] Patch for better thread support in hashlib

2009-05-03 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

Committed with a couple refactorings in trunk r72267.  I also added a
test (basically checking for corruption that would occur if the locks
weren't working).

(I'll sort out any py3k vs trunk differences to make future change
merges easier).

--
status: open - closed

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



[issue3382] Make '%F' and float.__format__('F') convert results to upper case.

2009-05-03 Thread Eric Smith

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

With the implementation of issue5859 (py3k only), the only case where
this matters in NAN and INF. I'm going to address those in 3.1, and not
make any change for 2.x.

--
versions:  -Python 2.7

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



[issue4482] 10e667.__format__('+') should return 'inf'

2009-05-03 Thread Eric Smith

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

With the new PyOS_double_to_string, this issue largely goes away. There
are some remaining issues with commas, 'n' and the like. I'll address those.

--

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



[issue5913] On Windows os.listdir('') - cwd and os.listdir(u'') - C:\

2009-05-03 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

I hope attached patch works.

 import os
 os.listdir()
Traceback (most recent call last):
  File stdin, line 1, in module
WindowsError: [Error 3] 指定されたパスが見つかりません。: ''
[36200 refs]
 os.listdir(u)
Traceback (most recent call last):
  File stdin, line 1, in module
WindowsError: [Error 3] 指定されたパスが見つかりません。: u''

# Error message says Cannot find specified path

--
keywords: +patch
nosy: +ocean-city
Added file: http://bugs.python.org/file13861/listdir_on_empty_path.patch

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



[issue5913] On Windows os.listdir('') - cwd and os.listdir(u'') - C:\

2009-05-03 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

For u, os.listdir calls FindFirstFileW with u\\*.*,
For , os.listdir calls FindFirstFileA with *.*.

The code before FindFirstFile[AW] is slightly different for empty path.

--

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



[issue5799] Change ntpath functions to implicitly support UNC paths

2009-05-03 Thread Larry Hastings

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

I've generated a new patch, attached.  I don't know why you had trouble
applying.  I tested this one with a clean tree and patch -p1  ... and
it applied cleanly.  If it fails again, how about I upload the three
modified files?

I removed the extraneous changes.  I claim that the changes that remain
in ntpath are salient to the UNC changes, but feel free to call me on it
if I got that wrong.  (Or make a new patch as you have graciously
volunteered to do.)

I also amended splitdrive's UNC handling slightly; it now rejects
UNC-like paths that start with three slashes or have two slashes between
the host and mount point.  Thus neither ///computer/mountpoint/x nor
//computer//mountpoint/x will be parsed as UNC paths.

--
Added file: http://bugs.python.org/file13862/lch.ntpath.r72242.diff

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



[issue5913] On Windows os.listdir('') - cwd and os.listdir(u'') - C:\

2009-05-03 Thread Martin v. Löwis

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

Hirokazu, the patch looks fine, please apply to 2.7 and 3k.

I wouldn't backport it to 2.6/3.0, since it may break existing code.

--
assignee:  - ocean-city
resolution:  - accepted

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



[issue5915] PEP 383 implementation

2009-05-03 Thread Martin v. Löwis

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

Reviewers: report_bugs.python.org, Benjamin,

Message:
Fixed in r72272

http://codereview.appspot.com/52095/diff/1/5
File Include/unicodeobject.h (right):

http://codereview.appspot.com/52095/diff/1/5#newcode1254
Line 1254: The function is intended to be used for paths and file names
only
On 2009/05/03 21:34:26, Benjamin wrote:
 If these are only meant to be used internally during bootstrap, should
they have
 the _Py prefix?

Perhaps. However, I only moved the declarations from a different part of
the file, so I feel renaming them is out of scope for this patch. Only
PyUnicode_FSConverter is new.

http://codereview.appspot.com/52095/diff/1/10
File Lib/test/test_pep383.py (right):

http://codereview.appspot.com/52095/diff/1/10#newcode1
Line 1: from test import support
On 2009/05/03 21:34:26, Benjamin wrote:
 I'm not sure this deserves a whole new file. Couldn't UtfbTest go in
test_codecs
 and FileTests go in test_os?

Done.

http://codereview.appspot.com/52095/diff/1/10#newcode2
Line 2: import unittest, shutil, os, sys
On 2009/05/03 21:34:26, Benjamin wrote:
 PEP 8 says these should be on separate lines.

Done.

http://codereview.appspot.com/52095/diff/1/10#newcode33
Line 33: if os.name != 'win32':
On 2009/05/03 21:34:26, Benjamin wrote:
 Isn't os.name nt on Windows?

class with
 @unittest.skipIf(sys.platform.startswith(win)).

Done. It's now in a non-Win32 section of test_os.

http://codereview.appspot.com/52095/diff/1/10#newcode47
Line 47: f = open(self.bdir + b/ + fn, w)
On 2009/05/03 21:34:26, Benjamin wrote:
 Looks like a good place for os.path.join.

Done.

http://codereview.appspot.com/52095/diff/1/13
File Modules/posixmodule.c (right):

http://codereview.appspot.com/52095/diff/1/13#newcode547
Line 547: else if(PyByteArray_Check(o)) {
On 2009/05/03 21:34:26, Benjamin wrote:
 There's a small white space problem here.

Sorry, I don't see it: what is the problem?

http://codereview.appspot.com/52095/diff/1/13#newcode548
Line 548: if (lock  o-ob_type-tp_as_buffer-bf_getbuffer(o, NULL, 0)
 0)
On 2009/05/03 21:34:26, Benjamin wrote:
 I believe you want PyObject_GetBuffer here.

Done. Notice, however, the loss of symmetry with release_bytes, where an
equivalent API function does not appear to exist.

http://codereview.appspot.com/52095/diff/1/13#newcode596
Line 596: bytes2str(name, 0));
On 2009/05/03 21:34:26, Benjamin wrote:
 What if byte2str returns NULL?

It really shouldn't; bytes2str should only be applied to results of the
PyUnicode_FSConverter, which should have checked that the result is
either bytes or bytearray. I have now changed bytes2str to give a
FatalError otherwise.

http://codereview.appspot.com/52095/diff/1/2
File Python/codecs.c (right):

http://codereview.appspot.com/52095/diff/1/2#newcode852
Line 852: if (!res)
On 2009/05/03 21:34:26, Benjamin wrote:
 This leaks object.

Done. Again :-(

http://codereview.appspot.com/52095/diff/1/2#newcode895
Line 895: return NULL;
On 2009/05/03 21:34:26, Benjamin wrote:
 This leaks object.

Done.

Please review this at http://codereview.appspot.com/52095

Affected files:
   M Doc/library/codecs.rst
   M Doc/library/os.rst
   M Include/unicodeobject.h
   A Lib/test/test_pep383.py
   M Modules/_io/fileio.c
   M Modules/posixmodule.c
   M Modules/python.c
   M Objects/unicodeobject.c
   M Python/codecs.c
   M Python/pythonrun.c
   M configure
   M configure.in
   M pyconfig.h.in

--

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



[issue5915] PEP 383 implementation

2009-05-03 Thread Martin v. Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


Removed file: http://bugs.python.org/file13857/383.diff

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



[issue5915] PEP 383 implementation

2009-05-03 Thread Martin v. Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


Added file: http://bugs.python.org/file13863/383.diff

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