[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2009-01-16 Thread Gabriel Genellina

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

An attempt to more accurately describe the issue, to attract more 
knowledgeable people, I hope...

--
components: +Library (Lib)
nosy: +gagenellina
title: Cannot upload binary file from form ? - cgi module cannot handle POST 
with multipart/form-data in 3.0
type: performance - behavior
versions: +Python 3.1

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



[issue4927] Inconsistent unicode repr for fileobject

2009-01-16 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

And btw,
This can be fixed in fileobject.c without affecting the testsuite at 
all, since test_file.py has never tested filenames with backslashes 
except by accident.  It is therefore quite unlikely to cause any 
problems.

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



[issue4961] Inconsistent/wrong result of askyesno function in tkMessageBox

2009-01-16 Thread eb303

New submission from eb303 eric.bru...@pragmadev.com:

Scenario to reproduce the problem:
- Run the attached script.
- Click the 'Ask confirm' button and answer 'Yes'; it should print 
True, which is the expected answer.
- Click the 'Ask file' button, select any file and confirm.
- Click the 'Ask confirm' button and answer 'Yes'.
The script prints False, which is obviously wrong.
Problem reproduced on Linux Red Hat Fedora Core 4, Suse Enterprise 
Linux 9, Solaris 8 for Sparc and Solaris 10 on Intel. The script works 
as expected on Windows 2000, so it seems to be Unix-specific.

Possible cause: the result of the _show function in tkMessageBox is not 
always a string, apparently depending on what happened before. Changing 
the last line to:
return str(res)
seemed to correct the problem for me.

--
components: Tkinter
files: dialog-bug.py
messages: 79944
nosy: eb303
severity: normal
status: open
title: Inconsistent/wrong result of askyesno function in tkMessageBox
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file12761/dialog-bug.py

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



[issue4927] Inconsistent unicode repr for fileobject

2009-01-16 Thread Terry J. Reedy

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

I think path names should be printed with forward slashes on Windows as
well as elsewhere to avoid this type of confusion, and this.
 sb
'tmp\\foo'
 print(sb)
tmp\foo
(Of course I know why.)

Users have been advised on python-list by various people to enter
literal paths with forward slashes for the same reason.  Printing them
out that way would encourage and reinforce this.

--
nosy: +tjreedy

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



[issue4962] urlparse nfs url (rfc 2224)

2009-01-16 Thread Cédric BRINER

New submission from Cédric BRINER bri...@infomaniak.ch:

Hi,

I'd like to add the ability to parse nfs url (rfc2224). Which look like:
nfs://server/my/path

To do this, we only need to add 'nfs' in uses_netloc to make it work

cEd

--
components: Extension Modules
messages: 79946
nosy: yuhl
severity: normal
status: open
title: urlparse  nfs url (rfc 2224)
type: feature request

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



[issue4927] Inconsistent unicode repr for fileobject

2009-01-16 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

That's true, but a it's a different point entirely
You see, this is not a problem with backslashes only:
If you have any kind of control caracter or high bit character in your 
filename, you may be in for trouble, because interpolating that string 
verbatim into the repr can cause uforeseen problems when it is printed 
out.

(and forward slashes are't the same as backslashes on windows.  UNC 
paths (\\my-pc\my-share\...) need backslashes.)

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Amaury Forgeot d'Arc

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

Is Msys+Mingw32 (running on a regular Windows) an interesting
configuration to support?
The build tools are similar to the ones used by cygwin, except that the
C runtime is msvcrt.

--
nosy: +amaury.forgeotdarc

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



[issue1672332] cPickle cannot unpickle subnormal floats on some machines

2009-01-16 Thread Mark Dickinson

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

Here's a patch, against the trunk, that simply amends load_float to ignore 
errno on underflow (while retaining it on overflow).  This fixes the problem on 
my machine.

The added tests may be a little severe.  There's no *good* reason why 
dumping and then loading a float on the same machine shouldn't produce 
exactly the same value, but there are likely many bad reasons.  I propose 
to checkin the change and watch the buildbots carefully;  if there are 
failures I'll weaken the tests to check for approximate equality instead 
of exact equality.

--
keywords: +patch
Added file: http://bugs.python.org/file12762/issue1672332.patch

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



[issue4962] urlparse nfs url (rfc 2224)

2009-01-16 Thread Senthil

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

 I'd like to add the ability to parse nfs url (rfc2224). Which look like:
 nfs://server/my/path

 To do this, we only need to add 'nfs' in uses_netloc to make it work

Do you encounter any errors or weird behaviors while using nfs url?
The RFC2224 for NFS just says it is for local  and network files and
in turn uses specification in RFC 1738 Uniform Resource Locators.
So, I don't think any problem or breakage should occur with NFS

('nfs', '', '//server//a/b/c/d/e/f', '', '', '')

If you have done the research already, can you please explain what
difference will adding 'nfs' to uses_netloc do in urlparse.py.

--
nosy: +orsenthil

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



[issue4956] Py_Initialize needs to be done before file load (on msys+wine)

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

hi gabriel, thanks for looking at this, and my apologies for not editing
the patch to remove debug and other information: i'm in the middle of a
comprehensive porting session.

WEIRD_DEBUG was me endeavouring to find out what the hell is going on

test_str.py segfaulted python under wine due to HAVE_SNPRINTF not being
defined - but that's irrelevant to this issue

likewise ignore the modification to setup.py

regarding the advice to seek out and understand the cause, i have
to say that i much prefer to ... how can i put this best...

@BEGIN CAVEAT THE FOLLOWING STATEMENTS ARE MADE WITH ABSOLUTELY NO
INTENTION TO CAUSE OFFENSE DO NOT TAKE THIS PERSONALLY IN ANY WAY DO NOT
TAKE IT AS A DELIBERATE INTENT TO OFFEND, CAUSE OFFENSE, CRITICISE OR
OTHERWISE INDICATE MALICIOUS OR HOSTILE INTENT

being absolutely honest: i genuinely do not care about the cause.
what i care about is working.  does it work if this code is moved?
yes.  does it work if the code is not moved? no.  does it _matter_
if the cause is identified? no.

will someone else, possibly in the future, accidentally encounter
or deliberately and actively seek out the cause?

possibly.

so - many many apologies for saying this, but i have much better
and more interesting and valuable things to be doing with my time
than _finding out_ why moving specific bits of code makes things works.

yes it would be nice to know... but i don't care!!

because, most importantly, me _knowing_ makes absolutely -all
difference to the outcome of whether it will work or not.

so, on balance, i'd rather spend my time finding out the additional
code-moving and code-improving required to debug the additional
bug where python.exe -i will give me a prompt but python.exe with
no arguments will not (and hangs).

@END CAVEAT

gabriel, hi,

debugging python.exe under msys under wine under linux is _really_
tricky.

* gdb.exe under msys under wine under linux not only segfaults
on exit but also refuses to fork() in order to spawn the process
to be debugged!

* strace obviously cannot be used _inside_ msys / wine

* strace _outside_ - on the /usr/bin/wine process - often interferes
with the processes it is tracking, causing them to run out of resources
and also to fail to start up.

* gdb cannot be attached from _outside_ of wine (/usr/bin/winegdb) to
an internal process.

fortunately, segfaults inside wine result in quite a good stacktrace
report, including line numbers and filenames inside python, but in
this case it's hanging - and there's something _really_ weird going
on with the stdin, stdout and stderr.

overall, then, the payoff in time invested in understanding what
is going on by using non-standard and laborious debugging techniques
is extremely small.

small enough so that, i am very very sorry to say, i'm not going to
put any further time into this _other_ than to _actually_ fix bugs,
rather than understand bugs.

it's a development technique that has saved me _vast_ amounts of time.

i never worry about why - i just get on with it.

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



[issue4956] Py_Initialize needs to be done before file load (on msys+wine)

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

here's a clue:

$ ./python.exe -i
Python 2.5.2 (r252:60911, Jan 16 2009, 10:34:33) [gcc] on win32
Type help, copyright, credits or license for more information.
 
 exit()
close failed: [Errno 0] Success
$

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



[issue4956] Py_Initialize needs to be done before file load (on msys+wine)

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

here's another clue:
$ ./python.exe 
stdin_is_interactive: 0

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



[issue4956] Py_Initialize needs to be done before file load (on msys+wine)

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

here's an updated version, without the cruft.
this has a workaround for the problem of stdin
being seen as not a tty (!) until _after_
Py_Initialize() is run.

Added file: http://bugs.python.org/file12763/x

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2009-01-16 Thread S Arrowsmith

New submission from S Arrowsmith si...@chiark.greenend.org.uk:

Asking mimetypes to reload mime.types can cause guess_extension() to
return a different result if multiple extensions are mapped to that mime
type:

 import mimetypes
 mimetypes.guess_extension('image/jpeg')
'.jpe'
 mimetypes.init()
 mimetypes.guess_extension('image/jpeg')
'.jpeg'


This is because both the forward (extension to type) and inverse (type
to extension) type mapping dicts are populated by iterating through the
existing forward (extension to type) dict (types_map), then supplemented
by reading from mime.types (or any other files given to init()). The
fully populated forward dict becomes the new types_map. Initially,
types_map is hard-coded, but when the type mapping dicts are
repopulated, by explicitly or implicitly calling init() again, it is
done by iterating over the types_map created by the first init() call,
not the hard-coded one. If the iteration order for a set of extensions
with the same type is different in these two versions of the forward
dict, the order of extensions appearing for that type in the inverse
dict will change. And so the behavior of guess_all_extensions() and
hence guess_extension() will change.

--
components: Library (Lib)
messages: 79955
nosy: siona
severity: normal
status: open
title: mimetypes.guess_extension result changes after mimetypes.init()
type: behavior
versions: Python 2.4, Python 2.5

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

martin, hi, thanks for responding.

* graminit and configure were removed because they are built
automatically.  no project should ever include auto-generated files so i
assumed that it would be reasonable to remove them from the python_2.5.2
original git commit that i did, in order to produce the diff.  on a
build, graminit got _replaced_ with one that had ^M after eery
siiingle line.

so - if graminit and configure _are_ in the main
python source tree, it's a serious mistake that should be
rectified _immediately_.

... but i doubt that, and so graminit and configure appearing
to be removed can be ignored.

* regarding your comment that compiling python under msys under wine
is a minority platform, i believe that that is also a serious
assumption.

the reason why it's a minority platform is because... THERE WASN'T
ANY CHOICE.

i.e. msys and wine simply have not been good enough - and certainly
not _demonstrated_ as being good enough - which this patch shows
that they now most definitely are - to _have_ any choice about
whether python should be compiled with purely free software tools.

instead of depending on some ing proprietary piece of double-
operating system _and_ the development IDE it walked in on.

sorry about that - just to emphasise how distasteful i find it to
be _forced_ to use proprietary software, and i'm not the only
person.

basically, it should be pretty clear that now that python _can_
be compiled for win32 using an entirely free-software platform,
the proprietary build chain should be absolutely dropped like a
red-hot stone.

... but regarding minority platform?  that's  really quite
funny and ironic.

it was a _non-existent_ platform until about... yesterday :)

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

