[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-24 Thread Hirokazu Yamamoto

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

Sorry, previous one contained experimental code for another issue.
I've attached correct one.

--
Added file: http://bugs.python.org/file18992/py3k_better_build_ssl.zip

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



[issue9933] os module does not have the documented EX_NOTFOUND attribute

2010-09-24 Thread Georg Brandl

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

I agree with Martin.

--
nosy: +georg.brandl
resolution:  - works for me
status: open - closed

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



[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Iwasa Kazmi

Iwasa Kazmi kzmi...@gmail.com added the comment:

Added sample registory data file.

--
Added file: http://bugs.python.org/file18993/fonts.reg

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



[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Iwasa Kazmi

Iwasa Kazmi kzmi...@gmail.com added the comment:

Added py file to reproduce.

--
Added file: http://bugs.python.org/file18994/test.py

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



[issue9868] test_locale leaves locale changed

2010-09-24 Thread Hirokazu Yamamoto

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

Committed in r84973(py3k) and r84990(release31-maint).

--
resolution:  - fixed
status: open - closed

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




[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-24 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:


Removed file: http://bugs.python.org/file18974/py3k_better_build_ssl.zip

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



[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-24 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:


Removed file: http://bugs.python.org/file18992/py3k_better_build_ssl.zip

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



[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-24 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:


Added file: http://bugs.python.org/file18995/py3k_better_build_ssl.zip

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



[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
stage:  - patch review

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



[issue9783] _elementtree.c warnings under 64-bit Windows

2010-09-24 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
stage: needs patch - patch review

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor

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

New version of the patch:
 - reencode sys.path_importer_cache (and remove the last FIXME)
 - fix different reference leaks
 - catch PyIter_Next() failures
 - create a subfunction to reencode sys.modules: it's easier to review and 
manager errors in shorter functions
 - add some comments

--
Added file: http://bugs.python.org/file18996/reencode_modules_path-3.patch

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor

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


Removed file: http://bugs.python.org/file18561/reencode_modules_path-2.patch

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor

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

 I would rename the feature to something like redecode-modules

Yes, right. I will rename the functions before commiting the patch.

--

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Marc-Andre Lemburg

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

STINNER Victor wrote:
 
 STINNER Victor victor.stin...@haypocalc.com added the comment:
 
 New version of the patch:
  - reencode sys.path_importer_cache (and remove the last FIXME)
  - fix different reference leaks
  - catch PyIter_Next() failures
  - create a subfunction to reencode sys.modules: it's easier to review and 
 manager errors in shorter functions
  - add some comments

Why is this needed ?

With PYTHONFSENCODING there should be no need to change the FS
encoding after startup.

--
nosy: +lemburg

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor

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

 Why is this needed ?

Short answer: to support filesystem encoding different than utf-8. See #8611 
for a longer explanation.

Example:

$ pwd
/home/SHARE/SVN/py3ké
$ PYTHONFSENCODING=ascii ./python test_fs_encoding.py 
Fatal Python error: Py_Initialize: can't initialize sys standard streams
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 20: 
ordinal not in range(128)
Abandon

My patch fixes this specific case and prepare the work for the complete fix 
(support different *locale* encodings, see #8611 and #9425).

--

Longer answer: Py_FilesystemDefaultEncoding is changed too late. Some modules 
are already loaded, sys.executable is already set, etc. 
Py_FilesystemDefaultEncoding is changed but modules filenames are decoded with 
utf-8 and should be redecoded.

It is not possible to set Py_FilesystemDefaultEncoding before loading the first 
module. initfsencoding() loads codecs and encodings modules to check the codec 
name. sys.executable is also set before initfsencoding().

Read my other messages of this issue to get other reasons why the patch is 
needed. I explained other possibilities (but they don't work).

--

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Antoine Pitrou

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

It is not possible to set Py_FilesystemDefaultEncoding before loading 
the first module. initfsencoding() loads codecs and encodings modules to 
check the codec name.

Not sure it's related, but there seems to be a bug:

$ ./python -c import sys; print(sys.getfilesystemencoding())
utf-8
$ LC_CTYPE=latin1 ./python -c import sys; print(sys.getfilesystemencoding())
ascii
$ LC_CTYPE=fr_FR:iso8859-1 ./python -c import sys; 
print(sys.getfilesystemencoding())
ascii

--
nosy: +pitrou

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Antoine Pitrou

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

Some things about your patch:
- as Amaury said, functions should be named redecode* rather than reencode*
- please use -1 for error return, not 1
- have you tried to measure if it made Python startup slower?

--

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor

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

 Not sure it's related, but there seems to be a bug:

It's not a bug, it's a feature :-) If you specify a non-existing locale, the 
GNU libc fails back to ascii.

$ locale -a
C
français
french
fr_FR
fr...@euro
fr_FR.iso88591
fr_fr.iso885...@euro
fr_FR.utf8

$ LC_CTYPE=fr_FR.iso88591 ./python -c import locale; 
print(locale.nl_langinfo(locale.CODESET))
ISO-8859-1

$ LC_CTYPE=xxx ./python -c import locale; 
print(locale.nl_langinfo(locale.CODESET))
ANSI_X3.4-1968

--

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



[issue1542544] Improve dynamic linking support on AIX

2010-09-24 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

I think this issue can be closed as a duplicate of issue 941346.

--

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



[issue1542544] Improve dynamic linking support on AIX

2010-09-24 Thread Antoine Pitrou

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


--
resolution:  - duplicate
status: open - closed
superseder:  - AIX shared library fix

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Antoine Pitrou

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


--
nosy: +brett.cannon, loewis

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



[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-24 Thread Antoine Pitrou

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

I'm not really able to review this kind of things. Please commit if you think 
it is ok.

--

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



[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Antoine Pitrou

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


--
nosy: +brian.curtin, haypo, tim.golden
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Marc-Andre Lemburg

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

STINNER Victor wrote:
 
 STINNER Victor victor.stin...@haypocalc.com added the comment:
 
 Why is this needed ?
 
 Short answer: to support filesystem encoding different than utf-8. See #8611 
 for a longer explanation.
 
 Example:
 
 $ pwd
 /home/SHARE/SVN/py3ké
 $ PYTHONFSENCODING=ascii ./python test_fs_encoding.py 
 Fatal Python error: Py_Initialize: can't initialize sys standard streams
 UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 
 20: ordinal not in range(128)
 Abandon
 
 My patch fixes this specific case and prepare the work for the complete fix 
 (support different *locale* encodings, see #8611 and #9425).
 
 --
 
 Longer answer: Py_FilesystemDefaultEncoding is changed too late. Some modules 
 are already loaded, sys.executable is already set, etc. 
 Py_FilesystemDefaultEncoding is changed but modules filenames are decoded 
 with utf-8 and should be redecoded.
 
 It is not possible to set Py_FilesystemDefaultEncoding before loading the 
 first module. initfsencoding() loads codecs and encodings modules to check 
 the codec name. sys.executable is also set before initfsencoding().
 
 Read my other messages of this issue to get other reasons why the patch is 
 needed. I explained other possibilities (but they don't work).

Thanks for the explanation. So the only reason why you have to go through
all those hoops is to

 * allow the complete set of Python supported encoding names
   for the PYTHONFSENCODING

 * make sure that the Py_FilesystemDefaultEncoding is set to
   the actual name of the codec as used by the system

Given that the redecoding of the filenames is fragile, I'd suggest
to drop the encoding name check and then setting the variable right
at the start of Py_Initialize().

If the encoding defined in PYTHONFSENCODING turns out not
to be defined, the module loader will complain later on during
startup.

To play extra safe, you might run get_codec_name() at the same
point in startup as you have initfsencoding() now. If something
failed to load, you won't even get there. If things loaded
fine, then you have a chance to safely double-check at that point.

--

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor

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

 Some things about your patch:
 - as Amaury said, functions should be named redecode*
 rather than reencode* 

Yes, as written before (msg117269), I will do it in my next patch.

 - please use -1 for error return, not 1

Ok.

 - have you tried to measure if it made Python startup slower?

(Sploiter: the overhead is around 3%)

First, my patch doesn't concern Windows or Mac OS X, because the filesystem 
encoding is hardcoded in these platforms. Then, it only concerns systems with 
a filesystem encoding different than utf-8. utf-8 is now the default encoding 
of 
all Linux distributions. I suppose that BSD systems do also use it by default.

Let's try a dummy benchmark with py3k r84990. 5 runs, I kept the smallest 
time.

-- pydebug mode (gcc -O0) with the patch ---

$ unset PYTHONFSENCODING; time ./python  -c pass
real0m0.084s
user0m0.080s
sys 0m0.010s

$ export PYTHONFSENCODING=ascii; time ./python  -c pass
real0m0.100s
user0m0.100s
sys 0m0.000s

The startup time overhead is around 20%.

-- default mode (gcc -O3) without the patch ---

$ unset PYTHONFSENCODING; time ./python  -c pass

real0m0.033s
user0m0.030s
sys 0m0.000s

-- default mode (gcc -O3) with the patch ---

$ export PYTHONFSENCODING=utf-8; time ./python  -c pass

real0m0.032s
user0m0.030s
sys 0m0.000s

$ export PYTHONFSENCODING=ascii; time ./python  -c pass

real0m0.033s
user0m0.020s
sys 0m0.020s

Here is overhead is around 3%.

--

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



[issue9929] subprocess.Popen unbuffered not work

2010-09-24 Thread Antoine Pitrou

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

You are right that it doesn't work anymore (under Linux too).

Your patch is almost ok. It should raise a ValueError if bufsize=0 and 
universal_newlines is true (the two can't be satisfied together, since 
universal newlines implies buffering).

It would also be better to add a test in test_subprocess.

As a sidenote, bufsize=1 (line buffering) doesn't work anymore either, and this 
can't be fixed without breaking compatibility.

--
components: +Library (Lib) -Windows
nosy: +gregory.p.smith, pitrou
title: subprocess.Popen unbuffered not work (windows) - subprocess.Popen 
unbuffered not work
type:  - behavior

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



[issue9929] subprocess.Popen unbuffered not work

2010-09-24 Thread Antoine Pitrou

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

As another sidenote, `bufsize` should only be relevant for stdin. For stdout 
and stderr, disabling buffering will only reduce performance, not add 
functionality. So I would suggest only setting buffering on stding.

--

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor

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

Le vendredi 24 septembre 2010 14:35:29, Marc-Andre Lemburg a écrit :
 Thanks for the explanation. So the only reason why you have to go through
 all those hoops is to
 
  * allow the complete set of Python supported encoding names
for the PYTHONFSENCODING
 
  * make sure that the Py_FilesystemDefaultEncoding is set to
the actual name of the codec as used by the system

Yes, the problem is the get_codec_name() function: it calls _PyCodec_Lookup() 
which loads codecs module and then the encodings.xxx module.

 Given that the redecoding of the filenames is fragile, I'd suggest
 to drop the encoding name check and then setting the variable right
 at the start of Py_Initialize().

Yes, it is fragile. If the import machinery is changed (eg. add a new cache), 
if the code object is changed, or if something else using filenames is changed, 
reencode_filenames() should also be changed.

Check the encoding name is very important. If I remember correctly, I added it 
to avoid an unlimited recusion loop. Or it was related to 
sys.setfilesystemencoding()? I don't remember :-)

I agree that my patch is not the most simple or safe method to fix the problem. 
I will try your solution.

But we have to be careful of the fallback to utf-8 if the encoding name is 
invalid.

 If the encoding defined in PYTHONFSENCODING turns out not
 to be defined, the module loader will complain later on during
 startup.

Yes. But I hope that it doesn't fill any cache or something else keeping a 
trace of the filename encoded to the wrong encoding.

 To play extra safe, you might run get_codec_name() at the same
 point in startup as you have initfsencoding() now. If something
 failed to load, you won't even get there. If things loaded
 fine, then you have a chance to safely double-check at that point.

Exactly.

As I wrote before, I don't like my reencode* patch, but I didn't found better 
solution. I will work on patch implementing your solution and check if it 
works or not ;-)

--

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



[issue9418] Move _formatter_* methods from string type into _string module

2010-09-24 Thread Eric Smith

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

My only concern with this is that it would cause other implementations to do 
the same thing. I assume it's not hard for them, but it is work. I know that 
IronPython implemented the _formatter_* methods so that they could use 
string.py as-is.

But that's a small concern, I think this is a good idea in general. I agree it 
should be its own C module _string.

--

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



[issue9935] Faster pickling of instances

2010-09-24 Thread Antoine Pitrou

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


--
nosy: +rhettinger

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



[issue9790] ntpath contains imports inside functions

2010-09-24 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Yeah, I realised shortly after I sent my email in response to the checkin that 
the original version was covering more cases in that first try-block.

I'll defer to you when it comes to exactly which case that NotImplementedError 
was covering - patch looks good given the explanation.

--

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



[issue9790] ntpath contains imports inside functions

2010-09-24 Thread Antoine Pitrou

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

Patch looks ok, and it would hopefully fix build errors on the XP buildbots :)

--
nosy: +pitrou

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



[issue9790] ntpath contains imports inside functions

2010-09-24 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Committed in r84992. Thanks for having a look.

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

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



[issue9418] Move _formatter_* methods from string type into _string module

2010-09-24 Thread Eric Smith

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

Now that I start this, I see that it's complicated by the fact that the 
functions actually being wrapped are in stringlib/string_format.h. That's 
because in 2.x they compile as both unicode and str. Before the _string module 
is created, the code should really be moved out of stringlib (possibly into 
_string). But that's a much more involved task.

I guess it depends if we want to have a bytes version of format(). If we do, 
it's best to leave the code in stringlib so it can be shared between the 
implementations. If we never want that, it can be removed from stringlib and 
put somewhere else, removing the ability to call it both ways. I'll have to 
give that some thought.

--

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



[issue9938] Documentation for argparse interactive use

2010-09-24 Thread Jay T

New submission from Jay T jayt...@gmail.com:

I want to create a custom interactive shell where I continually do 
parse_args.  Like the following: 
parser = argparse.ArgumentParser() 
command = raw_input() 
while(True): 
  args = parser.parse_args(shlex.split(command)) 
  # Do some magic stuff 
  command = raw_input() 
The problem is that if I give it invalid input, it errors and exits 
with a help message.

I learned from argparse-users group that you can override the exit method like 
the following:

class MyParser(ArgumentParser): 
  def exit(self, status=0, message=None): 
# do whatever you want here 

I would be nice to have this usage documented perhaps along with best practices 
for doing help messages in this scenario.

--
assignee: d...@python
components: Documentation
messages: 117287
nosy: d...@python, jayt
priority: normal
severity: normal
status: open
title: Documentation for argparse interactive use
type: feature request
versions: Python 2.7

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



[issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io

2010-09-24 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
assignee: brian.curtin - 

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



[issue766910] fix one or two bugs in trace.py

2010-09-24 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
Removed message: http://bugs.python.org/msg117114

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



[issue766910] fix one or two bugs in trace.py

2010-09-24 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
Removed message: http://bugs.python.org/msg117113

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



[issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

2010-09-24 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


--
assignee: ronaldoussoren - 
components:  -Macintosh
nosy:  -ronaldoussoren

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



[issue9907] interactive mode TAB does not insert on OS X built with editline instead of GNU readline

2010-09-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Patch looks fine and should IMO be applied

--

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



[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

I'm not able to reproduce any MemoryError on 2.6, 2.7, or 3.2 on Windows 7 
using your registry data and test script.

--

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




[issue459007] Document sys.path on Windows

2010-09-24 Thread MunSic JEONG

MunSic JEONG rus...@gmail.com added the comment:

I made patch which move comment from PC/getpathp.c to Doc/using/windows.rst. 
And did a little editing, reST markup.

http://codereview.appspot.com/2211046

--
keywords: +patch
Added file: http://bugs.python.org/file18997/comment_move_to_windows_rst.patch

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



[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto

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

I can reproduce the issue on python2.x. I cannot on
python3.x.

--
nosy: +ocean-city

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou

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

While writing tests for nntplib, it came to me that a PipeIO or BytesPipeIO 
would be useful (I actually wrote a minimal one). It would be a non-seekable 
in-memory bytes buffer with distinct read and write pointers, so as to act like 
a system FIFO or a socket.makefile() object. A pure Python implementation would 
probably be sufficient, since the main use would be for test purposes. What do 
you think?

(you may point to os.pipe() but it has problems such as limited buffer size: 
try to write many bytes to the write end and it will block until the other end 
tries to read something)

--
components: Library (Lib)
messages: 117292
nosy: benjamin.peterson, pitrou, stutzbach
priority: normal
severity: normal
status: open
title: Add a pipe type (FIFO) to the io module
type: feature request
versions: Python 3.2

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



[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto

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

This happens because RegQueryInfoKeyA returns maximum value
name length in *Unicode* characters. Strange API.

lpcMaxValueNameLen [out, optional]

A pointer to a variable that receives the size of the key's longest value 
name, in Unicode characters. The size does not include the terminating null 
character. This parameter can be NULL.

http://msdn.microsoft.com/en-us/library/ms724902%28VS.85%29.aspx

The Unicode length equals to Ansi length in ascii locale,
so this may not happen where people live in ascii locale.

--

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



[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:


--
Removed message: http://bugs.python.org/msg117293

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

 It would be a non-seekable in-memory bytes buffer with distinct 
 read and write pointers, so as to act like a system FIFO or a 
 socket.makefile() object.

What would it do when the equivalent system FIFO object would block?

 (you may point to os.pipe() but it has problems such as limited buffer
 size: try to write many bytes to the write end and it will block until
 the other end tries to read something)

In the past, I've gotten around that limitation by using threads (which, 
admittedly, certainly had its own drawbacks)

--

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



[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2010-09-24 Thread Antoine Pitrou

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

Note that the original issue (test_tarfile failures on the Windows buildbots) 
now seems fixed thanks to the various tarfile and test_tarfile improvements.

I have no opinion on whether assertRaises should take care of cleaning the 
tracebacks or not. As the test_tarfile issue shows, the resource consumption 
issues were tied to actual bugs both in the library and in the test suite.

--
stage: commit review - patch review
title: test_tarfile sometimes ends with error Cannot remove dir - 
assertRaises as a context manager keeps tracebacks and frames alive

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou

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

  It would be a non-seekable in-memory bytes buffer with distinct 
  read and write pointers, so as to act like a system FIFO or a 
  socket.makefile() object.
 
 What would it do when the equivalent system FIFO object would block?

Simply buffer everything.
(this is more aimed at mocking sockets than system FIFOs; system FIFOs
can be trivially wrapped in a BufferedRWPair)

  (you may point to os.pipe() but it has problems such as limited buffer
  size: try to write many bytes to the write end and it will block until
  the other end tries to read something)
 
 In the past, I've gotten around that limitation by using threads
 (which, admittedly, certainly had its own drawbacks)

Sure, but that's a lot of complication in itself.

--

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

The _multiprocessing module already have similar objects.
_multiprocessing.Connection is based on file descriptors (and initialized with 
the result of os.pipe())
_multiprocessing.PipeConnection uses Windows named pipes.

--
nosy: +amaury.forgeotdarc

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

 Simply buffer everything.

That works for when a write operation would block.  What would it do when a 
read operation would block?

--

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



[issue9940] Strange error reporting with with statement

2010-09-24 Thread Antoine Pitrou

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

Under 3.2 and 3.1:

 with open(foo, wb) as x: pass
... 
 with open(foo, wb) as (x, y): pass
... 
Traceback (most recent call last):
  File stdin, line 1, in module
io.UnsupportedOperation: read

Similar oddities under 2.7:

 with open(foo, wb) as (x, y): pass
... 
Traceback (most recent call last):
  File stdin, line 1, in module
IOError: File not open for reading
 with io.open(foo, wb) as (x, y): pass
... 
Traceback (most recent call last):
  File stdin, line 1, in module
io.UnsupportedOperation: read

--
components: Interpreter Core, Library (Lib)
messages: 117299
nosy: benjamin.peterson, pitrou, stutzbach
priority: normal
severity: normal
status: open
title: Strange error reporting with with statement
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou

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

  Simply buffer everything.
 
 That works for when a write operation would block.  What would it do
 when a read operation would block?

Good question. It could either return an empty bytes object, or perhaps
raise EOFError (it could be a constructor argument).

--

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou

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

 The _multiprocessing module already have similar objects.
 _multiprocessing.Connection is based on file descriptors (and initialized 
 with the result of os.pipe())
 _multiprocessing.PipeConnection uses Windows named pipes.

_multiprocessing.Connection exposes a socket-like API (recv/send) rather
than file-like (read/write/etc.).
Furthermore, _multiprocessing isn't available everywhere; and I wouldn't
really trust it in terms of stability.

--

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

Another option would be to have the read-end act like a non-blocking socket 
(i.e., raise EAGAIN).

Since it would mostly be for testing, would it make more sense to add it to 
test.support or someplace similar instead of io?

--

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou

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

 Another option would be to have the read-end act like a non-blocking
 socket (i.e., raise EAGAIN).
 
 Since it would mostly be for testing, would it make more sense to add
 it to test.support or someplace similar instead of io?

I thought it might be useful for third-party libraries, or even
non-testing situations (although obviously the latter wouldn't be very
common). But, yes, a starting point could be test.support. It would also
avoid having to write unit tests and docs :)
In this case, I would like to do it as a part of the nntplib patch.

--

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



[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-24 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Ok, so here is an idea that could remove the need for TestSuite._wrapped_run. 

TestSuite.run could tag the result object (set an attribute). Nested 
TestSuites would see an already tagged suite and do nothing (beyond running 
tests of course). The suite that does the tagging would call the necessary 
module / class level test suites on exit.

--

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



[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

 I thought it might be useful for third-party libraries, or even
 non-testing situations 

That might be true, but I prefer that we give code a more vigorous exercise 
before putting it in the standard library proper.  When we try to use it for 
something more than nntplib tests we might find that we need to alter its 
behavior slightly or flesh out the functionality more.

 But, yes, a starting point could be test.support. It would also
 avoid having to write unit tests and docs :)

+1 from me.

--

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



[issue9936] trace misreports missing lines

2010-09-24 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
stage: unit test needed - commit review
Added file: http://bugs.python.org/file18998/issue9936a.diff

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



[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-24 Thread Hirokazu Yamamoto

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

Thank you, I've committed in r84993(py3k)
I'll close this issue after merging to other branches.

--

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



[issue9940] Strange error reporting with with statement

2010-09-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Of course, you get the same error with:

 f = open('foo', 'wb')
 x, y = f
Traceback (most recent call last):
  File stdin, line 1, in module
IOError: File not open for reading

i.e. the tuple assignment iterates over the file, and calls readline()

--
nosy: +amaury.forgeotdarc

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



[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto

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

This happens because RegQueryInfoKeyA returns maximum value
name length not in *Ansi* characters but in *Unicode characters.
I don't know clue why.

http://msdn.microsoft.com/en-us/library/ms724902%28VS.85%29.aspx

In multibyte environment, 2 or 3 bytes characters are
mapped to one size unicode. So usually, the length of *Ansi*
characters are larger than or equals to the length of *Unicode*
characters. If every Ansi characters are mapped to one size
Unicode, lengthes are equal, so probably this issue won't happen.

I'll attach the patch to fix this issue. But be care, this is not 
tested so densely. At least, the script to reproduce this issue
ran fine.

--
keywords: +patch
Added file: http://bugs.python.org/file18999/py27_winreg_EnumValue.patch

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



[issue9941] Unify trace and profile interfaces

2010-09-24 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

The trace and profile modules provide similar functionality, but have some 
gratuitous differences in their APIs and command line interfaces.

For example, the method to trace a single call is Trace.runfunc, but almost 
identical Profile method is called runcall.

The CLIs provided by the two modules are vastly different: profile splits out 
formatting of the results into a separate module, pstats, while trace module 
includes many options to control the output of traced runs.

This situation leeds to an unnecessary burden on users who need to learn two 
different ways to do very similar things.

--
assignee: belopolsky
components: Library (Lib)
messages: 117309
nosy: belopolsky
priority: normal
severity: normal
stage: needs patch
status: open
title: Unify trace and profile interfaces
type: feature request
versions: Python 3.2

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



[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto

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

Again, I'm not sure this is right fix.

--

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



[issue9941] Unify trace and profile interfaces

2010-09-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

The runfunc/runcall difference is the easiest to address.  I propose to add 
runcall to Trace as an alias to runfunc and deprecate runfunc.  In addition, I 
propose to add __enter__ and __exit__ methods to both Trace and Profile so that 
they can be used as context managers.

--

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



[issue6608] asctime does not check its input

2010-09-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

MunSic,

Your patch does not apply cleanly to the py3k branch.  Please not that new 
features can only go to py3k.  While some may argue that this issue is a bug, I 
think it is more likely that it will only be accepted for 3.2.  In any case, a 
py3k patch should be the starting point.  Could you post a patch agains the 
py3k branch?

--
stage: needs patch - patch review

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



[issue6608] asctime does not check its input

2010-09-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Hmm, it looks like issue6608-timemodule-2nd.patch is a patch on top of your 
previous patches.  I'll check if I can apply last three patches in order.

--

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



[issue9940] Strange error reporting with with statement

2010-09-24 Thread Benjamin Peterson

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

I would say it's strange but correct. (and unavoidable I think)

--
resolution:  - invalid
status: open - closed

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



[issue6608] asctime does not check its input

2010-09-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

No, it looks like the starting patch is against 2.7.  We need a py3k patch.  
Meanwhile, I've noticed a couple of grammatical mistakes in comments:

strftime(), asctime() does not - strftime() and asctime() do not
fixes bug #897625, #6608 - fixes bugs #897625 and #6608

--
stage: patch review - needs patch

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



[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Martin v . Löwis

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

-1 for the patch. I still maintain that it is better to follow the current SDK.

--

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



[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Kevin Hunter

New submission from Kevin Hunter hunt...@earlham.edu:

Should Python enable a way for folks to inform the OS of MADV_MERGEABLE memory?

I can't speak for other OSs, but Linux added the ability for processes to 
inform the kernel that they have memory that will likely not change for a while 
in 2.6.32.  This is done through the madvise syscall with MADV_MERGEABLE.

http://www.kernel.org/doc/Documentation/vm/ksm.txt

After initial conversations in IRC, it was suggested that this would be 
difficult in the Python layer, but that the OS doesn't care what byte page it's 
passed as mergeable.  Thus when I, as an application programmer, know that I 
have some objects that will be around for awhile, and that won't change, I 
can let the OS know that it might be beneficial to merge them.

I suggest this might be a library because it may only be useful for certain 
projects.

--
components: Library (Lib)
messages: 117317
nosy: hunteke
priority: normal
severity: normal
status: open
title: Allow memory sections to be OS MERGEABLE
type: feature request

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



[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

With CPython, even objects that don't change see their reference counter 
modified quite frequently, just by looking at them.
What kind of memory would you mark this way?

--
nosy: +amaury.forgeotdarc

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



[issue9418] Move _formatter_* methods from string type into _string module

2010-09-24 Thread Eric Smith

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

The more I think about this, the more sense it makes to leave the module in 
unicodeobject.c. Certainly all the code it's likely to ever contain would 
already be in unicodeobject.c.

While I agree there's some conceptual clarity to be had by having the code in a 
new Modules/_stringmodule.c (and indeed, that's the first place I'd go if I 
were looking for it), I think that practically it might make sense to leave it 
in unicodeobject.c.

On the other hand, there are no modules defined in Objects/*.c, so this is 
clearly an unusual and unexpected practice.

Maybe a first step would be to commit Georg's patch as-is. Later I'll get rid 
of stringlib (at least for format()), then at that point rethink where any 
module should live.

I note that Georg's code doesn't need any tests because the affected code in 
string.py is already tested and will fail if the module is moved.

--

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



[issue3873] Unpickling is really slow

2010-09-24 Thread Alexandre Vassalotti

Alexandre Vassalotti alexan...@peadrop.com added the comment:

I get this error with the patch:

python: /home/alex/src/python.org/py3k/Modules/_pickle.c:908: 
_Unpickler_ReadFromFile: Assertion `self-next_read_idx == 0' failed.
Aborted

--

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



[issue9936] trace misreports missing lines

2010-09-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Fixed in r84994, r84995 (3.1) and r84996 (2.7).

--
resolution:  - fixed
stage: commit review - committed/rejected

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



[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-24 Thread Martin v . Löwis

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

 Perhaps slightly ironically (for this particular bug report) is that
 the change was introduced to support class and module level setUp and
 tearDown (similar to the use-case it now blocks).

FWIW, this issue arrived from pygresql, see TestSuite2 in
http://tinyurl.com/2ap9t6d

Here, the objective is to wrap a number of test suite classes
with a single setup/teardown, covering all test cases that occur
in either test suite, so that the expensive database creation
happens only once. I can't see how either class or module level
setup could easily replace this.

 A backwards compatible change would be to rename BaseTestSuite *back*
 to TestSuite and give the current TestSuite a new name.

That sounds good to me.

 The disadvantage of this approach is that it is not uncommon for test
 frameworks to create suites themselves - and doing this could 'break'
 tests using class / module fixtures.

You mean, for test suites that have been modified to explicitly
support Python 2.7?

 Any other suggestions or ideas?

I think this would then be for python-dev to discuss.

--

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



[issue3873] Unpickling is really slow

2010-09-24 Thread Antoine Pitrou

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

Ah, thank you. I hadn't tested in debug mode and there was a wrong assert from 
the previous code.
Here is a patch with the assert removed.

--
versions: +Python 3.2 -Python 3.1
Added file: http://bugs.python.org/file19000/unpickleprefetch2.patch

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



[issue9783] _elementtree.c warnings under 64-bit Windows

2010-09-24 Thread Martin v . Löwis

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

 issue9783.diff provides a patch that will compile clean on 32 and 64
 bit Windows systems.  I tried to avoid explicit casts where I could,
 but it was not always possible. I have ported a lot of my company's
 code to 64 bit (all Windows based).  In my experience many warnings
 are because of programmers using the int type in places where a
 size_t may be more appropriate. Most of the warnings here are due to
 mixing int and Py_ssize_t types.

I think the patch is incorrect as it stands: the casts may cause
truncation. As you say, int is still being used where size_t was
more appropriate, so I think we should change it in that manner
(e.g. make element_resize accept Py_ssize_t).

In cases where we really can't propagate Py_ssize_t to (e.g.
XML_Parse), we need to check for an int overflow, and raise
an exception if it does overflow.

--

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



[issue8879] Implement os.link on Windows

2010-09-24 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

In a round-about way, that's what the tests do via sameopenfile.

Maybe the behavior of os.path.samefile for Windows hard links should be 
documented? Possibly just a small note explaining that os.path.sameopenfile is 
an alternate solution due to how GetFinalPathNameByHandle works.

--

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



[issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

2010-09-24 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Thanks for the patches.  Can you also add a test case to Lib/test/mailcap.py to 
cover this problem?

--
nosy: +ned.deily
stage:  - unit test needed

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



[issue9943] TypeError message became less helpful in Python 2.7

2010-09-24 Thread Geoffrey Bache

New submission from Geoffrey Bache gjb1...@users.sourceforge.net:

Consider the following code:

### keywords.py

def f(**kw):
print arg, kw

f(hello, keyword=True)

and compare the behaviour in Python 2.6 and Python 2.7:

$ python keywords.py 
Traceback (most recent call last):
  File keywords.py, line 5, in module
f(hello, keyword=True)
TypeError: f() takes exactly 0 non-keyword arguments (1 given)

$ python2.7 keywords.py
Traceback (most recent call last):
  File keywords.py, line 5, in module
f(hello, keyword=True)
TypeError: f() takes exactly 0 arguments (2 given)

The error message from 2.6 is I would say a more accurate description of the 
situation.

--
components: Interpreter Core
messages: 117327
nosy: gjb1002
priority: normal
severity: normal
status: open
title: TypeError message became less helpful in Python 2.7
type: behavior
versions: Python 2.7

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



[issue9864] email.utils.{parsedate, parsedate_tz} should have better return types

2010-09-24 Thread R. David Murray

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

http://launchpad.net/python-email6

--

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



[issue6706] asyncore's accept() is broken

2010-09-24 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Here's a rewriting attempt (not tested).
Now that I look at it I must say it's quite ugly, so I don't think we should 
follow this road.
An alternative I see is to return None in case of errors occurring on accept() 
and make this very clear in doc. 
Other than accept(), doc should explicitly show how to use handle_accept() in 
general, which would end up looking like this:

class SomeServer(asyncore.dispatcher):

...

def handle_accept():
   conn = self.accept()
   if conn is None:
   return
   else:
   sock, addr = conn
   ...

...


A completely different approach could be to provide a new TCPServer class 
which deprecates direct accept() method usage. Something like this:


class TCPServer(asyncore.dispatcher):

def __init__(self, ip, port, handler, interface='', map=None):
asyncore.dispatcher.__init__(self, map=map)
self.create_socket(family=socket.AF_INET, type=socket.SOCK_STREAM)
self.bind((ip, port))
self.listen(5)
self.handler = handler

def handle_accept(self):
try:
sock, addr = self.accept()
except TypeError:
return
except socket.error, err:
if err[0] != errno.ECONNABORTED:
raise
return
else:
if addr == None:
return
handler = self.handler(conn, self._map)

def writable(self):
return 0



...but for some reason I don't like it either. Point is asyncore API design is 
fundamentally wrong and there's nothing we can do about it unless we break 
backward compatibility or a brand new asyncore2 module is written.

--
keywords: +patch
nosy: +pitrou
Added file: http://bugs.python.org/file19001/accept.patch

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



[issue9938] Documentation for argparse interactive use

2010-09-24 Thread Steven Bethard

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


--
nosy: +bethard
versions: +Python 3.2

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



[issue9896] Introspectable range objects

2010-09-24 Thread Terry J. Reedy

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

Range objects are new in 3.0; they supersede 2.x xrange objects, which are 
perhaps 10 years old. I do not remember that xrange objects had such 
attributes. On the other hand, I believe there were requests.

The request, with either implementation, seems reasonable in that range objects 
could be regarded as iterable slice objects. The differences are that range 
objects have __getitem__, __iter__, and __reversed__ special methods while 
slice objects have start, stop, and stop real-only attributes and the indices 
method. (I could not really understand the last from the doc; I had to 
experiment.) Starting fresh, we might do with just one class instead of two.

I guess this makes me +0.3 at the moment.

--
nosy: +terry.reedy
stage:  - patch review

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



[issue9889] PyUnicode_FormatV and Py_UNICODE*?

2010-09-24 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions:  -Python 3.1

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



[issue9360] nntplib cleanup

2010-09-24 Thread Antoine Pitrou

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

Here is a patch adding tests for article(), head() and body(), as well as for 
the file parameter.
As far as code is concerned, this should now be complete. Documentation remains 
to be updated :)

--
Added file: http://bugs.python.org/file19002/nntplib_cleanup6.patch

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



[issue9915] speeding up sorting with a key

2010-09-24 Thread Terry J. Reedy

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

The posted experiments on sorted data do not do any sorting. They only test the 
difference in setup and comparison speed and not sorting/swapping speed. Please 
post something with large arrays of random data.

Since the patch is intended to speed up 3.2 and your posted experiments were 
run on that, I am puzzled that you would post a test script to run under late 
2.x instead of 3.1+.

--
nosy: +terry.reedy

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



[issue9925] Idle doesn't launch

2010-09-24 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions:  -Python 2.6

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



[issue9934] Python Docs Typo

2010-09-24 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
keywords: +easy, patch
stage:  - needs patch
versions:  -Python 2.5, Python 2.6, Python 3.3

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



[issue9934] Python Docs Typo

2010-09-24 Thread Terry J. Reedy

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

Agreed. Should happen sometime. Thanks for catching this.

--
nosy: +terry.reedy

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



[issue9915] speeding up sorting with a key

2010-09-24 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

 Since the patch is intended to speed up 3.2 and your posted 
 experiments were run on that, I am puzzled that you would post a
 test script to run under late 2.x instead of 3.1+.

I had originally written the test script was originally written for something 
else and repurposed it.  Actually, it's been repurposed at least twice so it 
has a long history and an unfortunate amount of cruft.  I will work on porting 
it to run on py3k.

My original examples did not use random data because timeit is challenging to 
use to time sorting of random data and I wanted to post something relatively 
concise.

Sometime next week I plan to post extensive timing results on random data.  I 
have been working on some fine-tuning of my patch as well as to my timing 
script.

--

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



[issue9915] speeding up sorting with a key

2010-09-24 Thread Terry J. Reedy

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

Does this help any?
 import random
 from timeit import timeit
 testlist = list(range(10))
 random.shuffle(testlist)
 timeit('t=list(testlist); t.sort()',
'from __main__ import testlist', number=1)
0.1467957519740679

I just learned the import trick from the tracker issue suggesting that it be 
made more prominent.

--

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



[issue9915] speeding up sorting with a key

2010-09-24 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

 Does this help any?

No :-)

The problem is that the random data you run in interpreter 1 won't be the same 
data you run in interpreter 2, so the results are not directly comparable.  One 
of the sets of random data may be more easily sortable than the other.

That leaves two options:
1. save the random data to a file and use it in both interpreters, or
2. run a sufficiently large number of tests, with new random data for each 
test, such that you get a good measurement of the time required to sort average 
random data

I have been using approach #2.

--

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



[issue9915] speeding up sorting with a key

2010-09-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

 the random data you run in interpreter 1 won't be the same data
 you run in interpreter 2

what about adding a simple random.seed(12345)

--
nosy: +amaury.forgeotdarc

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



[issue9915] speeding up sorting with a key

2010-09-24 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

 what about adding a simple random.seed(12345)

That's an excellent suggestion!  In fact, I'm embarrassed that it never 
occurred to me (especially since I have used it in other projects).

I will have a revised speed_test along with more extensive measurement results 
sometime next week.

--

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



[issue9944] Typo in doc for itertools recipe of consume

2010-09-24 Thread Jon Clements

New submission from Jon Clements jon...@googlemail.com:

Very low priority.

def consume(iterator, n):
Advance the iterator n-steps ahead. If n is none, consume entirely.
# Use functions that consume iterators at C speed.
if n is None:
# feed the entire iterator into a zero-length deque
collections.deque(iterator, maxlen=0)
else:
# advance to the emtpy slice starting at position n
next(islice(iterator, n, n), None)

Hardly a show stoppper, and not me worth submitting a patch, but emtpy should 
be empty. Just thought I'd make note of it before I forgot.

--
assignee: d...@python
components: Documentation
messages: 117339
nosy: d...@python, joncle
priority: normal
severity: normal
status: open
title: Typo in doc for itertools recipe of consume
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-24 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

On 24/09/2010 19:23, Martin v. Löwis wrote:
 Martin v. Löwismar...@v.loewis.de  added the comment:
 Perhaps slightly ironically (for this particular bug report) is that
 the change was introduced to support class and module level setUp and
 tearDown (similar to the use-case it now blocks).
 FWIW, this issue arrived from pygresql, see TestSuite2 in
 http://tinyurl.com/2ap9t6d

Thanks.

Heh, well - allowing multiple testcases to share fixtures like expensive 
databases was one of the primary use cases given for introducing 
setUpModule and setUpClass.

 A backwards compatible change would be to rename BaseTestSuite *back*
 to TestSuite and give the current TestSuite a new name.
 That sounds good to me.


As I mentioned, the introduction of _wrapped_run to TestSuite has been 
released in Python 2.7 - so I don't think that we can pursue this option.

 The disadvantage of this approach is that it is not uncommon for test
 frameworks to create suites themselves - and doing this could 'break'
 tests using class / module fixtures.
 You mean, for test suites that have been modified to explicitly
 support Python 2.7?


No, I just mean that directly creating test collections using TestSuite 
is a common thing for test frameworks to do. If the base TestSuite 
didn't support class / module fixtures then these test frameworks would 
no longer be able to use these features.

 Any other suggestions or ideas?
 I think this would then be for python-dev to discuss.


I think the result tagging idea will work both as a bugfix for 2.7 and 
3.2. I'll work on a  patch and test. If it doesn't work we can take it 
to python-dev, but bearing in mind that we have to remain compatible 
with the released 2.7 as well (i.e. not changing the behaviour of 
TestSuite drastically).

--

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



[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Which SDK Example are you referring to? I could not find any example.

--

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



[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Martin v . Löwis

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

See, for example, the link you gave in msg115750. It has this sample code in it 
(listed in the Examples section):

FNFCIREAD(fnFileRead)
{
DWORD dwBytesRead = 0;

UNREFERENCED_PARAMETER(pv);

if( ReadFile((HANDLE)hf, memory, cb, dwBytesRead, NULL) == FALSE )
{
dwBytesRead = (DWORD)-1;
*err = GetLastError();
}
 
return dwBytesRead;
}

--

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



  1   2   >