[issue18744] pathological performance using tarfile

2013-08-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide a simple script which shows the problem? -- nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue17628] str==str: compare the first character before calling memcmp()

2013-08-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps it worth manually inline unicode_eq() in these tight inner loops. Then we can move "PyUnicode_GET_LENGTH(a) * PyUnicode_KIND(a)" out of the loop. -- ___ Python tracker _

[issue18743] References to non-existant "StringIO" module

2013-08-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue18682] [PATCH] remove bogus codepath from pprint._safe_repr

2013-08-15 Thread Michal Vyskocil
Michal Vyskocil added the comment: The fast scalars approach looks great! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18745] Test enum in test_json is ignorant of infinity value

2013-08-15 Thread Vajrasky Kok
New submission from Vajrasky Kok: Test enum json in Lib/test/test_json/test_enum.py is ignorant of infinity values. Also, NaN, but since NaN is a weirdo, let's not take that into account. The unit test should represent of what will work in every case. For example: def test_floats(self):

[issue16463] testConnectTimeout of test_timeout TCPTimeoutTestCasefailures fails intermittently

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Or we can wrap the resolve_address() method with the @functools.lru_cache() > decorator. Sounds ok to me. -- ___ Python tracker ___

[issue17628] str==str: compare the first character before calling memcmp()

2013-08-15 Thread STINNER Victor
STINNER Victor added the comment: In issue #18719, Raymond modified Python 2.7, but he didn't touch the following macro: #define Py_UNICODE_MATCH(string, offset, substring) \ ((*((string)->str + (offset)) == *((substring)->str)) && \ ((*((string)->str + (offset) + (substring)->length-1)

[issue17628] str==str: compare the first character before calling memcmp()

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: It's also bad for memory read performance if the string is rather long. The memory controller performs best when code reads memory sequential. The talk http://www.youtube.com/watch?v=MC1EKLQ2Wmg about mythbusting modern hardware sums it up real nice. --

[issue18296] test_os.test_trailers() is failing on AMD64 FreeBSD 9.0 dtrace 3.x

2013-08-15 Thread koobs
koobs added the comment: As per our IRC conversation, our 'koobs-freebsd10' bot also reproduces the failure and can be used to test the patch. -- ___ Python tracker ___

[issue18296] test_os.test_trailers() is failing on AMD64 FreeBSD 9.0 dtrace 3.x

2013-08-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 924d327da3af by Victor Stinner in branch '3.3': Issue #18296: Try to fix TestSendfile.test_trailers() of test_os on FreeBSD http://hg.python.org/cpython/rev/924d327da3af New changeset 92039fb68483 by Victor Stinner in branch 'default': (Merge 3.3) I

[issue18746] test_threading.test_finalize_with_trace() fails on FreeBSD buildbot

2013-08-15 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18746] test_threading.test_finalize_with_trace() fails on FreeBSD buildbot

2013-08-15 Thread STINNER Victor
New submission from STINNER Victor: The following test fails on FreeBSD buildbot: def test_finalize_with_trace(self): # Issue1733757 # Avoid a deadlock when sys.settrace steps into threading._shutdown assert_python_ok("-c", """if 1: import sys, threading

[issue18746] test_threading.test_finalize_with_trace() fails on FreeBSD buildbot

2013-08-15 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file31299/finalize_clear_trace.patch ___ Python tracker ___ ___

[issue18219] csv.DictWriter is slow when writing files with large number of columns

