[issue34760] Regression in abc in combination with passing a function to issubclass

2018-09-21 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: OK, lets close this for now. We will see if there are any other situations. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > > one of the things we want to fix is to eliminate non-PyObject > pointer types from public APIs entirely. > A notable exception is Py_buffer. [1] Right, because Py_buffer isn't a PyObject at all :) > Using PyObject for contextvars makes sense (for the

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Eric Snow
Eric Snow added the comment: > one of the things we want to fix is to eliminate non-PyObject > pointer types from public APIs entirely. A notable exception is Py_buffer. [1] As well, cross-interpreter data must not be PyObject, though that isn't much of an issue (yet). :) At some point it

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: >> We'll need to make a prominent notice in the release notes though. > Something can be added at: https://docs.python.org/dev/whatsnew/3.7.html#notable-changes-in-python-3-7-1 Yeah, thank you for suggestion, I'll do that. I'll also update the PEP, docs in

[issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does

2018-09-21 Thread Antony Lee
Antony Lee added the comment: > encourage the common assumption that locals() returns a dict where mutating > it actually works, since it usually doesn't. It does at global and class scope, not at function scope. FWIW, PEP558 (admittedly not accepted yet) proposes to modify the

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: > We'll need to make a prominent notice in the release notes though. Something can be added at: https://docs.python.org/dev/whatsnew/3.7.html#notable-changes-in-python-3-7-1 -- ___ Python tracker

[issue33649] asyncio docs overhaul

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

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur that the sooner the change is applied, the better it will be for everyone. We'll need to make a prominent notice in the release notes though. -- nosy: +rhettinger ___ Python tracker

[issue34765] Update install-sh

2018-09-21 Thread Zachary Ware
Zachary Ware added the comment: If there's no actual bug, it certainly does not need to be done on maintenance branches. -- nosy: +zach.ware versions: -Python 2.7, Python 3.6, Python 3.7 ___ Python tracker

[issue34763] Python lacks 0x4E17

2018-09-21 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +8887 stage: -> patch review ___ Python tracker ___ ___

[issue34767] Optimize asyncio.Lock

2018-09-21 Thread Yury Selivanov
New submission from Yury Selivanov : There's no point in always creating a deque() for waiters in Lock.__init__. Not all locks end up using waiters. -- components: asyncio messages: 325997 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Optimize

[issue34766] BaseProxy cache should be cleaned when Manager client is reconnected

2018-09-21 Thread Yongnan Wu
Change by Yongnan Wu : -- components: Library (Lib) nosy: wynfred priority: normal severity: normal status: open title: BaseProxy cache should be cleaned when Manager client is reconnected type: behavior versions: Python 2.7, Python 3.6, Python 3.7

[issue34765] Update install-sh

2018-09-21 Thread Charalampos Stratakis
New submission from Charalampos Stratakis : The install-sh file that python uses for autotools is horribly outdated. Last update was 16 years ago and it's being copied from automake's source code. Updating it to modern standards could potentially fix issues for systems that use autotools,

[issue34764] Improve documentation example for using iter() with sentinel value

2018-09-21 Thread ChrisRands
New submission from ChrisRands : This arose from this SO question: https://stackoverflow.com/questions/52446415/line-in-iterfp-readline-rather-than-line-in-fp The example given in the docs: with open('mydata.txt') as fp: for line in iter(fp.readline, ''): process_line(line) Is

[issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does

2018-09-21 Thread Josh Rosenberg
Josh Rosenberg added the comment: The documentation for locals ( https://docs.python.org/3/library/functions.html#locals ) specifically states: Note: The contents of this dictionary should not be modified; changes may not affect the values of local and free variables used by the

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: Let’s change it ASAP. It’s still up to Ned whether to hold up 3.7.1, if he won’t it should go into 3.7.2. On Fri, Sep 21, 2018 at 8:28 AM STINNER Victor wrote: > > STINNER Victor added the comment: > > IMHO it's not too late to change the public C API in

[issue34763] Python lacks 0x4E17

2018-09-21 Thread 草木建
New submission from 草木建 : This is very easy issue. 丗 meanning is 30.(丗 is 0x4E17) "丗".isnumeric() must returns true. but "丗".isnumeric() returns False. -- components: Unicode messages: 325992 nosy: ezio.melotti, vstinner, 草木建 priority: normal severity: normal status: open title:

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: IMHO it's not too late to change the public C API in Python 3.7.1, since it's a very new API, I don't expect many users, and I only expect compiler warnings nor hard error if existing code pass PyContextVar* instead of PyObject*. I agree that it's way

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: Just to add to this issue: I originally realized that something is wrong with the design when we had a super hard to track memory leak in uvloop, caused by Cython being unable to automatically manage increfs/decrefs for PyContext* pointers. So I do believe

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +8886 stage: -> patch review ___ Python tracker ___ ___

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
New submission from Yury Selivanov : Unfortunately, the current C API for PEP 567 has a flaw: it uses non-PyObject pointers. This causes problems with integrating with tools like Cython, where PyObject is special and a lot of machinery recognizes it and manages refcounts correctly. It

[issue34561] Replace list sorting merge_collapse()?

2018-09-21 Thread Vincent Jugé
Vincent Jugé added the comment: Dear all, After me and my colleagues worked on the first paper you mention, I recently created another merge-based sorting algorithm, which I called "Adaptive Shivers Sort". This is a close variant of the Augmented Shivers Sort presented by Buss & Knop in

[issue34722] Non-deterministic bytecode generation

2018-09-21 Thread Peter Ebden
Change by Peter Ebden : -- keywords: +patch pull_requests: +8885 stage: -> patch review ___ Python tracker ___ ___

[issue34589] Py_Initialize() and Py_Main() should not enable C locale coercion

2018-09-21 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34751] Hash collisions for tuples

2018-09-21 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- nosy: +sir-sigurd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34751] Hash collisions for tuples

2018-09-21 Thread Ned Deily
Change by Ned Deily : -- nosy: -ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34751] Hash collisions for tuples

