[issue16045] add more unit tests for built-in int()

2012-09-27 Thread Chris Jerdonek
Chris Jerdonek added the comment: >From http://bugs.python.org/review/16036/ for issue 16036: > Somewhere should be exposed that x must be str, bytes, bytearray or a > subclass. We can add tests for this, too (if not already there). -- ___ Python t

[issue16056] shadowed test names in std lib regression tests

2012-09-27 Thread Xavier de Gaye
Xavier de Gaye added the comment: Running find_duplicate_test_names.py (after changing the print statements) on the 2.7 branch, gives the following output: $ ./python find_duplicate_test_names.py Lib/test/ Duplicate test method names: Lib/test/test_unicode.py: .UnicodeTest.test_capitalize Lib/te

[issue16056] shadowed test names in std lib regression tests

2012-09-27 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- stage: -> needs patch versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue16056] shadowed test names in std lib regression tests

2012-09-27 Thread Ezio Melotti
Ezio Melotti added the comment: The script could be actually be added somewhere (e.g. Tools/scripts) and run as part of `make patchcheck` on the test files that got changed. -- ___ Python tracker _

[issue16060] Double decref and dereferencing after decref in int()

2012-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In function convert_integral_to_int() in file Objects/abstract.c integral double decrefed and dereferenced after decrefing if returned value of __int__() is not int. Python 3.3 only affected. Here is a patch. -- components: Interpreter Core files:

[issue16046] python -O does not find *.pyo files

2012-09-27 Thread STINNER Victor
STINNER Victor added the comment: It would be nice to have a test. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing

[issue11461] UTF-16 incremental decoder doesn't support partial surrogate pair

2012-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In issue14624 utf-16 decoder has been significantly reworked. Here is adapted for 3.3 patch. -- keywords: +needs review nosy: +storchaka Added file: http://bugs.python.org/file27317/partial_utf16-3.3.patch ___ Pyth

[issue16059] Serialize MD5 computation-state and resume later

2012-09-27 Thread R. David Murray
R. David Murray added the comment: In the python context I believe what you are asking for is to make hashlib hash objects pickleable. -- nosy: +r.david.murray versions: +Python 3.4 -Python 2.7 ___ Python tracker

[issue8425] a -= b should be fast if a is a small set and b is a large set

2012-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I find my first patch more readable and efficient, but if these comments > are conformant to pep7.. Attaching updated patch (issue8425.3.patch) It was only a suggestion. Both forms are good enougth. > Yes, but bench.py is available, fell free to run it with

[issue16060] Double decref and dereferencing after decref in int()

2012-09-27 Thread Mark Dickinson
Mark Dickinson added the comment: Nice catch! And indeed, the following code generates a segfault on my machine: class B(object): def __int__(self): return 43.0 class A(object): def __trunc__(self): return B() int(A()) The patch should pr

