[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Paul Moore
Paul Moore added the comment: I added the label for you. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I claim that adding Py_LIKELY/Py_UNLIKELY will reduce the performance randomness of non-PGO builds. So it would be strange to use that randomness as an argument *against* this patch. -- ___ Python tracker

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: I submitted a new PR for the Windows test case. Please take a look. Also how do I attach the label "skip news" to this new PR? -- ___ Python tracker

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-08-13 Thread Guido van Rossum
Guido van Rossum added the comment: Using `__wrapped__` if present sounds like a good idea. Ivan, what do you think? Netzeband, have you considered submitting a PR with the necessary changes (and tests and docs)? -- ___ Python tracker

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-13 Thread Srinivas Nyayapati
Change by Srinivas Nyayapati : -- pull_requests: +14973 pull_request: https://github.com/python/cpython/pull/15252 ___ Python tracker ___

[issue20861] datetime argument handling inconsistent; should accept logical integers, not coercible values

2019-08-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: This is essentially a duplicate of #36048. The example is now deprecated: >>> from decimal import Decimal >>> from datetime import datetime >>> datetime(Decimal("2000.5"), 1, 2) :1: DeprecationWarning: an integer is required (got type decimal.Decimal).

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: We're not talking about prefetching here. The Py_LIKELY/Py_UNLIKELY macros only affect which of the two code paths in a branch is the "default" one, i.e. the one not involving a jmp. -- ___ Python tracker

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: It started to write a new issue, but then I found this issue issue (created in 2013!) which is still open. So let me write my comment here instead. The code to convert a number to an integer is quite complex in Python. There are *many* ways to do that and

[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2019-08-13 Thread flying sheep
flying sheep added the comment: There’s this monkeypatching solution: https://pypi.org/project/nest-asyncio/ But yes, it’s a very practical problem that you can’t call async code from sync code that’s being called from async code. -- nosy: +flying sheep

[issue20861] datetime argument handling inconsistent; should accept logical integers, not coercible values

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-35707. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35707] time.sleep() should support objects with __float__

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-20861. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20861] datetime argument handling inconsistent; should accept logical integers, not coercible values

2019-08-13 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20861] datetime argument handling inconsistent; should accept logical integers, not coercible values

2019-08-13 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Could be related to some discussions in this PR: https://github.com/python/cpython/pull/14842 -- ___ Python tracker ___

[issue20861] datetime argument handling inconsistent; should accept logical integers, not coercible values

2019-08-13 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37821] IDLE shell uses wrong namespace for completions

2019-08-13 Thread Tal Einat
Tal Einat added the comment: Terry, many thanks for the clarifications! > The intended behavior is to complete if at all possible. I can see the point in that. > What is odd to me is that you seem happy using the more numerous non-user > IDLE imports when there is no Shell. The

[issue37821] IDLE shell uses wrong namespace for completions

2019-08-13 Thread Tal Einat
Change by Tal Einat : -- Removed message: https://bugs.python.org/msg349556 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue37821] IDLE shell uses wrong namespace for completions

2019-08-13 Thread Tal Einat
Tal Einat added the comment: Terry, many thanks for the clarifications! > The intended behavior is to complete if at all possible. I can see the point in that. > What is odd to me is that you seem happy using the more numerous non-user > IDLE imports when there is no Shell. The

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: Another example to explain my concern. In the Linux kernel, list macros used to prefetch next items: “(...) So the conclusion is: prefetches are absolutely toxic, even if the NULL ones are excluded.” https://lwn.net/Articles/444336/ The lesson is that we

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: > I would expect that Py_LIKELY/Py_UNLIKELY helps with this. Well, PGO is made of many optimizations, not only help branch prediction. For example, it detects hot code and tries to put functions which call them each other close in memory to enhance the CPU

[issue20861] datetime argument handling inconsistent; should accept logical integers, not coercible values

2019-08-13 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1615158] POSIX capabilities support

2019-08-13 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2019-08-13 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: paul.j3, The fix looks promising. Do you want to open a PR with this fix? -- nosy: +nanjekyejoannah ___ Python tracker ___

[issue36077] Inheritance dataclasses fields and default init statement

2019-08-13 Thread Kim Gustyr
Change by Kim Gustyr : -- nosy: +kgustyr ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > If it's an optimization, can you show a benchmark to validate that it's > really faster as expected? Yes, I did test it. I didn't save the results, but I can redo them if you want. If you plan to reject the issue anyway, there is no point. > not building

[issue37837] add internal _PyLong_FromUnsignedChar() function

