[issue21258] Add __iter__ support for mock_open

2018-09-12 Thread Anthony Flury
Anthony Flury added the comment: The lack of dunder_iter support on mock_open has been resolved in Issue 32933 (Git Hub 5974). Can I suggest that once the above PR is merged into 3.8 (due imminently allegedly ), that we should then backport that fix into 3.5, 3.6 & 3.7 as a minimum ? I am

[issue32933] mock_open does not support iteration around text files.

2018-09-12 Thread Berker Peksag
Berker Peksag added the comment: New changeset 2087023fdec2c89070bd14f384a3c308c548a94a by Berker Peksag (Tony Flury) in branch 'master': bpo-32933: Implement __iter__ method on mock_open() (GH-5974) https://github.com/python/cpython/commit/2087023fdec2c89070bd14f384a3c308c548a94a -

[issue32933] mock_open does not support iteration around text files.

2018-09-12 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Anthony.I consider this a new feature, so I removed 3.6 and 3.7 from the versions field. We can backport to 3.7 if other core developers think that it's worth to fix in the latest maintenance branch. -- resolution: -> fixed stag

[issue21258] Add __iter__ support for mock_open

2018-09-12 Thread Berker Peksag
Berker Peksag added the comment: Closing this as a duplicate of issue 32933. Let's discuss backporting to maintenance branches there. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> mock_open does not support iteration around text fi

[issue34004] Acquiring locks not interrupted by signals on musl libc

2018-09-12 Thread Joseph Sible
Joseph Sible added the comment: How is this considered "fixed"? Why couldn't this be actually fixed by using eventfd instead of semaphores when they're available, for example? -- ___ Python tracker

[issue32933] mock_open does not support iteration around text files.

2018-09-12 Thread Anthony Flury
Anthony Flury added the comment: Berker, Thanks for your work on getting this complete. I would strongly support backporting if possible. 3.5 and 3.6 will be in common use for a while (afaik 3.6 has only now got delivered to Ubuntu as the default Python 3), and this does fix does allow full

[issue34004] Acquiring locks not interrupted by signals on musl libc

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: Reimplementing locks with eventfd can be another issue. Such a change can only land in a new Python version, though. We'll just have to consider musl unsupported for interrupting locks in our current maintenance releases as I have done. How likely is it

[issue34654] test_time needs to handle '+' at the beginning of large years

2018-09-12 Thread Benjamin Peterson
New submission from Benjamin Peterson : POSIX allows the '%Y' format in strftime to start with a '+' sign for years with more than 4 digits. test_time is not tolerant of that, which leads to failures like this with musl: == F

[issue34654] test_time needs to handle '+' at the beginning of large years

2018-09-12 Thread Benjamin Peterson
Change by Benjamin Peterson : -- keywords: +patch pull_requests: +8669 stage: -> patch review ___ Python tracker ___ ___ Python-bug

[issue34652] never enable lchmod on Linux

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 40caa05fa4d1810a1a6bfc34e0ec930c351089b7 by Benjamin Peterson in branch 'master': closes bpo-34652: Always disable lchmod on Linux. (GH-9234) https://github.com/python/cpython/commit/40caa05fa4d1810a1a6bfc34e0ec930c351089b7 -- resol

[issue34652] never enable lchmod on Linux

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8670 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34652] never enable lchmod on Linux

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8671 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34652] never enable lchmod on Linux

2018-09-12 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +8672 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue34652] never enable lchmod on Linux

2018-09-12 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +8673 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue34652] never enable lchmod on Linux

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8674 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34652] never enable lchmod on Linux

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8675 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34650] test_posix fails with musl

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 0aef909d630ff40614cde0c58796a8bdf66c67eb by Benjamin Peterson in branch '3.7': [3.7] closes bpo-34650: Check if sched_getscheduler returns ENOSYS before declaring it supported. (GH-9236) https://github.com/python/cpython/commit/0aef909d630ff

