[issue3158] Doctest fails to find doctests in extension modules

2008-06-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

For me, a 'function' is written in Python, a 'builtin' is written in C. 

The fact that it is defined in an extension module is irrelevant, and
depends on the implementation: zlib is an extension module on Unix, but
is linked inside python26.dll on Windows.

maybe inspect.isroutine() is the correct test here.

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3131] 2to3 can't find fixes_dir

2008-06-21 Thread Helmut Jarausch

Helmut Jarausch <[EMAIL PROTECTED]> added the comment:

This patch seems to work, but

when invoked it tries to write to /usr/local/lib/python3.0/lib2to3
( I get 
root: Writing failed:[Errno 13] Permission denied: '/usr/local/lib/
python3.0/lib2to3/PatternGrammar3.0.0.beta.1.pickle'
)

I hope this will be handled during install in future.

Furthermore, as a test, I copied refactor.py to xxx.py
and ran 2to3 on xxx.py

Here I get
RefactoringTool: Can't parse xxx.py: ParseError: bad input: type=22, 
value='=', context=('', (67, 71))

This error message is a bit terse for someone not knowing the details
of 2to3

Thanks for the patch,
Helmut.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3159] glob.py improvements

2008-06-21 Thread Aristotelis Mikropoulos

New submission from Aristotelis Mikropoulos <[EMAIL PROTECTED]>:

Simplified some of the code, improving performance and readability.

--
components: Library (Lib)
files: glob.py.patch
keywords: patch
messages: 68493
nosy: Indy
severity: normal
status: open
title: glob.py improvements
type: performance
versions: Python 2.5
Added file: http://bugs.python.org/file10680/glob.py.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3131] 2to3 can't find fixes_dir

2008-06-21 Thread Georgij Kondratjev

Georgij Kondratjev <[EMAIL PROTECTED]> added the comment:

> when invoked it tries to write to /usr/local/lib/python3.0/lib2to3

2to3 always worked like this. I always had to run it as root. Seems
weird for me too.

> Furthermore, as a test, I copied refactor.py to xxx.py
and ran 2to3 on xxx.py

It seems to be a bug with 2to3 processing refactor.py.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3131] 2to3 can't find fixes_dir

2008-06-21 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3101] global function _add_one_to_C

2008-06-21 Thread Ricardo Quesada

Ricardo Quesada <[EMAIL PROTECTED]> added the comment:

This seems to be fixed in r62348
http://svn.python.org/view?rev=62348&view=rev

--
nosy: +riq

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error

2008-06-21 Thread Manuel Kaufmann

Manuel Kaufmann <[EMAIL PROTECTED]> added the comment:

I fixed this error, I attach the patch.

--
keywords: +patch
nosy: +humitos
Added file: http://bugs.python.org/file10681/libsubprocess.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3043] Recursion bug in deepcopy

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Two weeks passed, closing it manually (see
http://mail.python.org/pipermail/python-dev/2008-February/076992.html).

--
nosy: +facundobatista
status: pending -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3062] Turtle speed() function has no effect under Mac OS X

2008-06-21 Thread Ricardo Quesada

Ricardo Quesada <[EMAIL PROTECTED]> added the comment:

turtle.py was replaced by a new module in r63929 .
I can't reproduce this bug with this revision, so it seems to be fixed.
using: os/x 10.5.3 intel.

--
nosy: +riq

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3101] global function _add_one_to_C

2008-06-21 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Ok, so it's fixed for the trunk, but not Py3k. The trunk fix doesn't
port to 3k, since the functions are called inside memoryobject.c (so
making them static would break that module).

--
versions:  -Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3160] Building a Win32 binary installer crashes

2008-06-21 Thread Viktor Ferenczi

New submission from Viktor Ferenczi <[EMAIL PROTECTED]>:

Python 3.0b1, official MSI installer.

Checkout source code of this project:
http://code.google.com/p/anntools/

Enter into the root of your working copy and try to build a Win32 installer:

C:\Python30\python.exe setup.py bdist_wininst

NOTE: You might want to replace the path above with you Python
installation path. Please ensure, that Python 3.0 is used, since all
other versions from 2.4 to 2.6b1 works well.

You will get the following traceback during the build process:

Traceback (most recent call last):
  File "setup.py", line 37, in 
"anntools",
  File "C:\python30\lib\distutils\core.py", line 149, in setup
dist.run_commands()
  File "C:\python30\lib\distutils\dist.py", line 941, in run_commands
self.run_command(cmd)
  File "C:\python30\lib\distutils\dist.py", line 961, in run_command