[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent

2012-09-27 Thread ABR
ABR added the comment: I can report that this occurs on Python 2.7.3, when using urllib[x] wrapped in 'requests'. Trying to access a site using basic auth over https will not work with certain servers, whereas it will work over plain http. I tried searching to see if a corresponding https iss

[issue16061] performance regression in string replace for 3.3

2012-09-27 Thread Mark Lawrence
New submission from Mark Lawrence: Quoting Steven D'Aprano on c.l.p. "But add a call to replace, and things are very different: [steve@ando ~]$ python2.7 -m timeit -s "s = 'b'*1000" "s.replace('b', 'a')" 10 loops, best of 3: 9.3 usec per loop [steve@ando ~]$ python3.2 -m timeit -s "s = 'b'*

[issue16062] Socket closed prematurely in httplib for https

2012-09-27 Thread ABR
New submission from ABR: When attempting to use basic auth over https with a server that sends 401 and closes the connection as soon as the headers missing auth are received, the process aborts with a broken pipe when (presumably) trying to send the POST body. session = requests.session(auth=

[issue16060] Double decref and dereferencing after decref in int()

2012-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > And indeed, the following code generates a segfault on my machine: I was going to give similar example and assign crash type to issue, but on my machine it does not generate a segfault. > The patch should probably include a regression test. Someone borrow

[issue10217] python-2.7.amd64.msi install fails

2012-09-27 Thread Alexander L. Belikoff
Alexander L. Belikoff added the comment: Same problem for Python 3.2.3. Log file for failed installation attached. -- nosy: +abelikoff versions: +Python 3.2 -Python 2.7 Added file: http://bugs.python.org/file27318/python.zip ___ Python tracker

[issue16060] Double decref and dereferencing after decref in int()

2012-09-27 Thread Mark Dickinson
Mark Dickinson added the comment: That test doesn't look quite the same, though: the return value of __trunc__ is an object that has __trunc__ rather than __int__. And all the existing tests pass on my machine without issues. -- ___ Python tracker

[issue16060] Double decref and dereferencing after decref in int()

2012-09-27 Thread Mark Dickinson
Mark Dickinson added the comment: Here's patch that adds a regression test. -- Added file: http://bugs.python.org/file27319/float2int_dbl_decref_2.patch ___ Python tracker ___ __

[issue16063] HMAC trans_5C is a string, causing a TypeError

2012-09-27 Thread Adam Glenn
New submission from Adam Glenn: When passing 2 unicode objects to hmac.new() I'm getting "TypeError: character mapping must return integer, None or unicode" I've tried this using hashlib.sha1 and hashlib.md5 and the behavior is the same. What I think is happening is that the trans_5C join at t

[issue16060] Double decref and dereferencing after decref in int()

2012-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, it generates a segfault in debug mode. LGTM. -- type: behavior -> crash ___ Python tracker ___ __

[issue16061] performance regression in string replace for 3.3

2012-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core nosy: +storchaka ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue16060] Double decref and dereferencing after decref in int()

2012-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 690287f8ea95 by Mark Dickinson in branch 'default': Issue #16060: Fix a double DECREF in int() implementation. Thanks Serhiy Storchaka. http://hg.python.org/cpython/rev/690287f8ea95 -- nosy: +python-dev ___

[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-27 Thread Larry Hastings
New submission from Larry Hastings: I wrote the following script called "bonkers.py": -- import sys print(sys.argv[0]) -- then ran % python3 -m unittest bonkers It printed -- ['python -m unittest', 'bonkers'] -- Shouldn't it say "python3", not "python"? Maybe it should use sys

[issue16060] Double decref and dereferencing after decref in int()

2012-09-27 Thread Mark Dickinson
Mark Dickinson added the comment: Applied. Thanks! I'm not sure whether this is worthy of inclusion in Python 3.3.0; on one hand, it's a segfault from core Python. On the other, it doesn't look that easy to trigger by accident. On balance, I'd say it's safe to wait for Python 3.3.1 for thi

[issue16060] Double decref and dereferencing after decref in int()

2012-09-27 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue16061] performance regression in string replace for 3.3

2012-09-27 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Unicode nosy: +ezio.melotti, haypo stage: -> needs patch versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ _

[issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode

2012-09-27 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, petri.lehtinen stage: -> needs patch type: -> enhancement ___ Python tracker ___ _

[issue16065] Python/distutils setup.py: passing --prefix / makes --root ignored

2012-09-27 Thread Ron Hubbard
New submission from Ron Hubbard: setup.py loses the DESTDIR aka --root iff "/" is passed as prefix http://seclists.org/nmap-dev/2012/q3/1025 I can reproduce this now, but only with a prefix of "/". For example, this works: $ python setup.py install --prefix "/a" --root "/home/david/destdir" c

[issue16065] Python/distutils setup.py: passing --prefix / makes --root ignored

2012-09-27 Thread Ron Hubbard
Changes by Ron Hubbard : -- type: -> security ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16065] Python/distutils setup.py: passing --prefix / makes --root ignored

2012-09-27 Thread Ron Hubbard
Ron Hubbard added the comment: python 2.7.2 installation: CFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE" ./configure -C --prefix="/" || exit 1 make -j9 || exit 1 make DESTDIR="//opt/python" install || exit 1 what python generates out of --install-scripts=//bin \ --install-platlib=//lib/pyt

[issue13028] python wastes linux users time by checking for dylib on each dynamic library load

2012-09-27 Thread Ron Hubbard
Changes by Ron Hubbard : -- type: -> resource usage ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue16056] shadowed test names in std lib regression tests

2012-09-27 Thread Xavier de Gaye
Xavier de Gaye added the comment: The attached patch uses the infrastructure of patchcheck.py and merges the script into patchcheck.py instead of adding a new script. -- keywords: +patch Added file: http://bugs.python.org/file27320/duplicate_test_names.patch

[issue16056] shadowed test names in std lib regression tests

2012-09-27 Thread Xavier de Gaye
Xavier de Gaye added the comment: patchcheck output with the patch applied: $ make patchcheck ./python ./Tools/scripts/patchcheck.py Getting the list of files that have been added/changed ... 1 file Fixing whitespace ... 0 files Fixing C file whitespace ... 0 files Fixing docs whitespace ... 0 f

[issue16036] simplify int() signature docs

2012-09-27 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching updated patch that clarifies the accepted non-numeric types as Serhiy suggested on Rietveld. I also made a few other changes like linking to "integer literal" and updating the "base-radix" reference. As I began to suspect, the latter was left over

[issue16066] Truncated POST data in CGI script on Windows 7