[issue34650] test_posix fails with musl

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset e105e551dbf072d773aaa1fd6f8cbda218c273f0 by Benjamin Peterson in branch '3.6': [3.6] closes bpo-34650: Check if sched_getscheduler returns ENOSYS before declaring it supported. (GH-9237) https://github.com/python/cpython/commit/e105e551dbf07

[issue34603] ctypes on Windows: error calling C function that returns a struct containing 3 bools

2018-09-12 Thread Vladimir Matveev
Vladimir Matveev added the comment: I think the problem is that FFI layer assumes that MSVC compiler will try to pass any structure less than 8 bytes in registers whereis it is not always true: To be returned by value in RAX, user-defined types must have a length of 1, 2, 4, 8, 16, 32, or 6

[issue34004] Acquiring locks not interrupted by signals on musl libc

2018-09-12 Thread Joseph Sible
Joseph Sible added the comment: Re musl changing their behavior, see https://www.openwall.com/lists/musl/2018/09/07/1 and the resulting thread. In addition to the old kernel version issue, two other issues were raised: 1. EINTR makes programming mistakes more likely, as people won't think to

[issue34654] test_time needs to handle '+' at the beginning of large years

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset e1a34ceb541ef87e03bb428630097dacc9c658e5 by Benjamin Peterson in branch 'master': closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238) https://github.com/python/cpython/commit/e1a34ceb541ef87e03bb428630097dacc9c658e5

[issue34654] test_time needs to handle '+' at the beginning of large years

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8676 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34654] test_time needs to handle '+' at the beginning of large years

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8677 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34652] never enable lchmod on Linux

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 69e96910153219b0b15a18323b917bd74336d229 by Benjamin Peterson in branch '2.7': [2.7] closes bpo-34652: Always disable lchmod on Linux. (GH-9242) https://github.com/python/cpython/commit/69e96910153219b0b15a18323b917bd74336d229 -- _

[issue34004] Acquiring locks not interrupted by signals on musl libc

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Wed, Sep 12, 2018, at 16:03, Joseph Sible wrote: > 2. Most of the time, counting on receiving an EINTR results in race > conditions. Our code seems to be affected by this too. Even on glibc, a > signal at just the "right" time could result in it not bei

[issue34652] never enable lchmod on Linux

2018-09-12 Thread miss-islington
miss-islington added the comment: New changeset 98344a4f2f09ddae295352ec54fae6388446eeaf by Miss Islington (bot) in branch '3.7': closes bpo-34652: Always disable lchmod on Linux. (GH-9234) https://github.com/python/cpython/commit/98344a4f2f09ddae295352ec54fae6388446eeaf -- nosy: +m

[issue34652] never enable lchmod on Linux

2018-09-12 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +8678 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue34652] never enable lchmod on Linux

2018-09-12 Thread miss-islington
miss-islington added the comment: New changeset bdace2ea53c578184235729a4cf383891084cc70 by Miss Islington (bot) in branch '3.6': closes bpo-34652: Always disable lchmod on Linux. (GH-9234) https://github.com/python/cpython/commit/bdace2ea53c578184235729a4cf383891084cc70 -- ___

[issue34655] Support sendfile in asyncio streams API

2018-09-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- components: asyncio nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Support sendfile in asyncio streams API versions: Python 3.8 ___ Python tracker _

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: I can make the test reliable... but I wouldn't say I fully understand the ultimate cause of the problem. The reliability fix for test_pkg is to stop using test.support.modules_setup() and test.support.modules_cleanup() in the setUp() and tearDown() methods

[issue34654] test_time needs to handle '+' at the beginning of large years

2018-09-12 Thread miss-islington
miss-islington added the comment: New changeset ea2fcd3db65b796ad3eda1619a903cefb1aa9363 by Miss Islington (bot) in branch '3.7': closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238) https://github.com/python/cpython/commit/ea2fcd3db65b796ad3eda1619a903cefb1aa9363 ---

[issue34648] Confirm the types of parameters of traceback.format_list and traceback.StackSummary.from_list post-3.5

2018-09-12 Thread Sebastian Rittau
Change by Sebastian Rittau : -- nosy: +srittau ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +8679 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue33649] asyncio docs overhaul

