[issue23742] expandvars removes single quotes ( ' )

2015-03-22 Thread Manuel Vögele
New submission from Manuel Vögele: When executing os.path.expandvars("%SystemDrive%\\Foo'Bar") the function erases the ' returning 'C:\\FooBar' using Python 3.4.3 on Windows 7 -- components: Library (Lib) messages: 238968 nosy: manuel_v, serhiy.storchaka priority: normal severity: no

[issue23740] http.client request and send method have some datatype issues

2015-03-22 Thread R. David Murray
R. David Murray added the comment: Yeah, if we're going to check the type for iterables to convert strings, we might as well check the type for read() as well. The bit about the len not being set except for str and bytes was me mis-remembering what I read in the code. (The isinstance check is

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-03-22 Thread R. David Murray
R. David Murray added the comment: If the first word is a function name that does not start with a capital, the sentence can't start with a capital. Sometimes it is worthwhile to reword the sentence so you can start it with a capitalizable word, but sometimes it isn't. (I haven't reviewed th

[issue23742] expandvars removes single quotes ( ' )

2015-03-22 Thread R. David Murray
R. David Murray added the comment: It apparently only loses unbalanced single quotes. -- components: +Windows -Library (Lib) nosy: +r.david.murray, steve.dower, tim.golden, zach.ware stage: -> needs patch versions: +Python 3.5 ___ Python tracker

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-03-22 Thread Zbyszek Jędrzejewski-Szmek
Zbyszek Jędrzejewski-Szmek added the comment: > Please start sentences with capital letters, specifically “mkstemp() and > mkdtemp() are lower-level functions . . .”. This would make the sentence more convoluted... I think that with markup it is pretty clear that this is a function name and th

[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-22 Thread Martin Panter
Martin Panter added the comment: I think I saw your patch for Issue 18814 proposes to use UnicodeTranslateError. Is there any other case where it is used, either currently or in the past? All I know of it is the documentation, which says it is raised “during translating”. Experimenting with th

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-03-22 Thread Martin Panter
Martin Panter added the comment: The current proposed text would be rendered something like this: ''' TemporaryFile, NamedTemporaryFile, TemporaryDirectory, SpooledTemporaryFile are high-level interfaces which provide automatic cleanup and can be used as context managers. mkstemp() and mkdtemp

[issue5784] raw deflate format and zlib module

2015-03-22 Thread Martin Panter
Martin Panter added the comment: According to , the deflateInit2(windowBits) parameter can be: * +8 to +15 to include a “zlib” header and trailer * −8 to −15 to write a raw Deflate stream with no header nor trailer * 16 + (8 to 15) to include a basic “gzip”

[issue22163] max_wbits set incorrectly to -zlib.MAX_WBITS in tarfile, shouldn't be negative

2015-03-22 Thread Martin Panter
Martin Panter added the comment: Eduardo’s patch causes many tests to fail. Abbreviated test output: $ ./python -bWall -m test -v test_tarfile == ERROR: test_compare_members (test.test_tarfile.GzipStreamReadTest) ERROR: test_emp

[issue23062] test_argparse --version test cases

2015-03-22 Thread Martin Panter
Martin Panter added the comment: Serhiy, there is already a test for that: class TestHelpVersionAction(HelpTestCase): """Test the default help for the version action""" So I still think the test is redundant, unless it is made to exercise help=SUPPRESS, as Berker’s patch does. --

[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-03-22 Thread Martin Panter
Martin Panter added the comment: V3 patch with suggested changes to the test case, though still completely untested by me. -- Added file: http://bugs.python.org/file38641/win-error-format-v3.patch ___ Python tracker

[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2015-03-22 Thread Martin Panter
Martin Panter added the comment: Patch v2 just changes a test to use “with self.assertRaises()”. The behaviour of urlparse() succeeding and then result.port failing is indeed odd and surprising. Hopefully documenting this behaviour will help with the “surprising” aspect. But changing it would

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-03-22 Thread Zbyszek Jędrzejewski-Szmek
Zbyszek Jędrzejewski-Szmek added the comment: Actually they are not classes, so the proposed wording cannot be used. But indeed it sounds better with the "and". v4: - one more "and" -- Added file: http://bugs.python.org/file38643/0001-docs-update-description-of-TemporaryFile-and-tempf

[issue23743] Python crashes upon exit if importing g++ compiled mod after importing gcc compiled mod

2015-03-22 Thread matham
New submission from matham: I have encountered a situation where python crashes when python exits if one imports a c compiled extension followed by a cpp compiled extension (but not if imported in the reverse order). This is on windows with mingw (current using mingw-get install gcc g++ msys-m

[issue20271] urllib.parse.urlparse() accepts wrong URLs

2015-03-22 Thread Martin Panter
Martin Panter added the comment: To me, the only difference between urlsplit() and urlparse() is that urlsplit() does not treat parameters following a semicolon specially. The documentation tends to agree with this view. So whatever exceptions are raised by urlparse() should also be raised by

[issue23744] Speed-up deque.__bool__

2015-03-22 Thread Raymond Hettinger
New submission from Raymond Hettinger: The __bool__ method is a little faster than __len__. Timings attached. -- assignee: rhettinger components: Library (Lib) files: deque_bool1.diff keywords: patch messages: 238983 nosy: rhettinger priority: normal severity: normal status: open title:

[issue23744] Speed-up deque.__bool__

2015-03-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file38645/timings_deque_bool.txt ___ Python tracker ___ ___ Python-bugs-list

[issue23378] argparse.add_argument action parameter should allow value extend

2015-03-22 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> needs patch versions: -Python 3.4, Python 3.6 ___ Python tracker ___ __

<    1   2