[issue34333] Path.with_suffix() raises TypeError when doing %-formatting

2018-08-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +8217 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34333] Path.with_suffix() raises TypeError when doing %-formatting

2018-08-10 Thread Berker Peksag
Berker Peksag added the comment: New changeset 423d05f6f59b24c91b9ef6b2e4ac130316764382 by Berker Peksag in branch 'master': bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663) https://github.com/python/cpython/commit/423d05f6f59b24c91b9ef6b2e4ac130316764382 --

[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Retested using Tim's ulp(x) function (see attached script). The accuracy results are for 1,000 trials using 10,000 arguments to hypot() where the arguments are generated using triangular(0.999, 1.001) and arranged in the least favorable order,

[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-10 Thread Evan Allrich
Change by Evan Allrich : -- keywords: +patch pull_requests: +8215 stage: -> patch review ___ Python tracker ___ ___

[issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section

2018-08-10 Thread Evan Allrich
New submission from Evan Allrich : At present the note [0] appears under the documentation for `json.dumps` (which does not use the `fp` argument). It seems the note would be better placed with the documentation for the affected function. [0] > Note > > Unlike pickle and marshal, JSON is

[issue34378] Documentation 3.5+

2018-08-10 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Sorry you're having trouble with this. There is similar issue as https://bugs.python.org/issue28044. The Python documentation Sphinx theme is now being maintained over at https://github.com/python/python-docs-theme/ Please file the issue there. Thanks.

[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here's a little more performance data that might suggest where possible speed optimizations may lay (I was mostly going for accuracy improvements in this patch). On my 2.6GHz (3.6Ghz burst) Haswell, the hypot() function for n arguments takes about

[issue34378] Documentation 3.5+

2018-08-10 Thread Karan
New submission from Karan : The documentation link for 3.5+ is having an issue with the left sidebar where the index is present. In 2.7 if I scroll the main doc below to mid of the document the sidebar still shows me the index. The same is not present in the 3.5+. I know this is a very

[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-10 Thread Tim Peters
Tim Peters added the comment: Not that it matters: "ulp" is a measure of absolute error, but the script is computing some notion of relative error and _calling_ that "ulp". It can understate the true ulp error by up to a factor of 2 (the "wobble" of base 2 fp). Staying away from denorms,

[issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple

2018-08-10 Thread Eric V. Smith
Eric V. Smith added the comment: For the record, I don't disagree with namedtuples not having a base class. Maybe it's best to let copy.deepcopy() deal with namedtuples, instead of trying to detect them here. So just special case exact tuples and lists, and pass everything else to

[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: > What results for all components equal? hypot(1.0, 1.0, ..., 1.0) The scaled summation will be exact (all elements scale to 1.0 and frac is always 0.0). > Would it give a performance benefit if get rid of multiplication > and division, and scale by the

[issue18307] Relative path in co_filename for zipped modules

2018-08-10 Thread Brett Cannon
Brett Cannon added the comment: This will be a semantic change to the value of co_filename so I don't think this can safely be backported. -- versions: -Python 2.7, Python 3.7 ___ Python tracker

[issue18307] Relative path in co_filename for zipped modules

2018-08-10 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +twouters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would it give a performance benefit if get rid of multiplication and division, and scale by the power of two approximation of the max using ldexp()? -- ___ Python tracker

[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What results for all components equal? hypot(1.0, 1.0, ..., 1.0) -- ___ Python tracker ___ ___

[issue34377] Update valgrind suppressions

2018-08-10 Thread Paul Price
Change by Paul Price : -- keywords: +patch pull_requests: +8213 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34377] Update valgrind suppressions

2018-08-10 Thread Paul Price
New submission from Paul Price : I've found that the valgrind suppressions don't work for me with cpython 3.6.2. Renaming PyObject_Free/PyObject_Realloc to _PyObject_Free/_PyObject_Realloc in the suppressions file works. I've got a patch that I'll put in via a GitHub PR. --

[issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple

2018-08-10 Thread Neil Girdhar
Neil Girdhar added the comment: > The code generated by oollections.namedtuple was based on patterns already in > widespread use at the time. That's fair enough. However, it seems like there is one important difference: unlike any other Sequence, namedtuples cannot be initialized with an

[issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple

2018-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Raymond has resisted adding a base class to namedtuple. I believe the > preferred way to identify a namedtuple is to look for a _fields member. FWIW, that was also Guido's opinion as well. A named tuple is generic concept defined in the glossary as

[issue33125] Windows 10 ARM64 platform support

2018-08-10 Thread Paul Monson
Paul Monson added the comment: The PR hasn't changed since September. Is it still active? Should I consider updating the libffi_msvc code to support ARM32 in Python? Completing the switch to libffi makes more sense to me. I fetched the PR code to my fork and rebased it on the current

[issue34370] Tkinter scroll issues on macOS

2018-08-10 Thread Vlad Tudorache
Vlad Tudorache added the comment: Now, the video for TK 8.5 showing expected behavior on macOS. -- Added file: https://bugs.python.org/file47743/Tk85Mac.mov ___ Python tracker

[issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple

2018-08-10 Thread Eric V. Smith
Eric V. Smith added the comment: Hmm, for some reason I'm not getting mail from this issue, so I made my PR before I saw the comments since my last comment. Raymond has resisted adding a base class to namedtuple. I believe the preferred way to identify a namedtuple is to look for a _fields

[issue34370] Tkinter scroll issues on macOS

2018-08-10 Thread Vlad Tudorache
Vlad Tudorache added the comment: The bug needs forwarding to the Tcl/Tk community. This is the script written in Tcl (run with tclsh8.6 script.tcl for Tcl 8.6 and tclsh8.5 script.tcl for 8.5): package require Tk scrollbar .vbar -width 10 text .edit pack .vbar -side right -fill y pack

[issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple

2018-08-10 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +8212 stage: -> patch review ___ Python tracker ___ ___

[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +8211 stage: -> patch review ___ Python tracker ___ ___

[issue34376] Improve accuracy of math.hypot() and math.dist()

2018-08-10 Thread Raymond Hettinger
New submission from Raymond Hettinger : Apply two accuracy improvements that work well together and that are both cheap (less than 5% difference in speed). 1. Moving the max value to the end saves an iteration and can improve accuracy (especially in the case where len(args) <= 3 where the

[issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple

2018-08-10 Thread Neil Girdhar
Neil Girdhar added the comment: Why can't we add an ABC into a NamedTuple instance's MRO? Because while I like Eric's solution, it seems to be backwards: tuple and list are not the special cases—NamedTuple is. All sequences accept an iterable in their constructor, and NamedTuple doesn't.

[issue34375] Subtests (unittest)

2018-08-10 Thread R. David Murray
R. David Murray added the comment: https://docs.python.org/3/library/unittest.html#distinguishing-test-iterations-using-subtests -- nosy: +r.david.murray resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue34374] Shouldn't shutil.copyfile replace link in dst with follow_symlinks set?

2018-08-10 Thread R. David Murray
R. David Murray added the comment: It is following the model of the posix cp command, whose equivalent to 'follow_symlinks' only affects the source. -- nosy: +r.david.murray ___ Python tracker

[issue34375] Subtests (unittest)

2018-08-10 Thread Victor Porton
New submission from Victor Porton : The following is a fragment of a real code: ~~~ def test_run_xinlude(self): # stub_stdin(self, Global.get_resource_bytes("tests/core/data/xml/xinclude.xml")) for next_script_mode in ['doc1', 'doc2']: for order in ['breadth',

[issue34374] Shouldn't shutil.copyfile replace link in dst with follow_symlinks set?

2018-08-10 Thread theger
New submission from theger : This might not be an issue at all and maybe I'm just missing something but this confused me a bit and hence the question in title. Python's shutil.copyfile() has a follow_symlinks argument but it only affects the source, not the destination - i.e. when src is a

[issue34373] test_time errors on AIX

2018-08-10 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +8210 stage: -> patch review ___ Python tracker ___ ___

[issue34373] test_time errors on AIX

2018-08-10 Thread Michael Felt
New submission from Michael Felt : 32-bit: == ERROR: test_mktime (test.test_time.TimeTestCase) -- Traceback (most recent call last): File

[issue34372] Compiler could output more accurate line numbers

2018-08-10 Thread Arusekk
New submission from Arusekk : If this is a duplicate, please excuse me. In particular, the most noticeable inaccuracy happens when the postfix if-else expression is involved. Maybe there are more of them. The problem is quite self-explaining. The module named 'dis' will be helpful to

[issue34369] kqueue.control() documentation and implementation mismatch

2018-08-10 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I don't believe (kqueue.control at least) is a regression from Argument Clinic. Both the documentation and the behaviour are the same in Python-2.7. -- ___ Python tracker

[issue34371] File reading gets stuck if you read at eof on macos

2018-08-10 Thread Ronald Oussoren
Change by Ronald Oussoren : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34371] File reading gets stuck if you read at eof on macos

2018-08-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: For completeness sake I've attached a C program demonstrating the same problem. -- status: pending -> open Added file: https://bugs.python.org/file47740/readwrite.c ___ Python tracker

[issue33125] Windows 10 ARM64 platform support

2018-08-10 Thread Steve Dower
Steve Dower added the comment: If libffi already has support and just needs to be updated in CPython, then sure. I thought we'd finished extracting it, but Zach posted aPR link above that apparently still needs finishing. However, if libffi doesn't have the support yet then you'll have to

[issue34371] File reading gets stuck if you read at eof on macos

2018-08-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is IMHO not a bug in CPython (or even macOS). On Python 2.7 file I/O is implemented using C's stdio library and that prescribes this behaviour (the "at EOF" state of a file stream is sticky. fd.seek(0, 2) should unset the "at EOF" flag. --

[issue34369] kqueue.control() documentation and implementation mismatch

2018-08-10 Thread Berker Peksag
Berker Peksag added the comment: This is probably a regression from the Argument Clinic conversion. Another docstring mismatches: select(rlist, wlist, xlist, timeout=None, /) Wait until one or more file descriptors are ready for some kind of I/O. >>> select.select(timeout=0.1)

[issue34371] File reading gets stuck if you read at eof on macos

2018-08-10 Thread Sverrir Berg
New submission from Sverrir Berg : Reading a file that is at eof causes the file reading to halt indefinitely. 1) open() a file and read() everything from it. 2) call read() a second time - reading nothing (this causes the issue). 3) append to the file (using another file handle or manually).

[issue34097] ZIP does not support timestamps before 1980

2018-08-10 Thread Marcel Plch
Change by Marcel Plch : -- pull_requests: +8209 stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue34369] kqueue.control() documentation and implementation mismatch

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

[issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple

2018-08-10 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Eric, I like your solution. It is probably not perfect, but at least it solves the existing problem without introducing obvious problems. Neil, your way will not work since named tuples don't have NamedTuple in their MROs: CustomNT.mro == (CustomNT,

[issue34343] Why is turtle still present in python embedded for Windows?

2018-08-10 Thread Vlad Tudorache
Change by Vlad Tudorache : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34370] Tkinter scroll issues on macOS

2018-08-10 Thread Vlad Tudorache
New submission from Vlad Tudorache : Run the python script below. import tkinter root = tkinter.Tk() text = tkinter.Text(root) vbar = tkinter.Scrollbar(root) vbar.pack(side=tkinter.RIGHT, fill=tkinter.Y) text.pack(side=tkinter.LEFT, fill=tkinter.BOTH, expand=1)

[issue34360] urllib.parse doesn't fully comply to RFC 3986

2018-08-10 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: I confirm violation of https://tools.ietf.org/html/rfc3986#section-3.2.2 . URLs are now covered by RFC 3986 which obsoletes RFC 1808 that `urllib's documentation refers to. This new URL RFC adds [] to 'reserved' characters, so them being present unquoted

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-10 Thread Tal Einat
Change by Tal Einat : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-10 Thread Tal Einat
Tal Einat added the comment: > Should one open a different report for the clicks on the scrollbar ends, like > in the script I put (independent of IDLE)? Indeed. Please open a new issue with an appropriate title and attach your example script and video. --

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-08-10 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-10 Thread miss-islington
miss-islington added the comment: New changeset ca4badb5c0bedaa4ebcb33b9cad5f64750876750 by Miss Islington (bot) in branch '3.6': bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678) https://github.com/python/cpython/commit/ca4badb5c0bedaa4ebcb33b9cad5f64750876750

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-10 Thread miss-islington
miss-islington added the comment: New changeset ea8835fb302447da82f265a5bc0f785353100271 by Miss Islington (bot) in branch '3.7': bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678) https://github.com/python/cpython/commit/ea8835fb302447da82f265a5bc0f785353100271

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-10 Thread Vlad Tudorache
Vlad Tudorache added the comment: The scroll works. Many thanks, I thought the callback should have been rewritten, too. Should one open a different report for the clicks on the scrollbar ends, like in the script I put (independent of IDLE)? --

[issue34369] kqueue.control() documentation and implementation mismatch

2018-08-10 Thread Toshio Kuratomi
New submission from Toshio Kuratomi : The current kqueue documentation specifies that timeout is a keyword argument but it can only be passed as a positional argument right now: >>> import select >>> ko = select.kqueue() >>> ko.control([1], 0, timeout=10) Traceback (most recent call last):

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +8208 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-10 Thread Tal Einat
Tal Einat added the comment: New changeset 077059e0f086cf8c8b7fb9d1f053e38ddc743f59 by Tal Einat in branch 'master': bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678) https://github.com/python/cpython/commit/077059e0f086cf8c8b7fb9d1f053e38ddc743f59 --

[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-08-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +8207 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: