[issue18584] examples in email.policy doc are fu'd

2013-07-28 Thread rurpy
New submission from rurpy: In the first example in the documentation for library module email.policy (http://docs.python.org/3/library/email.policy.html#module-email.policy): >>> from email import msg_from_binary_file >>> from email.generator import BytesGenerator >>> from subprocess impo

[issue15415] Add temp_dir() and change_cwd() to test.support

2013-07-28 Thread Nick Coghlan
Nick Coghlan added the comment: I did see the Windows buildbot failure, but stopped scanning the log once I saw the intermittent test_signal failure :P With the more granular API, test_startfile is a better fit for support.change_cwd, so we'll see how that goes on the Windows buildbots. -

[issue15415] Add temp_dir() and change_cwd() to test.support

2013-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset a76693942de3 by Nick Coghlan in branch '3.3': Attempt to fix #15415 on Windows http://hg.python.org/cpython/rev/a76693942de3 New changeset b14308524cff by Nick Coghlan in branch 'default': Merge #15415 Windows buildbot change from 3.3 http://hg.pyth

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patch attached with current version. I noted in a comment that we should probably replace some of format_paragraph with textwrap.wrap. The find_paragraph test works fine with the current text mock. I split one test method and will probably do more. It could b

[issue18583] Idle: enhance FormatParagraph

2013-07-28 Thread Terry J. Reedy
New submission from Terry J. Reedy: Writing tests for FormatParagraph.py #18226 revealed that it could use some improvements. At minimum, some for format_paragraph should probably be replaced with textwrap.wrap (or the class) in order to handles double spacing after sentences. Find_paragrap

[issue18538] `python -m dis ` should use argparse

2013-07-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-28 Thread Guido van Rossum
Guido van Rossum added the comment: > Raymond Hettinger added the comment: > > Nick, +1 from me if you want to make your edits and wrap this one up. +1 from me too. -- ___ Python tracker __

[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2013-07-28 Thread R. David Murray
R. David Murray added the comment: Yes, this is a very good point. (And your passing test is worthwhile, you are correct.) People are expected to be able to write handlers, so clearly the timeout API needs to be documented, if for no other reason than to keep a handler writer from stomping

[issue11152] pb in zipfile module

2013-07-28 Thread Damien M Calloway
Damien M Calloway added the comment: I believe I have isolated the bug - I added a blank string to the SMALL TEST DATA list, since empty strings will not compress. Test now fails on lines 645 and 663 when "extract" and "extract_all" assertions fail. This appears to replicate the issue reported

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Some comments on patch 6: 1. tearDownClass was omitted, resulting in boxes left on the screen, at least when running in Idle with win7. I added this to the README. I am also getting messages like "warning: callback failed in WindowList : invalid command name

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nick, +1 from me if you want to make your edits and wrap this one up. -- ___ Python tracker ___ _

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-28 Thread Nick Coghlan
Nick Coghlan added the comment: "with statements are good", basically. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue15415] Add temp_dir() and change_cwd() to test.support

2013-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: -def temp_cwd(name='tempcwd', quiet=False, path=None): +def temp_cwd(name='tempcwd', quiet=False): Since this parameter removal was pushed, the Windows buildbots consistently have this new error in this Windows-only test. ERROR: test_empty (test.test_startfil

[issue18441] Idle: Make test.support.requires('gui') skip when it should.

2013-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c57b2a344097 by Terry Jan Reedy in branch '3.3': Issue #18441: Remove check from test_text.py in 3.3,4 (already done in 2.7). http://hg.python.org/cpython/rev/c57b2a344097 -- ___ Python tracker

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-28 Thread Guido van Rossum
Guido van Rossum added the comment: OK, forget I said anything about exceptions. The language in Nick's patch is fine. Regarding "break is bad", while I agree with Terry's recommendation, I think saying anything about this would be overreaching the scope of a style guide. We shouldn't give

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Based on recent python-list posts, there is also 'break is bad' propaganda > going around. Perhaps we should say that loop-and-a-half with break is > preferred (or at least equally acceptable) to repeating code. Sometimes yet one alternative can be used in

[issue18563] No unit test for yiq to rgb and rgb to yiq converting functions

2013-07-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue11619] On Windows, don't encode filenames in the import machinery

2013-07-28 Thread Drekin
Drekin added the comment: Is there a chance this will be fixed at least in Python 4? -- nosy: +Drekin ___ Python tracker ___ ___ Pytho

[issue18575] Fixing tarfile._mode when using gzip via ":gz"

2013-07-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Multivolume support in tarfile module nosy: +serhiy.storchaka stage: -> patch review type: -> behavior ___ Python tracker ___ __

[issue18577] lru_cache enhancement: lru_timestamp helper function

2013-07-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger versions: +Python 3.4 -Python 3.3 ___ Python tracker ___

[issue18112] PEP 442 implementation

2013-07-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file31068/050c6d089164.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18112] PEP 442 implementation

