[issue42109] Use hypothesis for testing the standard library, falling back to stubs

2021-05-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: In order to understand what Paul is concretely proposing, I read and partly reviewed his PR. I thought about maintainability. Part A adds test.support.hypothesis_helper, similar in purpose to other specialized xyz_helper modules. Hypothesis_helper imports

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-05-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg394414 ___ Python tracker ___ ___ Python-bugs-list

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-05-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is it possible to defer hash randomization until after pycs are generated? The underlying problem here is an intentional scrambling of data. If determinism is what is desired then deferring that action addresses the action cause of non-determinism

[issue5758] fileinput.hook_compressed returning bytes from gz file

2021-05-25 Thread Inada Naoki
Inada Naoki added the comment: > I did consider and confirm that mode="rb" does also provide a uniform > solution, but it also regresses the behavior of uncompressed inputs, making > them bytes where they were text. Of course, I suggested to use "rb" when you want to read bytes. * When

[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2021-05-25 Thread John Belmonte
John Belmonte added the comment: I've opened a new PR, please review. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-25 Thread Catherine Devlin
Catherine Devlin added the comment: All that said, it's easy to imagine a PyPI package that would give this functionality for those who want it. Maybe even one that could also alter the behavior of Click and Typer. If you want to go that route, let me know. --

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-25 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +24967 pull_request: https://github.com/python/cpython/pull/26375 ___ Python tracker ___

[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: William, thank you for the suggestion, but we're going to decline for the reasons listed by Eric and me. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

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

2021-05-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Victor, can you take a look at the opened PRs? -- ___ Python tracker ___ ___

[issue43921] test_ssl fails on Windows buildbots

2021-05-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks for the explanation! > They're flakey in the sense that they're not failing reliably, when they > clearly should be :) Yeah, I do agree with you in this, but I am still not happy that they *realiably* pass in 3.9 and 3.8 in two different OS

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

2021-05-25 Thread Neil Schemenauer
Change by Neil Schemenauer : -- nosy: +nascheme ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread Cameron Simpson
On 25May2021 19:21, hw wrote: >On 5/25/21 11:38 AM, Cameron Simpson wrote: >>On 25May2021 10:23, hw wrote: >>>if status != 'OK': >>>print('Login failed') >>>exit >> >>Your "exit" won't do what you want. I expect this code to raise a >>NameError exception here (you've not defined "exit").

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread Cameron Simpson
On 25May2021 15:53, Dennis Lee Bieber wrote: >On Tue, 25 May 2021 19:21:39 +0200, hw declaimed the >following: >>Oh ok, it seemed to be fine. Would it be the right way to do it with >>sys.exit()? Having to import another library just to end a program >>might not be ideal. > > I've never

Re: learning python ...

2021-05-25 Thread Greg Ewing
On 2021-05-24, Alan Gauld via Python-list wrote: Although wouldn't it be "expected boolean expression" rather than conditional expression? Python doesn't care how the argument to 'if' is arrived at so long as it's a boolean. This isn't really true either. Almost every object in Python has an

Re: learning python ...

2021-05-25 Thread Greg Ewing
On 26/05/21 3:33 am, Dennis Lee Bieber wrote: the OBJECTS have a type and can not change type. Well... built-in types can't, but... >>> class A: ... pass ... >>> class B: ... pass ... >>> a = A() >>> type(a) >>> a.__class__ = B >>> type(a) -- Greg --

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread Greg Ewing
On 26/05/21 5:21 am, hw wrote: On 5/25/21 11:38 AM, Cameron Simpson wrote: You'll need to import "sys". aving to import another library just to end a program might not be ideal. The sys module is built-in, so the import isn't really loading anything, it's just giving you access to a

[issue44222] Improving _removeHandlerRef for a very long _handlerList

2021-05-25 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43921] test_ssl fails on Windows buildbots

2021-05-25 Thread Steve Dower
Steve Dower added the comment: > But 3.9 and 3.8 are not failing on test_ssl, so do something has clearly > changed. Are the failing tests new? They're flakey in the sense that they're not failing reliably, when they clearly should be :) If something changed about how any part of the

[issue44222] Improving _removeHandlerRef for a very long _handlerList