cmd_obj.run()
  File "C:\python30\lib\distutils\command\bdist_wininst.py", line 177,
in run
self.create_exe(arcname, fullname, self.bitmap)
  File "C:\python30\lib\distutils\command\bdist_wininst.py", line 263,
in create_exe
cfgdata = cfgdata + "\0"
TypeError: can't concat bytes to str

--
components: Distutils
messages: 68500
nosy: complex
severity: normal
status: open
title: Building a Win32 binary installer crashes
type: crash
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3160] Building a Win32 binary installer crashes

2008-06-21 Thread Viktor Ferenczi

Viktor Ferenczi <[EMAIL PROTECTED]> added the comment:

Fixed by appending the b (bytes) prefix to three string literals
concatenated to cfgdata in
C:\python30\lib\distutils\command\bdist_wininst.py:

Line #262:

# Append the pre-install script
cfgdata = cfgdata + b"\0"
if self.pre_install_script:
script_data = open(self.pre_install_script, "r").read()
cfgdata = cfgdata + script_data + b"\n\0"
else:
# empty pre-install script
cfgdata = cfgdata + b"\0"
file.write(cfgdata)

Sorry for the source code fragment. I'll try to submit a patch instead
next time.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2701] csv.reader accepts string instead of file object (duck typing gone bad)

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Skip is right, this is working ok.

--
nosy: +facundobatista
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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




[issue2732] curses.textpad loses characters at the end of lines

2008-06-21 Thread Anthony Lenton

Anthony Lenton <[EMAIL PROTECTED]> added the comment:

This doesn't happen to me with 2.6 compiled from HEAD, or with 2.5.2
shipped with Ubuntu Hardy.

In both cases the output is:

Contents of text box: '123456789\n123456789\n'

--
nosy: +elachuni

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3161] Missing import for sys in _abcoll

2008-06-21 Thread Simon Cross

New submission from Simon Cross <[EMAIL PROTECTED]>:

The _hash method of the Set ABC uses sys.maxsize but doesn't import sys.
The attached patch (against trunk) imports sys and adds a test to show
the problem. There are also still some other _abcoll.py cleanups waiting
in issue 2226.

--
components: Library (Lib), Tests
files: abcoll-hash.diff
keywords: patch
messages: 68504
nosy: hodgestar
severity: normal
status: open
title: Missing import for sys in _abcoll
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10682/abcoll-hash.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1817] module-cgi: handling GET and POST together

2008-06-21 Thread Nubis

Nubis <[EMAIL PROTECTED]> added the comment:

This was pretty much done when I got here. It broked the other cgi_test
(which tests some other corner cases).
Patch includes modifications to Lib/cgi.py and adds
Lib/test/test_cgi_post_qs.py to test the new features.

This should be closed by now, but since this is my first patch, just let
me know what else should I do to get it closed.

thanks!

--
keywords: +patch
nosy: +Nubis
versions: +Python 2.6
Added file: http://bugs.python.org/file10683/post_qs.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3161] Missing import for sys in _abcoll

2008-06-21 Thread Simon Cross

Simon Cross <[EMAIL PROTECTED]> added the comment:

One could also make a case for simply removing the _hash method since it
doesn't look like anything is using it? And anything that was using it
would already be broken?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3132] implement PEP 3118 struct changes

2008-06-21 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

If the struct changes are made, add also 2 formats for C types ssize_t and 
size_t, perhaps 'z' resp. 'Z'.  In particular since on platforms 
sizeof(size_t) != sizeof(long).

--
nosy: +MrJean1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1044479] docs for Py_UNICODE are wrong

2008-06-21 Thread Manuel Muradás

Manuel Muradás <[EMAIL PROTECTED]> added the comment:

This looks fixed to me. The current documentation is much more clear.
Look:
http://docs.python.org/api/unicodeObjects.html

--
nosy: +dieresys

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2813] No float formatting in PyString_FromFormat

2008-06-21 Thread Ricardo Quesada

Ricardo Quesada <[EMAIL PROTECTED]> added the comment:

Do you expect to have support for float, double and long double ?
Also, do you expect to have support for precision-modifiers ?

--
nosy: +riq

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1044479] docs for Py_UNICODE are wrong

2008-06-21 Thread Manuel Muradás

Manuel Muradás <[EMAIL PROTECTED]> added the comment:

This is the link to the current py_unicode documentation:
http://docs.python.org/dev/c-api/unicode.html

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3001] RLock's are SLOW

2008-06-21 Thread sebastian serrano