2013-07-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch with the suggested changes, apart from a couple stylistic ones (waiting for your answer on these ones). -- ___ Python tracker ___

[issue18582] PBKDF2 support

2013-07-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Please use the "y*" format, not "y#". Also, I would lower-case "pbkdf2", just as we already lower-case "md5", "sha1", etc. -- nosy: +pitrou ___ Python tracker

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Based on recent python-list posts, there is also 'break is bad' propaganda going around. Perhaps we should say that loop-and-a-half with break is preferred (or at least equally acceptable) to repeating code. while True: value = getvalue() if not value:

[issue17134] Use Windows' certificate store for CA certs

2013-07-28 Thread Christian Heimes
Christian Heimes added the comment: I guess I have to revise my patch and go throw Windows' crypto lookup functions... Automatic CA root certificate updates on Windows http://netsekure.org/2011/04/automatic-ca-root-certificate-updates-on-windows/ -- _

[issue18582] PBKDF2 support

2013-07-28 Thread Christian Heimes
Changes by Christian Heimes : Removed file: http://bugs.python.org/file31066/pbkdf2.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18582] PBKDF2 support

2013-07-28 Thread Christian Heimes
Changes by Christian Heimes : Added file: http://bugs.python.org/file31067/pbkdf2.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue18582] PBKDF2 support

2013-07-28 Thread Christian Heimes
New submission from Christian Heimes: The patch is a proof of concept for PBKDF2 support for the OpenSSL variant of hashlib. It's a thin wrapper around PKCS5_PBKDF2_HMAC() and is deliberately designed as low level API with bytes and input and output types. High level wrappers can do the conver

[issue18581] Duplicate test and missing class test in test_abc.py

2013-07-28 Thread Vajrasky Kok
New submission from Vajrasky Kok: There are two classes in Lib/test/test_abc.py, which are TestABC and TestLegacyAPI. Only TestABC is being unit tested. Beside that TestLegacyAPI class has one duplicate test, which is test_abstractmethod_integration with TestABC class. -- components:

[issue18575] Fixing tarfile._mode when using gzip via ":gz"

2013-07-28 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue18580] distutils compilers are unicode strings on OS X since Python 2.7.4

2013-07-28 Thread Ned Deily
Ned Deily added the comment: Thanks for the analysis. I'm consolidating this issue with Issue18580. -- assignee: eric.araujo -> ned.deily nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected superseder: -> _osx_support compiler_fixup ___

[issue18580] distutils compilers are unicode strings on OS X since Python 2.7.4

2013-07-28 Thread Ralf Schmitt
Changes by Ralf Schmitt : -- nosy: +schmir ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue18071] _osx_support compiler_fixup

2013-07-28 Thread Ralf Schmitt
Changes by Ralf Schmitt : -- nosy: +schmir ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue18071] _osx_support compiler_fixup

2013-07-28 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: Also, to reproduce it you have to temporarily move away your /usr/bin/cc and /usr/bin/clang, which then triggers the affected code path. -- ___ Python tracker __

[issue18071] _osx_support compiler_fixup

2013-07-28 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: I was unaware of this issue (which homebrew works around incorrectly), and because of this I created issue 18580. The problem is indeed with unicode strings which are coming from _read_output in _osx_support. This is probably because this code was merged fro

[issue18577] lru_cache enhancement: lru_timestamp helper function