2013-08-15 Thread Peter Otten
Peter Otten added the comment: Note that set operations on dict views work with lists, too. So the only change necessary is to replace wrong_fields = [k for k in rowdict if k not in self.fieldnames] with wrong_fields = rowdict.keys() - self.filenames (A backport to 2.7 would need to replace

[issue18739] math.log of a long returns a different value of math.log of an int

2013-08-15 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, Tim saw through my cunningly-laid false trail of incorrect issue numbers. Step 1 of my world domination plan is foiled! Yes, let's fix this. In my mind, it's definitely a bug that ints and longs aren't interchangeable here, and it would be nice to have 2

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-08-15 Thread Julian Berman
Changes by Julian Berman : -- nosy: +Julian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread Christian Heimes
New submission from Christian Heimes: A couple of reports and check-in messages like Postgres / pgcrypto CVE-2013-1900 http://bugs.ruby-lang.org/issues/4579 http://www.exim.org/lurker/message/20130402.171710.92f14a60.fi.html suggests that OpenSSL's PRNG should be reset or re-seeded after

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Are there any uses of the OpenSSL PRNG from Python? Is the PRNG used for SSL session keys, or another mechanism? -- nosy: +pitrou, sbt type: security -> enhancement versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue16500] Add an 'atfork' module

2013-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: The ssl module exposes OpenSSL's PRNG and advertises the API as secure CPRNG: http://docs.python.org/3/library/ssl.html#random-generation OpenSSL uses its own PRNG to create (amongst others) session keys for SSL connections. --

[issue8713] multiprocessing needs option to eschew fork() under Linux

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Using the custom builders, it seems to happen randomly in test_rlock: test_rlock (test.test_multiprocessing_spawn.WithManagerTestLock) ... Assertion failed: !collecting, file ..\Modules\gcmodule.c, line 1617 ok http://buildbot.python.org/all/builders/AMD64%20W

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The ssl module exposes OpenSSL's PRNG and advertises the API as secure > CPRNG: http://docs.python.org/3/library/ssl.html#random-generation AFAICT, Python's PRNG isn't reset after fork, so I don't think OpenSSL's should be reset. OTOH, multiprocessing does res

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: Python doesn't have a builtin PRNG. We use the OS's CPRNG such as /dev/urandom or CryptGenRandom(). Both use a system wide state and are not affected by process state. OpenSSL's PRNG is different because it uses an internal state. AFAIK it only polls the sys

[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2013-08-15 Thread Maries Ionel Cristian
New submission from Maries Ionel Cristian: Running the file couple of times will make the interpreter fail with: libgcc_s.so.1 must be installed for pthread_cancel to work >From what I've seen it is triggered from PyThread_delete_key (tries to load >libgcc_s.so at that time). How does it happ

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Python doesn't have a builtin PRNG. Of course it does. It's in the random module, and you can seed() it: >>> random.seed(5) >>> random.random() 0.6229016948897019 >>> random.random() 0.7417869892607294 >>> random.seed(5) >>> random.random() 0.6229016948897019

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: Am 15.08.2013 15:14, schrieb Antoine Pitrou: >> Python doesn't have a builtin PRNG. > > Of course it does. It's in the random module, and you can seed() it: Now you are nit-picking. Although random is a PRNG, it is not a CPRNG. I'm clearly talking about the i

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > When the OpenSSL's CPRNG is already initialized before 3) than all child > processes created by 3) will have almost the same PRNG state. According > to http://bugs.ruby-lang.org/issues/4579 the PRNG will return the same > value when PID numbers are recycled. T

[issue18749] [issue 18606] Re: Add statistics module to standard library

2013-08-15 Thread Steven D'Aprano
New submission from Steven D'Aprano: I hope I'm doing the right thing by replying in-line. This is my first code review, please let me know if I'm doing something wrong. By the way, the email hasn't gone to the tracker again. Is that a bug in the tracker? I've taken the liberty of changing the

[issue18749] [issue 18606] Re: Add statistics module to standard library

2013-08-15 Thread Ezio Melotti
Ezio Melotti added the comment: > I hope I'm doing the right thing by replying in-line. This is my > first code review, please let me know if I'm doing something wrong. > > By the way, the email hasn't gone to the tracker again. Is that a > bug in the tracker? I've taken the liberty of changing t

[issue18742] Abstract base class for hashlib

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: Updated patch. I'm going to add documentation when everybody is happy with the patch. -- nosy: +pitrou Added file: http://bugs.python.org/file31302/hashlib_abc2.patch ___ Python tracker

[issue18533] Avoid error from repr() of recursive dictview

2013-08-15 Thread Ben North
Ben North added the comment: Is anything further needed from me before this can be reviewed? -- ___ Python tracker ___ ___ Python-bugs

[issue18532] hashlib.HASH objects should officially expose the hash name

2013-08-15 Thread Christian Heimes
Changes by Christian Heimes : -- stage: patch review -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue18532] hashlib.HASH objects should officially expose the hash name

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: The builtin hash algorithms still had upper case names. I fixed it in revision http://hg.python.org/cpython/rev/9a4949f5d15c -- ___ Python tracker __