sebastian serrano <[EMAIL PROTECTED]> added the comment:

Running with python -O the timing gets a little closer between Lock and
RLock. This code won't be easy to improve in performance. 
The heaviest call is current_thread(), used at lines:
117:me = current_thread()
137:if self.__owner is not current_thread():

and only consist on:
788: def current_thread():
789: try:
790: return _active[_get_ident()]
791: except KeyError:
792: ##print "current_thread(): no current thread for", _get_ident()
793: return _DummyThread()

Simple profiler dump:
$../python-trunk/python -O rlock.py 
time Lock 0.720541000366
time RLock 4.90231084824
 44 function calls in 0.982 CPU seconds

   Ordered by: internal time, call count

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
   100.3040.0000.3900.000 threading.py:116(acquire)
   100.2780.0000.3600.000 threading.py:136(release)
10.2320.2320.9820.982 rlock.py:27(testRLock)
   200.1680.0000.1680.000
threading.py:788(current_thread)
10.0000.0000.0000.000 threading.py:103(__init__)
10.0000.0000.0000.000 threading.py:98(RLock)
10.0000.0000.0000.000 threading.py:76(__init__)
00.000 0.000  profile:0(profiler)

--
nosy: +sserrano

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1817] module-cgi: handling GET and POST together

2008-06-21 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Thanks for your contribution!

To get this commmitted, please draw the attention of someone else on
python-dev (or if you're an IRC person try #python-dev at freenote,
IIRC).  I'd recommend moving the tests into the existing test_cgi.py.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1491] BaseHTTPServer incorrectly implements response code 100

2008-06-21 Thread Neil Muller

Neil Muller <[EMAIL PROTECTED]> added the comment:

The attached patch is against recent svn (r64442), and adds samwyse's
refactoring of the class. The test for server responses is made less
restrictive when the request isn't HTTP/1.1.

--
nosy: +Neil Muller
Added file: http://bugs.python.org/file10684/BaseHTTPServer_continue_2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-06-21 Thread Rodolpho Eckhardt

Rodolpho Eckhardt <[EMAIL PROTECTED]> added the comment:

Verified Werneck's patch and it also works on 2.6 and 3.0.

However, the previous code used to present a "friendly" message about
non-numeric ports: "socket.error: nonnumeric port" and now it raises
"ValueError: invalid literal for int() with base 10".

Should it be changed to inform that the exception is due to a
non-numeric port? (Just wrap int(port) with a try and change the raised
exception)

--
nosy: +rodolpho
versions: +Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2776] urllib2.urlopen() gets confused with path with // in it

2008-06-21 Thread Adrianna Pinska

Adrianna Pinska <[EMAIL PROTECTED]> added the comment:

I have written a test to go with my patch.

Added file: http://bugs.python.org/file10685/doubleslash_test.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-06-21 Thread Martin v. Löwis

Changes by Martin v. Löwis <[EMAIL PROTECTED]>:


___
Python tracker <[EMAIL PROTECTED]>

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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-06-21 Thread admin

admin <[EMAIL PROTECTED]> added the comment:

What is wrong? Documentation or method?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names.

2008-06-21 Thread Simon Cross

New submission from Simon Cross <[EMAIL PROTECTED]>:

It appears that ssl.SSLSocket attempts to override some of the methods
socket.socket delegates to the underlying _socket.socket methods.
However, this overriding fails because socket.socket.__init__ replaces
all the methods mentioned in _delegate_methods.

These methods are: recv, recvfrom, recv_into, recvfrom_into, send and
sendto.

ssl.SSLSocket implements recv and send. Neither of these overrides will
actually work.  ssl.SSLSocket also implements recv_from and send_to
which seem to be attempts to override recvfrom and sendto.

In the Py3k branch it looks like the overriding done by
socket.socket.__init__ is gone so that these methods are now potentially
overridable. This could potentially be emulated in trunk by checking for
the methods using hasattr(...) before overriding them.

I'm happy to create patches which fix the method names and clean up the
methods on both branches and add tests. I just want to check that I have
an accurate picture of what's needed before starting on them.

--
components: Library (Lib)
messages: 68517
nosy: hodgestar
severity: normal
status: open
title: ssl.SSLSocket implements methods that are overriden by 
socket.socket.__init__ and methods with incorrect names.
versions: Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3155] Python should expose a pthread_cond_timedwait API for threading

2008-06-21 Thread Adam Olsen

Changes by Adam Olsen <[EMAIL PROTECTED]>:


--
nosy: +Rhamphoryncus

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1044479] docs for Py_UNICODE are wrong

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Thanks Thomas and Manuel!