hi amaury, thanks for responding.

 Is Msys+Mingw32 (running on a regular Windows) an interesting
 configuration to support?

 [wine+]msys+mingw32 is used to _build_ python - not depend on it.
 [wine+]msys+mingw32 _replaces_ the proprietary build toolchain MSVC.

 clarification:

 * in the case of #3871, msys+mingw32 replaces MSVC.
 * in the case of #4954, wine+msys+mingw32 replaces MSVC _and_ windows

 but in either case, you end up with a complete build of python.exe,
 libpython2.5.dll and modules that is perfectly well capable of
 running under both wine _and_ native windows...

 ... WITHOUT requiring, in any way shape or form,
 EITHER msys OR mingw32.

 in other words, it's a big damn deal.

 no more proprietary dependence.

 ... let me put it this way, martin: if i told richard stallman that
 you said that msys+mingw32 was a minority platform he'd have
 a fit!! :)


 The build tools are similar to the ones used by cygwin, except that the
 C runtime is msvcrt.

 ys sort-of - but if you do s/#ifdef __CYGWIN__/#if defined
(__CYGWIN__) || defined(__MINGW32__) it all goes _horribly_ wrong :)

 you actually have to do s/#ifdef _MSC_VER/#if defined(_MSC_VER) ||
defined(__MINGW32__) because _MSC_VER is used alll over the place
 to detect and indicate a win32 build (as separate and distinct
 from a cygwin build).

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