2018-09-12 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 5b7cbd602e57265604d6c099fd174b1c7917f861 by Yury Selivanov (Carol Willing) in branch 'master': bpo-33649: Edit asyncio eventloop doc - second pass (GH-9233) https://github.com/python/cpython/commit/5b7cbd602e57265604d6c099fd174b1c7917f861

[issue34654] test_time needs to handle '+' at the beginning of large years

2018-09-12 Thread miss-islington
miss-islington added the comment: New changeset 21a808230aa33741f1dd9bf38f0e283c1b72210e by Miss Islington (bot) in branch '3.6': closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238) https://github.com/python/cpython/commit/21a808230aa33741f1dd9bf38f0e283c1b72210e ---

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread Jeremy Kloth
Jeremy Kloth added the comment: Did you attempt to use the 3-line change I posted earlier? I stepped through to test line-by-line to find the offending piece of code. And it was indeed the open() call causing the test-tree to be processed prior to it being completed. Thus making the .py f

[issue34641] Curiosity: f((a)=1) is not a syntax error -- why?

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset c9a71dd223c4ad200a97aa320aef6bd3d45f8897 by Benjamin Peterson in branch 'master': closes bpo-34641: Further restrict the LHS of keyword argument function call syntax. (GH-9212) https://github.com/python/cpython/commit/c9a71dd223c4ad200a97aa3

[issue34652] never enable lchmod on Linux

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8680 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34652] never enable lchmod on Linux

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset ed709d5699716bf7237856dc20aba321e2dfff6d by Benjamin Peterson in branch 'master': bpo-34652: Remove lchmod from the big func checking block. (GH-9247) https://github.com/python/cpython/commit/ed709d5699716bf7237856dc20aba321e2dfff6d ---

[issue34643] How to build Release Version of Python in Windows?

2018-09-12 Thread Steve Dower
Steve Dower added the comment: Have a look in the Tools/msi directory. The "build.bat" and "buildrelease.bat" files will generate the installers and other packages (note that you may need .NET 3.5 enabled on your machine). You may also be able to use the make_zip.py script to help create a "

[issue34652] never enable lchmod on Linux

2018-09-12 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +8681 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: this is also present in 3.5, but it'll be up to the 3.5 release manager to cherry pick the test_pkg.py reliability fix into the 3.5 branch if it impacts them during the release process. -- versions: +Python 3.5

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +8682 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34652] never enable lchmod on Linux

2018-09-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 2184fe5ba48a58cb51be144230622b84b372644c by Benjamin Peterson in branch '3.6': [3.6] bpo-34652: Remove lchmod from the big func checking block. (GH-9250) https://github.com/python/cpython/commit/2184fe5ba48a58cb51be144230622b84b372644c

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8684 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +8683 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread miss-islington
miss-islington added the comment: New changeset 4ae8ece5cd4c5853b625381db13429f25512108d by Miss Islington (bot) (Gregory P. Smith) in branch 'master': bpo-34200: Fix non-determinism of test_pkg (GH-9248) https://github.com/python/cpython/commit/4ae8ece5cd4c5853b625381db13429f25512108d

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread miss-islington
miss-islington added the comment: New changeset 90f7d455b7f4bd53d3af11cb951347c9c8230399 by Miss Islington (bot) in branch '3.7': bpo-34200: Fix non-determinism of test_pkg (GH-9248) https://github.com/python/cpython/commit/90f7d455b7f4bd53d3af11cb951347c9c8230399 -- __

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread miss-islington
miss-islington added the comment: New changeset 3e3d4a4b55cbef481486aaa68ee255f4928b9c3f by Miss Islington (bot) in branch '3.6': bpo-34200: Fix non-determinism of test_pkg (GH-9248) https://github.com/python/cpython/commit/3e3d4a4b55cbef481486aaa68ee255f4928b9c3f -- __

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: I still feel like there is an underlying issue within the import system that use of test.support.modules_cleanup somehow triggers that I never managed to really understand. but the particular issue in this bug that people were seeing frequently is fixed.