--
nosy: +facundobatista
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3017] Verify doc updates for the decimal module

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Reviewed and updated it, in the trunk and 3.0.

Thank you!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2569] default_scheme in urlparse.urlparse() useless

2008-06-21 Thread Anthony Lenton

Anthony Lenton <[EMAIL PROTECTED]> added the comment:

In http://bugs.python.org/issue754016 there's already a discussion about
this.
The RFC that urlparse is following (rfc 1808) requires the net_loc
component to start with // even if the scheme component is missing,
which is why urlparse("www","http") puts the 'www' in to the path
component instead of net_loc.

It seems that this is indeed the intended behavior, and the patch for
issue 754016 adds a docfix clarifying this.

--
nosy: +elachuni

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1534607] IndexError: Add bad index to msg

2008-06-21 Thread Martín Conte Mac Donell

Martín Conte Mac Donell <[EMAIL PROTECTED]> added the comment:

I don't think this is bearly needed. This error messages (IndexError:
list index out of range) comes from so long ago that those kind of
changes makes me feel worried.

--
nosy: +Reflejo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2569] default_scheme in urlparse.urlparse() useless

2008-06-21 Thread Anthony Lenton

Changes by Anthony Lenton <[EMAIL PROTECTED]>:


--
nosy: +facundobatista

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2569] default_scheme in urlparse.urlparse() useless

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Thanks (pk) and Anthony!

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2813] No float formatting in PyString_FromFormat

2008-06-21 Thread duane Bailey

duane Bailey <[EMAIL PROTECTED]> added the comment:

Well, precision modifiers would be nice, but I don't think that they're
necessarily needed. General floating point support, however, is needed.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2888] pprint produces different output in 2.6 and 3.0

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Commited in 64446, thank you all!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3158] Doctest fails to find doctests in extension modules

2008-06-21 Thread Fernando Pérez

Fernando Pérez <[EMAIL PROTECTED]> added the comment:

I think there are two issues that need to be separated:

1. The doctest bug.  I'm happy with any resolution for it, and I'm not
claiming that my patch is the best approach.  isroutine() indeed works
in my case, and if that approach works well in general for doctest, I'm
perfectly happy with it.

2. Terminology.  I really disagree with the idea that 

- 'function' describes the implementation language of an object instead
of whether it's a standalone callable (vs an object method).

- 'builtin' doesn't mean the object is "built into the shipped Python"
but instead that it's "written in C".  

The language exposes its builtins via the __builtin__ module precisely
to declare what is part of itself, and it even has in the documentation:

http://docs.python.org/lib/built-in-funcs.html

a section that starts:

"""2.1 Built-in Functions

The Python interpreter has a number of functions built into it that are
always available."""


Nowhere does it say that "builtins are written in C and functions in
Python".

In summary, I'm happy with any fix for the bug, but I very strongly
disagree with a use of terminology that is confusing and misleading (and
which unfortunately is enshrined in the inspect and types modules in how
they distinguish 'Function' from 'BuiltinFunctionType').

And by the way, by 'extension module' I mean to describe C-extensions,
since that is how most C code is shipped by third-party authors, those
affected by this bug (since the stdlib doesn't seem to use doctests
itself for its own testing of C code).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue754016] urlparse goes wrong with IP:port without scheme

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Senthil, your patch is wrong, see:

>>> import urlparse
>>> urlparse.urlparse('1.2.3.4:80','http')
ParseResult(scheme='http', netloc='', path='1.2.3.4:80', params='',
query='', fragment='')

The netloc should be "1.2.3.4:80", note the composition of an URL:

  :///;?#

Please fix it and test it applying the patch to the test I'm submitting
here...

Added file: http://bugs.python.org/file10686/test_urlparse.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3163] module struct support for ssize_t and size_t

2008-06-21 Thread Jean Brouwers

New submission from Jean Brouwers <[EMAIL PROTECTED]>:

Attached is a (simplistic) patch for the struct module to support C types 
ssize_t and size_t with format characters 'z' resp. 'Z'.

The patch updates Python 2.6b1 files Modules/_struct.c and 
Doc/library/struct.rst.

Note, format character 'Z' is also proposed in PEP 3118 for C type complex  
and that has to be something else, perhaps 'C'.

--
components: Library (Lib)
files: struct_size_t.patch
keywords: patch
messages: 68528
nosy: MrJean1
severity: normal
status: open
title: module struct support for ssize_t and size_t
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file10687/struct_size_t.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3062] Turtle speed() function has no effect under Mac OS X