[issue18533] Avoid error from repr() of recursive dictview

2013-08-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please visit http://www.python.org/psf/contrib/ http://www.python.org/psf/contrib/contrib-form/ and submit a Contributor Agreement. This process is complete when '*' appears after your name here, as with mine and others. --

[issue13248] deprecated in 3.2/3.3, should be removed in 3.4

2013-08-15 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18750] ''' % [1] doens't fail

2013-08-15 Thread Andrew Svetlov
New submission from Andrew Svetlov: I think this is a bug. Can be reproduced on all Pythons (from 2.6 to 3.4a). Maybe should be fixed for 3.4 only as backward incompatible change. -- messages: 195263 nosy: asvetlov priority: normal severity: normal status: open title: ''' % [1] doens't f

[issue13248] deprecated in 3.2/3.3, should be removed in 3.4

2013-08-15 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread STINNER Victor
STINNER Victor added the comment: This issue was already discussed in the atfork issue: http://bugs.python.org/issue16500#msg179838 See also: http://www.openwall.com/lists/oss-security/2013/04/12/3 "I believe it is wrong to fix this in PostgreSQL. Rather, this is a bug in the OpenSSL fork prote

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-15 Thread STINNER Victor
STINNER Victor added the comment: Another link: http://article.gmane.org/gmane.comp.encryption.openssl.user/48480/match=does+child+process+still+need+reseeded+after+fork -- ___ Python tracker __

[issue8713] multiprocessing needs option to eschew fork() under Linux

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I enabled faulthandler in the child process and I got the explanation: http://buildbot.python.org/all/builders/AMD64%20Windows%20Server%202008%20%5BSB%5D%20custom/builds/5/steps/test/logs/stdio multiprocessing's manager Server uses daemon threads... Daemon t

[issue18751] A manager's server never joins its threads