2021-05-25 Thread miss-islington
miss-islington added the comment: New changeset 156699bca02dd2def844d03e26fc16a831336635 by Yonatan Goldschmidt in branch 'main': bpo-44222: Improve _removeHandlerRef() for a very long _handlerList (GH-26325) https://github.com/python/cpython/commit/156699bca02dd2def844d03e26fc16a831336635

[issue44092] [sqlite3] Remove special rollback handling

2021-05-25 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Berker, does this look ok to you? -- title: [sqlite3] consider removing special rollback handling -> [sqlite3] Remove special rollback handling ___ Python tracker

[issue44237] test_ssl randomly fails on macOS GH Action: test_get_server_certificate_sni() and test_get_server_certificate_timeout()

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: learning python ...

2021-05-25 Thread Manfred Lotz
On Mon, 24 May 2021 08:14:39 +1200 Ron.Lauzon@f192.n1.z21.fsxnet (Ron Lauzon) wrote: > -=> hw wrote to All <=- > > hw> Traceback (most recent call last): > hw>File "[...]/hworld.py", line 18, in > hw> print(isinstance(int, float)) > hw> TypeError: isinstance() arg 2 must be a

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread Terry Reedy
On 5/25/2021 1:25 PM, MRAB wrote: On 2021-05-25 16:41, Dennis Lee Bieber wrote: In Python 3, strings are UNICODE, using 1, 2, or 4 bytes PER CHARACTER This is CPython 3.3+ specific. Before than, it depended on the OS. I believe MicroPython uses utf-8 for strings. (I don't recall

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread Chris Angelico
On Wed, May 26, 2021 at 8:27 AM Grant Edwards wrote: > > On 2021-05-25, MRAB wrote: > > On 2021-05-25 16:41, Dennis Lee Bieber wrote: > > >> In Python 3, strings are UNICODE, using 1, 2, or 4 bytes PER > >> CHARACTER (I don't recall if there is a 3-byte version). If your > >> input bytes are all

Re: learning python ...

2021-05-25 Thread Michael F. Stemper
On 24/05/2021 18.30, Alan Gauld wrote: On 24/05/2021 16:54, Michael F. Stemper wrote: In my early days of writing python, I created lists named "list", dictionaries named "dict", and strings named "str". I mostly know better now, but sometimes still need to restrain my fingers. I think most

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread Grant Edwards
On 2021-05-25, MRAB wrote: > On 2021-05-25 16:41, Dennis Lee Bieber wrote: >> In Python 3, strings are UNICODE, using 1, 2, or 4 bytes PER >> CHARACTER (I don't recall if there is a 3-byte version). If your >> input bytes are all 7-bit ASCII, then they map directly to a 1-byte >> per character

Re: learning python ...

2021-05-25 Thread Grant Edwards
On 2021-05-25, Michael F. Stemper wrote: > On 24/05/2021 23.08, hw wrote: >> On 5/25/21 12:37 AM, Greg Ewing wrote: >> >> Are all names references?  When I pass a name as a parameter to a >> function, does the object the name is referring to, when altered by the >> function, still appear

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

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24966 pull_request: https://github.com/python/cpython/pull/26374 ___ Python tracker ___

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

2021-05-25 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thanks! Hashlib PR comin' up. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42792] [MacOS] Can't open file in a separate (threading.Thread) thread

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24965 pull_request: https://github.com/python/cpython/pull/26373 ___ Python tracker ___

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

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24964 pull_request: https://github.com/python/cpython/pull/26373 ___ Python tracker ___

[issue42792] [MacOS] Can't open file in a separate (threading.Thread) thread

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: -24962 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42792] [MacOS] Can't open file in a separate (threading.Thread) thread

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: -24961 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24963 pull_request: https://github.com/python/cpython/pull/26372 ___ Python tracker ___

[issue42792] [MacOS] Can't open file in a separate (threading.Thread) thread

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24962 pull_request: https://github.com/python/cpython/pull/26373 ___ Python tracker ___

[issue42792] [MacOS] Can't open file in a separate (threading.Thread) thread

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland nosy_count: 4.0 -> 5.0 pull_requests: +24961 pull_request: https://github.com/python/cpython/pull/26372 ___ Python tracker

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

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24960 pull_request: https://github.com/python/cpython/pull/26371 ___ Python tracker ___

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

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24959 pull_request: https://github.com/python/cpython/pull/26370 ___ Python tracker ___

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

2021-05-25 Thread Christian Heimes
Christian Heimes added the comment: Please open PRs and assign them to me. I'll review them as soon as possible. -- ___ Python tracker ___

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

2021-05-25 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Christian, I've got a PR ready for Modules/_ssl.c, but I won't submit it if you'd rather do it yourself. I'll stay off the sha/md5 types unless you approve :) -- nosy: +christian.heimes ___ Python tracker

[issue44031] python3.8.9, python3.9.2 test_embed test_tabnanny failed

2021-05-25 Thread Alexei S
Alexei S added the comment: I downloaded tar.gz of Python-3.8.9 and Python-3.9.4 into my ~/Downloads folder (~/Загрузки in Russian) extracted them, after that executed: chmod +x configure CXX=/usr/bin/g++ ./configure --enable-optimizations make -j4 problems the same for both Python versions

[issue43921] test_ssl fails on Windows buildbots

2021-05-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Also, this seems to be reproducible in MacOS at least: https://bugs.python.org/issue44229 -- ___ Python tracker ___

[issue43216] Removal of @asyncio.coroutine in Python 3.11

2021-05-25 Thread Illia Volochii
Change by Illia Volochii : -- keywords: +patch pull_requests: +24958 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26369 ___ Python tracker ___

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

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24957 pull_request: https://github.com/python/cpython/pull/26368 ___ Python tracker ___

[issue43921] test_ssl fails on Windows buildbots

2021-05-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Looking at the output, I think the tests are just going to be inherently > flakey. It's not testing the specific scenario directly enough, and relying > heavily on implicit synchronization. But 3.9 and 3.8 are not failing on test_ssl, so do

[issue43921] test_ssl fails on Windows buildbots

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: > Looking at the output, I think the tests are just going to be inherently > flakey. It's not testing the specific scenario directly enough, and relying > heavily on implicit synchronization. My notes to debug race conditions:

[issue43921] test_ssl fails on Windows buildbots

2021-05-25 Thread Steve Dower
Steve Dower added the comment: I can't reproduce these on my own (Windows) machine either. Looking at the output, I think the tests are just going to be inherently flakey. It's not testing the specific scenario directly enough, and relying heavily on implicit synchronization. We probably

[issue37439] Add random.binomialvariate()

2021-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: Nope, that's the wrong paper. It looks as though this is the right one, but it's hidden behind a paywall: https://dl.acm.org/doi/abs/10.1145/42372.42381 -- ___ Python tracker

[issue44237] test_ssl randomly fails on macOS GH Action: test_get_server_certificate_sni() and test_get_server_certificate_timeout()

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: > https://github.com/python/cpython/pull/26359/checks?check_run_id=2668874284 test.pythoninfo: ssl.HAS_SNI: True ssl.OPENSSL_VERSION: OpenSSL 1.1.1k 25 Mar 2021 ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 11, 15) ssl.OP_ALL: 0x8054 ssl.OP_NO_TLSv1_1: 0x1000

[issue44232] Crash in Objects/typeobject.c

2021-05-25 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +24956 pull_request: https://github.com/python/cpython/pull/26365 ___ Python tracker

[issue44237] test_ssl randomly fails on macOS GH Action: test_get_server_certificate_sni() and test_get_server_certificate_timeout()

2021-05-25 Thread Christian Heimes
Christian Heimes added the comment: It looks like a duplicate or very similar to bpo-44229. -- dependencies: +test_get_server_certificate fails intermittently on macOS ___ Python tracker

[issue44232] Crash in Objects/typeobject.c

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset bd199e72fb60a8ff001a023f23925092a290be91 by Victor Stinner in branch 'main': bpo-44232: Fix type_new() error reporting (GH-26359) https://github.com/python/cpython/commit/bd199e72fb60a8ff001a023f23925092a290be91 --

[issue44237] test_ssl randomly fails on macOS GH Action: test_get_server_certificate_sni() and test_get_server_certificate_timeout()

2021-05-25 Thread STINNER Victor
New submission from STINNER Victor : https://github.com/python/cpython/pull/26359/checks?check_run_id=2668874284 Error 1: 2021-05-25T20:02:41.9174160Z == 2021-05-25T20:02:41.9268350Z ERROR: test_get_server_certificate_sni

[issue37439] Add random.binomialvariate()

2021-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: I think the NumPy implementation may be from here: https://core.ac.uk/download/pdf/11007254.pdf (though I'm struggling to find a clear citation in the NumPy source) -- ___ Python tracker

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-05-25 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +24955 pull_request: https://github.com/python/cpython/pull/26364 ___ Python tracker ___

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

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24954 pull_request: https://github.com/python/cpython/pull/26363 ___ Python tracker ___

[issue36384] [security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: > I think the only thing I'd improve would be to mention that this issue is the > one that introduced the bug, otherwise it looks a bit weird. Ok, done: https://python-security.readthedocs.io/vuln/ipaddress-ipv4-leading-zeros.html#timeline --

[issue44217] Tkinter/IDLE: literal astral char discombobulates text editing

2021-05-25 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Sorry, 1.0 and 1.1 refer to  not 1.1 and 1.2 -- ___ Python tracker ___ ___ Python-bugs-list

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

2021-05-25 Thread miss-islington
miss-islington added the comment: New changeset 534da740a2586357d204ab5f446295b9ce220787 by Miss Islington (bot) in branch '3.10': bpo-42972: Fully implement GC protocol for arraymodule types (GH-26114) https://github.com/python/cpython/commit/534da740a2586357d204ab5f446295b9ce220787

[issue44217] Tkinter/IDLE: literal astral char discombobulates text editing

2021-05-25 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I executed the code Tal provided and yes both Serhiy and Tal you're right. It seems the backspace problem is related to Tcl/Tk's indexing. 1.1 and 1.2 both refer to . Also the dancing I told actually tells why this is happening. Since Tcl/Tk uses BMP it

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

2021-05-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset bd404ccac0d3e8358995ac0cbeec9373bb6c4d96 by Erlend Egeberg Aasland in branch 'main': bpo-42972: Fully implement GC protocol for arraymodule types (GH-26114)

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

2021-05-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +24953 pull_request: https://github.com/python/cpython/pull/26362 ___ Python tracker ___

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

2021-05-25 Thread miss-islington
miss-islington added the comment: New changeset e8d9df0089e30a06d837fa2cfbd070e01531701f by Miss Islington (bot) in branch '3.10': bpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104) https://github.com/python/cpython/commit/e8d9df0089e30a06d837fa2cfbd070e01531701f

[issue40551] PRs should be rebased on top of master before running the build/tests

2021-05-25 Thread Filipe Laíns
Change by Filipe Laíns : -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37439] Add random.binomialvariate()

