[issue23123] Only READ support for Decimal in json

2014-12-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: To cope with this potential problem, compliant parsers must preserve the original textual representation of properties internally in order to support JCS normalization requirements That sounds ridiculous. Did someone try to reason the IETF guys? :)

[issue22166] test_codecs leaks references

2014-12-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: resolved - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22166 ___ ___

[issue23103] Reduce memory usage for ipaddress object instances

2014-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I believe you need to add a bunch of __slots__ = () to various base classes in the module, even though they lack member variables. Done. Here is updated patch. I don't think that IP addresses need weak references more than base types as integers or

[issue23123] Only READ support for Decimal in json

2014-12-30 Thread Anders Rundgren
Anders Rundgren added the comment: Antoine Pitrou added the comment: To cope with this potential problem, compliant parsers must preserve the original textual representation of properties internally in order to support JCS normalization requirements That sounds ridiculous. Did someone

[issue23132] Faster total_ordering

2014-12-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes comparation method generated by the total_ordering decorator faster up to 20%. Benchmark results: Unpatched Patched a b 2.46 2.45 b a 2.48 2.49 a = b 4.86 4.16 b = a 5.1 4.16 a = b 4.93 4.15 b

[issue23132] Faster total_ordering

2014-12-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37562/total_ordering_bench.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23132 ___

[issue23094] Unpickler failing with PicklingError at frame end on readline due to a broken comparison

2014-12-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23094 ___

[issue23103] Reduce memory usage for ipaddress object instances

2014-12-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think that IP addresses need weak references more than base types as integers or strings. People may already be taking weak references, so it's a matter of compatibility. (and weakrefs can actually help implement an interning scheme as proposed

[issue23123] Only READ support for Decimal in json

2014-12-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: I won't claim to know/understand the specifics, but message payload in base64 actually sounds reasonable to me, if far from optimal (both from readibility and space overhead POV) :-). -- ___ Python tracker

[issue23123] Only READ support for Decimal in json

2014-12-30 Thread Anders Rundgren
Anders Rundgren added the comment: Antoine Pitrou added the comment: I won't claim to know/understand the specifics, but message payload in base64 actually sounds reasonable to me, if far from optimal (both from readibility and space overhead POV) :-). It is indeed a working solution.

[issue11245] Implementation of IMAP IDLE in imaplib?

2014-12-30 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11245 ___ ___

[issue18921] In imaplib, cached capabilities may be out of date after login

2014-12-30 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18921 ___ ___

[issue23103] Reduce memory usage for ipaddress object instances

2014-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch preserves weak references support. -- Added file: http://bugs.python.org/file37563/ipaddress_lightweight_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23103

[issue23133] Pickling of ipaddress classes

2014-12-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently ipaddress classes support pickling, but the pickling is not efficient and is implementation depened. Proposed patch makes pickling more compact and implementation agnostic. -- components: Library (Lib) files: ipaddress_pickle.patch

[issue23103] Reduce memory usage for ipaddress object instances

2014-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As far as adding __slots__ breaks pickling with protocols 2, issue23133 can be considered as a dependency. -- dependencies: +Pickling of ipaddress classes ___ Python tracker rep...@bugs.python.org

[issue22939] integer overflow in iterator object

2014-12-30 Thread Ronald Oussoren
Ronald Oussoren added the comment: Is it necessary to raise when it_index is PY_SSIZE_T_MAX? An alternative is to set it_index to -1 when there would be overflow and raise an exception on the next call to next(). That way a virtual sequence with PY_SSIZE_T_MAX-1 items would still work

[issue11245] Implementation of IMAP IDLE in imaplib?

2014-12-30 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: -terry.reedy versions: +Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11245 ___

