[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-06-24 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Kristján, you are certainly correct that a single-argument that can be either a filename or a cert is inappropriate; we should not be peeking inside of strings to guess what they contain. And I think you also have a good point about Pythonic-ness when

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-06-11 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Kristján, your patch is a wonderful idea—I am about to commit production code that will have to create tens of thousands of temporary files during operation, one file each time SSL is started up on a socket, which could be avoided if something like

[issue17855] Implement introspection of logger hierarchy

2013-06-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Adding an entirely separate API for introspection strikes me as counter-productive — instead of merely having to maintain the logging API that you already maintain, you will additionally now have an entirely separate and second API that also has

[issue13477] tarfile module should have a command line

2013-03-19 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Larry Hastings rep...@bugs.python.org writes: Huh. tar *can* infer it from the data itself. On the other hand, it chooses explicitly not to. I guess tar knows explicit is better than implicit too ;-) I am told that the refusal of tar to introspect

[issue17370] PEP should not if it has been superseded

2013-03-06 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes: A friend (@theomn on Twitter) was just working off of PEP-333 when I mentioned to him that PEP-, and he had never heard of it, and he expressed the wish that PEPs would have a banner or something at the top if there is a more recent version

[issue17370] PEP should note if it has been superseded

2013-03-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: (Corrected not to note in the title and went with enhancement) -- title: PEP should not if it has been superseded - PEP should note if it has been superseded type: - enhancement ___ Python tracker rep

[issue17370] PEP should note if it has been superseded

2013-03-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: The original inspiration: https://twitter.com/theomn/status/309468740611891200 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17370

[issue13477] tarfile module should have a command line

2011-11-24 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: The tarfile module should have a simple command line that allows it to be executed with -m — even if its only ability was to take a filename and extract it to the current directory, it could be a lifesaver on Windows machines

[issue1947] Exception exceptions.AttributeError '_shutdown' in module 'threading'

2011-09-13 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: In case Google brings anyone else to this bug: this error typically indicates that a `threading.py` which is not actually the Standard Library's `threading` module has somehow wound up on an earlier path in `sys.path

[issue11561] coverage of Python regrtest cannot see initial import of libs

2011-09-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Brett, yes, you are welcome to close this issue — Ned quite handily convinced me that coverage code belongs in the coverage distribution, not languishing about in the CPython source tree. That solution also quite beautifully solves

[issue11572] bring Lib/copy.py to 100% coverage

2011-08-04 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Ezio and Sandro, thank you very much for your attention to this issue, and for helping me split it into manageable chunks! To answer the question about why coverage does not show as high a total as it ought: it's because coverage

[issue11572] bring Lib/copy.py to 100% coverage

2011-08-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Éric, I think your points are good ones. (And, as I return to this patch after three months, I should thank the PSF for sponsoring the CPython sprint here at PyOhio, and creating this opportunity for me to continue trying to land

[issue11561] coverage of Python regrtest cannot see initial import of libs

2011-08-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Éric, I think your suggestions are all good ones, and I have incorporated them into the file. (But do note that the departures we are now making from Ned's own copy of the tracer code ­— removing the commented-out debugging

[issue12056] … (HORIZONTAL ELLIPSIS) should be an alternative syntax for ... (FULL STOP FULL STOP FULL STOP)

2011-05-11 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: But if we allow for ellipsis, then would we not also have to start allowing characters like ≥ and ≤ in Python? And the problem with any of these (admittedly very attractive) substitutions is that they seem to abandon the principle

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-21 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Nick Coghlan rep...@bugs.python.org writes: Regarding __reduce__, other readers will have the same question Éric did, so that point should definitely go in a comment after the __reduce_ex__ check. I just sat down to review

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-19 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Nick Coghlan rep...@bugs.python.org writes: Nick Coghlan ncogh...@gmail.com added the comment: Regarding __reduce__, other readers will have the same question Éric did, so that point should definitely go in a comment after

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-18 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Éric, after checking line 112 of the two patches and then of the new file, I figured out that you meant line 112 of the old file — and, yes, that test can go away too since in python3 complex always exists and unicode never exists

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Éric, the Makefile in Python trunk seems to include Objects/complexobject.o in the build unilaterally without any way to turn it off. What is leading you to believe that Python 3 can conditionally turn the complex type off during

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Antoine, neither this issue, nor either version of my patch, was intended to assert that 100% test coverage indicates that a test of tests are complete. If you will point out where in the text this is implied, I will correct

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-16 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: The attached patch will bring Lib/copy.py to 100% test coverage. A bug in coverage results in its only reporting 99% at the moment; see coverage issue #122 on bitbucket: https://bitbucket.org/ned/coveragepy/issue/122/for-else

[issue502085] pickle problems (with Boost.Python)

2011-03-16 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Benjamin, I would like some way to know when our tests achieve 100% coverage because otherwise I will keep coming back to this module to add more tests and have to re-discover code that is not CPython relevant. But for now I have

[issue502085] pickle problems (with Boost.Python)

2011-03-16 Thread Brandon Craig Rhodes
Changes by Brandon Craig Rhodes bran...@rhodesmill.org: Removed file: http://bugs.python.org/file21245/test_copy2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue502085

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-16 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Benjamin, thanks for the pointers! The attached patch now uses assertIs() and assertIsNot(), and calls self.fail() instead of using the exception from support. In the future I would like some way to determine when test coverage

[issue11561] coverage of Python regrtest cannot see initial import of libs

2011-03-15 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: When running the Python regression tests in coverage, the initial outer level of interpreted code in several standard library modules shows as not having been covered by the tests, because they were imported during the Python

[issue11561] coverage of Python regrtest cannot see initial import of libs

2011-03-15 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Here is a module that solves this problem if the tests are run with the fullcoverage directory at the front of the PYTHONPATH, like this: PYTHONPATH=Tools/fullcoverage ./python -m coverage run --pylib Lib/test/regrtest.py

[issue10979] setUpClass exception causes explosion with -b

2011-01-21 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: Normally, unittest cleanly reports an exception in a setUpClass method. But if I place the attached test in a directory by itself and then run python -m unittest discover -b from inside of the same directory, then instead

[issue10901] Python 3 MIME generator dies if not given boundary

2011-01-13 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: If you try doing msg.as_string() to a MIMEMultipart message that has not been given a boundary, then it dies with this exception: Traceback (most recent call last): File mime_gen_alt.py, line 40, in module print

[issue10901] Python 3 MIME generator dies if not given boundary

2011-01-13 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Here is a patch that fixes the problem. The problem probably only occurs if the MIMEMultipart is actually given several MIME parts to use in its interior. -- keywords: +patch Added file: http://bugs.python.org/file20391

[issue9723] pipes.quote() needs to be documented

2010-08-31 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: The only way to safely build shell command lines from inside of Python — which is necessary when sending commands across SSH, since that behaves like os.system() rather than like subprocess.call() — is to use the wonderful

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

2010-05-14 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: The multiprocessing module uses a bare fork() to create child processes under Linux, so the children get a copy of the entire state of the parent process. But under Windows, child processes are freshly spun-up Python

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

2010-05-14 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Jesse, it's great to learn it's on your wish list too! Should I design the patch so that (a) there is some global in the module that needs tweaking to choose the child creation technique, or (b) that an argument to the Process

[issue8517] Apple Style Guide link is broken in the Documenting Python chapter

2010-04-24 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: On this page, the Style Guide for people who want to try contributing to the Python documentation: docs.python.org/documenting/style.html there is a broken link to the Apple Style Guide. The 2008 edition now seems gone