[issue25168] test_datetime.test_strptime() random failures on "s390x SLES" buildbots

2015-11-14 Thread Martin Panter
Martin Panter added the comment: I wonder if this has anything to do with _strptime._TimeRE_cache. This seems to get initialized when _strptime is first imported. Some of the tests in datetimetester temporarily set the timezone to -0500 EST, and another to UTC, but they change it back afterwar

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3b9fb8ebf44f by Benjamin Peterson in branch '2.7': fix build with older openssl (#25569) https://hg.python.org/cpython/rev/3b9fb8ebf44f New changeset f13a75544b6f by Benjamin Peterson in branch '3.4': fix build with older openssl (#25569) https://hg

[issue25623] Keep the link to Python implementation of OrderedDict

2015-11-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: For now C implementation of OrderedDict totally overrides Python implementation. >>> import collections >>> collections.OrderedDict.__init__ The only way to get Python implementation of Order

[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-11-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +needs review nosy: +michael.foord stage: needs patch -> patch review ___ Python tracker ___ __

[issue25168] test_datetime.test_strptime() random failures on "s390x SLES" buildbots

2015-11-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 139c18943d9b by Martin Panter in branch 'default': Issue #25168: Temporary timezone and cache debugging https://hg.python.org/cpython/rev/139c18943d9b -- nosy: +python-dev ___ Python tracker

[issue25624] shutil.make_archive makes invalid directory entries

2015-11-14 Thread Dingyuan Wang
New submission from Dingyuan Wang: The _make_zipfile in shutil uses ZIP_DEFLATED compression by default, and the fix introduced by #24982 adds directory entries. In zipfile.ZipFile.write, directories is added as 0 file_size, 0 compress_size, regardless of the compression method. Deflate will c

[issue25624] shutil.make_archive makes invalid directory entries

2015-11-14 Thread SilentGhost
SilentGhost added the comment: Can you provide a test? -- nosy: +SilentGhost, serhiy.storchaka, tarek versions: +Python 3.6 ___ Python tracker ___ ___

[issue25624] shutil.make_archive makes invalid directory entries

2015-11-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you want to provide a patch? -- assignee: -> serhiy.storchaka keywords: +easy stage: -> needs patch ___ Python tracker ___ __

[issue25624] shutil.make_archive makes invalid directory entries

2015-11-14 Thread Dingyuan Wang
Dingyuan Wang added the comment: $ mkdir foo; touch foo/a.txt; python3 -c "import shutil; shutil.make_archive('foo', 'zip', base_dir='foo')"; unzip -t foo.zip Archive: foo.zip testing: foo/ error: invalid compressed data to inflate testing: foo/a.txt

[issue25624] shutil.make_archive makes invalid directory entries

2015-11-14 Thread Dingyuan Wang
Dingyuan Wang added the comment: My patch for this. -- keywords: +patch Added file: http://bugs.python.org/file41039/storedirectory.patch ___ Python tracker ___ _

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-14 Thread Daniel Plachotich
Daniel Plachotich added the comment: Looks good to me. Without the fix, the test fails on Windows 7 as expected. -- ___ Python tracker ___ ___

[issue3353] make built-in tokenizer available via Python C API

2015-11-14 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag versions: +Python 3.6 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue24821] The optimization of string search can cause pessimization

2015-11-14 Thread STINNER Victor
STINNER Victor added the comment: > The patch also makes a little refactoring. STRINGLIB(fastsearch_memchr_1char) > now is renamed and split on two functions STRINGLIB(find_char) and > STRINGLIB(rfind_char) with simpler interface. Could you please push this part of the change? It looks good to

[issue23883] __all__ lists are incomplete

2015-11-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8fa7bc837a3 by Martin Panter in branch 'default': Issue #23883: Add test.support.check__all__() and test gettext.__all__ https://hg.python.org/cpython/rev/f8fa7bc837a3 New changeset 78d67bdc1142 by Martin Panter in branch 'default': Issue #23883: A

[issue23883] __all__ lists are incomplete

2015-11-14 Thread Martin Panter
Martin Panter added the comment: Thankyou for sticking with this Jacek. I have committed your three patches. I reworded the documentation a little bit, mainly so it says that it looks for “public” names, rather than documented names, because it does not look at documentation at all. I also add

[issue25388] tokenizer crash/misbehavior -- heap use-after-free

2015-11-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 73da4fd7542b by Serhiy Storchaka in branch '3.4': Issue #25388: Fixed tokenizer crash when processing undecodable source code https://hg.python.org/cpython/rev/73da4fd7542b New changeset e4a69eb34ad7 by Serhiy Storchaka in branch '3.5': Issue #25388

[issue25168] test_datetime.test_strptime() random failures on "s390x SLES" buildbots

2015-11-14 Thread Martin Panter
Martin Panter added the comment: Info when the s390x SLES 3.x buildbot failed : _TimeRE_cache['Z']='(?Pstd|utc|gmt|dst)' TZ=None, or None via getenv() _regex_cache={'%Y-%m-%d %H:%M:%S.%f': re.compile('

[issue23883] __all__ lists are incomplete

2015-11-14 Thread Jacek Kołodziej
Jacek Kołodziej added the comment: Martin, yay! :) And thank you for the documentation correction. Milap, Joel, Mauro, are you still interested in working on patches for calendar/tarfile/fileinput patches? I intend to finish them up if that's not the case. --

[issue24821] The optimization of string search can cause pessimization

2015-11-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1412be96faf0 by Serhiy Storchaka in branch 'default': Issue #24821: Refactor STRINGLIB(fastsearch_memchr_1char) and split it on https://hg.python.org/cpython/rev/1412be96faf0 -- nosy: +python-dev ___ Pyth

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-14 Thread Alex Gaynor
Alex Gaynor added the comment: fixed -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25578] Memory leak in SSLSocket.getpeercert() with 0-length AIA extension

2015-11-14 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue24821] The optimization of string search can cause pessimization