[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2014-12-30 Thread Mark Lawrence
Mark Lawrence added the comment: This is referenced from #4431 which has been closed for over six years but keeps getting comments. -- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org

[issue4431] Distutils MSVC doesn't create manifest file

2014-12-30 Thread Mark Lawrence
Mark Lawrence added the comment: Should this issue be reopened or not? -- components: +Windows nosy: +dstufft, steve.dower, tim.golden, zach.ware versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue19980] Improve help('non-topic') response

2014-12-30 Thread Mark Lawrence
Mark Lawrence added the comment: I screwed up, sorry folks. If the latest patch isn't correct I give up as it's three strikes and I'm out :( -- Added file: http://bugs.python.org/file37565/issue19880v3.diff ___ Python tracker rep...@bugs.python.org

[issue23128] Key presses are doubled in Tkinter dialog invoked from window close handler (OS X only)

2014-12-30 Thread Philipp Emanuel Weidmann
Philipp Emanuel Weidmann added the comment: I upgraded to Python 2.7.9 and ActiveTcl 8.5.17.0 as suggested. I confirmed that this is the Tk version actually used by looking at Python's About dialog. The problem persists. -- ___ Python tracker

[issue23129] sqlite3 COMMIT nested in SELECT returns unexpected results

2014-12-30 Thread R. David Murray
R. David Murray added the comment: (Please trim the original message when replying to a tracker issue.) When I said, that probably means it's a doc issue, I meant that, even if it is a bug, for backward compatibility reasons we'd have to just document the behavior. Fixing the bug would then

[issue23130] Tools/scripts/ftpmirror.py allows overwriting arbitrary files on filesystem

2014-12-30 Thread R. David Murray
R. David Murray added the comment: I would guess that the most future-proof response to this would be to delete the script. If we do keep it, it should definitely be fixed. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue23129] sqlite3 COMMIT nested in SELECT returns unexpected results

2014-12-30 Thread Jim Carroll
Jim Carroll added the comment: Completely understood. I recently found a workaround. Setting isolation_level to None seems to mitigate the issue, ie: db = sq.connect(':memory:', isolation_level=None) I'm hoping to put some time in scrutinizing the c-api code later this week (as SQLite

[issue23129] sqlite3 COMMIT nested in SELECT returns unexpected results

2014-12-30 Thread R. David Murray
R. David Murray added the comment: Ah, then I suspect you are getting hit by the 'automatic transaction' feature of the DB2 API. So it is probably not the commit, but the subsequent implicit 'begin transaction' that is causing the problem. The trick then is to figure out why that affects

[issue23130] Tools/scripts/ftpmirror.py allows overwriting arbitrary files on filesystem

