[issue42830] tempfile mkstemp() leaks file descriptors if os.close() is not called

2021-01-28 Thread Mieczysław Torchała
Mieczysław Torchała added the comment: Yes, having it written explicitly in docs (that remove means not only a file removal with unlink/remove and warn about lacking file descriptors), or/and providing a remove function in tempfile which will both unlink and close, would be valuable. The

Re: Jupyter notebooks to A4 (again)

2021-01-28 Thread tommy yama
Hi, A4article is not indicated in git as you had a look. :( Maybe that format (A4article) was depreciated already? On Fri, Jan 29, 2021 at 6:52 AM Martin Schöön wrote: > Den 2021-01-25 skrev tommy yama : > > Hi Martin, > > > > I noticed that i did use the same , > > formats are mentioned in

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Before removing public documented attribute it should be deprecated. Of course. > […], I have a large patch for removing obsolete version attributes in process. Great! -- ___ Python tracker

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Before removing public documented attribute it should be deprecated. Don't haste with this, I have a large patch for removing obsolete version attributes in process. -- nosy: +serhiy.storchaka ___ Python

[issue43029] unittest: Add assertUniqeIn

2021-01-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks pretty niche. I do not remember a single case in which such method would help. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue43029] unittest: Add assertUniqeIn

2021-01-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: -0 on this one because the algorithm is quadratic, the name is opaque, and because the common case can already be clearly expressed with sets. -- nosy: +rhettinger ___ Python tracker

[issue23544] IDLE hangs when selecting Stack View with debug active

2021-01-28 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue23544] IDLE hangs when selecting Stack View with debug active

2021-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Tal, I agree with you. The debugger is an execution controller with an optional current-frame viewer updated whenever execution is paused. It displays both name and value. I believe a current PR addresses the issue of value representations being

[issue23544] IDLE hangs when selecting Stack View with debug active

2021-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 901a9834420e516c07d6cad356d2be481db6d8d1 by Miss Islington (bot) in branch '3.8': bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163) (#24366) https://github.com/python/cpython/commit/901a9834420e516c07d6cad356d2be481db6d8d1

[issue43051] Pip Permissions Error overwriting pip directory

2021-01-28 Thread Steve Dower
Steve Dower added the comment: This is better reported at https://github.com/pypa/pip, as it will be fixed out of their repository and then updated into here. Seems like the failed install did not roll back properly. Those directories are the backup of the uninstallation so that if it

[issue23544] IDLE hangs when selecting Stack View with debug active

2021-01-28 Thread miss-islington
miss-islington added the comment: New changeset 6d87dec5818667168cc7e4ad972dde8aeec6d900 by Miss Islington (bot) in branch '3.9': bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163) https://github.com/python/cpython/commit/6d87dec5818667168cc7e4ad972dde8aeec6d900

[issue23544] IDLE hangs when selecting Stack View with debug active

2021-01-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +23189 pull_request: https://github.com/python/cpython/pull/24366 ___ Python tracker ___

[issue23544] IDLE hangs when selecting Stack View with debug active

2021-01-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +23188 pull_request: https://github.com/python/cpython/pull/24365 ___ Python tracker

[issue23544] IDLE hangs when selecting Stack View with debug active

2021-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 23a567c11ca36eedde0e119443c85cc16075deaf by Zackery Spytz in branch 'master': bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163) https://github.com/python/cpython/commit/23a567c11ca36eedde0e119443c85cc16075deaf --

Re: idlelib re-use

2021-01-28 Thread Terry Reedy
On 1/28/2021 5:53 AM, Robin Becker wrote: I googled in vain for instances where parts of idlelib are re-used in a simplistic way. I would like to use the editor functionality in a tkinter window and also probably run code in a subprocess. Are there any examples around that do these sorts of

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread user1347091
user1347091 added the comment: At least in Python 3.9.1, these commands still exist: Python 3.9.1 (default, Dec 13 2020, 11:55:53) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> sqlite3.version

Re: Jupyter notebooks to A4 (again)

2021-01-28 Thread Martin Schöön
Den 2021-01-25 skrev tommy yama : > Hi Martin, > > I noticed that i did use the same , > formats are mentioned in git already. > > https://github.com/jupyter/nbconvert > Are you telling me there are instruction for how to get A4paper format there? I have looked around but... /Martin --

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Perhaps we should remove the (pysqlite) version attributes while we're there? Ref. https://mail.python.org/archives/list/python-...@python.org/message/NS6YVA3QCAXELK7KROOLULKXOF3KFFJA/ >>> import sqlite3 >>> sqlite3.version '2.6.0' >>>

Re: Jupyter notebooks to A4 (again)

2021-01-28 Thread Martin Schöön
Den 2021-01-28 skrev Pieter van Oostrum : > Martin Schöön writes: > >> Hello all, >> >> Some years ago I asked about exporting notebooks to pdf in >> A4 rather than US Letter. I got help, rather detailed >> instructions from you in general and Piet von Oostrum in > > Who now calls himself Pieter

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +23186 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24364 ___ Python tracker

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread Zachary Ware
Zachary Ware added the comment: Looks like that link could be safely removed from our docs. Would you like to submit a pull request doing so? -- nosy: +berker.peksag, erlendaasland, zach.ware ___ Python tracker

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread user1347091
user1347091 added the comment: The documentation page in question is the following: https://docs.python.org/3.10/library/sqlite3.html (Sorry, I forgot to add this information to my original post) -- ___ Python tracker

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread user1347091
New submission from user1347091 : In the documentation of the sqlite3 module it says: See also: https://github.com/ghaering/pysqlite The pysqlite web page – sqlite3 is developed externally under the name “pysqlite”. However, the README.md of the linked repository says: This

Re: _Py_FatalErrorFunc not found

2021-01-28 Thread Barry Scott
> On 28 Jan 2021, at 09:48, Klaus Dittrich wrote: > > > I need some help. > > hplip as of late complains : > > File "/usr/bin/hp-scan", line 40, in >import scanext > ImportError: /usr/lib/python3.9/site-packages/scanext.so: undefined symbol: > _Py_FatalErrorFunc > > Which module

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-01-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Should we proceed with fixing GC for all heap types before continuing work with bpo-40077? -- ___ Python tracker ___

[issue43046] argparse: capturing actions

2021-01-28 Thread Glenn Linderman
Glenn Linderman added the comment: Raymond Hettinger added the comment: >> Sounds like another wet blanket argpment > Please watch your tone. It borders on being abusive. I considered that as a canonical description of the type of negativity presented by your comment. It was not intended

[issue43009] Port curses capi pointer array to a struct

2021-01-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: The _decimal API is also just an array of pointers. Should we change that to a struct as well? -- nosy: +erlendaasland ___ Python tracker

[issue43058] setting a logging Handler name

2021-01-28 Thread Brett Cohen
New submission from Brett Cohen : When using the logging module to add a new handler, the documentation doesn't mention the ability to set the name of the handler. It turns out that it's actually a supported feature by using: handler_instance.set_name("YOUR_NAME_HERE") I'd suggest

[issue43057] Timezone 'Etc/GMT-5' functions as Timezone 'Etc/GMT+5'

2021-01-28 Thread Mark Dickinson
Mark Dickinson added the comment: This isn't a Python bug - it's a quirk of the way that the "Etc/***" timezones are defined. See for example https://en.wikipedia.org/wiki/Tz_database#Area: > In order to conform with the POSIX style, those zone names beginning with > "Etc/GMT" have their

[issue42380] Build windows binaries with MS VS2019 16.8+ / MSVC 19.28+

2021-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Judging from the link you posted to version numbering https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering the first line should have 'MSVC 14.28' the middle column title should be 'MS Visual Studio'. Mark Shannon today posted

[issue24275] lookdict_* give up too soon

2021-01-28 Thread Hristo Venev
Hristo Venev added the comment: Benchmark program attached. 0. Creates a dict with str keys 1. str lookups 2. str subclass lookups on the same dict 3. str lookups on the same dict Results before patch: 0.9493069459404069 +- 0.004707371313935551 1.47313450980997 +- 0.01350596115630158

[issue24275] lookdict_* give up too soon

2021-01-28 Thread Hristo Venev
Hristo Venev added the comment: I've attached a patch. I will soon provide benchmark results. -- keywords: +patch nosy: +h.venev Added file: https://bugs.python.org/file49772/0001-Don-t-downgrade-unicode-only-dicts-to-mixed-on-non-u.patch ___

[issue43057] Timezone 'Etc/GMT-5' functions as Timezone 'Etc/GMT+5'

2021-01-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: I reproduced something similar in 3.9 with standard library modules: >>> from datetime import datetime >>> from zoneinfo import ZoneInfo >>> zone = ZoneInfo(key='Etc/GMT-3') >>> zone.tzname(datetime(2021, 1, 28)) '+03' -- nosy: +Dennis Sweeney

[issue43040] random.py randrange() is very slow if the range is a power of 2.

2021-01-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: > python2's implementation of randrange() that uses random() > under the hood was noticeably faster than python3's > randrange() that uses getrandbits() under the hood. Yes, that was a conscious decision. See https://bugs.python.org/issue9025 . We

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Mark Dickinson
Mark Dickinson added the comment: Translation of the proposal to the iterative version described here: https://github.com/python/cpython/blob/64fc105b2d2faaeadd1026d2417b83915af6622f/Modules/mathmodule.c#L1591-L1611 The main loop: c = (n.bit_length() - 1) // 2 a = 1

idlelib re-use

2021-01-28 Thread Robin Becker
I googled in vain for instances where parts of idlelib are re-used in a simplistic way. I would like to use the editor functionality in a tkinter window and also probably run code in a subprocess. Are there any examples around that do these sorts of things? -- Robin Becker --

_Py_FatalErrorFunc not found

2021-01-28 Thread Klaus Dittrich
I need some help. hplip as of late complains : File "/usr/bin/hp-scan", line 40, in import scanext ImportError: /usr/lib/python3.9/site-packages/scanext.so: undefined symbol: _Py_FatalErrorFunc Which module defines this _Py_FatalErrorFunc? Or has the name of this function changed in

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Mark Dickinson
Mark Dickinson added the comment: Some comments, now that I've had a chance to look properly at the suggestion. For reference, here's the "near square root" function that forms the basis of Python's isqrt algorithm. For clarity, I've written it recursively, but it's equivalent to the

[issue43057] Timezone 'Etc/GMT-5' functions as Timezone 'Etc/GMT+5'

2021-01-28 Thread killv5
New submission from killv5 : When I run the code attached I get the results below. This is not the expected behavior because I was expecting the GMT-5 timezone instead of GMT+5. When I tried to use GMT-5 I had the result of GMT+5. Luckily the timezone names still work ('EST','CST', etc.)

[issue43056] Use of dicts in sections 4.2 and 4.7 of Python tutorial a bit confusing

2021-01-28 Thread Jesse Silverman
New submission from Jesse Silverman : The Python tutorial was not my first introduction to Python, but I see things in sections 4.2 and 4.7 that likely would have confused me a lot if it was. In 4.2 near the end, we have great advice about how to avoid problems with modifying a collection

[issue29076] Mac installer shell updater script silently fails if default shell is fish

2021-01-28 Thread Ned Deily
Ned Deily added the comment: Thanks for the PR! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29076] Mac installer shell updater script silently fails if default shell is fish

2021-01-28 Thread Ned Deily
Ned Deily added the comment: New changeset 81b23a9b148b60f8f541e4b06e1d88c58644e3b8 by Miss Islington (bot) in branch '3.8': bpo-29076: Add fish support to macOS installer (GH-23302) (GH-23938) https://github.com/python/cpython/commit/81b23a9b148b60f8f541e4b06e1d88c58644e3b8 --

[issue29076] Mac installer shell updater script silently fails if default shell is fish

2021-01-28 Thread Ned Deily
Ned Deily added the comment: New changeset e9c6c26aff08e4c7bc6f1e8015cdd8edcc92dbef by Miss Islington (bot) in branch '3.9': bpo-29076: Add fish support to macOS installer (GH-23302) (GH-23937) https://github.com/python/cpython/commit/e9c6c26aff08e4c7bc6f1e8015cdd8edcc92dbef --

[issue42988] [security] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-01-28 Thread Ned Deily
Ned Deily added the comment: Resolution of this issue is blocking 3.7.x and 3.6.x security releases and threatens to block upcoming maintenance releases. -- nosy: +lukasz.langa, ned.deily priority: normal -> release blocker title: Information disclosure via pydoc -p:

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-28 Thread Ned Deily
Ned Deily added the comment: Resolution of this issue is blocking 3.7.x and 3.6.x security releases and threatens to block upcoming maintenance releases. -- nosy: +lukasz.langa, ned.deily priority: normal -> release blocker ___ Python tracker

[issue42819] readline 8.1 bracketed paste

2021-01-28 Thread Ned Deily
Change by Ned Deily : -- nosy: +twouters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24790] Idle: improve stack viewer

2021-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: 9. As of now, values are not named, whereas I believe they are in debugger. IE given def f(a,b,c): 1/0; f(1,2,3), viewer prints unlaabelled 1, 2, 3 on separate lines. Also, the representation of a value may not fit on a line. I believe a current debugger

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Juraj Sukop
Juraj Sukop added the comment: The rounding down of `l` might compute more than half of the bits so that the final Heron' step in `isqrt_2` might correct the uncertain low bit if `a - (a*a > n)` is missing from `isqrt`. As it currently stands, `a - (a*a > n)` is computed both in `isqrt` and

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Mark Dickinson
Mark Dickinson added the comment: > As it currently stands, `a - (a*a > n)` is computed both in `isqrt` and > `isqrt_2`. So I was thinking that maybe the former might be dropped. Ah, sorry; I misunderstood. Yes, I think so. I'll respond more fully later. (Sorry - real life getting in the

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Mark Dickinson
Mark Dickinson added the comment: > the only thing I'm not sure about is whether the final correction in the > original `isqrt` is needed Well, *some* part of the algorithm has to make use of the low-order bits of n. Otherwise we won't be able to distinguish n = 4a**2 + 4a + 1 (whose isqrt

[issue43055] Inconsistent behaviour when using walrus operator with 'and'/'or'

2021-01-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. The short circuit evaluation of and/or expressions is already documented, and this behavior follows directly from that. -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue36207] robotsparser deny all with some rules

2021-01-28 Thread jeanotlapin
jeanotlapin added the comment: Il semblerait que le script continue d'afficher des erreurs et rencontre des bugs. Preuve en est puisque j'ai testé sur ce site d'auto hypnose https://www.lautohypnose.com/ en vain... -- nosy: +jeanotlapin ___ Python

[issue43055] Inconsistent behaviour when using walrus operator with 'and'/'or'

2021-01-28 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is pretty clearly the intended semantics. In your first example, what do you propose "print(x)" would produce? Consider: if False and (x:=input()) != '': pass else: print(x) We cannot change the semantics to now call input(), or any function

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-28 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Mark. I'll just close it now. I've made a reminder about the PEP, but not sure when/if I'll get to it. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Juraj Sukop
Juraj Sukop added the comment: What the proof goes, you did most of the work already. Consider the following: l = (n.bit_length() - 1)//4 a = isqrt(n >> 2*l) a = ((a << l) + n//(a << l))//2 return a - (a*a > n) This computes the square root of the (possibly longer) upper

[issue42819] readline 8.1 bracketed paste

2021-01-28 Thread Dustin Rodrigues
Dustin Rodrigues added the comment: Bumping this issue because it's a bug affecting all users who build or use a Python built with the current version of readline, to include all macOS HomeBrew and Arch Linux users who use the python from the respective package managers. --

[issue43048] Printing RecursionError results in RecursionError

2021-01-28 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate status: open -> pending superseder: -> asyncio produces an unexpected traceback with recursive __getattribute__ ___ Python tracker

EuroPython 2021: Getting ready

2021-01-28 Thread M.-A. Lemburg
We're happy to announce the pre-launch website for this year's EuroPython 2021: * EuroPython 2021 * https://ep2021.europython.eu/ The site comes with an FAQ page, which lists all the information we have for you at the moment. We're repeating the most

[issue43054] What does the existence of a struct in a header file imply about the C-API

2021-01-28 Thread Petr Viktorin
Petr Viktorin added the comment: When we're talking just about API, not the stable ABI (which contains only a few structs), reordering and additions should be fair game. > Rather than go through this tortuous analysis for all headers, it might be > better to document which structs are part

EuroPython 2021: Getting ready

2021-01-28 Thread M.-A. Lemburg
We're happy to announce the pre-launch website for this year's EuroPython 2021: * EuroPython 2021 * https://ep2021.europython.eu/ The site comes with an FAQ page, which lists all the information we have for you at the moment. We're repeating the most

[issue43055] Inconsistent behaviour when using walrus operator with 'and'/'or'

2021-01-28 Thread Aman Anifer
New submission from Aman Anifer : Using the walrus operator (:=) alongside 'and'/'or' shows inconsistent behaviour which changes with the order of given conditions. For example: if(False and (x := 0)<1): print("Yes") else: print(x) Gives the error that 'NameError: name 'x' is not

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-28 Thread Mark Dickinson
Mark Dickinson added the comment: @Eric: Are you okay with closing this issue, or do you think we should leave it open as a reminder to write that PEP? -- ___ Python tracker

Re: IDE tools to debug in Python?

2021-01-28 Thread Skip Montanaro
> > > Python is an interactive language. You can develop a lot while working > > on a Python console. Then copy and paste into a program. > > Absolutely, the humble interactive prompt is often overlooked > as a development tool. It's not as good as the "evaluate > expression" tool in the Smalltalk

[issue43054] What does the existence of a struct in a header file imply about the C-API

2021-01-28 Thread Mark Shannon
New submission from Mark Shannon : Given the lack of explicit documentation on this subject, and differing opinions among core developers, I though it would be good to discuss how the existence of a struct in a header file constrains the C-API. Original PR provoking this discussion:

[issue42830] tempfile mkstemp() leaks file descriptors if os.close() is not called

2021-01-28 Thread Isaac Young
Isaac Young added the comment: Perhaps the documentation should be more explicit, but I wouldn't say this is an issue. Both mkstemp and mkdtemp are low level functions which are intended to have this kind of flexibility. The os.unlink, and the equivalent os.remove, are POSIX defined

Re: Jupyter notebooks to A4 (again)

2021-01-28 Thread Pieter van Oostrum
Martin Schöön writes: > Hello all, > > Some years ago I asked about exporting notebooks to pdf in > A4 rather than US Letter. I got help, rather detailed > instructions from you in general and Piet von Oostrum in Who now calls himself Pieter van Oostrum, just like his passport says :) --

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks; I'll take a look at this at the weekend. Do you have a sketch of a proof of correctness available? -- assignee: -> mark.dickinson ___ Python tracker

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +mark.dickinson, rhettinger, serhiy.storchaka, stutzbach ___ Python tracker ___ ___

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Juraj Sukop
New submission from Juraj Sukop : This is a follow up to https://bugs.python.org/issue36887 and https://bugs.python.org/issue36957 . The new `isqrt` is remarkably simple but it does not split the number at hand optimally. Ideally one would want to have 2n/n division everywhere but since the