[issue31969] re.groups() is not checking the arguments

2017-11-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue31984] startswith and endswith leak implementation details

2017-11-08 Thread Ronan Lamy
Ronan Lamy added the comment: The problem is the complexity of the actual behaviour of these methods. It is impossible to get it right without looking at the source (at least, it was for me), and I doubt any ordinary user can correctly make use of the v='' behaviour, or predict what the retu

[issue31984] startswith and endswith leak implementation details

2017-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue24284. `s1.startswith(s2, start, end)` for non-negative indices and non-tuple s2 is equivalent to expressions start + len(s2) <= end and s2[start: start + len(s2)] == s2 or s1.find(s2, start, end) == start -- nosy: +serhiy.storchak

[issue31983] Officially add Py_SETREF and Py_XSETREF

2017-11-08 Thread Stefan Krah
Stefan Krah added the comment: Just adding +1. -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31984] startswith and endswith leak implementation details

2017-11-08 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue31983] Officially add Py_SETREF and Py_XSETREF

2017-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does anyone want to propose a patch? This is mainly a documentation issue. Needed documenting Py_SETREF and Py_XSETREF in Doc/c-api/refcounting.rst, adding entries in Doc/whatsnew/3.7.rst, and "Misc/NEWS.d/next/C API/", and updating a guard in Include/objec

[issue31980] Special case log(x, 2), log(x, 10) and pow(2, x)

2017-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: I'd say not. If people want `log` base 2 or 10, they should use the appropriate functions. One potential numeric issue here is maintaining monotonicity. If we swap out libm `log` calls for `log2` calls for some inputs, we not only make the code more complica

[issue31984] startswith and endswith leak implementation details

2017-11-08 Thread Ronan Lamy
Ronan Lamy added the comment: Ah, thanks, I noticed the discrepancy between unicode and str in 2.7, but wondered when it was fixed. I guess I'm arguing that it was resolved in the wrong direction, then. Now, your first expression is wrong, even after fixing the obvious typo. The correct vers

[issue15631] Python 3.3/3.4 installation issue on OpenSUSE lib/lib64 folders

2017-11-08 Thread Colin McCabe
Colin McCabe added the comment: When installing Python 3.6.3 from source on openSUSE Leap 42.2, this bug still occurs. Python cannot find the readline module, until you symlink $prefix/lib/python3.6/lib-dynload to $prefix/lib64/python3.6/lib-dynload. -- nosy: +cmccabe versions: +Pyth

[issue10598] Add test for curses haskey replacement

2017-11-08 Thread Sanyam Khurana
Sanyam Khurana added the comment: Is this bug still valid or we can just close it? -- nosy: +CuriousLearner ___ Python tracker ___ _

[issue31980] Special case log(x, 2), log(x, 10) and pow(2, x)

2017-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no two-argument libm `log`. Two-argument log(x, base) is implemented as log(x) / log(base). log(base) adds an error. >>> import math >>> math.log(2**31, 2) 31.004 Since two-argument log() doesn't correspond a C function, I think we are

[issue31980] Special case log(x, 2), log(x, 10) and pow(2, x)

2017-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: > There is no two-argument libm `log`. Two-argument log(x, base) is implemented > as log(x) / log(base). Yep. But log(x) / log(base) is monotonic in x for a fixed base, assuming that the libm log is. My objections still hold. :-) Please let's keep the math.lo

[issue26182] Deprecation warnings for the future async and await keywords in Python 3.6

2017-11-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -970 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue31973] Incomplete DeprecationWarning for async/await keywords

2017-11-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue31901] atexit callbacks only called for current subinterpreter

2017-11-08 Thread Graham Dumpleton
Graham Dumpleton added the comment: FWIW, that atexit callbacks were not called for sub interpreters ever was a pain point for mod_wsgi. What mod_wsgi does is override the destruction sequence so that it will first go through each sub interpreter when and shutdown threading explicitly, then

[issue6412] Titlecase as defined in Unicode Case Mappings not followed

2017-11-08 Thread Serhiy Int
Change by Serhiy Int : -- nosy: +Serhiy Int ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-08 Thread Berker Peksag
Berker Peksag added the comment: New changeset 9a10ff4deb2494e22bc0dbea3e3a6f9e8354d995 by Berker Peksag in branch 'master': bpo-11063: Add a configure check for uuid_generate_time_safe (GH-4287) https://github.com/python/cpython/commit/9a10ff4deb2494e22bc0dbea3e3a6f9e8354d995 -- __

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-08 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue31980] Special case log(x, 2), log(x, 10) and pow(2, x)

2017-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: Also, prec_log would need significant work to make it handle all the corner cases sensibly. For example: Python 3.6.3 (default, Oct 5 2017, 23:34:28) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin Type "help", "copyright", "credits" or "l

[issue31980] Special case log(x, 2), log(x, 10) and pow(2, x)

2017-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Okay. I think that log(x, base) still will be monotonic, because log(x, nextafter(2, +INF)) <= log2(x) <= log(x, nextafter(2, -INF)). I know about this limitation of prec_log(). It was just an example. Maybe Tim know more robust and efficient algorithms.

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does this check work? I tried similar checks with other functions and they were falsely passed because calling an undeclared function is not an error in C. The reliable check of the existence of the uuid_generate_time_safe function is: void *x = uuid_ge

[issue31984] startswith and endswith leak implementation details

2017-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For the justification of the find() behavior see msg243668. But the largest argument for this behavior is that find() have it for a long time. Changing it will break existing code that depends on it. This argument is weaker in the case of startwith() and en

[issue31980] Special case log(x, 2), log(x, 10) and pow(2, x)

2017-11-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 from me as well. Various root finding and minimization algorithms rely (perhaps) incorrect on the functions transitioning smoothly across the inputs. Inside the code for math.log10() and math.log2(), it would be reasonable to use the C99 functions rath

[issue31982] 8.3. collections — Container datatypes

2017-11-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I will flip the two because there is not downside. However, the table of wasn't intended to be a sequential example (that's why there is no data or display of result). Instead, it was just meant to be table of typing-this-does-that. -- assignee:

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-08 Thread Stefan Krah
Stefan Krah added the comment: On Wed, Nov 08, 2017 at 08:28:10PM +, Serhiy Storchaka wrote: > Does this check work? I tried similar checks with other functions and they > were falsely passed because calling an undeclared function is not an error in > C. Not here. If I replace uuid_genera

[issue31982] 8.3. collections — Container datatypes

2017-11-08 Thread Sasha Kacanski
Sasha Kacanski added the comment: Agree, and I know. On Nov 8, 2017 3:41 PM, "Raymond Hettinger" wrote: > > Raymond Hettinger added the comment: > > I will flip the two because there is not downside. However, the table of > wasn't intended to be a sequential example (that's why there is no

[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2017-11-08 Thread Neil Schemenauer
Neil Schemenauer added the comment: The current "master" branch seems to be building successfully on "AMD64 Debian PGO 3.x". Can we close this issue? -- ___ Python tracker __

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-08 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +4301 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue31980] Special case log(x, 2), log(x, 10) and pow(2, x)

2017-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: > significantly accurate significantly *more* accurate -- ___ Python tracker ___ ___ Python-bugs-

[issue31980] Special case log(x, 2), log(x, 10) and pow(2, x)

2017-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: > Exposing exp2 in the math library would be less interesting I disagree: a libm exp2 is likely to be significantly accurate than pow(2.0, x). The latter is unlikely to be special-cased by the libm pow. > The latter can call exp2() internally if it provides m

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-08 Thread Berker Peksag
Berker Peksag added the comment: It worked for me on OS X (returns no) and Linux (returns yes after I installed uuid-dev) but I didn't test it on both systems at the same. Travis CI also returned 'no': https://travis-ci.org/python/cpython/jobs/299285001 In any case, Serhiy's suggestion is bet

[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2017-11-08 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> works for me stage: -> resolved status: open -> closed type: performance -> compile error ___ Python tracker ___ ___

[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why do you want Condition to work with a Semaphore? What would be achieved? A Semaphore is not a lock, it's an other kind of concurrency primitive. I don't think there's any point in detailing it any futrher. -- nosy: +pitrou, tim.peters __

[issue31976] Segfault when closing BufferedWriter from a different thread

2017-11-08 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +benjamin.peterson, stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue31976] Segfault when closing BufferedWriter from a different thread

2017-11-08 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +martin.panter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-08 Thread Berker Peksag
Berker Peksag added the comment: New changeset 0e163d2ced28ade8ff526e8c663faf03c2c0b168 by Berker Peksag in branch 'master': bpo-11063: Use more reliable way to check if uuid function exists (GH-4343) https://github.com/python/cpython/commit/0e163d2ced28ade8ff526e8c663faf03c2c0b168 -

[issue31985] Deprecate/remove aifc.openfp

2017-11-08 Thread Brian Curtin
New submission from Brian Curtin : Since 1993, aifc.openfp has simply pointed to aifc.open as a matter of backwards compatibility. See https://github.com/python/cpython/commit/7bc817d5ba917528e8bd07ec461c635291e7b06a for the exact change. aifc.openfp is both undocumented and untested, and in

[issue31985] Deprecate/remove aifc.openfp

2017-11-08 Thread Brian Curtin
Change by Brian Curtin : -- keywords: +patch pull_requests: +4302 stage: needs patch -> patch review ___ Python tracker ___ ___ Pytho

[issue31986] [2.7] test_urllib2net.test_sites_no_connection_close() randomly fails on Python 2.7

2017-11-08 Thread STINNER Victor
New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/78/builds/20 ERROR: test_sites_no_connection_close (test.test_urllib2net.OtherNetworkTests) -- Traceback (most recent call last): File "/buildbot/

[issue31987] Ctypes Packing Bitfields Incorrectly - GCC both Linux and Cygwin

2017-11-08 Thread Marc Le Roy
New submission from Marc Le Roy : The structure : typedef struct __attribute__ ((packed)) { unsigned int F0:24; unsigned int F3:24; unsigned int F6:24; unsigned int F9:24; } StructF_T; is mapped as expected by GCC under both Linux and Cygwin. As expected, the memory layout see

[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2017-11-08 Thread Jonas H.
Jonas H. added the comment: This affects me too. -- nosy: +jonash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue31985] Deprecate/remove aifc.openfp

2017-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Don't forget about wave and sunau. You can use a common test for all three modules. -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-08 Thread STINNER Victor
STINNER Victor added the comment: Hum, test_use() still fails (commit fbdd3eeba3e526e162f2eb54d224cf36ed8cfea1) on AMD64 Windows8.1 Refleaks 2.7. I reopen the issue. http://buildbot.python.org/all/#/builders/33/builds/21 == E

[issue24132] Direct sub-classing of pathlib.Path

2017-11-08 Thread Stephen M. Gava
Stephen M. Gava added the comment: @paul.moore is the original contributor mia? i seem to remember pathlib as once being marked 'provisional', i think it should have stayed that way until this problem was resolved. easy to say i know ;) when i don't have a patch. @projetmbc yes i found variou

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-08 Thread STINNER Victor
STINNER Victor added the comment: > Hum, test_use() still fails (commit fbdd3eeba3e526e162f2eb54d224cf36ed8cfea1) > on AMD64 Windows8.1 Refleaks 2.7. I reopen the issue. I'm not 100% sure that this build really tested the commit fbdd3eeba3e526e162f2eb54d224cf36ed8cfea1. We had an issue on the

[issue30952] [Windows] include Math extension in SQlite

2017-11-08 Thread Big Stone
Big Stone added the comment: I know you can do create_function(): https://raw.githubusercontent.com/stonebig/sqlite_bro/master/docs/sqlite_bro.GIF But the performance is crappy at best because of string conversion in the API. If you want SQlite because of its performance, recent version start

[issue10598] Add test for curses haskey replacement

2017-11-08 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue31988] Saving bytearray to binary plist file doesn't work

2017-11-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : >>> import plistlib >>> plistlib.dumps(bytearray(), fmt=plistlib.FMT_BINARY) Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/plistlib.py", line 962, in dumps dump(value, fp, fmt=fmt, skipkeys=skipkeys, sort_k

[issue31984] startswith and endswith leak implementation details

2017-11-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: Thank you for the bug report Ronan, but I'm afraid that I have no idea what you think the problematic behaviour is. I'm not going to spend the time installing the third-party hypothesis module, and learning how to use it, just to decipher your "actual spec".

[issue31984] startswith and endswith leak implementation details

2017-11-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: I don't have Python 3.7 available to me, but in 3.5 the behaviour of u.startswith(v) with an empty v seems consistent to me: py> "alpha".startswith("", 20, 30) True py> "alpha"[20:30].startswith("") True py> "".startswith("", 20, 30) True py> ""[20:30].star