2008-06-21 Thread David Kwast

David Kwast <[EMAIL PROTECTED]> added the comment:

I wrote a small python program to test turtle speed in OSX. I tested
with trunk and py3k branch.

The string input works differently with 2.5, 2.6 and 3.0. The turtle is
slower in 2.5 and almost the same speed in 2.6 and 3.0.

Here are my test results:

david-kwasts-macbook:turtle davidkwast$ ../python_3k/python speedy.py 
0:00:04.640639
0:00:02.031436
david-kwasts-macbook:turtle davidkwast$ ../python_trunk/python speedy.py 
0:00:04.598181
0:00:02.048452
david-kwasts-macbook:turtle davidkwast$ python speedy.py 
(Python version < 2.6 don't support int in speed funtion)
0:00:18.343453

--
nosy: +david.kwast
versions: +Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10688/speedy.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1817] module-cgi: handling GET and POST together

2008-06-21 Thread Nubis

Nubis <[EMAIL PROTECTED]> added the comment:

I moved the test into the current test_cgi.py, and also added the docs
and NEWS.
This patch also includes all the previous changes and is the only one
that needs to be merged.


Now I think it def should be closed :)

Added file: http://bugs.python.org/file10689/post_qs_final.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3163] module struct support for ssize_t and size_t

2008-06-21 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Now that Python 2.6 is in beta, new features should be deferred to 2.7.

--
nosy: +loewis
versions: +Python 2.7 -Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3163] module struct support for ssize_t and size_t

2008-06-21 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

Please ignore the first patch.  Use the rev2 patch which includes an 
update for test file  Lib/test/test_struct.py as well.

Added file: http://bugs.python.org/file10690/struct_size_t.rev2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3163] module struct support for ssize_t and size_t

2008-06-21 Thread Jean Brouwers

Changes by Jean Brouwers <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10687/struct_size_t.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False

2008-06-21 Thread Matias Gonzalez

Matias Gonzalez <[EMAIL PROTECTED]> added the comment:

This is not a bug. Function __instancecheck__ should be a classmethod.

>>> class Meta(type):
... @classmethod
... def __instancecheck__(self, other):
... return False
... 
>>> isinstance(3, Meta)
False

--
nosy: +mato2000

___
Python tracker <[EMAIL PROTECTED]>

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



[issue754016] urlparse goes wrong with IP:port without scheme

2008-06-21 Thread Anthony Lenton

Anthony Lenton <[EMAIL PROTECTED]> added the comment:

I agree with facundobatista that the patch is bad, but for a different
reason: it now breaks with:

>>> import urlparse
>>> urlparse.urlparse ('http:')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/anthony/svn/python26/Lib/urlparse.py", line 108, in urlparse
tuple = urlsplit(url, scheme, allow_fragments)
  File "/home/anthony/svn/python26/Lib/urlparse.py", line 148, in urlsplit
if i > 0 and not url[i+1].isdigit():
IndexError: string index out of range

I'm afraid that it it's not evident that the expected behavior isn't
evident.

Take for example:

>>> import urlparse
>>> urlparse.urlparse('some.com', 'http')
ParseResult(scheme='http', netloc='', path='some.com', params='',
query='', fragment='')

Is the url referring to the some.com domain or to a windows executable file?

If you're using urlparse to parse only absolute urls then probably you
want the first component to be considered a net_loc, but not if you're
thinking of accepting also relative urls.

It would probably be better to be explicit and raise an exception if the
url is invalid, so that the user can prepend a '//' and resubmit if
needed.  Also we'd probably stop seeing bugreports about this issue :)

--
nosy: +elachuni

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1817] module-cgi: handling GET and POST together

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Commited the final Nubis' version in r64447. Fixed, :). Thank you all!

--
nosy: +facundobatista
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue754016] urlparse goes wrong with IP:port without scheme

2008-06-21 Thread Facundo Batista

Changes by Facundo Batista <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10686/test_urlparse.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue754016] urlparse goes wrong with IP:port without scheme

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

I agree with Anthony here, because if you let people write without the
"//" at the beginning, you'll never know if they're entering a net
location or a relative path.

So, the better behaviour to be as explicit as possible should be:

>>> urlparse.urlparse('1.2.3.4:80','http')
Traceback!!! ValueError()

>>> urlparse.urlparse('//1.2.3.4:80','http')
('http', '1.2.3.4:80', '', '', '', '')


So, to close this issue, we should fix the code to behave like indicated
in the first case.