2014-12-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8f92ab37dd3a by Benjamin Peterson in branch '2.7': delete old ftpmirror script, which now has security bugs (closes #23130) https://hg.python.org/cpython/rev/8f92ab37dd3a New changeset 223d0927e27d by Benjamin Peterson in branch '3.2': delete old

[issue23134] datetime.strptime at the turn of the year

2014-12-30 Thread Tomasz Ryczkowski
New submission from Tomasz Ryczkowski: I've found wrong behaviour datetime.strptim function at the turn of the year. I've created datetime object base on the week number (%W), year (%Y) and day of week (%w). The date for Tuesday in the first week in 2015 is wrong: from datetime import

[issue23111] ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or TLSv1.2

2014-12-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: ssl_version is a class attribute so you can simply set that before instantiating FTP_TLS class: import ftplib ftplib.FTP_TLS.ssl_version = ... client = ftplib.FTP_TLS(...) ... -- ___ Python tracker

[issue23134] datetime.strptime at the turn of the year

2014-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In C the strptime function doesn't return valid data if an input is invalid. $ ./strptimetest 0 2015 1 %W %Y %w 2015-00--2 00:00:00 $ ./strptimetest 0 2015 2 %W %Y %w 2015-00--1 00:00:00 $ ./strptimetest 0 2015 3 %W %Y %w 2015-00-00 00:00:00 $ ./strptimetest

[issue23135] import searchpaths as arguments

2014-12-30 Thread c2621566
New submission from c2621566: This patch allows specifying import searchpaths as `-p path` arguments to the interpreter, without touching environment variables. Avoiding environment variables simplifies a script of mine and is a portable way of swapping module implementation without touching

[issue23111] ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or TLSv1.2

2014-12-30 Thread varde
varde added the comment: I know that, but it seems pretty unusual. And I would never had guessed from the documentation, I had to read the source. My point is that it should be easier to just connect to a TLSv1.2 server: the documentation should mention the fact that ssl_version is a class

[issue23135] import searchpaths as arguments

2014-12-30 Thread R. David Murray
R. David Murray added the comment: Thank you for the suggestion and patch, but we have a general policy of not adding unnecessary command line options, so I don't know that it will be accepted. -- nosy: +r.david.murray ___ Python tracker

[issue23136] BUG in how _strptime() handles week 0

2014-12-30 Thread Jim Carroll
New submission from Jim Carroll: The following bit of code demonstrates a bug in how _strptime handles week 0. The bug is an edge condition that specifically affects how it handles two days before the first day of the new year for i in range(7): ... datetime.strptime('%s %s %s' % (0,

[issue19776] Provide expanduser() on Path objects

2014-12-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset bee697b0fd18 by Antoine Pitrou in branch 'default': Issue #19776: Add a expanduser() method on Path objects. https://hg.python.org/cpython/rev/bee697b0fd18 -- nosy: +python-dev ___ Python tracker

[issue19776] Provide expanduser() on Path objects

2014-12-30 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___

[issue23111] ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or TLSv1.2

2014-12-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 414c450e8406 by Benjamin Peterson in branch '3.4': make PROTOCOL_SSLv23 the default protocol version for ftplib (closes #23111) https://hg.python.org/cpython/rev/414c450e8406 New changeset 33603f7949c5 by Benjamin Peterson in branch 'default':

[issue23111] ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or TLSv1.2

2014-12-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 29689050ec78 by Benjamin Peterson in branch '3.4': update docs for #23111 https://hg.python.org/cpython/rev/29689050ec78 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23111

[issue23127] socket.setsockopt() is still broken for multicast TTL and Loop options

2014-12-30 Thread Bertrand Janin
Bertrand Janin added the comment: I don't really need it in my own software, I was trying to use https://github.com/SoCo/SoCo/ and couldn't get it working on OpenBSD. I'm sure this is a portability problem on a number of library using Multicast. Do you see something wrong with the patch?

[issue23127] socket.setsockopt() is still broken for multicast TTL and Loop options

2014-12-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: We don't really have a precedent for adjusting the size automatically when integers are passed to setsockopt. Anyway, your patch will be wrong for big-endian systems. -- ___ Python tracker rep...@bugs.python.org

[issue23077] PEP 1: Allow Provisional status for PEPs

2014-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: As we've started working through the post-release PEP 440 changes, I think this is definitely worthy of a separate PEP. I'll take the opportunity to pitch some other changes as well, like separating out the interoperability standards from the informational PEPs

[issue23138] cookiejar parses cookie value as int with empty name-value pair and Expires

2014-12-30 Thread Christopher Foo
New submission from Christopher Foo: Something like Set-Cookie: ; Expires=Thu, 01 Jan 1970 00:00:10 GMT causes the resulting cookie.value to be parsed as an int. I expected either str or None as described in the documentation. Example evil server: try: import http.server as

[issue23132] Faster total_ordering

2014-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: This looks like a nice, relatively simple improvement in both speed and introspection support, so +1 from me. Something I've wondered since we changed total_ordering to handle NotImplemented correctly is whether it would be worth exposing more of the

[issue23132] Faster total_ordering

2014-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: I tweaked Serhiy's benchmark script to also include the timing relative to spelling out all four ordered comparison methods. For an unpatched debug build of trunk, I get the following: $ ../py3k/python total_ordering_relative_bench.py a b 1.643 1.605 x0.98