2021-05-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: A presumed optimal version of this is already available in numpy. https://numpy.org/doc/stable/reference/random/generated/numpy.random.Generator.binomial.html

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

2021-05-25 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +24952 pull_request: https://github.com/python/cpython/pull/26361 ___ Python tracker

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

2021-05-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset d3c277a59c3d93fb92f7026f63678083d1d49fc5 by Erlend Egeberg Aasland in branch 'main': bpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104)

[issue44031] python3.8.9, python3.9.2 test_embed test_tabnanny failed

2021-05-25 Thread Alexei S
Alexei S added the comment: make test TESTOPTS="-v test_embed test_tabnanny" CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python -E ./setup.py build running build running build_ext The following

[issue44233] Provide Windows Terminal Fragment Extension

2021-05-25 Thread Steve Dower
Steve Dower added the comment: Thanks! This is a great idea. I'd prioritise adding support to the Store app first, as that's easier to manage (we're not having to modify files owned by other apps outside of our install directory). But no reason we couldn't extend the older installer and

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread MRAB
On 2021-05-25 16:41, Dennis Lee Bieber wrote: On Tue, 25 May 2021 10:23:41 +0200, hw declaimed the following: So I'm forced to convert stuff from bytes to strings (which is weird because bytes are bytes) and to use regular expressions to extract the message-uids from what the functions

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread hw
On 5/25/21 11:38 AM, Cameron Simpson wrote: On 25May2021 10:23, hw wrote: I'm about to do stuff with emails on an IMAP server and wrote a program using imaplib which, so far, gets the UIDs of the messages in the inbox: #!/usr/bin/python I'm going to assume you're using Python 3. Python

[issue44226] Threads shutting down in Py 2.7 but not in Py 3.69 while making SSH connection using Paramiko module

2021-05-25 Thread Muralidhar BN
Muralidhar BN added the comment: We have checked this issue by adapting another 3rd party SSH packages ( replace paramiko with pyssh). Using this we have found same o/p results. Which means it is not 3rd party SSH package ( paramiko or pyssh) issue. Issue report in Paramiko github will be

[issue36384] [security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-05-25 Thread George-Cristian Bîrzan
George-Cristian Bîrzan added the comment: I think the only thing I'd improve would be to mention that this issue is the one that introduced the bug, otherwise it looks a bit weird. -- ___ Python tracker

Re: learning python ...

2021-05-25 Thread Michael F. Stemper
On 24/05/2021 23.08, hw wrote: On 5/25/21 12:37 AM, Greg Ewing wrote: Python does have references to *objects*. All objects live on the heap and are kept alive as long as there is at least one reference to them. If you rebind a name, and it held the last reference to an object, there is no

Re: learning python ...

2021-05-25 Thread Grant Edwards
On 2021-05-25, Greg Ewing wrote: > On 25/05/21 5:56 pm, Avi Gross wrote: >> Var = read in something from a file and make some structure like a data.frame >> Var = remove some columns from the above thing pointed to by Var >> Var = make some new calculated columns ditto >> Var = remove some rows

[issue36384] [security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: George-Cristian Bîrzan: "The timeline there is wrong." Fixed: https://python-security.readthedocs.io/vuln/ipaddress-ipv4-leading-zeros.html#timeline The strange part is "2019-03-20 (-741 days): Python issue bpo-36384 reported by Joel Croteau". The problem

[issue42109] Use hypothesis for testing the standard library, falling back to stubs

2021-05-25 Thread Paul Ganssle
Paul Ganssle added the comment: > I use hypothesis during development, but don't have a need for in the the > standard library. By the time code lands there, we normally have a specific > idea of what edge cases needs to be in the tests. The suggestion I've made here is that we use @example

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-05-25 Thread Filipe Laíns
Filipe Laíns added the comment: What about normal sets? They also suffer from the same issue. -- ___ Python tracker ___ ___

[issue44131] [C API] Add tests on Py_FrozenMain()

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: commit eaede0ded72e67cee4a91c086847d54cb64ca74c Author: Victor Stinner Date: Mon May 17 23:48:35 2021 +0200 bpo-44131: Test Py_FrozenMain() (GH-26126) * Add test_frozenmain to test_embed * Add Programs/test_frozenmain.py * Add

[issue44232] Crash in Objects/typeobject.c

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: > We noticed a behavior change in [1]. Hey, well done bisection, you're right, it's a regression of my large type_new() refactoring in bpo-43770. I wrote PR 26359 to fix it. -- ___ Python tracker

[issue44232] Crash in Objects/typeobject.c

2021-05-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24951 pull_request: https://github.com/python/cpython/pull/26359 ___ Python tracker ___

[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-05-25 Thread Trygve Aaberge
Trygve Aaberge added the comment: > The _PyImport_FixupExtensionObject() change impacts extensions using the > legacy API and so should not be used in subinterpreters. I'm not using that directly in my code, but I guess it's used indirectly? If it shouldn't be used, what's the alternative

[issue44232] Crash in Objects/typeobject.c

2021-05-25 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +24950 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26358 ___ Python tracker ___

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Possible solution: add an ordered subtype of frozenset which would keep an array of items in the original order. The compiler only creates frozenset when optimizes "x in {1, 2}" or "for x in {1, 2}". It should now create an ordered frozenset from a list

Re: learning python ...

2021-05-25 Thread Grant Edwards
On 2021-05-24, Alan Gauld via Python-list wrote: > On 24/05/2021 19:48, Grant Edwards wrote: > >>> Traceback ( File "", line 1 >>> if = 1.234 >>>^ >>> SyntaxError: invalid syntax >> >> I must admit it might be nice if the compiler told you _why_ the >> syntax is invalid (e.g.

[issue44214] PyArg_Parse* for vectorcall?

2021-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are alternative ideas of parsing API which should be considered: 1. Linearize keyword arguments using _PyArg_UnpackKeywords() and parse the linear array of arguments with a variant of _PyArg_ParseStack(). 2. Parse arguments outside of the user

[issue44232] Crash in Objects/typeobject.c

2021-05-25 Thread Ken Jin
Ken Jin added the comment: Alright, I got a minimum reproducible example: class XBase(type): def __new__(cls, name, bases, attrs, **kwargs): attrs.pop('__module__') return super().__new__(cls, name, bases, attrs, **kwargs) class X(metaclass=XBase): ... type('A', (X, ),

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread Grant Edwards
On 2021-05-25, hw wrote: > I'm about to do stuff with emails on an IMAP server and wrote a program > using imaplib My recollection of using imaplib a few years ago is that yes, it is unweildy, oddly low-level, and rather un-Pythonic (excuse my presumption in declaring what is and isn't

Re: learning python ...

2021-05-25 Thread Greg Ewing
On 25/05/21 5:56 pm, Avi Gross wrote: Var = read in something from a file and make some structure like a data.frame Var = remove some columns from the above thing pointed to by Var Var = make some new calculated columns ditto Var = remove some rows ... Var = set some kind of grouping on the

Re: learning python ...

2021-05-25 Thread Greg Ewing
On 25/05/21 2:59 pm, hw wrote: Then what is 'float' in the case of isinstance() as the second parameter, and why can't python figure out what 'float' refers to in this case? You seem to be asking for names to be interpreted differently when they are used as parameters to certain functions.

Re: learning python ...

2021-05-25 Thread Alan Gauld via Python-list
On 25/05/2021 00:41, Jon Ribbens via Python-list wrote: > What would you call the argument to a function that > returns, say, an upper-cased version of its input? Probably 'candidate' or 'original' or 'initial' or somesuch. Or even just 's'. Single character names are OK when there is no

[issue44010] IDLE: highlight soft keywords

2021-05-25 Thread Tal Einat
Tal Einat added the comment: IMO this can be closed, so I'm closing this. (Terry is welcome to reopen this if needed.) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue44236] Define SOABI, LIBRARY, LDLIBRARY and LIBPL on Windows

2021-05-25 Thread Steve Dower
Steve Dower added the comment: Should actually be: LIBPL=Path(sysconfig.get_config_var("installed_base")) / "libs" -- ___ Python tracker ___

[issue44236] Define SOABI, LIBRARY, LDLIBRARY and LIBPL on Windows

2021-05-25 Thread Steve Dower
New submission from Steve Dower : Python on Windows currently has no values in sysconfig to locate the lib files for building. Though these are very predictable (for now), it would be nice to have them in the same place as for other platforms. I propose defining the following config vars in

[issue44229] test_get_server_certificate fails intermittently on macOS

2021-05-25 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Yes, sorry ‘bout the cryptic messages :) This is against current main branch (I’m not at my computer right now, so I don’t have the git ref). The first two failures came after 328 and 389 runs. Increasing the timeout (using test.support.SHORT_TIMEOUT)

[issue44010] IDLE: highlight soft keywords

2021-05-25 Thread E. Paine
E. Paine added the comment: Can we close this, or are we leaving it open for when (if) we do a colouriser refactor? -- ___ Python tracker ___

[issue44235] Remove l*gettext() and related functions in the gettext module

2021-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Go ahead! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44235] Remove l*gettext() and related functions in the gettext module

2021-05-25 Thread Dong-hee Na
Dong-hee Na added the comment: @serhiy If you are okay, can I process this issue? -- ___ Python tracker ___ ___ Python-bugs-list

[issue44214] PyArg_Parse* for vectorcall?

2021-05-25 Thread Ronald Oussoren
Ronald Oussoren added the comment: Annoyingly the keywords variant is the most interesting to expose :-) due to the complexity of correctly interpreting keyword arguments. I agree that we should be careful in exposing the APIs using _PyArg_Parser, although it should be easer to expose it

Re: learning python ...

2021-05-25 Thread Michael Torrie
On 5/24/21 9:53 PM, hw wrote: > That seems like an important distinction. I've always been thinking of > variables that get something assigned to them, not as something that is > being assigned to something. Your thinking is not incorrect. Assignment is how you set a variable to something.

  1   2   >