2013-07-28 Thread Peter Santoro
Peter Santoro added the comment: I updated my proposed lru_timestamp function with the following changes: 1) restricted refresh_interval to int type 2) updated doc string Updated doc string follows: def lru_timestamp(refresh_interval=60): """ Return a timestamp string for @lru_cache decora

[issue18580] distutils compilers are unicode strings on OS X since Python 2.7.4

2013-07-28 Thread Alexey Borzenkov
New submission from Alexey Borzenkov: A user reported getting a TypeError when building greenlet on OS X with Python 2.7.4 built with homebrew. The TypeError happens because we subclass build_ext so before building extensions we can change compiler's compiler_so. The problem is that instead of

[issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper

2013-07-28 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: ncoghlan -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue18579] Dereference after NULL check in listobject.c merge_hi()

2013-07-28 Thread Christian Heimes
New submission from Christian Heimes: Coverity Scan may have found an issue in listobject's merge code. I'm not familiar with the code so I don't know if ssb.value can be NULL here. 3. Condition "ssb.values != NULL", taking false branch 4. var_compare_op: Comparing "ssb.values" to null implies

[issue15376] Refactor the test_runpy walk_package support code into a common location

2013-07-28 Thread Nick Coghlan
Nick Coghlan added the comment: test.support is now a subpackage in both 3.3 and default, but test.support.package_helper still needs to be created (see comments on #15403) -- versions: +Python 3.4 ___ Python tracker

[issue15403] Refactor package creation support code into a common location

2013-07-28 Thread Nick Coghlan
Nick Coghlan added the comment: Also, now that test.support is a subpackage, the helper should be a submodule of that (test.support.package_helper) rather than directly in the test directory. -- ___ Python tracker

[issue15403] Refactor package creation support code into a common location

2013-07-28 Thread Nick Coghlan
Nick Coghlan added the comment: As noted in #18576 and #18578, I'd like for these relocation patches to include the addition of documentation for the submodule in Doc/library/test.rst -- ___ Python tracker ___

[issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper

2013-07-28 Thread Nick Coghlan
New submission from Nick Coghlan: test.bytecode_helper provides various utilities for sensibly testing bytecode generation. It isn't easy for CPython developers to discover, since it isn't documented and the file is mixed in with actual tests in the main test directory. As discussed in #15494

[issue18577] lru_cache enhancement: lru_timestamp helper function

2013-07-28 Thread Peter Santoro
New submission from Peter Santoro: The attached proposed lru_timestamp function provides developers with more control over how often lru_cache entries are refreshed. Doc string follows: def lru_timestamp(refresh_interval=60): """ Return a timestamp string for @lru_cache decorated functions.

[issue18576] Rename and document test.script_helper as test.support.script_helper

2013-07-28 Thread Nick Coghlan
New submission from Nick Coghlan: tests.script_helper provides various utilities for sensibly testing scripts in a subprocess. It isn't easy for CPython developers to discover, since it is isn't documented and the file is mixed in with actual tests in the main test directory. As discussed in

[issue15415] Add temp_dir() and change_cwd() to test.support

2013-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f0034477ba9 by Nick Coghlan in branch '3.3': Close #15415: Factor out temp dir helpers to test.support http://hg.python.org/cpython/rev/4f0034477ba9 New changeset b20a10c97e08 by Nick Coghlan in branch 'default': Merge #15415 from 3.3 http://hg.pyt

[issue18574] BaseHTTPRequestHandler.handle_expect_100() sends invalid response

2013-07-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +orsenthil versions: -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue15494] Move test/support.py into a test.support subpackage

2013-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0b7ed24f7d33 by Nick Coghlan in branch '3.3': Issue #15494: test.support is now a package rather than a module http://hg.python.org/cpython/rev/0b7ed24f7d33 -- ___ Python tracker

[issue15494] Move test/support.py into a test.support subpackage

2013-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 203a77e74aa7 by Nick Coghlan in branch 'default': Close #15494: test.support is now a package rather than a module http://hg.python.org/cpython/rev/203a77e74aa7 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status:

[issue17620] Python interactive console doesn't use sys.stdin for input

2013-07-28 Thread Drekin
Drekin added the comment: Is there any chance the API will be added and used by python.exe? -- ___ Python tracker ___ ___ Python-bugs-

[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains

2013-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2aa6c1e35b8a by Nick Coghlan in branch 'default': Close #13266: Add inspect.unwrap http://hg.python.org/cpython/rev/2aa6c1e35b8a -- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___

[issue18575] Fixing tarfile._mode when using gzip via ":gz"

2013-07-28 Thread Eduardo Robles Elvira
Eduardo Robles Elvira added the comment: Fixing gzip.patch, it was using basestring (python2) instead of str -- Added file: http://bugs.python.org/file31062/gzip.patch ___ Python tracker __

[issue18575] Fixing tarfile._mode when using gzip via ":gz"

2013-07-28 Thread Eduardo Robles Elvira
Changes by Eduardo Robles Elvira : Removed file: http://bugs.python.org/file31061/gzip.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue18575] Fixing tarfile._mode when using gzip via ":gz"

2013-07-28 Thread Eduardo Robles Elvira
New submission from Eduardo Robles Elvira: A TarFile object constructor accepts a fileobj argument. When this argument is set and it has a "mode" property, tarfile._mode is blindly copied from there. Otherwise, mode is set using the mode argument in the constructor. This usually works, but in

[issue18321] Multivolume support in tarfile module

2013-07-28 Thread Eduardo Robles Elvira
Eduardo Robles Elvira added the comment: Sure, I will fill it out. But is it required? -- ___ Python tracker ___ ___ Python-bugs-list