updated patch - also removes quotes removal quotes of graminit and
configure so that martin is happier :)

also included is an updated version of #4956 as it's an essential
integral part of compiling and using python.exe under msys that
it actually WORK! :)

Added file: http://bugs.python.org/file12764/x

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Luke Kenneth Casson Leighton

Changes by Luke Kenneth Casson Leighton l...@lkcl.net:


Removed file: http://bugs.python.org/file12755/f

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



[issue4956] Py_Initialize needs to be done before file load (on msys+wine)

2009-01-16 Thread Luke Kenneth Casson Leighton

Changes by Luke Kenneth Casson Leighton l...@lkcl.net:


Removed file: http://bugs.python.org/file12758/f

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



[issue3871] cross and native build of python for mingw32 with distutils

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

roumen, hi,
i'm interested in collaborating with you to get python compiled
under wine (running msys+mingw32 under wine, on linux).
#4954 incorporates much of your work, and takes a slightly
different direction for the configure setup - the time taken to
complete configure under wine is intolerable (3 hours).
also i have found that by setting PATH=%PATH%;c:/mingw/bin in the
environment vars, the python.exe that's produced can successfully
be used to run setup.py build.

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



[issue4955] inconsistent, perhaps incorrect, behavior with respect to entities parsed by xml.sax

2009-01-16 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@divmod.com added the comment:

After further investigation, I've learned a bit more.  External entities
are forbidden in attribute values.  Their presence constitutes a fatal
error according to http://www.w3.org/TR/REC-xml/#forbidden.  This
means that dropping entities in an attribute value is incorrect. 
Instead the fatal error hook must be called.

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2009-01-16 Thread S Arrowsmith

S Arrowsmith si...@chiark.greenend.org.uk added the comment:

Ah, yes, forgot to mention this is on Debian 4.0. I doubt you're going
to run into it on a Windows system unless you explicitly give init() a
mime.types file, looking at the knownfiles list used by default.

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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-16 Thread Jeffrey Yasskin

Changes by Jeffrey Yasskin jyass...@gmail.com:


--
nosy: +collinwinter, jyasskin

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



[issue4927] Inconsistent unicode repr for fileobject

2009-01-16 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

I think this is my fault.  I should have used the proper repr() of the
filename in the repr() of a file object from the beginning, then this
wouldn't have been a problem.

I think we should let this rest for Python 2.x (except for fixing the
test suite).  Fortunately this is gone in 3.x for any number of reasons.

Here's my proof that we should let it rest.

If nobody were parsing the repr() of file objects, then we could easily
fix this.  However, the reason this was brought up in the first place is
that people *are* parsing file object repr()s.  So now fixing it would
create backwards compatibility problems.  I'd rather live with an
inconsistency (until 2.x is dead) than introduce more backwards
incompatibility into 2.7.

--
nosy: +gvanrossum
resolution:  - rejected
status: open - closed

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



[issue4927] Inconsistent unicode repr for fileobject

2009-01-16 Thread Martin v. Löwis

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

 So you are saying that you see no problem with the repr of a fileobject 
 being generated in different ways depending on the fileobject being 
 unicode or string?

My question is: What is the issue at hand? Is it what the subject says
(inconsistent representation), or is it what your first message says
(problems on Vista)? If the former, I'm opposed to fixing it. If the
latter, I'm in favor of the straight-forward fix to the test suite.

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



[issue4927] Inconsistent unicode repr for fileobject

2009-01-16 Thread Martin v. Löwis

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

 It is therefore quite unlikely to cause any 
 problems.

That is a false conclusion. The test suite cannot speak
for all the code out there that might break with the
incompatible change that you are proposing.

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Martin v. Löwis

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

 Is Msys+Mingw32 (running on a regular Windows) an interesting
 configuration to support?

It is certainly desirable to be able to build extension modules
with this configuration; AFAIU, distutils already supports that
case. Whether or not it is desirable to be build Python from
source in this configuration, I don't know - most people that
want to build with mingw seem to be using the Python binaries
available from python.org, or from ActiveState. I'm not sure
whether mingw is capable of building Python correctly, with
assembly manifests and all.

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Martin v. Löwis

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

 * graminit and configure were removed because they are built
 automatically.  no project should ever include auto-generated files so i
 assumed that it would be reasonable to remove them from the python_2.5.2
 original git commit that i did, in order to produce the diff.

Please trust that Python puts generated files into the repository for
good reasons. This is not going to change, regardless of how evil you
consider it.

 ... but regarding minority platform?  that's  really quite
 funny and ironic.
 
 it was a _non-existent_ platform until about... yesterday :)

Ok, so feel free to continue to work on it; good luck with
that project. If the project is still alive in a few years
from now, and enjoys a significant user base, we should reconsider
accepting patches.

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Martin v. Löwis

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

  no more proprietary dependence.

So what CRT do you link with? Is it msvcrt? Which version?

If building with mingw becomes wide-spread, care must
be taken that it uses the same CRT as the official binaries.
Otherwise, it will be a desaster for Python.

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

 Please trust that Python puts generated files into the repository for
 good reasons. 

 i can respect that :)  for no reason other than if somone says
 please trust, i do :)

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

 So what CRT do you link with? Is it msvcrt? Which version?

i was _just_ beginning to wonder about that, after i saw
rpetrov's comments about MSCVER stuff.

http://www.mingw.org/wiki/SpecsFileHOWTO

aww, _frick_. :)

well... it's _going_ to be msvcr80.  why don't mingw ship with
a pre-prepared msvcr80 specfile??

*sigh*.

will get back to you on that one - it may make a difference on
the regression tests (250 passed, 12 failed, 8 skpped).

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

 It is certainly desirable to be able to build extension modules
 with this configuration;

 yeah, and the nice thing is - it works, too! :)

 AFAIU, distutils already supports that case.

 not without modification, it doesn't: #3871 adds proper
 mingw32 compiler detection and link options, such as support
 for dll.a which isn't auto-detected (but is on cygwin)

 etc. etc.

 Whether or not it is desirable to be build Python from
 source in this configuration, I don't know - most people that
 want to build with mingw seem to be using the Python binaries
 available from python.org, or from ActiveState.

 i tried that a few months ago.

 1) there is no .tgz for python-win32 so i was forced to
   install from a binary package

 2) there is no .exe so i was forced to install from msi,
   a proprietary installer - which as a free software
   developer, i have issues with, but i tried it anyway.

 3) msi installed, thanks to winetricks, but segfaulted