[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2018-09-12 Thread hongweipeng
Change by hongweipeng : -- pull_requests: +8685 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue34643] How to build Release Version of Python in Windows?

2018-09-12 Thread Valentin Zhao
Valentin Zhao added the comment: Sorry for not illustrating this clearly. What I need to build is a copyable, relocatable bunch of files which contains a directory like \bin then has an executable in it, so I can run Python directly. Notwithstanding I do not need a installer because I am not

[issue21109] tarfile: Traversal attack vulnerability

2018-09-12 Thread shashank
shashank added the comment: 1. I have done some changes to Lar's patch to address class of bugs which Jakub found. Attached patch safetarfile-2.diff Patch is for code only and is work in progress. 2. However, there maybe several edge cases which have not been covered. Going by types of bugs

[issue34656] memory exhaustion in Modules/_pickle.c:1393

2018-09-12 Thread shuoz
New submission from shuoz : python version: Python 3.8.0a0 (heads/master:4ae8ece, Sep 13 2018, 09:48:16) [GCC 5.4.0 20160609] on linux I found a bug in python pickle.load func. Can cause memory exhaustion DDOS. ./python pk.py poc cat ./pk.py import pickle import sys filename = sys.ar

[issue34656] memory exhaustion in Modules/_pickle.c:1393

2018-09-12 Thread shuoz
Change by shuoz : Added file: https://bugs.python.org/file47802/pk.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34656] memory exhaustion in Modules/_pickle.c:1393

2018-09-12 Thread shuoz
shuoz added the comment: [--registers---] RAX: 0x7ff9d401e010 --> 0x0 RBX: 0x77f48d00 --> 0x1 RCX: 0x7ff8ab58c800 --> 0x77ea5d80 --> 0x2 RDX: 0x73ac47d8 --> 0x1 RSI: 0x25152303 RDI: 0xfff3a803c00 --> 0x0 RBP: 0x74

[issue34643] How to build Release Version of Python in Windows?

2018-09-12 Thread Valentin Zhao
Valentin Zhao added the comment: Or say what the difference of the python executable generated from msi installer and built from source? -- ___ Python tracker ___ ___

[issue34652] never enable lchmod on Linux

2018-09-12 Thread miss-islington
miss-islington added the comment: New changeset 35c94c765bf46e93a0d84e39dbc6eaaba40b1f36 by Miss Islington (bot) in branch '3.7': bpo-34652: Remove lchmod from the big func checking block. (GH-9247) https://github.com/python/cpython/commit/35c94c765bf46e93a0d84e39dbc6eaaba40b1f36 --

[issue34656] memory exhaustion in Modules/_pickle.c:1393

2018-09-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +alexandre.vassalotti, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue27820] Possible bug in smtplib when initial_response_ok=False

2018-09-12 Thread iMath
iMath added the comment: I encountered the same issue , Dario D'Amico's changing works ! please fix the problem ! -- nosy: +redstone-cold ___ Python tracker ___

[issue34657] pyconfig.h macro "timezone" name clashes with user source are likely

2018-09-12 Thread Mark Mikofski
New submission from Mark Mikofski : TL;DR: if PC user compiles source which defines "timezone" in a header, and includes Python.h after the header, then the macro also called "timezone" in pyconfig.h will redefine the users source, yielding unexpected results. see Cython google group for an a

[issue34200] importlib: python -m test test_pkg fails semi-randomly

2018-09-12 Thread STINNER Victor
STINNER Victor added the comment: Thank you for the fix Gregory! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue31141] Start should be a keyword argument of the built-in sum

2018-09-12 Thread STINNER Victor
Change by STINNER Victor : -- resolution: out of date -> duplicate ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue21109] tarfile: Traversal attack vulnerability

2018-09-12 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue34647] print sys.thread_info in regrtest header

2018-09-12 Thread STINNER Victor
STINNER Victor added the comment: > Actually, this is already in "make pythoninfo", which is enough, I think. Yeah, whenever possible, I try to avoid to "pollute" the regrtest header. In the past, we added more and more info, and at the end, the header became "giant" for no good reason. That

<    1   2