[issue34720] Fix test_importlib.test_bad_traverse for AIX

2018-09-18 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +8815 stage: -> patch review ___ Python tracker ___ ___

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The first issue, with ignoring initial=None, is complex because Argument Clinic and the inspect module don't support optional parameters without default value. It could be possible to use optional groups, but currently Argument Clinic supports optional

[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: Good question. A comment on says that glibc already uses vfork where appropriate, explicitly using the flag may not be necessary. Note that I haven't verified if the

[issue34719] Deprecate set to frozenset conversion in set.__contains__

2018-09-18 Thread Javier Dehesa
New submission from Javier Dehesa : This comes from this SO question: https://stackoverflow.com/q/52382983/1782792 Currently, this works: > print({1, 2} in {frozenset({1, 2})) # True This is strange because set is unhashable. Apparently, it is a case-specific feature implemented back

[issue34720] Fix test_importlib.test_bad_traverse for AIX

2018-09-18 Thread Michael Felt
Change by Michael Felt : -- title: Fix test_importlib for AIX -> Fix test_importlib.test_bad_traverse for AIX ___ Python tracker ___

[issue34719] Deprecate set to frozenset conversion in set.__contains__

2018-09-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33649] asyncio docs overhaul

2018-09-18 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +8813 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34597] Python needs to check existence of functions at runtime for targeting older macOS platforms

2018-09-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: @Zorg: you don't need to sell the usefulness of this functionality. Its just that the python developers are volunteers and hence have limited time to work on python. -- ___ Python tracker

[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If glibc already uses vfork() if it is safe, I suppose that using vfork() in other cases is unsafe, and we shouldn't support this nonstandard option. -- ___ Python tracker

transform a "normal" decorator in one for async functions

2018-09-18 Thread vito . detullio
Hi. Let's say I have this library that expose a decorator; it's meant to be used with normal functions. but I have to "apply" the decorator to an async function. >From what I understand I cannot "really" wait for this decorated async >function, as it's not really "async", and, from a simple

[issue34597] Python needs to check existence of functions at runtime for targeting older macOS platforms

2018-09-18 Thread Zorg
Zorg added the comment: I understand that. I was mainly responding to a question that was asked with information I felt was important to provide. -- ___ Python tracker ___

[issue31635] test_strptime failure on OpenBSD

2018-09-18 Thread Paul Ganssle
Paul Ganssle added the comment: Bug reported to BSD here: https://marc.info/?l=openbsd-bugs=153728102618747=2 -- ___ Python tracker ___

[issue25825] AIX shared library extension modules installation broken

2018-09-18 Thread Michael Felt
Michael Felt added the comment: On 10/08/2016 17:22, David Edelsohn wrote: > David Edelsohn added the comment: Hi, Just thought I would mention that I have a branch with all the test PR fixes I have made in the last two months. a) would appreciate your testig them with gcc - to be sure all is

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-18 Thread Joe Pamer
Joe Pamer added the comment: Got it - thanks! That sounds good to me, so I'll take a look at how other functions are working around MAX_PATH and update the diff to also avoid the copy when possible. -- ___ Python tracker

[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The documentation says: The child process is created using vfork(2) instead of fork(2) when either of the following is true: * the spawn-flags element of the attributes object pointed to by attrp contains the GNU-specific

[issue17239] XML vulnerabilities in Python

2018-09-18 Thread STINNER Victor
STINNER Victor added the comment: > Who normally updates the vendored libexpat? I made the 3 latest libexpat updates, and each of them was painful :-) My notes on vendored libraries: https://pythondev.readthedocs.io/cpython.html#vendored-external-libraries I wrote a tool to get the version

[issue34542] [TLS] Update test certs to future proof settings

2018-09-18 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +8820 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-18 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I think I'll pass Raymond, its been so long since I've contributed, in the mean time there is github and argument clinic and whatnot so I'm out of training. I´m lurking around these parts and maybe shall return one day :) --