and borked.  as i didn't really want to use it, i
wasn't that unhappy.

 4) the msi turns out to be understood by the free software
cabextract package.  but... the filenames are all borked
and mangled.

 at that point, i decided i'd had enough: i wasn't going to
 go through 100 files looking for the one that _might_ be
 the python25.lib implib, plus other files that i'd need
 to do a non-proprietary-dependent build of python software.

 I'm not sure
 whether mingw is capable of building Python correctly, with
 assembly manifests and all.

 python setup.py build seems quite happy: rpetrov added .S
 to the compile-extensions and happily compiled win32.S
 in libffi with it.

 the only slight issue there is that the assembly file
 is incompatible with MSVC and so it borked (not at build
 time, unfortunately - at runtime).

 there's been a gcc bugreport raised, to get interoperability
 back (urk).

 GCC issue #36834.

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

yaay!  here's the regression test log, including some
loovely wine segfaults :)

summary:

250 tests OK.

12 tests failed:
test_builtin test_cpickle test_file test_gzip test_locale
test_mailbox test_os test_pep277 test_socket test_unicode_file
test_xpickle test_zipfile
60 tests skipped:
 
 
 
8 skips unexpected on win32:
test_bz2 test_cProfile test_bsddb test_profile test_tcl
test_sundry test_sqlite test_winsound

not baaad :)

Added file: http://bugs.python.org/file12765/regressiontest.log

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



[issue4910] Remove uses of nb_long slot, and rename to nb_reserved.

2009-01-16 Thread Benjamin Peterson

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

+1 for applying the last patch.

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Martin v. Löwis

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

  2) there is no .exe so i was forced to install from msi,
a proprietary installer - which as a free software
developer, i have issues with, but i tried it anyway.

Please understand that MSI is *not* a proprietary installer.
Instead, it is just a data format to be interpreted by the
installer. Whether that installer is proprietary or not
depends on whether you use the Microsoft one, or write one
yourself (or perhaps use a free interpreter for MSI that
somebody else might have written).

So to help Wine, it would be best to write a proper MSI
interpreter.

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



[issue4293] Thread Safe Py_AddPendingCall

2009-01-16 Thread Mark Dickinson

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

Kristján,

The r68461 checkin seems to be causing a number of the buildbots to fail,
typically with output like:

test_capi
test test_capi failed -- Traceback (most recent call last):
  File 
/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/test/test_capi.py, 
line 57, in 
test_pendingcalls_threaded
self.pendingcalls_wait(l, n)
  File 
/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/test/test_capi.py, 
line 42, in 
pendingcalls_wait
timeout waiting for %i callbacks, got %i%(n, len(l)))
AssertionError: timeout waiting for 32 callbacks, got 23

Please could you look into this?


Also, I don't understand the code:

for i in xrange(1000):
a = i*i

in pendingcalls_wait(), in test_capi.py.  Whatever you're
trying to do here, surely there's a better way?

--
nosy: +marketdickinson
status: closed - open

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



[issue4964] UTF-16 stream codec barfs on valid input

2009-01-16 Thread Guido van Rossum

New submission from Guido van Rossum gu...@python.org:

I am attaching a file encoded in UTF-16 (with bom) which causes the
stream codec employed by the file reader to barf when reading by lines.
 However reading the file in binary mode and decoding it in one fell
swoop works fine, and reading the whole text file with text() also works
fine; so I believe the data in the file is not corrupt (it started out
as an export of my Gmail contacts, but I x-ed out all printable ASCII
characters).

 x = open('contacts.csv', 'rb').read().decode('utf16')  # OK
 x = open('contacts.csv', encoding='utf16').read()  # OK
 x = open('contacts.csv', encoding='utf16').readlines()  # Dies
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/local/lib/python3.0/io.py, line 534, in readlines
return list(self)
  File /usr/local/lib/python3.0/io.py, line 1739, in __next__
line = self.readline()
  File /usr/local/lib/python3.0/io.py, line 1813, in readline
while self._read_chunk():
  File /usr/local/lib/python3.0/io.py, line 1562, in _read_chunk
self._set_decoded_chars(self._decoder.decode(input_chunk, eof))
  File /usr/local/lib/python3.0/io.py, line 1295, in decode
output = self.decoder.decode(input, final=final)
  File /usr/local/lib/python3.0/codecs.py, line 300, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
  File /usr/local/lib/python3.0/encodings/utf_16.py, line 69, in
_buffer_decode
return self.decoder(input, self.errors, final)
UnicodeDecodeError: 'utf16' codec can't decode byte 0x00 in position 0:
truncated data


Making certain modifications to the file elicits slightly different
error messages (e.g. 'utf16' codec can't decode bytes in position
90-91: illegal encoding when I swap the second and first half of the
file) so it looks like some kind of data corruption in the codec's state
management or in the code in io.py that feeds the codec its data.