2018-09-21 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +8884 stage: resolved -> patch review ___ Python tracker ___ ___

[issue25312] Cryptic error message if incorrect spec is set on a callable mock

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

[issue24828] Segfault when using store-context AST node in a load context

2018-09-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the script. The crash is still reproducible as of now with at least python 2.7.14 . I need to check on the latest 2.7 branch yet. On python 3 it produces an error as below : Traceback (most recent call last): File

[issue25240] Stack overflow in reprlib causes a core dump

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

[issue24997] mock.call_args compares as equal and not equal

2018-09-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems this is not reproducible at least on Python 3.6.4 and Master branch. # bpo24997.py from unittest.mock import * m = Mock() m(1,2) m.call_args print("1 ", m.call_args == call(1,2)) print("2 ", m.call_args != call(1,2)) # Master ./python.exe

[issue26214] textwrap should minimize number of breaks in extra long words

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

[issue26495] super() does not work in nested functions, genexps, listcomps, and gives misleading exceptions

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

[issue26452] Wrong line number attributed to comprehension expressions

2018-09-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think there have been some improvements merged with https://bugs.python.org/issue12458 . I am not sure if the patch covers more cases. I ran the tests attached in the patch and some of them cause RuntimeError in master. # bpo26452.py def f():

[issue26767] Inconsistant error messages for failed attribute modification

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

[issue27121] imghdr does not support jpg files with Lavc bytes

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

[issue27903] Avoid ResourceWarnings from platform._dist_try_harder

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

[issue34589] Py_Initialize() and Py_Main() should not enable C locale coercion

2018-09-21 Thread Nick Coghlan
Nick Coghlan added the comment: Correct - it won't change anything from 3.7.0, and even the original discrepancies relative to PEP 538 only affect applications that: 1. Are embedding a CPython runtime 2. *Aren't* already ensuring that they're running in a locale other than the C locale 3.

[issue34760] Regression in abc in combination with passing a function to issubclass

2018-09-21 Thread Christoph Glaubitz
Christoph Glaubitz added the comment: I just realized this while trying to use the openstack command line tools on python3.7. After reading issue33018 and the fact that even in python2 class B: pass def f(): pass issubclass(f, B) Traceback (most recent call last): File "", line

[issue34751] Hash collisions for tuples

2018-09-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > So, jdemeyer, if it's possible to show (or describe) to us an example of a > problem you had, such that we could repeat it, that would be helpful (and > necessary) to evaluate any proposed changes. What were the inputs to hash() > that caused a problem,