[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-18 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "If this is an optimization, what is the downside of always using vfork()?" I don't know the vfork() function, but you can find articles like: "vfork considered dangerous" (old article of 2012) https://ewontfix.com/7/ But it's unclear to

[issue34722] Non-deterministic bytecode generation

2018-09-18 Thread Peter Ebden
New submission from Peter Ebden : We've found that the following code produces non-deterministic bytecode, even post PEP-552: def test(x): if x in {'ONE', 'TWO', 'THREE'}: pass It's not too hard to test it: $ python3.7 -m compileall --invalidation-mode=unchecked-hash test.py

[issue34723] lower() on Turkish letter "İ" returns a 2-chars-long string

2018-09-18 Thread Dogan
New submission from Dogan : Hey there, I believe I've come across a bug. It occurs when you try to lower() the Turkish uppercase letter "İ". Gonna explain it with example code since it's easier: >>> len("Ş") 1 >>> len("Ş".lower()) 1 >>> len("Ğ") 1 >>> len("Ğ".lower()) 1 >>> len("Ö") 1 >>>

[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: vfork() is more dangerous than fork() because the parent and child processes share memory (not copy-on-write, but really the same memory). Whether or not this affects posix_spawn depends on its implementation (to give a very vague statement). Glibc

[issue17239] XML vulnerabilities in Python

2018-09-18 Thread Christian Heimes
Christian Heimes added the comment: > * only Windows and macOS will get the fix Modules/expat can be used on all platforms. A downstream patch is only a problem for platforms that compile Python with "./configure --with-system-expat". The security fixes for entity expansion blowup and

[issue34723] lower() on Turkish letter "İ" returns a 2-chars-long string

2018-09-18 Thread STINNER Victor
STINNER Victor added the comment: > Should it not simply return “i”? Python implements the Unicode standard. >>> "U+%04x" % ord("İ") 'U+0130' >>> ["U+%04x" % ord(ch) for ch in "İ".lower()] ['U+0069', 'U+0307'] >>> unicodedata.name("İ") 'LATIN CAPITAL LETTER I WITH DOT ABOVE' >>>

[issue34702] urlopen doesn't handle query strings with "file" scheme

2018-09-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-09-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +8817 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-09-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +8816 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-09-18 Thread Christian Heimes
Christian Heimes added the comment: Since it's a security fix, the change should land in 3.4 and 3.5, too. -- versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker

[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-09-18 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +8818 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21109] tarfile: Traversal attack vulnerability

2018-09-18 Thread Tal Einat
Tal Einat added the comment: I am not a lawyer, but to the best of my understanding, using such tarballs would be fine. Since Jakub's repo only provides code to generate archive files but doesn't include actual archive files, and the generation code is licensed via the MIT license, we are

[issue34721] json module loads function

2018-09-18 Thread zack
New submission from zack : the json.loads function think a string variable is a json type, but the variable is "123" -- components: Library (Lib) files: json_test.py messages: 325639 nosy: jaihong priority: normal severity: normal status: open title: json module loads function type:

[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-09-18 Thread miss-islington
miss-islington added the comment: New changeset cb5778f00ce48631c7140f33ba242496aaf7102b by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146) https://github.com/python/cpython/commit/cb5778f00ce48631c7140f33ba242496aaf7102b

[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-09-18 Thread miss-islington
miss-islington added the comment: New changeset 470a435f3b42c9be5fdb7f7b04f3df5663ba7305 by Miss Islington (bot) in branch '3.7': bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146) https://github.com/python/cpython/commit/470a435f3b42c9be5fdb7f7b04f3df5663ba7305 --

[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-09-18 Thread miss-islington
miss-islington added the comment: New changeset 18b20bad75b4ff0486940fba4ec680e96e70f3a2 by Miss Islington (bot) (Christian Heimes) in branch '2.7': [2.7] bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146) (GH-9394)

[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-09-18 Thread miss-islington
miss-islington added the comment: New changeset f7666e828cc3d5873136473ea36ba2013d624fa1 by Miss Islington (bot) in branch '3.6': bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146) https://github.com/python/cpython/commit/f7666e828cc3d5873136473ea36ba2013d624fa1 --

[issue31635] test_strptime failure on OpenBSD

2018-09-18 Thread Paul Ganssle
Paul Ganssle added the comment: I do think this is an active bug in OpenBSD's ISO calculations, here: https://github.com/openbsd/src/blob/b66614995ab119f75167daaa7755b34001836821/lib/libc/time/wcsftime.c#L326 I re-created this algorithm in Python and at the beginning of the year it gives

[issue34721] json module loads function

2018-09-18 Thread Ammar Askar
Ammar Askar added the comment: This is intentional, the parsed in JSON doesn't necessarily have to have an object at the root. This is also what allows you to do: >>> json.loads("[]") [] This behavior is also consistent with browsers, try this in your browser's dev console: >

[issue34542] [TLS] Update test certs to future proof settings

2018-09-18 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +8819 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Permutations using a recursive generator

2018-09-18 Thread ast
Hello I found a smart and very concise code to generate all permutations of a list. I put it here if someone is interested to figure out how it works def permut(li, prefix=[]): if len(li)==1: yield prefix + li else: for elt in li: li2 = li.copy()

[issue25825] AIX shared library extension modules installation broken

2018-09-18 Thread Michael Felt
Michael Felt added the comment: On 18/09/2018 16:46, Michael Felt wrote: > Michael Felt added the comment: Ignore this. If only I could remove stuff! Good day all. -- ___ Python tracker

Re: Permutations using a recursive generator

2018-09-18 Thread ast
Le 18/09/2018 à 17:01, ast a écrit : error: permut instead of S     yield from permut(li2, prefix+[elt]) -- https://mail.python.org/mailman/listinfo/python-list

<    1   2