--
components: Library (Lib)
files: contacts.csv
messages: 79976
nosy: gvanrossum
priority: critical
severity: normal
status: open
title: UTF-16 stream codec barfs on valid input
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file12766/contacts.csv

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



[issue4964] UTF-16 stream codec barfs on valid input

2009-01-16 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

Dang. Already fixed in trunk. (Is it fixed in 3.0.1 too?)

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

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



[issue4954] native build of python win32 using msys under wine.

2009-01-16 Thread Martin v. Löwis

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

I'm rejecting this patch for the moment, as it seems far from being
ready yet. If you consider it complete and applicable-as-is (i.e. if you
can't think of any possible further improvement to the patch), please
submit a new issue. If I had to review the patch x, I would reject it
for many reasons, e.g. because it is not against the trunk, and because
it removes graminit.h.

--
resolution:  - rejected
status: open - closed

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



[issue4753] Faster opcode dispatch on gcc

2009-01-16 Thread Antoine Pitrou

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

Here is an updated patch with a dedicated configure option
(--with-computed-gotos, disabled by default), rather than a compiler
detection switch.

(sorry, the patch is very long because it seems running autoconf changes
a lot of things in the configure script)

Added file: http://bugs.python.org/file12767/threadedceval6.patch

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



[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2009-01-16 Thread oopos

oopos myoo...@gmail.com added the comment:

Hehe.
I only want to use python to slove the upload files instead of PHP.but
it is hard to me or I have no much time to leran it.
Now,I learn Perl quickly and use it upload files, it works ok.

Thank you . I will take more time to learn Python language well.
Best Regards!

This is my code: (Perl Language)

Added file: http://bugs.python.org/file12768/opsuper.pl

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



[issue4293] Thread Safe Py_AddPendingCall

2009-01-16 Thread Mark Dickinson

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

How about using a timer instead of the 'count += 1' loop:  after starting 
the 32 self.pendingcalls_submit threads, set up a threading.Event and 
start yet another thread that simply does a time.sleep(5.0) (or whatever) 
and then sets that event.

Then your waiting loop could be something like:

while not self.my_event.is_set():
for i in range(1000):
a = i*i
self.assertEqual(len(l), n)

There's probably a better way, but that's the best I can come up with this 
late on a Friday night...

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



[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2009-01-16 Thread Antoine Pitrou

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

You could also test this principle with a few opcodes in ceval.c.
Especially, the error cases in LOAD_FAST, LOAD_GLOBAL etc. could be
flagged as unlikely.

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



[issue4753] Faster opcode dispatch on gcc

2009-01-16 Thread Skip Montanaro

Skip Montanaro s...@pobox.com added the comment:

Antoine (sorry, the patch is very long because it seems running
Antoine autoconf changes a lot of things in the configure script)

Normal practice is to not include the configure script in such patches and
indicate to people that they will need to run autoconf.

Skip

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



[issue4753] Faster opcode dispatch on gcc

2009-01-16 Thread Antoine Pitrou

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

Thanks Skip, it makes sense... so here is a patch without the configure
script.

(I wonder however if those huge configure changes, when checked into the
SVN, could break something silently somewhere)

Added file: http://bugs.python.org/file12769/threadedceval6.patch

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



[issue4753] Faster opcode dispatch on gcc

2009-01-16 Thread Antoine Pitrou

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


Removed file: http://bugs.python.org/file12767/threadedceval6.patch

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



[issue4965] Can doc index of html version be separately scrollable?

2009-01-16 Thread Terry J. Reedy

New submission from Terry J. Reedy tjre...@udel.edu:

In the Windows help version of the docs that come with the Windows .msi
installer, the index pane to the left scrolls separately from the
content pane to the right.  Very nice for jumping around even to other docs.

In the html versions at docs.python.org, there is one scroll bar and the
index disappears when one moves very far down the page.  If sensibly
possible, decoupling index and context would be nice.  Please pardon my
ignorance if not.

--
assignee: georg.brandl
components: Documentation
messages: 79986
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: Can doc index of html version be separately scrollable?
type: feature request
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

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



[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2009-01-16 Thread Paolo 'Blaisorblade' Giarrusso

Paolo 'Blaisorblade' Giarrusso p.giarru...@gmail.com added the comment:

Yep, agreed. It could be quite cool to rely on __attribute__((cold)) to
mark format_exc_check_arg(), but that only works with newer gcc's. I
guess I'll add many likely() by hand - in some cases GCC might already
get it right, but the heuristics used to choose the likely path
statically are quite arguable and subject to change. Also, on other
archs such hints might have a bigger impact on the generated code.

I'll give a look at that not earlier than February, or you're welcome to
try this. However, at least on x86, an if (successCondition) {
success(); dispatch(); } failure(); will be probably compiled to
assembly like follows, equivalent to adding likely to the test:

evaluate successCondition
if_false goto err:
call to success();
dispatch next instrutions.

err:
call to failure();

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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-16 Thread Collin Winter

Collin Winter coll...@gmail.com added the comment:

Another data point: I've tested this patch applied to trunk on Core 2
Duo and Opteron 8214 HE machines using both gcc 4.0.3 and 4.3.1, and I'm
seeing mixed results. Pybench with warp 1 is between ~1.5% slower and
~1% faster, depending on gcc version (fairly consistent across
machines). 2to3 and two template systems I've tested are between 2.5%
slower and 2% faster depending on workload and gcc version.

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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-16 Thread Paolo 'Blaisorblade' Giarrusso

Paolo 'Blaisorblade' Giarrusso p.giarru...@gmail.com added the comment:

Given a 10% speedup on some systems, and statistically insignificant
changes on other systems, I would still apply the patch, even simply
because the bitmask part simply makes more sense.

I'm not sure about the goto part, but still, it does straighten the
code. Anyway, simply call the label why_is_WHY_NOT,
why_set_to_WHY_NOT or something like that. Verbosity on a use-once
label used with goto should be encouraged - we're not Java programmer,
but we need to pay for using goto by increasing readability in other ways.

@collinwinter: since the differences you report are so low (similar to
the statistical noise I get on my machine), I would expect that you're
just getting statistical noise instead of different results depending on
the GCC version, unless you performed statistical hypothesis testing
(confidence intervals and related stuff). And if I had done the needed
tens/hundreds of repetitions for hypothesis testing, I'd state that
clearly, so I suppose you didn't, and that's fully acceptable since the
result is likely to be statistically insignificant anyway.

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



[issue4874] decoding functions in _codecs module accept str arguments

2009-01-16 Thread STINNER Victor

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

New patch:
 - Leave unicode_escape_decode() and raw_unicode_escape_decode() 
unchanged (still accept unicode string)
 - Test changes (reject unicode for most codecs decode functions)
 - Write tests for unicode_escape_decode() and 
raw_unicode_escape_decode() (there was no test for these functions)

Added file: http://bugs.python.org/file12770/_codecs_bytes-2.patch

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



[issue4874] decoding functions in _codecs module accept str arguments

2009-01-16 Thread STINNER Victor

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


Removed file: http://bugs.python.org/file12641/_codecs_bytes.patch

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



[issue4177] Crash in MIMEText on FreeBSD

2009-01-16 Thread STINNER Victor

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


--
nosy:  -haypo

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



[issue4626] compile() doesn't ignore the source encoding when a string is passed in

2009-01-16 Thread STINNER Victor

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

New version of my patch: add a regression test.

@brett.cannon: Could you review my patch?

Added file: http://bugs.python.org/file12771/tokenizer_ignore_cookie-3.patch

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



[issue4626] compile() doesn't ignore the source encoding when a string is passed in

2009-01-16 Thread STINNER Victor

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


Removed file: http://bugs.python.org/file12589/tokenizer_ignore_cookie-2.patch

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



[issue3826] Problem with SocketIO for closing the socket

2009-01-16 Thread STINNER Victor

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

 This still needs back porting to release30-maint 
 assuming no other issues are found with it

How can we check if they are new issues with the changes?

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



[issue3826] Problem with SocketIO for closing the socket

2009-01-16 Thread Gregory P. Smith

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

That mostly meant let the buildbots run it and/or see if anyone 
complains on a list.  Go ahead and backport. :)

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



[issue4821] Patches for thread-support in built-in SHA modules

2009-01-16 Thread STINNER Victor

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

sha1module_small_locks.diff patch is very similar to the changes made 
in #4751, except:
 - SHA1_GIL_MINSIZE is 8192 whereas HASHLIB_GIL_MINSIZE is 2048
 - There is no test for PyThread_allocate_lock() failure

Instead of copy/paste code in hashlib, sha1, sha256 and sha512 (4 
modules), can't we share some constants, functions or macros? 
Examples:
 - the GIL minimum size constant
 - the long MY_GET_BUFFER_VIEW_OR_ERROUT macro (which can be a 
function)

And about sha, why using 3 files for sha? Are the source code so 
different? In the GNU libc, they use template files (it's possible 
even with the C language using the preprocessor!): strtof(), strtod() 
and strtold() share 99% of the source code. Interesting content of 
strtof.c :

#define FLOAT   float
#define FLT FLT
#ifdef USE_WIDE_CHAR
#define STRTOF  wcstof
#define STRTOF_L__wcstof_l
#else
# define STRTOF strtof
# define STRTOF_L   __strtof_l
#endif

#include strtod.c


Refactoring to share code between hash modules will ease the changes, 
eg. release the GIL ;-)

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



[issue4626] compile() doesn't ignore the source encoding when a string is passed in

2009-01-16 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

I will see when I can get to it (other stuff is taking priority). Not
going to assign to myself quite yet in case someone wants to beat me to
this. I won't lose track since I created the bug and have a saved query
to look at all bugs I make.

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



[issue4956] Py_Initialize needs to be done before file load (on msys+wine)

2009-01-16 Thread Gabriel Genellina

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

Ok, imagine for a moment that your patch is accepted and applied. 
Python runs in a wide variety of systems. Now imagine that, in a few of 
them, it stops running. What would you say to defend your changes? I 
have no idea why, but it works for me!. I have no doubt your changes 
would be reverted in two nanoseconds, and your chances of getting a 
second patch accepted would drop near zero.

I understand your project and hope you successfully complete your 
goals, but it seems it's not madure enough yet. At this stage, blogging 
about your progresses and writing some sort of recipe would be more 
adequate, until you get a system that builds cleanly and passes most 
(if not all) test cases. This applies to your other pending patches too.

PS: I don't know the English term, but here in Argentina (Spanish) the 
way you fix bugs would be called chapuza. No offense intended.

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



[issue4968] Clarify inspect.iscallable method docs

2009-01-16 Thread Terry J. Reedy

New submission from Terry J. Reedy tjre...@udel.edu:

inspect module in 3.0

.isclass: says Return true if the object is a class. Since the issue
of builtin versus Python coded is involved in all the other methods
below, I would expand this to
Return true if the object is a class, whether built-in or Python-coded.
to emphasize that this is not an issue for this one.

.isfunction: current Return true if the object is a Python function or
unnamed (lambda) function. falsely implies that there is such a thing
as 'unnamed (lambda) function; different from 'Python function'.  By
test, it just returns True for 'function' objects. Suggestion:

Return true for Python-coded functions, including unbound Python-coded
methods. or possibly
Return true for functions created by def statements and lambda
expressions, including unbound Python-coded methods.

.ismethod: Return true if the object is a method. should be specified
to something like
Return true if the object is a bound method written in Python.

.isbuiltin: says Return true if the object is a built-in function.
but actually tests for membership in class 'builtin_function_or_method'.
 I believe that truth is
Return true if the object is a built-in function (but not a class) or a
bound built-in non-special method.
It is True, for instance, for [].append but not [].__hash__.  I am
assuming that this behavior is intended and not a bug.

.ismethoddescriptor: Return true if the object is a method descriptor,
but not if ismethod() or isclass() or isfunction() are true. begs the
question of what a method descriptor is.  I believe the following is
both true and clearer.
Return true if the object is a built-in method and isbuiltin() is false.

I would follow with
The methods isclass, isfunction, ismethod, isbuiltin, and
ismethoddescriptor are mutually exclusive.
I believe the following is true, and could be added also.
Exact one is true for any instance of a built-in callable class.

--
assignee: georg.brandl
components: Documentation
messages: 7
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: Clarify inspect.iscallable method docs
versions: Python 3.0, Python 3.1

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



[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2009-01-16 Thread Gabriel Genellina

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

You should stick to Python 2.6 (or even 2.5) for web programming - 3.0 
is not mature enough. I thought this was a feasibility study on porting 
an existing application to Python 3.0 -- not your first steps in the 
language.

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



[issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only)

2009-01-16 Thread STINNER Victor

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

Patch fixing PyUnicode_FromWideChar() for UCS-2 build: create 
surrogates for character  U+ like PyUnicode_FromOrdinal() does.

--
keywords: +patch
Added file: 
http://bugs.python.org/file12773/unicode_fromwidechar_surrogate.patch

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



[issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only)

2009-01-16 Thread STINNER Victor

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

Note: I wrote my patch against py3k r68646.

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



[issue4959] inspect.formatargspec fails for keyword args without defaults, affects help and likely pydoc

2009-01-16 Thread Benjamin Peterson

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

Thanks for the patch! Fixed in r68647.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed
versions: +Python 3.1

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



[issue4907] ast.literal_eval does not properly handled complex numbers

2009-01-16 Thread Terry J. Reedy

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

I assume from the discussion that the patch was accepted/committed and
changed the resolution and stage field to match.

FWIW, list displays, for instance, are not literals either but are
successfully evaluated, so doing same for complex 'displays' seems
sensible to me too, and in line with the purpose of the method.

--
nosy: +tjreedy
resolution:  - accepted
stage: patch review - committed/rejected

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



[issue4914] trunc(x) erroneously documented as built-in

2009-01-16 Thread Terry J. Reedy

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

Confirmed for 3.0 that trunc does not exist in the builtins module and
is not listed in the Built-in functions section but is listed in the
Numeric Types section.  So I agree trunc(x) x truncated to Integral 
should leave the Operation table.

Yes, MM, we do want to clean up such discrepancies.

trunc is in the math module and is listed in its doc.

--
nosy: +tjreedy

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