2015-11-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Could you please push this part of the change? It looks good to me. Done. The patch that make an optimization now looks much simpler. > The C library provides a wmemchr() function which can be used to search for a > wchar_t character inside a wchar_t* stri

[issue25168] test_datetime.test_strptime() random failures on "s390x SLES" buildbots

2015-11-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +David.Edelsohn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2015-11-14 Thread Robin Roth
Robin Roth added the comment: Antoine's suggestion does not work, because "dirname" does not cover enough cases (for example trailing slash, possibly more). As suggested by him I now use realpath (instead of abspath). I can't come up with a symlink-situation that is broken with the old code, b

[issue25168] test_datetime.test_strptime() random failures on "s390x SLES" buildbots

2015-11-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks to Martin's research I have wrote a patch that resets a cache when timezone is changed. Martin's example in msg254643 works with this patch. -- keywords: +patch Added file: http://bugs.python.org/file41042/strptime_cache_timezone.patch ___

[issue25625] "chdir" Contex manager for pathlib

2015-11-14 Thread Jáchym Barvínek
New submission from Jáchym Barvínek: I use this context manager in my code: @contextmanager def in_directory(path): pwd = str(Path().absolute()) if not path.is_dir(): path = path.parent os.chdir(str(path)) yield path.absolute() os.chdir(pwd) I thought it would be nic

[issue25625] "chdir" Contex manager for pathlib

2015-11-14 Thread SilentGhost
Changes by SilentGhost : -- nosy: +pitrou versions: +Python 3.6 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue25625] "chdir" Contex manager for pathlib

2015-11-14 Thread desbma
desbma added the comment: I'm not a Python core developer, but a few thoughts: * this is not thread safe * subprocess.Popen already has a cwd parameter for similar purpose -- nosy: +desbma ___ Python tracker __

[issue23883] __all__ lists are incomplete

2015-11-14 Thread Mauro S. M. Rodrigues
Mauro S. M. Rodrigues added the comment: Yes, I'm, I have a commitment now but I'll submit a new version later today -- ___ Python tracker ___ ___

[issue25625] "chdir" Contex manager for pathlib

2015-11-14 Thread Jáchym Barvínek
Jáchym Barvínek added the comment: I did not know about cwd for Popen. It seems like the better way to go. Thank you. 2015-11-14 19:58 GMT+01:00 desbma : > > desbma added the comment: > > I'm not a Python core developer, but a few thoughts: > * this is not thread safe > * subprocess.Popen alrea

[issue25388] tokenizer crash/misbehavior -- heap use-after-free

2015-11-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue25626] Gzip fails for file over 2**32 bytes

2015-11-14 Thread Ben Cipollini
New submission from Ben Cipollini: Gzip fails when opening a file more than 2**32 bytes. This is a new issue in Python 3.5. We hit this opening large neuroimaging files from the Human Connectome Project. See https://github.com/nipy/nibabel/issues/362 for more details. When size is > 2**32, we