2012-09-27 Thread Alexander Martin
New submission from Alexander Martin: POST data is truncated randomly when sent to a python script running on a simple python CGI server on Windows 7 with Python 3.2.3. The same server and script files run successfully on MAC OSX 10.8 with Python 3.2.3. A similar server (adapted for lower Pyth

[issue10217] python-2.7.amd64.msi install fails

2012-09-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: The only trace to a potential error I could find is Assembly Error:The requested operation failed. A system reboot is required to roll back changes made. Assembly Error (sxs): Please look into Component Based Servicing Log located at -134744968ndir\logs\cbs\c

[issue16056] shadowed test names in std lib regression tests

2012-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset e99c0425da59 by Benjamin Peterson in branch 'default': renmae test method to avoid conflict (#16056) http://hg.python.org/cpython/rev/e99c0425da59 -- nosy: +python-dev ___ Python tracker

[issue16056] shadowed test names in std lib regression tests

2012-09-27 Thread Chris Jerdonek
Chris Jerdonek added the comment: To simplify and keep the discussions more focused, etc, I would create a new issue for the patch to patchcheck (and mark it "enhancement"). Both issues can still reference each other. -- ___ Python tracker

[issue16067] UAC prompt for installation shows temporary file name

2012-09-27 Thread Edward Brey
New submission from Edward Brey: When installing on Windows, the UAC prompt shows a temporary random file name for the MSI file. To solve this, use the /d switch with signtool when signing the MSI file. Cf. http://stackoverflow.com/q/4315840 -- components: Installation messages: 1713

[issue16068] with statement executes type(obj).__exit__ rather than getattr(obj, "__exit__")

2012-09-27 Thread Paul Wiseman
New submission from Paul Wiseman: I found this behaviour today and thought it was weird so asked the question on SO here http://stackoverflow.com/questions/12632894/why-doesnt-getattr-work-with-exit/12632972#12632972 basically if I attributes are returned dynamically, they seem to get overlook

[issue16069] packaging shows up on docs.python.org/dev

2012-09-27 Thread Chris Jerdonek
New submission from Chris Jerdonek: Date: Tue, 11 Sep 2012 16:20:54 +0200 To: d...@python.org Subject: [docs] packaging documentation should be removed docs.python.org/dev still carries documentation for packaging, despite the package having been removed. http://docs.python.org/dev/library/pack

[issue16068] with statement executes type(obj).__exit__ rather than getattr(obj, "__exit__")

2012-09-27 Thread Paul Wiseman
Paul Wiseman added the comment: I got pointed to an explanation in the docs! http://docs.python.org/reference/datamodel.html#special-method-lookup-for-new-style-classes It was confusing, though :) -- resolution: -> invalid status: open -> closed __

[issue16070] Structure and native Structure (LittleEndianStructure on Windows) supports __slots__, but BigEndianStructure doesn't

2012-09-27 Thread HCT
New submission from HCT: using official CPython 3.2.3 with a simple demonstration script (attached) to demonstrate inconsistency between ctypes structures from ctypes import * class cbs( BigEndianStructure ): __slots__ = tuple() def __init__( self, *args, **kw ): super().__init

[issue16071] fix link to email.message.Message in mailbox docs

2012-09-27 Thread Chris Jerdonek
New submission from Chris Jerdonek: > Date: Thu, 13 Sep 2012 00:28:20 -0700 > To: d...@python.org > Subject: [docs] Bug in documentation for mailbox module > > I think I may have found a minor bug in the documentation for the > mailbox module, at: > > http://docs.python.org/library/mailbox.html >

[issue16072] fix documentation of string.replace() signature

2012-09-27 Thread Chris Jerdonek
New submission from Chris Jerdonek: > Date: Thu, 13 Sep 2012 09:42:47 -0400 > To: > Subject: [docs] Problem with the documentation for string.replace > > >From http://docs.python.org/library/string.html > > string.replace(str, old, new[, > maxreplace])?

[issue16073] fix map() statement in list comprehension example

2012-09-27 Thread Chris Jerdonek
New submission from Chris Jerdonek: > Date: Thu, 20 Sep 2012 15:14:36 -0400 > To: d...@python.org > Subject: [docs] map objects are not lists > > 5.1.3. List > Comprehensions > > List comprehensions provide a concise wa

[issue13028] python wastes linux users time by checking for dylib on each dynamic library load

2012-09-27 Thread Thomas Lee
Thomas Lee added the comment: I know this is an old-ish issue, but I can't reproduce anything like this on Debian Wheezy with either Python 2.7 or tip (3.x). I think we need more details of what you're trying to do here Roger. 1. What exactly did you do to reproduce the strace output below? 2.

[issue16061] performance regression in string replace for 3.3

2012-09-27 Thread Thomas Lee
Thomas Lee added the comment: My results aren't quite as dramatic as yours, but there does appear to be a regression: $ ./python -V Python 2.7.3+ $ ./python -m timeit -s "s = 'b'*1000" "s.replace('b', 'a')" 10 loops, best of 3: 16.5 usec per loop $ ./python -V Python 3.3.0rc3+ $ ./python

[issue16062] Socket closed prematurely in httplib for https

2012-09-27 Thread Thomas Lee
Thomas Lee added the comment: Thanks ABR. You may be better off raising a ticket against requests (https://github.com/kennethreitz/requests). I'm assuming what you want to happen here is for the session.post() call to return the 401 response without raising an exception. Perfectly reasonable,