What do you think?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3001] RLock's are SLOW

2008-06-21 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Le samedi 21 juin 2008 à 16:40 +, sebastian serrano a écrit :
> sebastian serrano <[EMAIL PROTECTED]> added the comment:
> 
> Running with python -O the timing gets a little closer between Lock and
> RLock. This code won't be easy to improve in performance. 
> The heaviest call is current_thread(), used at lines:
> 117:me = current_thread()
> 137:if self.__owner is not current_thread():

One could always try to rewrite RLock by replacing calls to
threading.current_thread() with thread.get_ident().

However, given the profile table you have appended, it will only save at
most 30% of the time. If someone needs a more important speed-up, he
should reimplement the RLock type in C (and contribute it back :-)).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1083895] functions replaced by subprocess should point to its docs

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

The best is to leave that section where it is, because it'll remain
there in the Py3 docs, but to point to this section from the other places.

So, in the deprecated functions I added an alert to review specially a
section of the subprocess documentation that helps with the replacing of
those functions.

--
nosy: +facundobatista
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3156] bytes type has inconsistent methods (append, insert)

2008-06-21 Thread Bruno Gola

Bruno Gola <[EMAIL PROTECTED]> added the comment:

The following patch fixes the behavior, .append and .insert will accept
only integer as parameters.

Is this really the desired behavior? I mean, why not to accept a
character for both methods?

There are two tests in Lib/test/test_io.py that uses the old behavior
for .append().

--
keywords: +patch
nosy: +brunogola
Added file: http://bugs.python.org/file10691/issue3156.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1199808] installation problem with python 2.4.1 on Win2k system

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Can we close this? The OP didn't answer for almost three years... and
the 2.4 to download is now 2.4.5...

--
nosy: +facundobatista

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1199808] installation problem with python 2.4.1 on Win2k system

2008-06-21 Thread Martin v. Löwis

Changes by Martin v. Löwis <[EMAIL PROTECTED]>:


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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1159425] 2.4 crashes when try to exit app and mulitple threads active

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Does this still happen with newer Python versions? Could you provide an
example code?

Thanks!

--
nosy: +facundobatista

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3164] cPickle calls to save_string and save_unicode with unicode objects.

2008-06-21 Thread Angel Freire

New submission from Angel Freire <[EMAIL PROTECTED]>:

If Python trunk is compiled using Py_USING_UNICODE it'll call both,
save_str and save_unicode for an string object.

The patch adds a break to the case statment in case it encounters a
unicode or str.

--
components: Library (Lib)
files: cpickle-unicode-r64448.diff
keywords: patch
messages: 68541
nosy: cuerty
severity: normal
status: open
title: cPickle calls to save_string and save_unicode with unicode objects.
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10692/cpickle-unicode-r64448.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1556] Failure when calling __str__ for MIMEBase(message, rfc822) objects

2008-06-21 Thread Anthony Lenton

Anthony Lenton <[EMAIL PROTECTED]> added the comment:

I don't really think the MIMEBase class is supposed to be used like
this, or at all: it behaves more like a Multipart message in that it
expects to carry a list of MIMEBase objects as a payload (not a string!)
though it doesn't define a boundary by default.

You can carry on using the MIMEBase class, but changing the line that says:

attachment.set_payload(file(filename).read( ))

for:

attachment.set_payload([MIMEText(file(filename).read())])

I'd recommend you to use:

attachment = Message()
attachment.set_payload(file(filename).read())

or if you want a multipart message:

attachment = MIMEMultipart()
text = MIMEText(file(filename).read())
attachment.attach(text)

--
nosy: +elachuni

___
Python tracker <[EMAIL PROTECTED]>

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



[issue888830] POP3 lib timeout

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

This is a standard behaviour, and you shouldn't document it in *all* the
modules.

BTW, now in the POP3 lib you already have a timeout, :)

--
nosy: +facundobatista
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3165] cPickle recursion problem

2008-06-21 Thread Angel Freire

New submission from Angel Freire <[EMAIL PROTECTED]>:

A single Picklerobject->nesting++ will not take into consideration the
stack overhead caused by calls from
save->save_{list,dict}->batch{list,dict}.

--
components: Library (Lib)
files: cpickle-r64448.diff
keywords: patch
messages: 68544
nosy: cuerty
severity: normal
status: open
title: cPickle recursion problem
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10693/cpickle-r64448.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3166] Make conversions from long to float correctly rounded.

2008-06-21 Thread Mark Dickinson

New submission from Mark Dickinson <[EMAIL PROTECTED]>:

If n is a Python long, then one might expect float(n) to return the 
closest float to n.  Currently it doesn't do this.  For example (with 
Python 2.6, on OS X 10.5.2/Intel):

>>> n = 295147905179352891391L

The closest float to n is equal to n+1.  But float(n) returns the 
further of the two floats bracketing n, equal to n-65535:

>>> float(n)
2.9514790517935283e+20
>>> long(float(n))
295147905179352825856L
>>> n - long(float(n))
65535L

It's fairly straightforward to fix PyLong_AsDouble to return the closest 
double to a given long integer n (using the round-half-to-even rule in 
the case of a tie).  The attached patch does this.

Having a correctly rounded float(n) can be useful for testing other 
floating-point routines that are supposed to be correctly rounded.

--
components: Interpreter Core
files: long_as_double.patch
keywords: patch
messages: 68545
nosy: marketdickinson
severity: normal
status: open
title: Make conversions from long to float correctly rounded.
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file10694/long_as_double.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1556] Failure when calling __str__ for MIMEBase(message, rfc822) objects

2008-06-21 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

I agree with Anthony. If you have any further questions regarding how to
use this library feel free to ask them in python-list.

--
nosy: +facundobatista
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue449227] rlcompleter add "(" to callables feature

2008-06-21 Thread Manuel Muradás

Manuel Muradás <[EMAIL PROTECTED]> added the comment:

Here is a new patch against 2.6.

--
nosy: +dieresys
Added file: http://bugs.python.org/file10695/rlcompleter2.6.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names.

2008-06-21 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3167] math test fails on Solaris 10

2008-06-21 Thread Jean Brouwers

New submission from Jean Brouwers <[EMAIL PROTECTED]>:

There are 2 math test failures with 32-bit Python 2.6b1 and 3.0b1 on 
Solaris 10 both built with Sun's C compiler.  The failures do *not* 
occur for the 64-bit builds.  The same compiler options are used for all 
these builds (except -xtarget=native vs -xtarget=native64).
 

==
FAIL: testLog (__main__.MathTests)
--
Traceback (most recent call last):
  File "Lib/test/test_math.py", line 419, in testLog
self.assertRaises(ValueError, math.log, NINF)
AssertionError: ValueError not raised

==
FAIL: testLog10 (__main__.MathTests)
--
Traceback (most recent call last):
  File "Lib/test/test_math.py", line 441, in testLog10
self.assertRaises(ValueError, math.log10, NINF)
AssertionError: ValueError not raised

--

--
components: Tests
messages: 68548
nosy: MrJean1
severity: normal
status: open
title: math test fails on Solaris 10
type: behavior
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3168] cmath test fails on Solaris 10

2008-06-21 Thread Jean Brouwers

New submission from Jean Brouwers <[EMAIL PROTECTED]>:

There is on cmath test failure with 64-bit Python 2.6b1 and 3.0b1 on 
Solaris 10.  The failure does not occur in the 32-bit builds.

All builds are compiled with Sun's C compiler using the same options 
(except -xtarget=native vs -xtarget=native64).


==
FAIL: test_cmath_matches_math (__main__.CMathTests)
--
Traceback (most recent call last):
  File "Lib/test/test_cmath.py", line 294, in test_cmath_matches_math
self.rAssertAlmostEqual(math.log(v, base), z.real)
  File "Lib/test/test_cmath.py", line 128, in rAssertAlmostEqual
self.fail("%s and %s are not sufficiently close" % (repr(a), 
repr(b)))
AssertionError: 6.6438561897747244 and 0.71244141339823108 are not 
sufficiently close

--
components: Tests
messages: 68549
nosy: MrJean1
severity: normal
status: open
title: cmath test fails on Solaris 10
type: behavior
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1180470] BaseHTTPServer uses deprecated mimetools.Message

2008-06-21 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

This was solved in Python 3.0: http.server now uses email.parser (issue2848), 
which is not 
vulnerable to the DoS attack mentioned by Nick.

Should we backport these changes to 2.6? As HTTPMessage's base class was 
changed to 
email.message, additional work would be necessary to maintain API compatibility 
(ie.: 
implementing an interface similar to mimetools.Message in HTTPMessage).

--
nosy: +hdiogenes

___
Python tracker <[EMAIL PROTECTED]>

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



[issue600362] relocate cgi.parse_qs() into urlparse

2008-06-21 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

The patch is not applying cleanly.

BTW, urlparse has been renamed to urllib.parse, but the old docs are still 
there (urlparse.rst).