[issue25626] Gzip fails for file over 2**32 bytes

2015-11-14 Thread Matthew Brett
Changes by Matthew Brett : -- nosy: +Matthew.Brett ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue25619] Exception AttributeError: "'NoneType'.... thrown on exit

2015-11-14 Thread R. David Murray
R. David Murray added the comment: Yes, well, that is part of the fragility of python2's shutdown garbage collection, and one of the reasons it got improved. Changing the name of a function can change the order things get retrieved from various internal dictionaries, because they are hash tab

[issue25626] Gzip fails for file over 2**32 bytes

2015-11-14 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) nosy: +nadeem.vawda, twouters versions: +Python 3.6 ___ Python tracker ___ ___

[issue25627] distutils : file "bdist_rpm.py" allows Shell injection in "name

2015-11-14 Thread Bernd Dietzel
New submission from Bernd Dietzel: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1514183 File : /usr/lib/python2.7/distutils/command/bdist_rpm.py Line 358 : This line in the code uses the depreached os.popen command, should be replaced with subprocess.Popen() : out = os.popen(q_cmd

[issue25627] distutils : file "bdist_rpm.py" allows Shell injection in "name"

2015-11-14 Thread Bernd Dietzel
Changes by Bernd Dietzel : -- title: distutils : file "bdist_rpm.py" allows Shell injection in "name -> distutils : file "bdist_rpm.py" allows Shell injection in "name" ___ Python tracker _

[issue25627] distutils : file "bdist_rpm.py" allows Shell injection in "name"

2015-11-14 Thread SilentGhost
SilentGhost added the comment: This also seem to affect python 3, there os.popen implemented using subprocess.Popen, but that one is called with shell=True. So basically the string that's passed to os.popen should be quoted. The attached patch seem to be sufficient when applied on the default

[issue23914] pickle fails with SystemError

2015-11-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that makes broken OBJ opcode to raise UnpicklingError instead of SystemError, improves some UnpicklingError messages, and adds tests for unpickling broken data. -- assignee: -> serhiy.storchaka keywords: +patch stage: -> patch revie

[issue25578] Memory leak in SSLSocket.getpeercert() with 0-length AIA extension

2015-11-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 79abea02a569 by Benjamin Peterson in branch '2.7': fix possible memory lea k in _get_aia_uri (closes #25578) https://hg.python.org/cpython/rev/79abea02a569 New changeset bddc5491d0fb by Benjamin Peterson in branch '3.4': fix possible memory lea k in

[issue8728] 2.7 regression in httplib.py: AttributeError: 'NoneType' object has no attribute 'makefile'

2015-11-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue15504] pickle/cPickle saves invalid/incomplete data

2015-11-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since issue13555 is fixed, I think this issue is fixed too. -- nosy: +serhiy.storchaka status: open -> pending type: crash -> behavior ___ Python tracker

[issue18287] PyType_Ready() should sanity-check the tp_name field

2015-11-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.5, Python 3.6 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2015-11-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you have a patch Victor? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue20220] test_datetime, test_tarfile, test_strptime time zone failures

2015-11-14 Thread Martin Panter
Martin Panter added the comment: The problem is probably triggered by the test in test_imaplib which sets the timezone to “STD-1DST”. It was added in revision 42b9d9d795f7, in 2012 for Python 3.3 only, which explains why we don’t have any trouble with Python 2. I am no expert on time zone sett

[issue25168] test_datetime.test_strptime() random failures on "s390x SLES" buildbots

2015-11-14 Thread Martin Panter
Martin Panter added the comment: I just discovered Issue 20220 about a similar story with a tarfile test case. It looks like this is caused by the same underlying C library quirk, so I am closing this as a duplicate. Using Antoine’s reproducer there I triggered both this datetime failure and t

[issue20220] test_datetime, test_tarfile, test_strptime time zone failures

2015-11-14 Thread Martin Panter
Martin Panter added the comment: I added test_strptime to the title due to Issue 22795, but Antoine’s trick doesn’t seem to help reproduce it. In this run all three failed: [158/390] test_imaplib [17

[issue20220] test_datetime, test_tarfile, test_strptime time zone failures

2015-11-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> martin.panter stage: -> commit review ___ Python tracker ___ ___ Python-bu