[issue34751] Hash collisions for tuples

2018-09-21 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond and Tim here: while it's inevitably true that there are many possible hash collisions, we'd need to see where the current algorithm caused real problems in real code. Pointing out a few examples where there was a collision isn't very

[issue34760] Regression in abc in combination with passing a function to issubclass

2018-09-21 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +izbyshev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34751] Hash collisions for tuples

2018-09-21 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29013] zipfile: inconsistent doc for ZIP64 file size

2018-09-21 Thread Monte Davidoff
Monte Davidoff added the comment: I agree it may be better if we don't describe all the details of ZIP64. How about this rewording for the second change, so we don't have to give all the details? (2) In the description of the zipfile.ZipFile class, change: "If allowZip64 is True (the

[issue34760] Regression in abc in combination with passing a function to issubclass

2018-09-21 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This was a conscious decision (i.e we decided that the old inconsistency is a bug). See https://bugs.python.org/issue33018 for previous discussion. What is your use case? If it is critical, we can reconsider this. --

[issue34755] Few minor optimizations in _asynciomodule.c

2018-09-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34735] Modules/timemodule.c: Memory leak in time_strftime()

2018-09-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34761] str(super()) != super().__str__()

2018-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is an expected behavior. >From https://docs.python.org/3/library/functions.html#super: Return a proxy object that delegates method calls to a parent or sibling class of type. super() delegates explicit method calls. You shouldn't expect that it

[issue34760] Regression in abc in combination with passing a function to issubclass

2018-09-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34760] Regression in abc in combination with passing a function to issubclass

2018-09-21 Thread Christoph Glaubitz
Christoph Glaubitz added the comment: Maybe this is just how it should have been working the entire time, and osc is just holding it wrong. Since: class B: pass issubclass(f, B) Traceback (most recent call last): File "", line 1, in TypeError: issubclass() arg 1 must be a class

[issue34761] str(super()) != super().__str__()

2018-09-21 Thread Guillaume Dominici
New submission from Guillaume Dominici : The super proxy does not seem to forward call to .__str__() when the call occurs via str() function. It may be an expected behavior, but it looks unexpected to me. Minimal reproduction (tested on Python 3.6, but I believe may newer versions have

[issue34760] Regression in abc in combination with issubclass

2018-09-21 Thread Christoph Glaubitz
New submission from Christoph Glaubitz : I'm not sure if this is a bug, or a known breaking change. I didn't find anything related in the changelog, except for a rewrite of abc. But hovever, I want this to be documented. In 3.7.0: import abc def f(): pass class

[issue29013] zipfile: inconsistent doc for ZIP64 file size

2018-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This would look good too. To be accurate, zipfile will create ZIP files that use the ZIP64 extensions when: * It contains more than 65535 files. * It is larger than 2 GiB. More accurate, when either the offset or the size of the central directory is

[issue34751] Hash collisions for tuples

2018-09-21 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34670] Add set_post_handshake_auth for TLS 1.3

2018-09-21 Thread Christian Heimes
Christian Heimes added the comment: Please note that SSL_verify_client_post_handshake() doesn't perform any IO by itself. A typical scenario for HTTP looks like this (actual flow may vary): * client * send ``HTTP GET /path`` * server * recv * verify_client_post_handshake * send HTTP

[issue34735] Modules/timemodule.c: Memory leak in time_strftime()

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset 975f3cb1f25406a9be019906227d53b23852f415 by Miss Islington (bot) in branch '3.7': bpo-34735: Fix a memory leak in Modules/timemodule.c (GH-9418) https://github.com/python/cpython/commit/975f3cb1f25406a9be019906227d53b23852f415 --

[issue34735] Modules/timemodule.c: Memory leak in time_strftime()

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset f37496e893d743dbd01c802c8e8cdc16498a1604 by Miss Islington (bot) in branch '3.6': bpo-34735: Fix a memory leak in Modules/timemodule.c (GH-9418) https://github.com/python/cpython/commit/f37496e893d743dbd01c802c8e8cdc16498a1604 --

[issue34756] Few changes in sys.breakpointhook()

2018-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I will drop cleanup changes if they don't look good to you. -- ___ Python tracker ___ ___