--
nosy: +hdiogenes

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2813] No float formatting in PyString_FromFormat

2008-06-21 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

Attached is a patch attempting to provide support for %f with precision in 
PyString_FromFormat* based on file Objects/stringobject.c of Python 2.6b1.

Note, only %f is support but %lf is not and silently ignored.

--
keywords: +patch
nosy: +MrJean1
Added file: http://bugs.python.org/file10696/stringobject_format_f.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2813] No float formatting in PyString_FromFormat

2008-06-21 Thread Jean Brouwers

Changes by Jean Brouwers <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10696/stringobject_format_f.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2813] No float formatting in PyString_FromFormat

2008-06-21 Thread Jean Brouwers

Changes by Jean Brouwers <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file10697/stringobject_format_f.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3169] email/header.py doesn't handle Base64 headers that have been insufficiently padded.

2008-06-21 Thread Jason Williams

New submission from Jason Williams <[EMAIL PROTECTED]>:

email/header.py:decode_header() Line 95: dec = 
email.base64mime.decode(encoded)

Headers that contain Subject or From headers which are Base64 encoded 
and are insufficiently padded raise a HeaderParseError. The actual 
padding error is begin generated in binascii.a2b_base64 and bubbling up 
as a HeaderParseError in header.py. 

decode_header() should detect the padding error (Base64 text length does 
not evenly divide by 3) and automatically add padding before handing off 
to a2b_base64. The problem usually occurs with spam.

Example problem header:
Subject: =?iso-8859-1?B?
UHJldmVudCBGb3JlY2xvc3VyZSAmIFNhdmUgWW91ciBIb21lIA=?=


Properly Padded:
Subject: =?iso-8859-1?B?
UHJldmVudCBGb3JlY2xvc3VyZSAmIFNhdmUgWW91ciBIb21lIA==?=

--
components: Library (Lib)
messages: 68553
nosy: jasonjwwilliams
severity: normal
status: open
title: email/header.py doesn't handle Base64 headers that have been 
insufficiently padded.
type: behavior
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-06-21 Thread alejandro david weil

alejandro david weil <[EMAIL PROTECTED]> added the comment:

Shorter trigger code..

--
nosy: +tenuki
Added file: http://bugs.python.org/file10698/test_broken3.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-06-21 Thread alejandro david weil

alejandro david weil <[EMAIL PROTECTED]> added the comment:

Some debugging helper code and my conclutions of one work day:
debughelper.tgZ:
-test_broken1/2.py  
   one does triggers the bug, the other doesn't)
-rtest.sh 
   executes boths and compares its outputs
-frameobject.c.diff
   applied to Objects/frameobject.c, adds some debug info.

What I found:
1. The CustomException is disappearing from locals()
2. PyFrame_FastToLocals() (from that .c file) is updating the locals, 
and removing that exception from there.
3. In the failing case this code:
if (deref) {
assert(PyCell_Check(value));
value = PyCell_GET(value);
}
 is returning value==NULL.

Don't know why that happens.
But you could inspect out1.txt/out2.txt made with rtest.sh, and could 
discover something..

Added file: http://bugs.python.org/file10699/debughelper.tgz

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3170] test_pydoc has no way to regenerate pristine data

2008-06-21 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

test_pydoc relies on pristine data to verify that the tests pass.
Unfortunately there is no automated way to regenerate that pristine
data, making the test easily fail if something global (e.g., __loader__
attributes on all modules) is introduced.

This was seen on Python 3.0 but might also be an issue in 2.6.

--
assignee: benjamin.peterson
components: Tests
messages: 68556
nosy: benjamin.peterson, brett.cannon
priority: low
severity: normal
status: open
title: test_pydoc has no way to regenerate pristine data
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue600362] relocate cgi.parse_qs() into urlparse

2008-06-21 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

Correction: the patch does apply cleanly to 2.6, without breaking tests. 
It just needs to be ported to 3.0 (new urllib package).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3171] operator.*slice() should be deprecated in 2.6

2008-06-21 Thread Stefan Behnel

New submission from Stefan Behnel <[EMAIL PROTECTED]>:

operator.delslice() and friends were removed in Python 3.0, as the
underlying object methods no longer exist. In the same way that the
slicing special methods were deprecated in favour of the item methods
should the functions in the operator module be deprecated (or at least
receive a warning that they will disappear in future interpreter versions).

--
assignee: georg.brandl
components: Documentation, Library (Lib)
messages: 68558
nosy: georg.brandl, scoder
severity: normal
status: open
title: operator.*slice() should be deprecated in 2.6
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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