2013-08-15 Thread Antoine Pitrou
New submission from Antoine Pitrou: The Server class in multiprocessing.managers creates daemon threads and never joins them. This is in contrast with e.g. the Pool class, which creates daemon threads but uses util.Finalize to join them. (not joining daemon threads may have adverse effects suc

[issue18750] ''' % [1] doens't fail

2013-08-15 Thread R. David Murray
R. David Murray added the comment: What is it that doesn't fail? The expression in the title is the beginning of a triple quoted string with no closing triple quote. If you mean '' % [1] not falling, it has been that way forever (well, python2.4 is as far back as I can test), so if it is deem

[issue18750] '' % [1] doens't fail

2013-08-15 Thread STINNER Victor
STINNER Victor added the comment: I don't understand why str % list and str % dict behaves differently than str % int: >>> 'abc' % [1] 'abc' >>> 'abc' % ([1],) Traceback (most recent call last): File "", line 1, in TypeError: not all arguments converted during string formatting >>> 'abc' % 1

[issue18727] test for writing dictionary rows to CSV

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks. One more question: is there a reason you don't simply call getvalue() at the end (rather than seek(0) followed by several readline() calls)? -- ___ Python tracker

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0e9d41edb2e4 by Terry Jan Reedy in branch '2.7': Issue #18425: Unittests for idlelib.IdleHistory. First patch by R. Jayakrishnan. http://hg.python.org/cpython/rev/0e9d41edb2e4 New changeset c4cac5d73e9d by Terry Jan Reedy in branch '3.3': Issue #184

[issue18750] '' % [1] doens't fail

2013-08-15 Thread R. David Murray
R. David Murray added the comment: haypo: str % dict is a feature: >>> "%(a)s" % {'a': 1, 'b': 2} '1' -- ___ Python tracker ___ _

[issue18739] math.log of a long returns a different value of math.log of an int

2013-08-15 Thread Tim Peters
Tim Peters added the comment: +1 on fixing it in 2.7, for the reasons Mark gave. Way back when I introduced the original scheme, log(a_long) raised an exception, and the `int` and `long` types had a much higher wall between them. The original scheme changed an annoying failure into a "pretty

[issue18750] '' % [1] doens't fail

2013-08-15 Thread Andrew Svetlov
Andrew Svetlov added the comment: For dict it is correct from my perspective. "" % {'a': 'b'} tries to substitute format specs like "%(a)s" and does nothing if spec is not present. But list case like "" % [1] confuse me. -- ___ Python tracker

[issue18226] IDLE Unit test for FormatParagrah.py

2013-08-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 47307e7c80e1 by Terry Jan Reedy in branch '2.7': Issue #18226: Fix ImportError and subsequent TypeError in 2.7 backport. http://hg.python.org/cpython/rev/47307e7c80e1 -- ___ Python tracker

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed superseder: -> IdleHistory.History: eliminate unused parameter; other cleanup. ___ Python tracker ___ __

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue18226] IDLE Unit test for FormatParagrah.py

2013-08-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: test.regrtest is semi-useless, at least for idle, in 2.7 -- see commit message. First run single file directly or python -m test.test_idle. -- ___ Python tracker _

[issue18744] pathological performance using tarfile

2013-08-15 Thread K Richard Pixley
K Richard Pixley added the comment: New info... I see the degradation on most of the linux boxes I've tried: * ubuntu-13.04, (raring), 64-bit * rhel-5.4 64-bit * rhel-5.7 64-bit * suse-11 64-bit I see some degradation on MacOsX-10.8.4 but it's in the acceptable range, more like 2x than 60x. T

[issue18744] pathological performance using tarfile

2013-08-15 Thread K Richard Pixley
K Richard Pixley added the comment: Here's a script that tests for the problem. -- Added file: http://bugs.python.org/file31303/tarproblem.py ___ Python tracker ___ _

[issue16190] Misleading warning in random module docs

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: Thomas H. Ptacek pointed me to a good explanation: http://security.stackexchange.com/a/3939 TL;DR: Just use /dev/urandom and be happy. -- ___ Python tracker ___

[issue18739] math.log of a long returns a different value of math.log of an int

2013-08-15 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch that simply backports the Python 3.x code to Python 2.7. -- keywords: +patch Added file: http://bugs.python.org/file31304/issue18739.patch ___ Python tracker ___

[issue18750] '' % [1] doens't fail

2013-08-15 Thread R. David Murray
R. David Murray added the comment: Yes, I suspect you are right that that is a bug...and a long standing one :) -- ___ Python tracker ___

[issue18739] math.log of a long returns a different value of math.log of an int

2013-08-15 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue13647] Python SSL stack doesn't securely validate certificate (as client)

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm gonna close this entry, since there's no actual issue to fix in Python. -- resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue18732] IdleHistory.History: eliminate unused parameter; other cleanup.

2013-08-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7339dcff171f by Terry Jan Reedy in branch '2.7': Issue #18732: Remove unused* parameter output_sep from IdleHistory.History http://hg.python.org/cpython/rev/7339dcff171f New changeset 3105b78d3434 by Terry Jan Reedy in branch '3.3': Issue #18732: Re

[issue16190] Misleading warning in random module docs

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed with a re-wording. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18732] IdleHistory.History: eliminate unused parameter; other cleanup.

2013-08-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue13146] Writing a pyc file is not atomic

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Barry, do you still want to keep this issue open? -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue17970] Mutlithread XML parsing cause segfault

2013-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue6132] Implement the GIL with critical sections in Windows

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm closing this as out-of-date (due to the new GIL in 3.2 and upwards). -- resolution: -> out of date status: open -> closed ___ Python tracker ___

[issue13477] tarfile module should have a command line

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Regenerated patch against latest default (fixing conflicts). -- nosy: +pitrou stage: needs patch -> patch review Added file: http://bugs.python.org/file31305/tarcli.patch ___ Python tracker

[issue10441] some stdlib modules need to be updated to handle SSL certificate validation

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would like to reject this approach. I am still adding Christian to the CC list, in case he has something to say about it :) -- nosy: +christian.heimes resolution: -> rejected status: open -> closed ___ Python trac

[issue10441] some stdlib modules need to be updated to handle SSL certificate validation

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: I agree with Antoine. I'm not sure what is going to happen if you use a single SSLContext for unrelated services and different hosts -- not to mention SNI. A while ago I tried a similar patch but I was stopped by the fact that OpenSSL doesn't provide an API

[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-08-15 Thread Terry J. Reedy
New submission from Terry J. Reedy: It has become apparent from various discussions in recent months that chain.from_iterable is at least as useful as chain. In fact, I now think that 'chain' should have been what chain.from_iterable is, with current chain(a,b,c) done as chain((a,b,d)). But to

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-08-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: My counter proposal #18752 is that chain.from_iterable become a deprecated alias for a new function, chain_iterable. With '@classmethod' removed, the current Python equivalent would work for chain_iterable. -- ___

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Ethan Furman
Ethan Furman added the comment: +def __format__(self, *args, **kwargs): +return self.__class__._member_type_.__format__(self.value, *args, **kwargs) + With this in the Enum class all members simply forward formatting to the mixed-in type, meaning that IntEnum behaves exactly like i

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eli Bendersky
Eli Bendersky added the comment: The whole point of IntEnum and replacing stdlib constants with it was friendly str & repr out of the box. This means that "just printing out" an enum member should have a nice string representation. And "just printing out" means: print(member) "%s" % member "{}

[issue16105] Pass read only FD to signal.set_wakeup_fd

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a cleaned up patch. However, I'm wondering if raising an error is a good idea. The effect will be to get cryptic OSErrors at random execution points. Perhaps using PyErr_WriteUnraisable would be better? -- versions: -Python 2.6, Python 2.7, Py

[issue18121] antigravity leaks subprocess.Popen object

2013-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Outdated by PEP 442. -- resolution: -> out of date status: open -> closed ___ Python tracker ___ __

[issue17930] Search not needed in combinations_with_replacement

2013-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: On 8/15/2013 5:46 PM, Eli Bendersky wrote: > The whole point of IntEnum and replacing stdlib constants with it was > friendly str & repr out of the box. This means that "just printing out" an > enum member should have a nice string representation. And "just prin

[issue16611] multiple problems with Cookie.py

2013-08-15 Thread Julien Phalip
Julien Phalip added the comment: Updated the patch to use a tuple instead of a list for the cookie flags. -- Added file: http://bugs.python.org/file31307/cookies-httponly-secure-3.diff ___ Python tracker __

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eli Bendersky
Eli Bendersky added the comment: On Thu, Aug 15, 2013 at 3:20 PM, Eric V. Smith wrote: > > Eric V. Smith added the comment: > > On 8/15/2013 5:46 PM, Eli Bendersky wrote: > > The whole point of IntEnum and replacing stdlib constants with it was > friendly str & repr out of the box. This means th

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Ethan Furman
Ethan Furman added the comment: > Eli Bendersky added the comment: > Naturally, compatibility with % formatting is desired. '%s' is str, '%i' is > int(). Can we solve that one on this issue, or do we need to make another? -- ___ Python tracker

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eli Bendersky
Eli Bendersky added the comment: I guess there are merits to keeping it all in the same place. -- ___ Python tracker ___ ___ Python-bu

[issue18742] Abstract base class for hashlib

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: Now with block_size -- Added file: http://bugs.python.org/file31308/hashlib_abc3.patch ___ Python tracker ___

[issue18742] Abstract base class for hashlib

2013-08-15 Thread Christian Heimes
Changes by Christian Heimes : Removed file: http://bugs.python.org/file31295/hashlib_abc.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue18742] Abstract base class for hashlib

2013-08-15 Thread Christian Heimes
Changes by Christian Heimes : Removed file: http://bugs.python.org/file31302/hashlib_abc2.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Ethan Furman
Ethan Furman added the comment: > Eric V. Smith added the comment: > > I think the answers should be: > > - Formats as int if the length of the format spec is >= 1 and it ends in > one of "bdoxX" (the int presentation types). Hmmm. How about defining the characters that will be supported for st

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: On 8/15/2013 7:09 PM, Ethan Furman wrote: > > Ethan Furman added the comment: > >> Eric V. Smith added the comment: >> >> I think the answers should be: >> >> - Formats as int if the length of the format spec is >= 1 and it ends in >> one of "bdoxX" (the int pre

[issue16105] Pass read only FD to signal.set_wakeup_fd

2013-08-15 Thread Felipe Cruz
Felipe Cruz added the comment: Looks like PyErr_WriteUnraisable can be a better choice. Exceptions at random execution points looks a little bit dirty at least for this case. -- ___ Python tracker

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Ethan Furman
Ethan Furman added the comment: > Eric V. Smith added the comment: >> Ethan Furman added the comment: >> >>> Hmmm. How about defining the characters that will be supported for string >>> interpretation, and if there are any other >>> characters in format spec then go int (or whatever the mix-in

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: On 8/15/2013 8:20 PM, Ethan Furman wrote: > The characters I list are the justification chars and the digits that would > be used to specify the field width. If > those are the only characters given then treat the MixedEnum member as the > member string. But

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-08-15 Thread Christian Heimes
Christian Heimes added the comment: Brian Cameron from Oracle has requested a fix for Python 2.6. I have attached a patch for 2.6. In order to compile and test the patch I had to modify _ssl.c to handle OPENSSL_NO_SSL2. I also copied keycert.pem from 2.7 to fix two test failures. The former ke

[issue18742] Abstract base class for hashlib

2013-08-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: your patch makes sense to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue18750] '' % [1] doens't fail

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: Objects/unicodeobject.c has this, at line 14316: if (PyMapping_Check(args) && !PyTuple_Check(args) && !PyUnicode_Check(args)) ctx.dict = args; else ctx.dict = NULL; and later at line 14348: if (ctx.argidx < ctx.arglen && !ctx.dict) {

[issue18750] '' % [1] doesn't fail

2013-08-15 Thread Eric V. Smith
Changes by Eric V. Smith : -- title: '' % [1] doens't fail -> '' % [1] doesn't fail ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Ethan Furman
Ethan Furman added the comment: > Eric V. Smith added the comment: > > But a datetime format string can end in "0", for example. > format(datetime.datetime.now(), '%H:%M:%S.00') > '20:25:27.00' Not a problem, because once the digits were removed there would still be % : H M S and ., so the

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: On 8/16/2013 12:24 AM, Ethan Furman wrote: > > Ethan Furman added the comment: > >> Eric V. Smith added the comment: >> >> But a datetime format string can end in "0", for example. >> > format(datetime.datetime.now(), '%H:%M:%S.00') >> '20:25:27.00' > > Not

[issue18743] References to non-existant "StringIO" module

2013-08-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue14191] argparse doesn't allow optionals within positionals

2013-08-15 Thread Glenn Linderman
Glenn Linderman added the comment: Paul, is this ready to merge, or are you thinking of more refinements? -- ___ Python tracker ___ __