[issue31985] Deprecate aifc.openfp

2017-11-08 Thread Brian Curtin
Brian Curtin added the comment: i was going to do them as separate bugs and PRs per module, but if one is fine then i can do that. Updating the title as well since nothing is beings removed (was originally going to suggest skipping to removal but won’t do that). -- title: Deprecate/

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: Yes - stuff just flat out breaks when Linux distros upgrade Python. The response is "Yeah, python-dev decided years ago that they don't care about that". -- ___ Python tracker __

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: (And yes, I could push this as a downstream patch to Fedora's Python packages instead - if enough folks insist that springing breaking changes on people without warning them that those changes coming is fine, that's what I'll do) -- ___

[issue31901] atexit callbacks should be run at subinterpreter shutdown

2017-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, I see - yeah, that makes a lot of sense. I've retitled the issue to make it clearer that the problem is where the responsibility for calling atexit functions lives - currently it's in Py_Finalize, but really it should be inside the interpreter object's own

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: > The response is "Yeah, python-dev decided years ago that they don't care > about that". That's a little harsh don't you think? -- ___ Python tracker ___

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: Sure, it's harsh, but it's still what it looks like from the outside - there's no PEP explaining the reasoning for putting the interests of app developers that don't want to take responsibility for their user experience ahead of those of regular Python develope

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-08 Thread R. David Murray
R. David Murray added the comment: It was never about putting the interests of the app developers first, it was about putting the interests of the users first: not being pestered by seeing deprecation warnings they can't do anything about. So yeah, maybe a PEP explaining the logic would be he

[issue28791] update sqlite to latest version before beta 1

2017-11-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for backporting. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-08 Thread Caleb Hattingh
Caleb Hattingh added the comment: I messed up the PR through a failed rebase (trying to rebase my PR on top of upstream). I closed the PR as a result. I have now fixed up my feature branch, but I have not resubmitted the PR. Since the PR was left alone for many months, I'm ok with leaving t

[issue31989] setattr on a property gives a very unhelpful exception

2017-11-08 Thread Mark Diekhans
New submission from Mark Diekhans : done a setattr on a property gives a very unhelpful error message AttributeError: can't set attribute it neither indicates the name of the attribute that failed or the cause. an error such as "can't set property attribute: the_attr_name" would be far mor

[issue31989] setattr on a property gives a very unhelpful exception

2017-11-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Usually, all the necessary information is present in the previous line of the traceback: >>> a.volume = 10 Traceback (most recent call last): File "", line 1, in a.volume = 10 AttributeError: can't set attribute I don't seem to r

[issue31989] setattr on a property gives a very unhelpful exception

2017-11-08 Thread Mark Diekhans
Mark Diekhans added the comment: The trackback is not helpful if the attribute name is in a variable. It also doesn't explain why the error occurred. While I would not rate this as a high priority, I don't see an argument for having uninformative error messages. Raymond Hettinger writes: >

[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-08 Thread Zachary Ware
Zachary Ware added the comment: You should be able to force-push your branch (`git push -f origin auto-venv-docbuilder`, or replace `origin` with the correct remote name) to fix the existing PR. Sorry I haven't gotten back to this previously; time to do a review and remembering that the PR e

[issue30952] [Windows] include Math extension in SQlite

2017-11-08 Thread Zachary Ware
Zachary Ware added the comment: I, for one, don't have the time to work on this, especially since I don't regularly use the sqlite3 module. If this is something you want, submit a PR. Lack of skill is not a legitimate reason not to do so; the devguide provides instructions on the mechanics

[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Antoine and don't think there is a real issue here to be solved. -- nosy: +rhettinger ___ Python tracker ___

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-11-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Wed, Nov 8, 2017, at 06:14, STINNER Victor wrote: > > STINNER Victor added the comment: > > alignment.patch: +long double dummy; /* force worst-case alignment > */ > > Would it be possible to use max_align_t mentioned by Stefan, at least > when th

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: I'm currently still too annoyed to write a PEP about this - it would probably come out in tone like the state of the unicode literals PEP before I edited it. I just don't understand how this logic is hard: *our* primary responsibility for deprecation warnings i

<    1   2