[issue18489] IDLE Unit test for SearchEngine.py

2013-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: As with searchdialogbase tests, I get the following in the console every time I run the test file within idle. ''' can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6)

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-18 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file31369/18489-test_searchengine4.diff ___ Python tracker ___ ___ Python-bugs-

[issue18774] There is still last bit of GNU Pth code in signalmodule.c

2013-08-18 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18777] Cannot compile _ssl.c using openssl > 1.0

2013-08-18 Thread Vitaly Murashev
New submission from Vitaly Murashev: Cannot compile _ssl module when openssl version > 1.0 and it is configured with turned on macro OPENSSL_NO_DEPRECATED Everything looks like in recent versions of openssl routine 'CRYPTO_set_id_callback' has gone away. Patch suggested. -- component

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 310d187020e3 by Terry Jan Reedy in branch '2.7': Issue #18489: idlelib.SearchEngine - add docstrings http://hg.python.org/cpython/rev/310d187020e3 New changeset cfb510884a13 by Terry Jan Reedy in branch '3.3': Issue #18489: idlelib.SearchEngine - ad

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-08-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: As for 3.1, feel free to apply. There will likely be a source release of it at some point. -- ___ Python tracker ___ ___

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-08-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: 3.2 is owned by Georg. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18606] Add statistics module to standard library

2013-08-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: Patch file for the stats module alone, without the tests. -- Added file: http://bugs.python.org/file31367/statistics.patch ___ Python tracker _

[issue18606] Add statistics module to standard library

2013-08-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: Merged two test suites into one, and PEP-ified the test names testSpam -> test_spam. -- Added file: http://bugs.python.org/file31366/test_statistics.patch ___ Python tracker

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Hynek, thanks for your suggestion. I would like to mull it over for a while before chiming in. -- ___ Python tracker ___ __

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-18 Thread Ezio Melotti
Ezio Melotti added the comment: > If you are generically opposed to name localization, please take your > case to pydev. I'm not strongly opposed to it, I probably even use it sometimes. In that case I wouldn't have bothered, but YMMV. -- ___ Pytho

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ezio: grepping test/*.py for (name)'= self.assertEqual' gets 182 hits in 15 different files. If you are generically opposed to name localization, please take your case to pydev. I also found 'unless = self.assertTrue' and am sure I have seen others in the stdl

[issue18512] sys.stdout.write does not allow bytes in Python 3.x

2013-08-18 Thread Juan Luis Boya García
Juan Luis Boya García added the comment: Sorry for the late response, GMail's SPAM filter ate the replies. The main issue is sys.stdout being opened as text instead of binary. This fact is stated in the docs. http://docs.python.org/3/library/sys.html#sys.stdout In any case, there are some cave

[issue18727] test for writing dictionary rows to CSV

2013-08-18 Thread Muhammad Jehanzeb
Muhammad Jehanzeb added the comment: Sure. Thanks for the comment. I was just trying to be consistent with other tests. However, I updated the patch based on your recommendation. Please have a look at the latest one. -- Added file: http://bugs.python.org/file31365/issue18727_v3.patch

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: A subtle point about coverage. The target module must be imported. from idlelib import SearchDialogBase as sdb # works. import idlelib.SearchDialogBase as sdb # does not at least not as I invoke coveragepy in my batch file. With this change, the four uncovered

[issue18445] Tools/Script/Readme is outdated

2013-08-18 Thread A.M. Kuchling
A.M. Kuchling added the comment: Seydou: thanks for the patch! I've applied it to 3.4. -- nosy: +akuchling resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue18445] Tools/Script/Readme is outdated

2013-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 16fad6c48016 by Andrew Kuchling in branch 'default': #18445: update Tools/scripts/README. http://hg.python.org/cpython/rev/16fad6c48016 -- ___ Python tracker _

[issue18445] Tools/Script/Readme is outdated

2013-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9d5468a7a381 by Andrew Kuchling in branch 'default': #18445: change permissions on some scripts to executable http://hg.python.org/cpython/rev/9d5468a7a381 -- nosy: +python-dev ___ Python tracker

[issue1257] atexit errors should result in nonzero exit code

2013-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would disagree with this report. There are many errors which are effectively silenced by Python, except for being printed on stderr: for example, errors which occur in a __del__ method or a weakref callback (both of which semantically similar to an atexit ha

[issue18776] atexit error display behavior changed in python 3

2013-08-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Library (Lib) keywords: +easy stage: -> patch review type: -> enhancement versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker

[issue18776] atexit error display behavior changed in python 3

2013-08-18 Thread Doug Hellmann
New submission from Doug Hellmann: Under python 2 when an atexit callback raised an exception the full traceback was displayed. Under python 3, only the summary of the exception is shown. Input file: import atexit def exit_with_exception(message): raise RuntimeError(message) atexit.regi

[issue1680961] remove sys.exitfunc, rewrite atexit in C

2013-08-18 Thread Doug Hellmann
Changes by Doug Hellmann : -- nosy: +doughellmann ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue1680961] remove sys.exitfunc, rewrite atexit in C

2013-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sorry to ping you on an old issue, but can any of you explain why it was necessary to rewrite atexit in C? -- nosy: +pitrou resolution: accepted -> fixed stage: -> committed/rejected ___ Python tracker

[issue18562] Regex howto: revision pass

2013-08-18 Thread A.M. Kuchling
Changes by A.M. Kuchling : -- stage: patch review -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue18562] Regex howto: revision pass

2013-08-18 Thread A.M. Kuchling
Changes by A.M. Kuchling : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue11671] Security hole in wsgiref.headers.Headers

2013-08-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue18562] Regex howto: revision pass

2013-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 366ca21600c9 by Andrew Kuchling in branch '3.3': #18562: various revisions to the regex howto for 3.x http://hg.python.org/cpython/rev/366ca21600c9 -- nosy: +python-dev ___ Python tracker

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-08-18 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I am still working on it. I am implemented support for nested globals last week (http://hg.python.org/features/pep-3154-alexandre/rev/c8991b32a47e). At this point, the only big piece remaining is the support for method descriptors. There are other minor

[issue1257] atexit errors should result in nonzero exit code

2013-08-18 Thread Doug Hellmann
Changes by Doug Hellmann : -- nosy: +doughellmann ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: I added the docstrings that I wish had already been present. The only 2.7-3.3 difference in SearchDialogBase is Tkinter/tkinter. -- assignee: -> terry.reedy stage: -> patch review ___ Python tracker

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0d2b87ec9f2b by Terry Jan Reedy in branch '2.7': Issue #18592: Add docstrings to file being tested (idlelib.SearchDialogBase.py). http://hg.python.org/cpython/rev/0d2b87ec9f2b New changeset e09dfdbeb9a2 by Terry Jan Reedy in branch '3.3': Issue #185

[issue18418] Thread.isAlive() sometimes True after fork

2013-08-18 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: FYI I'm going on vacation again 8/20 through 8/25. I'll check in again as soon as I return to see if there's anything else I should do. -- ___ Python tracker ___

[issue18761] Fix internal doc references for the email package

2013-08-18 Thread R. David Murray
R. David Murray added the comment: Based on your response to the review (I haven't looked at the new patch) I say go ahead and apply it. -- ___ Python tracker ___ __

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

2013-08-18 Thread STINNER Victor
STINNER Victor added the comment: PySSL_RAND_atfork_child(void) can be simplified by calling _PyTime_gettimeofday(). This function uses the most(*) accurate function and already implements fallbacks on error. (*) _PyTime_gettimeofday() does not use clock_gettime() because of a linker issue: Pyth

[issue18761] Fix internal doc references for the email package

2013-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch which addresses comments from David. Long lines are wrapped now. -- Added file: http://bugs.python.org/file31363/refs.email_2.patch ___ Python tracker

[issue12641] Remove -mno-cygwin from distutils

2013-08-18 Thread Geert Jansen
Geert Jansen added the comment: *bump*. This is a critical bugfix that prevents I bet 90%+ of Python users on Windows compiling C extensions. It has been open for 2 years and it's a great disservice to people having to compile stuff on Windows. Oscar has been doing a terrific job of providing

[issue18606] Add statistics module to standard library

2013-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: A couple of comments about the test suite: - I would like to see PEP8 test names, i.e. test_foo_and_bar rather than testFooAndBar - I don't think we need two separate test modules, it makes things more confusing --

[issue18772] Fix gdb plugin for new sets dummy object

2013-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: See also the python-dev thread about other drawbacks of the new dummy approach: http://mail.python.org/pipermail/python-dev/2013-August/128025.html -- ___ Python tracker _

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

2013-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which fixes references to StringIO in docstrings and comments and removes redundant code. -- Added file: http://bugs.python.org/file31362/src_StringIO_refs.patch ___ Python tracker

[issue18771] Reduce the cost of hash collisions for set objects

2013-08-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Attaching an updated patch (same algorithm but with a little more factoring to make the patch smaller). -- Added file: http://bugs.python.org/file31361/so2.diff ___ Python tracker

[issue18771] Reduce the cost of hash collisions for set objects

2013-08-18 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18771] Reduce the cost of hash collisions for set objects

2013-08-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Instead of only a second lookup, could you try for example 4 lookup > and align j to fit in a cache line? Accessing 4 entries per probe is a tempting line of development, but will be subject to diminishing returns (second and third collisions aren't frequ

[issue18775] name attribute for HMAC

2013-08-18 Thread Christian Heimes
New submission from Christian Heimes: In issue #18532 name attribute was officially documented and tested for hashing objects. PEP 247 considers HMAC as keyed hashing algorithm. Therefore I suggest that HMAC object should provide the same interface. It's a bit unfortunate that HMAC has a block

[issue17276] HMAC: deprecate default hash

2013-08-18 Thread Christian Heimes
Christian Heimes added the comment: Here is a patch that deprecates MD5 has implicit default hashing algorithm. It also implements digestmod string support. PEP 247 doesn't define the digestmod argument of keyed hashing algorithms. I'm going to define it in PEP 452. -- keywords: +patc

[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-08-18 Thread pmoody
pmoody added the comment: I'm still not convinced. The rfc still says in essence "It's not private like rfc1918 space, but sometimes certain people can treat it similarly." and I think it would be pretty surprising for ipaddress to return True if it's not a network operator running the query.

[issue18562] Regex howto: revision pass

2013-08-18 Thread Ezio Melotti
Ezio Melotti added the comment: #17441 also has a discussion about regex caching that might be relevant. -- ___ Python tracker ___ ___

[issue18418] Thread.isAlive() sometimes True after fork

2013-08-18 Thread Charles-François Natali
Changes by Charles-François Natali : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18678] Wrong struct members name for spwd module

2013-08-18 Thread Vajrasky Kok
Vajrasky Kok added the comment: Attached the patch to accommodate R. David Murray's request. Accessing invalid attributes such as sp_nam and sp_pwd from spwd tuple will generate deprecation warning message. Also, I added test function so we can run spwd module directly. This is useful because

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

2013-08-18 Thread Charles-François Natali
Charles-François Natali added the comment: > On Linux, you can try to set the LD_PRELOAD environment variable as a > workaround. > > LD_PRELOAD=libgcc_s.so.1 python bug.py > > You may need to specify the full path. I don't think that'll work. Despite its name, using LD_PRELOAD won't "preload" th

[issue18603] PyOS_mystricmp unused and no longer available

2013-08-18 Thread Christian Heimes
Christian Heimes added the comment: Here is a simple patch based on the approach in Objects/object.c -- components: +Interpreter Core keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file31357/18603.patch ___ Python tracker

[issue15849] PEP 3121, 384 Refactoring applied to xx module

2013-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Everything except for the Xxo_Type. But you are right. Then again, why > are these global static variables from the start? Isn't this because > xxmodule is some kind of "dummy" module that is supposed to > demonstrate some coding conventions on how to build ext

[issue15849] PEP 3121, 384 Refactoring applied to xx module

2013-08-18 Thread Robin Schreiber
Robin Schreiber added the comment: Everything except for the Xxo_Type. But you are right. Then again, why are these global static variables from the start? Isn't this because xxmodule is some kind of "dummy" module that is supposed to demonstrate some coding conventions on how to build extensi

[issue18742] Abstract base class for hashlib

2013-08-18 Thread Christian Heimes
Christian Heimes added the comment: Thanks Gregory! Have you had a chance to read http://www.python.org/dev/peps/pep-0452/ , too? -- ___ Python tracker ___ _

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

2013-08-18 Thread Christian Heimes
Christian Heimes added the comment: The lastest patch mixes seconds into the time field of seed. Python 3.3+ support only NT and POSIX threads. 2.7 and 3.2 have GNU pth and other threading API but I neither have a system to test other threading libs nor the motivation to port my patch to an an

[issue15849] PEP 3121, 384 Refactoring applied to xx module

2013-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Updated patch accordingly. I don't understand why your patch still has a module state while all objects can be looked up in the module dict. -- ___ Python tracker _

[issue15849] PEP 3121, 384 Refactoring applied to xx module

2013-08-18 Thread Robin Schreiber
Robin Schreiber added the comment: Updated patch accordingly. Regarding the problem in http://mail.python.org/pipermail/python-dev/2013-August/127862.html , it can indeed be solved by returning the already existing module object, if PyInit is called multiple times. I followed the discussion a

[issue18178] Redefinition of malloc(3) family of functions at build time

2013-08-18 Thread Christian Heimes
Christian Heimes added the comment: Thx for the fix! -- nosy: +christian.heimes resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18606] Add statistics module to standard library

2013-08-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: On 15/08/13 22:58, ezio.melo...@gmail.com wrote: > http://bugs.python.org/review/18606/diff/8927/Lib/statistics.py#newcode277 > Lib/statistics.py:277: assert isinstance(x, float) and > isinstance(partials, list) > Is this a good idea? I think so add_partials is

[issue18606] Add statistics module to standard library

2013-08-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: Since I can't respond to the reviews, here's a revised patch. Summary of major changes: - median.* functions are now median_* - mode now only returns a single value - better integrate tests with Python regression suite - cleanup tests as per Ezio's suggestions

[issue18774] There is still last bit of GNU Pth code in signalmodule.c

2013-08-18 Thread Christian Heimes
Christian Heimes added the comment: Thanks! Three comments still refer to GNU pth: configure.ac:# (e.g. gnu pth with pthread emulation) Python/condvar.h: library (e.g. gnu pth in pthread emulation) */ Python/thread.c: library (e.g. gnu pth in pthread emulation) */ thread.c and condvar.h

[issue15849] PEP 3121, 384 Refactoring applied to xx module

2013-08-18 Thread Robin Schreiber
Robin Schreiber added the comment: Antoine, regarding that the last pending problem with the patch is related to the NULL checking of FindModule, I would be inclined to include your proposed helper API. I see that issue18710 has not been included into the trunk yet, but I think this is mostly

[issue18774] There is still last bit of GNU Pth code in signalmodule.c

2013-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 646c2388d8f5 by Christian Heimes in branch 'default': Issue #18774: Remove last bits of GNU PTH thread code, patch by Vajrasky Kok. http://hg.python.org/cpython/rev/646c2388d8f5 -- nosy: +python-dev ___ P

[issue18771] Reduce the cost of hash collisions for set objects

2013-08-18 Thread STINNER Victor
STINNER Victor added the comment: Instead of only a second lookup, could you try for example 4 lookup and align j to fit in a cache line? Or do you expect more collisions with 4 contiguious lookup? -- ___ Python tracker

[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-08-18 Thread Freek Dijkstra
Freek Dijkstra added the comment: I was about to make the same suggestion as the OP. Most users think of "private IP" addresses as NATed IP addresses. I think the technical term is "forwardable, but not globally unique". Thus, the method of least surprise would be that indeed the is_private()

[issue18712] Pure Python operator.index doesn't match the C version.

2013-08-18 Thread Armin Rigo
Armin Rigo added the comment: ...but yes, it's very obvious that exposing _PyType_Lookup() to pure Python is the right thing to do here. This is a central part of the way Python works internally, after all. Moreover, sorry about my previous note: if we started today to write PyPy, then it wo

[issue18712] Pure Python operator.index doesn't match the C version.

2013-08-18 Thread Armin Rigo
Armin Rigo added the comment: Ah. If that's the only reason, then that seems a bit like misguided effort... For alternative implementations like PyPy and Jython, the "_operator" module is definitely one of the simplest ones to reimplement in RPython or Java. Every function is straightforwar

[issue18712] Pure Python operator.index doesn't match the C version.

2013-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > For completeness, can you post one line saying why the much simpler solution > "range(a).stop" is not accepted? Because it is implementation detail. The range() function if it will be implemented in Python needs operator.index(). The main purpose of addin

[issue18712] Pure Python operator.index doesn't match the C version.

2013-08-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file31353/operator_index_4.patch ___ Python tracker ___ ___ Python-bugs-list

[issue18712] Pure Python operator.index doesn't match the C version.

2013-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a variant with getattr_static(). -- ___ Python tracker ___ ___ Python-bugs-list mailing li