[issue34756] Few changes in sys.breakpointhook()

2018-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a pure clean up except the last item which fixes a minor problem. I had wrote this patch a while ago (perhaps before 3.7.0 was released), and now revive my old patches. I think that the general rule is that exceptions shouldn't be ignored blindly,

[issue34759] Possible regression in ssl module in 3.7.1 and master

2018-09-21 Thread Christian Heimes
Christian Heimes added the comment: Good catch, Nathaniel. I was about to ask for a reproducer test, but then I saw that you have added one already. Fantastic! -- ___ Python tracker

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

2018-09-21 Thread Christian Heimes
Christian Heimes added the comment: I have contected Red Hat product security to request a CVE for the issue. -- ___ Python tracker ___

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

2018-09-21 Thread Christian Heimes
Christian Heimes added the comment: The bug affects multiple platforms. libexpat's expat.h uses slightly different autoconf macro names than pyconfig.h. Therefore only platforms that have either HAVE_GETRANDOM or _WIN32 defined, use a proper CSPRNG to seed the hash salt. Since

[issue34737] Python upgrade with SYSTEM account uninstalls python

2018-09-21 Thread Jatin Goel
Jatin Goel added the comment: Thanks for the info Steve. Yeah I noticed it earlier, but couldn't make sense why it would try per-user uninstall at all. (Thought some upgrade issue, and it was a rollback action) Though we've been doing the installation for all users from the beginning with

[issue34751] Hash collisions for tuples

2018-09-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: For the record: my collision is not contrived. It came up in actual code where I was hashing some custom class using tuples and found an unexpected high number of collisions, which I eventually traced back to the collision I reported here. By the way, I

[issue29013] zipfile: inconsistent doc for ZIP64 file size

2018-09-21 Thread Monte Davidoff
Monte Davidoff added the comment: Serhiy, merely reverting the change would not fix the originally reported problem in the documentation. Based on your additional information, and to prevent the need to describe the ZIP64 extensions in more than one place, I suggest two changes: (1) Change

[issue34751] Hash collisions for tuples

2018-09-21 Thread Tim Peters
Tim Peters added the comment: You said it yourself: "It's not hard to come up with ...". That's not what "real life" means. Here: >>> len(set(hash(1 << i) for i in range(100_000))) 61 Wow! Only 61 hash codes across 100 thousand distinct integers?! Yup - and I don't care. I contrived

[issue34759] Possible regression in ssl module in 3.7.1 and master

2018-09-21 Thread Nathaniel Smith
Nathaniel Smith added the comment: PR posted. Also seems to affect 3.6, so adding that to the tags. -- keywords: +3.6regression versions: +Python 3.6 ___ Python tracker ___

[issue34755] Few minor optimizations in _asynciomodule.c

2018-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fb3e9c00ed79f4d880ab9a67aab861eb3660ec75 by Serhiy Storchaka in branch 'master': bpo-34755: Add few minor optimizations in _asynciomodule.c. (GH-9455) https://github.com/python/cpython/commit/fb3e9c00ed79f4d880ab9a67aab861eb3660ec75

[issue34751] Hash collisions for tuples

2018-09-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: To come back to the topic of hashing, with "Bernstein hash" for tuples I did indeed mean the simple (in Python pseudocode): # t is a tuple h = INITIAL_VALUE for x in t: z = hash(x) h = (h * MULTIPLIER) + z return h I actually started working on the

[issue34735] Modules/timemodule.c: Memory leak in time_strftime()

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

[issue34735] Modules/timemodule.c: Memory leak in time_strftime()

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

[issue34735] Modules/timemodule.c: Memory leak in time_strftime()

2018-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 91e6c8717b7dcbcc46b189509de5f2d335819f37 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-34735: Fix a memory leak in Modules/timemodule.c (GH-9418) https://github.com/python/cpython/commit/91e6c8717b7dcbcc46b189509de5f2d335819f37

[issue34751] Hash collisions for tuples

2018-09-21 Thread Tim Peters
Tim Peters added the comment: @jdemeyer, you didn't submit a patch, or give any hint that you _might_. It _looked_ like you wanted other people to do all the work, based on a contrived example and a vague suggestion. And we already knew from history that "a simple Bernstein hash suffices"

<    1   2