2019-08-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Maybe an even better idea would be to partially inline PyLong_FromLong(). If the check for small ints in PyLong_FromLong() would be inlined, then the compiler could optimize those checks. This would benefit all users of PyLong_FromLong() without code

[issue16958] The sqlite3 context manager does not work with isolation_level=None

2019-08-13 Thread STINNER Victor
Change by STINNER Victor : -- keywords: -easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: BTW: Since when do we use type annotations in Python's stdlib ? -- nosy: +lemburg ___ Python tracker ___

[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: "from typing import *" I like to run pyflakes time to time on the Python code base. Please avoid "import *" since it prevents pyflakes (and other code analyzers) to find bugs. Example: $ pyflakes Tools/unicode/makeunicodedata.py

[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: $ find -name "*db.h" ./Modules/unicodedata_db.h ./Modules/unicodename_db.h ./Objects/unicodetype_db.h For .gitattributes, I would prefer to use unicode*_db.h pattern rather than "a generic" *_db.h, to avoid masking other potential file called

[issue32771] merge the underlying data stores of unicodedata and the str type

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: Hum, I forget to mention that the module is compiled as a dynamically library, at least on Fedora: $ python3 Python 3.7.4 (default, Jul 9 2019, 16:32:37) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for

[issue32771] merge the underlying data stores of unicodedata and the str type

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: > This will remove awkward maneuvers like ast.c importing unicodedata in order > to perform normalization. unicodedata is not needed by default. ast.c only imports unicodedata at the first non-ASCII identifier. If you application (and all dependencies) only

[issue15010] unittest: _top_level_dir is incorrectly persisted between calls to different load_test methods

2019-08-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37840] bytearray_getitem() handles negative index incorrectly

2019-08-13 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +14972 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15250 ___ Python tracker ___

[issue37840] bytearray_getitem() handles negative index incorrectly

2019-08-13 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : bytearray_getitem() adjusts negative index, though that's already done by PySequence_GetItem(). This makes PySequence_GetItem(bytearray(1), -2) to return 0 instead of raise IndexError. -- components: Interpreter Core messages: 349545 nosy:

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: > That's certainly true. The question is whether we want to optimize also > non-PGO builds. If it's an optimization, can you show a benchmark to validate that it's really faster as expected? I tried for 6 months to run benchmarks without PGO and it was a

[issue37839] makesetup Doesn't Handle Defines with Equal Sign

2019-08-13 Thread Will Bond
New submission from Will Bond : Using 3.8.0b3 on macOS. I'm doing a custom compile with (heavy) modifications to Modules/Setup.local. Whenever I add a define rule to a module line that includes an equal sign, e.g.: _sqlite3 -DMODULE_NAME=_sqlite3 _sqlite/module.c _sqlite/cache.c

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-08-13 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-08-13 Thread Netzeband
New submission from Netzeband : When decorating a function and using a forward declaration as type hint, the typing.get_type_hints function does not work anymore, since it cannot find the forward declared name in the namespace. After debugging I think, the typing.get_type_hints function is

[issue37837] add internal _PyLong_FromUnsignedChar() function

2019-08-13 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +14971 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15251 ___ Python tracker ___

[issue37834] readlink on Windows cannot read app exec links

2019-08-13 Thread Eryk Sun
Eryk Sun added the comment: > Honestly, the only real problem I've seen is in applications that use > a reimplementation of spawn() rather than the UCRT's version (which > handles the reparse point jsut fine). I looked into this spawn problem. It's due to Cygwin's spawnve, which calls

[issue37837] add internal _PyLong_FromUnsignedChar() function

2019-08-13 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : When compiled with default NSMALLPOSINTS, _PyLong_FromUnsignedChar() is significantly faster than other PyLong_From*(): $ python -m perf timeit -s "from collections import deque; consume = deque(maxlen=0).extend; b = bytes(2**20)" "consume(b)"

[issue37256] urllib.request.Request documentation erroneously refers to the "final two"

2019-08-13 Thread Sanyam Khurana
Sanyam Khurana added the comment: Thanks for the bug report Alan & for the PR Ngalim! I've checked the current docs and this is a valid bug. I've also reviewed the Pull request and it looks good to me. @Mariatta, @Senthil can you please have a look at this? Many thanks! -- nosy:

[issue12447] ~True is not False

2019-08-13 Thread STINNER Victor
STINNER Victor added the comment: bpo-37831 has been marked as a duplicate of this issue. -- nosy: +vstinner ___ Python tracker ___

[issue31601] Availability of utimensat, futimens not checked correctly on macOS

2019-08-13 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'd prefer a solution that uses symbols where the are available (weak linking). That way users on newer systems can use all functionality available there, without having multiple binaries. I've done this in the past for older macOS versions, but don't

[issue37836] Support .as_integer_ratio() in fractions.Fraction

2019-08-13 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : Currently, the fractions.Fraction constructor accepts an .as_integer_ratio() method only for the specific types "float" and "Decimal". It would be good to support this for arbitrary classes. This is part of what was proposed in #37822, but without adding

[issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class

2019-08-13 Thread Netzeband
New submission from Netzeband : When evaluating the type-hints of an inner-class (a class defined inside a function scope), the forward declaration does not work correctly. In this case the typing.get_type_hints does not get the right namespace, thus the class-string specified is not found.

[issue12611] 2to3 crashes when converting doctest using reduce()

2019-08-13 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12611] 2to3 crashes when converting doctest using reduce()

2019-08-13 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- pull_requests: +14970 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15249 ___ Python tracker ___

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > IHMO PGO compilation already defeats the purpose of these macros. That's certainly true. The question is whether we want to optimize also non-PGO builds. -- ___ Python tracker

[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-13 Thread Ned Deily
Ned Deily added the comment: OK, thanks, Ricardo. Since you appear to be using an Anaconda-supplied Tk, I suggest you open an issue or otherwise ask for help from the Conda project and, as necessary, the Tk folks. Without more info and unable to reproduce with other sources of Tk, there is

[issue32771] merge the underlying data stores of unicodedata and the str type

2019-08-13 Thread Greg Price
Change by Greg Price : -- nosy: +Greg Price ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-13 Thread Greg Price
Change by Greg Price : -- pull_requests: +14969 pull_request: https://github.com/python/cpython/pull/15248 ___ Python tracker ___

[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-13 Thread Ricardo Smits
Ricardo Smits added the comment: Thanks! I was just looking how to send you all this info, so here it is: tkinter.TCL_VERSION: 8.6 tkinter.TK_VERSION: 8.6 tkinter.info_patchlevel: 8.6.8 $ python3.7 -c 'import _tkinter;print(_tkinter.__file__)'

[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-13 Thread Ned Deily
Ned Deily added the comment: As far as I know, the best information you can get from Tk about version is the patch level which does not necessarily take into account builds from a dev repo or patched source. The easiest way to get that info from tkinter is to use test.pythoninfo: $

[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-13 Thread Ronald Oussoren
Ronald Oussoren added the comment: A followup question: How can I determine the exact version of Tk? -- ___ Python tracker ___ ___

[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-13 Thread Ronald Oussoren
Ronald Oussoren added the comment: I had a similar problem during EuroPython, but that was when I had anaconda on my machine. I've since removed it because generally don't use it but had it installed for a training session. I haven't tried to reproduce, but also don't run 10.14.6 yet

[issue37830] continue in finally with return in try results with segfault

2019-08-13 Thread Batuhan
Batuhan added the comment: serhiy can you review the solution i found? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37830] continue in finally with return in try results with segfault

2019-08-13 Thread Batuhan
Change by Batuhan : -- pull_requests: +14968 pull_request: https://github.com/python/cpython/pull/15247 ___ Python tracker ___ ___

[issue37798] Add C fastpath for statistics.NormalDist.inv_cdf()

2019-08-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Can I work on this issue? > It might be my first C module addition task for CPython. Yes. This issue would be a good place to start. -- ___ Python tracker

[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-13 Thread miss-islington
miss-islington added the comment: New changeset b02e148a0d6e7a11df93a09ea5f4e1b0ad9b77b8 by Miss Islington (bot) in branch '3.8': bpo-37760: Mark all generated Unicode data headers as generated. (GH-15171) https://github.com/python/cpython/commit/b02e148a0d6e7a11df93a09ea5f4e1b0ad9b77b8

[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-13 Thread miss-islington
miss-islington added the comment: New changeset c2b9d9f202e4a99fc0800b7a0f0944ac4c2382e3 by Miss Islington (bot) in branch '3.8': bpo-37760: Mark all generated Unicode data headers as generated. (GH-15171) https://github.com/python/cpython/commit/c2b9d9f202e4a99fc0800b7a0f0944ac4c2382e3

[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 99d208efed97e02d813e8166925b998bbd0d3993 by Benjamin Peterson (Greg Price) in branch 'master': bpo-37760: Constant-fold some old options in makeunicodedata. (GH-15129)

<    1   2