Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 12:44 PM Avi Gross via Python-list wrote: > > Greg, > > My point was not to ASK what python does as much as to ask why it matters to > anyone which way it does it. Using less space at absolutely no real expense > is generally a plus. Having a compiler work too hard, or

Re: Behaviour of pop() for dictionaries

2021-06-15 Thread dn via Python-list
On 15/06/2021 21.37, BlindAnagram wrote: > On 15/06/2021 00:11, dn wrote: >> On 15/06/2021 09.18, BlindAnagram wrote: >>> On 14/06/2021 20:43, Chris Angelico wrote: On Tue, Jun 15, 2021 at 5:41 AM BlindAnagram >> ... > I think the difference here is that I know I am going to have to look at >

[issue43945] [Enum] standardize format() behavior

2021-06-15 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +25337 pull_request: https://github.com/python/cpython/pull/26752 ___ Python tracker ___

[issue44431] Add command-line functionality to uuid module

2021-06-15 Thread Eric Phenix
Change by Eric Phenix : -- keywords: +patch pull_requests: +25336 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26751 ___ Python tracker ___

[issue44431] Add command-line functionality to uuid module

2021-06-15 Thread Eric Phenix
New submission from Eric Phenix : Suggested functionality: > python -m uuid > b9aa5a06-e2cd-4c26-b26b-1590f01ea996 -- messages: 395906 nosy: ephenix priority: normal severity: normal status: open title: Add command-line functionality to uuid module type: enhancement versions: Python

[issue44429] Tkinter Flow Geometry Manager

2021-06-15 Thread Zachary Ware
Zachary Ware added the comment: Hi Gary. This sounds interesting. However, Tkinter generally tries to be a pretty thin wrapper around Tcl/Tk; is there something like this already in Tk that could be used instead, or existing discussion to add such to Tk? We certainly would not want to

RE: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Avi Gross via Python-list
Greg, My point was not to ASK what python does as much as to ask why it matters to anyone which way it does it. Using less space at absolutely no real expense is generally a plus. Having a compiler work too hard, or even ask the code to work too hard, is often a minus. If I initialized the

[issue43945] [Enum] standardize format() behavior

2021-06-15 Thread Ethan Furman
Ethan Furman added the comment: Thinking about this some more I am partially reversing course. The idea behind `IntEnum` and `IntFlag` is to be, as close as possible, drop-in replacements for existing integer-based constants. If the format() of those two change then they become much less

[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman
Ethan Furman added the comment: New changeset 41c2a4a727d3d559632598759433e0ec1bf594f5 by Ethan Furman in branch '3.10': [3.10] bpo-44342: [Enum] improve test, add andrei kulakov to ACKS (GH-26726) https://github.com/python/cpython/commit/41c2a4a727d3d559632598759433e0ec1bf594f5 --

[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman
Ethan Furman added the comment: New changeset 741b8ae1cfc507902eb57e20f003487af13e40c0 by Ethan Furman in branch 'main': bpo-44342: [Enum] sync current docs to 3.10 (GH-26750) https://github.com/python/cpython/commit/741b8ae1cfc507902eb57e20f003487af13e40c0 --

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Greg Ewing
On 16/06/21 12:15 pm, Avi Gross wrote: May I ask if there are any PRACTICAL differences if multiple immutable tuples share the same address or not? Only if some piece of code relies on the identity of tuples by using 'is' or id() on them. There's rarely any need to write code like that,

[issue44425] 'dirty' added to sys.version on Linux and Mac source builds depending on git version

2021-06-15 Thread Ned Deily
Change by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 10:17 AM Avi Gross via Python-list wrote: > > May I ask if there are any PRACTICAL differences if multiple immutable > tuples share the same address or not? No, there aren't. It's nothing more than an (optional) optimization. This is true of every immutable type,

RE: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Avi Gross via Python-list
May I ask if there are any PRACTICAL differences if multiple immutable tuples share the same address or not? I mean if I use a tuple in a set or as the key in a dictionary and a second one comes along, will it result in two entries one time and only one the other time? Some languages I use often

[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +25335 pull_request: https://github.com/python/cpython/pull/26750 ___ Python tracker ___

Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-15 Thread Menno Holscher
Op 15-06-2021 om 19:14 schreef Grant Edwards: On 2021-06-15, Menno Holscher wrote: There is no difference regarding security concerns. I find that hard to believe given the long list of CVEs I've just had to sort through for even fairly recent versions of PHP. I just can't belive that

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Greg Ewing
On 15/06/21 7:32 pm, Jach Feng wrote: But usually the list creation is not in simple way:-) for example: a = [1,2] m = [a for i in range(3)] m [[1, 2], [1, 2], [1, 2]] id(m[0]) == id(m[1]) == id(m[2]) True The first line is only executed once, so you just get one list object [1, 2]. You

Re: optimization of rule-based model on discrete variables

2021-06-15 Thread Greg Ewing
On 15/06/21 10:07 pm, Elena wrote: After the optimization, I will use f just to predict new Xi. So you're going to use f backwards? I don't see how that will work. Where are you going to find a new yi to feed into the inverse of f? I think I don't understand what role g plays in all of this.

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

2021-06-15 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +25334 pull_request: https://github.com/python/cpython/pull/26749 ___ Python tracker ___

[issue44430] [sqlite3] refactor threading tests

2021-06-15 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +25333 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26748 ___ Python tracker

[issue44430] [sqlite3] refactor threading tests

2021-06-15 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : The threading tests (ThreadTests) in Lib/sqlite3/test/dbapi.py has a lot of code duplication, and none of the test methods use the test.support.threading_helper.reap_threads helper. Also, some branches are not covered by this test class. Suggesting the

[issue44429] Tkinter Flow Geometry Manager

2021-06-15 Thread Gary Davenport
New submission from Gary Davenport : Hi there. I love Python and Tkinter. I know that there are geometry managers pack, place, and grid. I think there should be a flow type management available, like what is done in Java or html/css. This is more important as responsive GUI design is

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

2021-06-15 Thread Eric Snow
Eric Snow added the comment: New changeset ac38a9f2dfbba95f5d4338eb11a0221d38ef9328 by Eric Snow in branch 'main': bpo-43693: Eliminate unused "fast locals". (gh-26587) https://github.com/python/cpython/commit/ac38a9f2dfbba95f5d4338eb11a0221d38ef9328 --

[issue8772] sysconfig: _get_default_scheme can be made public?

2021-06-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +25332 pull_request: https://github.com/python/cpython/pull/26747 ___ Python tracker ___

[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman
Ethan Furman added the comment: New changeset 0f99324f61d5a2edd8729be5eed6f172c892af24 by Miss Islington (bot) in branch '3.10': bpo-44342: [Enum] fix data type search (GH-26667) https://github.com/python/cpython/commit/0f99324f61d5a2edd8729be5eed6f172c892af24 --

[issue12458] Tracebacks should contain the first line of continuation lines

2021-06-15 Thread Edward Yang
Edward Yang added the comment: Supposing I like the old behavior (line number of the end of the statement), is there any way to recover that line number from the traceback after this change? -- nosy: +ezyang ___ Python tracker

[issue44428] _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes

2021-06-15 Thread Thomas Grainger
New submission from Thomas Grainger : demo program: import asyncio import socket import threading async def amain(): family = socket.AddressFamily.AF_INET sock = socket.socket(family, socket.SOCK_STREAM) sock.settimeout(1) sock.bind(('localhost', 0)) sock.listen()

[issue44342] enum with inherited type won't pickle

2021-06-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +25331 pull_request: https://github.com/python/cpython/pull/26746 ___ Python tracker ___

[issue29153] Test test.test_asynchat.TestAsynchat / test.test_asynchat.TestAsynchat_WithPoll fail test_close_when_done

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: asynchat is deprecated since version 3.6 so there won't be any more development related to it. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-15 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +25330 pull_request: https://github.com/python/cpython/pull/26745 ___ Python tracker ___

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-15 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 8d0b2ca493e236fcad8709a622c1ac8ad29c372d by Mark Dickinson in branch '3.10': [3.10] bpo-43475: Add what's new entry for NaN hash changes (GH-26725) (GH-26743) https://github.com/python/cpython/commit/8d0b2ca493e236fcad8709a622c1ac8ad29c372d

[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-15 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +25329 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26744 ___ Python tracker ___

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-15 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +25328 pull_request: https://github.com/python/cpython/pull/26743 ___ Python tracker ___

[issue4277] asynchat's handle_error inconsistency

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: asynchat has been deprecated for a long time, it's unlikely we will do anything with it now. -- nosy: +iritkatriel resolution: -> out of date stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-15 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 1d10bf0bb9409a406c56b0de8870df998637fd0f by Mark Dickinson in branch 'main': bpo-43475: Add what's new entry for NaN hash changes (GH-26725) https://github.com/python/cpython/commit/1d10bf0bb9409a406c56b0de8870df998637fd0f --

[issue16663] Poor documentation for METH_KEYWORDS

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: This part of the documentation was reworded in issue28805, making this issue out of date. -- nosy: +iritkatriel resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add documentation for METH_FASTCALL and

[issue44037] Broad performance regression from 3.10a7 to 3.10b2 with python.org macOS binaries

2021-06-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: The problem is still present in Python 3.10b2. -- title: Broad performance regression from 3.10a7 to 3.10b1 with python.org macOS binaries -> Broad performance regression from 3.10a7 to 3.10b2 with python.org macOS binaries

[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-15 Thread Mark Dickinson
Mark Dickinson added the comment: As a test, gcc and clang both seem happy to treat this as valid C. I think Sphinx is wrong to reject this. mdickinson@mirzakhani Desktop % cat test.c typedef struct { double real; double imag; } Py_complex; Py_complex _Py_c_neg(Py_complex complex);

[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-15 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. It's probably not the best name, and we can certainly change it. But I'm a bit confused by the error message: `complex` isn't a keyword in either C or C++, so I'm not sure why Sphinx thinks it is. -- nosy: +mark.dickinson

[issue44310] Document that lru_cache uses hard references

2021-06-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: See PR 26731 for a draft FAQ entry. Let me know what you think. -- ___ Python tracker ___

[issue27607] Importing the main module twice leads to two incompatible instances

2021-06-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: Help with Python circular error

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 3:17 AM MRAB wrote: > > On 2021-06-15 17:49, Chris Angelico wrote: > > On Wed, Jun 16, 2021 at 2:45 AM Arak Rachael > > wrote: > >> > >> Hi to everyone, > >> > >> I am having a problem with this error, I created a package and uploaded it > >> to Test PyPi, but I can not

[issue29126] Fix comments about _PyThreadState_Current

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: These comments have been removed in the meantime, here: https://github.com/python/cpython/commit/59d3dce69b0a4f6ee17578ae68037cc7ae90936f -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed

Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-15 Thread Grant Edwards
On 2021-06-15, Menno Holscher wrote: > There is no difference regarding security concerns. I find that hard to believe given the long list of CVEs I've just had to sort through for even fairly recent versions of PHP. I just can't belive that Python has anywhere close to that many secruity

Re: Help with Python circular error

2021-06-15 Thread MRAB
On 2021-06-15 17:49, Chris Angelico wrote: On Wed, Jun 16, 2021 at 2:45 AM Arak Rachael wrote: Hi to everyone, I am having a problem with this error, I created a package and uploaded it to Test PyPi, but I can not get it to work, can someone help me please?

Re: Where did the message go?

2021-06-15 Thread dn via Python-list
On 16/06/2021 04.47, Chris Angelico wrote: > On Wed, Jun 16, 2021 at 2:41 AM Grimble wrote: >> Thanks for reminding me of the log files. I've worked out that the >> message on machine H (for haydn, which shows my preferred music genre) >> was bouncing because haydn.. was not a registered

[issue23035] python -c: Line causing exception not shown for exceptions other than SyntaxErrors

2021-06-15 Thread Irit Katriel
Change by Irit Katriel : -- type: -> enhancement versions: +Python 3.11 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list

Re: Help with Python circular error

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 2:45 AM Arak Rachael wrote: > > Hi to everyone, > > I am having a problem with this error, I created a package and uploaded it to > Test PyPi, but I can not get it to work, can someone help me please? > > https://test.pypi.org/manage/project/videotesting/releases/' > >

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread MRAB
On 2021-06-15 17:18, Dieter Maurer wrote: Chris Angelico wrote at 2021-6-15 19:08 +1000: On Tue, Jun 15, 2021 at 6:32 PM Dieter Maurer wrote: Chris Angelico wrote at 2021-6-15 05:35 +1000: >On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: >> >> >>> n = [(1,2) for i in range(3)] >> >>> n >>

[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor
STINNER Victor added the comment: Oh, I reopen the issue for PR 26741. -- resolution: fixed -> status: closed -> open ___ Python tracker ___

[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +25327 pull_request: https://github.com/python/cpython/pull/26741 ___ Python tracker ___

[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor
STINNER Victor added the comment: Ok, the deadlock on reentrant call to threading.enumerate() is now fixed in 3.9, 3.10 and main (future 3.11) branches. I close the issue. Thanks for the reviews, as usual :-) -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8fe57aacc7bf9d9af84803b69dbb1d66597934c6 by Miss Islington (bot) in branch '3.9': bpo-44422: Fix threading.enumerate() reentrant call (GH-26727) (GH-26738) https://github.com/python/cpython/commit/8fe57aacc7bf9d9af84803b69dbb1d66597934c6

Re: Where did the message go?

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 2:41 AM Grimble wrote: > Thanks for reminding me of the log files. I've worked out that the > message on machine H (for haydn, which shows my preferred music genre) > was bouncing because haydn.. was not a registered subdomain with > my ISP, whereas bach..

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 2:18 AM Dieter Maurer wrote: > > Chris Angelico wrote at 2021-6-15 19:08 +1000: > >On Tue, Jun 15, 2021 at 6:32 PM Dieter Maurer wrote: > >> > >> Chris Angelico wrote at 2021-6-15 05:35 +1000: > >> >On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: > >> >> > >> >> >>> n =

Help with Python circular error

2021-06-15 Thread Arak Rachael
Hi to everyone, I am having a problem with this error, I created a package and uploaded it to Test PyPi, but I can not get it to work, can someone help me please? https://test.pypi.org/manage/project/videotesting/releases/' The error: /home/user/anaconda3/envs/testing/bin/python

Re: Where did the message go?

2021-06-15 Thread Grimble
On 14/06/2021 20:58, dn wrote: On 15/06/2021 01.00, Grimble wrote: I have two machines running Mageia 8 and Python 2.8.9, They use the same Python script to maintain a list of changed packages from dnf update and dnf install. In addition the script sends a short email message to my main email

Re: optimization of rule-based model on discrete variables

2021-06-15 Thread Elena via Python-list
Il Tue, 15 Jun 2021 01:53:09 +, Martin Di Paola ha scritto: > From what I'm understanding it is an "optimization problem" like the > ones that you find in "linear programming". > > But in your case the variables are not Real (they are Integers) and the > function to minimize g() is not

Re: optimization of rule-based model on discrete variables

2021-06-15 Thread Elena via Python-list
Il Tue, 15 Jun 2021 10:40:05 +1200, Greg Ewing ha scritto: > On 15/06/21 12:51 am, Elena wrote: > Hmmm, so the problem breaks down into two parts: > (1) find a vector Y that minimises g (2) find a set of rules that will > allow you to predict each component of Y from its corresponding X values >

Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-15 Thread Menno Holscher
Op 14-06-2021 om 21:17 schreef Pascal B via Python-list: Hi, I would like to know if for a small app for instance that requires a connection to a remote server database if php is more suitable than Python mainly regarding security. Php requires one port for http and one port for the connection

Re: Behaviour of pop() for dictionaries

2021-06-15 Thread BlindAnagram
On 15/06/2021 00:11, dn wrote: On 15/06/2021 09.18, BlindAnagram wrote: On 14/06/2021 20:43, Chris Angelico wrote: On Tue, Jun 15, 2021 at 5:41 AM BlindAnagram ... No it isn't hard to use popitem() but it evidently proved hard for me to remember that it was there. If that's a problem,

Re: Behaviour of pop() for dictionaries

2021-06-15 Thread BlindAnagram
On 15/06/2021 01:36, Terry Reedy wrote: On 6/14/2021 5:18 PM, BlindAnagram wrote: I believe that consistency in how methods common to different types work is useful since it adds to the coherence of the language as a whole and avoids the need to remember special cases. Each collection class

Re: Is there a way to get the following result in Python?

2021-06-15 Thread Jach Feng
Peter Otten 在 2021年6月15日 星期二下午2:48:07 [UTC+8] 的信中寫道: > On 12/06/2021 04:02, Jach Feng wrote: > > def foo(): > > ... # do something > > ... > a = [] > for i in range(3): > > ... a.append(foo()) > > ... > a > > [] > The most natural way to achieve something similar is

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Jach Feng
Greg Ewing 在 2021年6月15日 星期二下午3:01:46 [UTC+8] 的信中寫道: > On 15/06/21 3:18 pm, Jach Feng wrote: > > From a user's point, I don't really care how Python creates thoseinstances, > > > either using an already exist one or create a new one, as > > long as each element (and its sub-element) are

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Jach Feng
Chris Angelico 在 2021年6月15日 星期二上午5:23:12 [UTC+8] 的信中寫道: > On Tue, Jun 15, 2021 at 7:11 AM Rob Cliffe via Python-list > wrote: > > > > This puzzled me, so I played around with it a bit (Python 3.8.3): > > > > n = [] > > for i in range(3): > > n.append((1,7,-3,None,"x")) > > for i in

Re: Is there a way to get the following result in Python?

2021-06-15 Thread Christian Gollwitzer
Am 12.06.21 um 04:02 schrieb Jach Feng: def foo(): ... # do something ... a = [] for i in range(3): ... a.append(foo()) ... a [] How about having "foo" return a list of things? Then you can append that list and return an empty list if you want nothing added: In [1]: def

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Dieter Maurer
Chris Angelico wrote at 2021-6-15 19:08 +1000: >On Tue, Jun 15, 2021 at 6:32 PM Dieter Maurer wrote: >> >> Chris Angelico wrote at 2021-6-15 05:35 +1000: >> >On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: >> >> >> >> >>> n = [(1,2) for i in range(3)] >> >> >>> n >> >> [(1, 2), (1, 2), (1, 2)]

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Greg Ewing
On 15/06/21 3:18 pm, Jach Feng wrote: From a user's point, I don't really care how Python creates thoseinstances, > either using an already exist one or create a new one, as long as each element (and its sub-element) are independent from each other so a modification of one will not influence

Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-15 Thread Tomasz Rola
On Tue, Jun 15, 2021 at 08:39:51AM +1200, dn via Python-list wrote: > On 15/06/2021 07.17, Pascal B via Python-list wrote: > > Hi, > > I would like to know if for a small app for instance that requires a > > connection to a remote server database if php is more suitable than Python > > mainly

[issue38401] Make dataclass attribute docstrings accessible

2021-06-15 Thread 4-launchpad-kalvdans-no-ip-org
Change by 4-launchpad-kalvdans-no-ip-org : -- nosy: +4-launchpad-kalvdans-no-ip-org ___ Python tracker ___ ___ Python-bugs-list

[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-06-15 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +25326 pull_request: https://github.com/python/cpython/pull/26740 ___ Python tracker ___

[issue44407] A "Coroutines and Tasks" code example needs "asyncio.run(main())"

2021-06-15 Thread Andrei Kulakov
Andrei Kulakov added the comment: I think it's clear that the modification of previous example is limited to `main()` because `say_after()` is also omitted. This is very common in Python code examples, - it seems to me this change is not needed. -- nosy: +andrei.avk

[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread miss-islington
miss-islington added the comment: New changeset c3b776f83b4c765da6d7b8854e844e07bd33c375 by Miss Islington (bot) in branch '3.10': bpo-44422: Fix threading.enumerate() reentrant call (GH-26727) https://github.com/python/cpython/commit/c3b776f83b4c765da6d7b8854e844e07bd33c375 --

[issue44392] Py_GenericAlias is not documented

2021-06-15 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +25325 pull_request: https://github.com/python/cpython/pull/26739 ___ Python tracker ___ ___

[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +25324 pull_request: https://github.com/python/cpython/pull/26738 ___ Python tracker ___

[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +25323 pull_request: https://github.com/python/cpython/pull/26737 ___ Python tracker

[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 243fd01047ddce1a7eb0f99a49732d123e942c63 by Victor Stinner in branch 'main': bpo-44422: Fix threading.enumerate() reentrant call (GH-26727) https://github.com/python/cpython/commit/243fd01047ddce1a7eb0f99a49732d123e942c63 --

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

2021-06-15 Thread miss-islington
miss-islington added the comment: New changeset e30fe27dabbc6b48736c3c17d57f6fa542376e8f by Miss Islington (bot) in branch '3.10': bpo-42972: _thread.RLock implements the GH protocol (GH-26734) https://github.com/python/cpython/commit/e30fe27dabbc6b48736c3c17d57f6fa542376e8f --

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

2021-06-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1cd3d859a49b047dd08abb6f44f0539564d3525a by Victor Stinner in branch 'main': bpo-42972: _thread.RLock implements the GH protocol (GH-26734) https://github.com/python/cpython/commit/1cd3d859a49b047dd08abb6f44f0539564d3525a --

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

2021-06-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +25322 pull_request: https://github.com/python/cpython/pull/26735 ___ Python tracker ___

[issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC

2021-06-15 Thread asterite
Change by asterite : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40240] Expose public spelling of _PyGC_FINALIZED and _PyGC_SET_FINALIZED?

2021-06-15 Thread STINNER Victor
STINNER Victor added the comment: Pablo: "That is out of contract and goes against the guarantees on the GC and can (will) cause the finalizer of the object to be executed more than once. I don't think is a good idea to expose an API that allows breaking the guarantees that we give: every

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-15 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 10a5c806d4dec6c342dcc9888fbe4fa1fa9b7a1f by Erlend Egeberg Aasland in branch 'main': bpo-42064: Move sqlite3 types to global state (GH-26537) https://github.com/python/cpython/commit/10a5c806d4dec6c342dcc9888fbe4fa1fa9b7a1f -- nosy:

[issue44427] File extension for scripts on windows is unclear

2021-06-15 Thread Malte Kliemann
New submission from Malte Kliemann : It is common practice to use no extension for python scripts on UNIX. In 3.8.1.4., it is hinted that a script with a shebang line can be executed on windows only if the file extension of the script is associated with the python launcher. I'm not sure

[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-15 Thread Karolina Surma
New submission from Karolina Surma : Hello all, I want to build Python 3.10~b2 documentation using Sphinx 4.0.2 (released in May 2021) as RPM in Fedora with aim to ship it in Fedora 35. The build fails with the following error: Warning, treated as error:

[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10

2021-06-15 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 2f2ea96c4429b81f491aa1cdc4219ef2fd6d37fb by Miss Islington (bot) in branch '3.10': bpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637) (GH-26673)

[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: Thanks! -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2021-06-15 Thread Rostislav Kondratenko
Rostislav Kondratenko added the comment: Hello, I don't have that code, as I worked around that issue at the time. I checked with my project, using PyObject_GC_New works fine. It seems that since then the issue has been fixed at some point since 2017. Either that or I misinterpreted what was

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

2021-06-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +25321 pull_request: https://github.com/python/cpython/pull/26734 ___ Python tracker ___

[issue40240] Expose public spelling of _PyGC_FINALIZED and _PyGC_SET_FINALIZED?

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: Can this be closed now? It seems that the query API was added and the set API was rejected. -- nosy: +iritkatriel ___ Python tracker ___

[issue39217] GC of a ctypes object causes application crash

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: As Terry suggested, it would be better to establish whether this is a python bug by asking on python-list, where more people are likely to see your question. A complete script reproducing the crash is *always* better than a verbal description that we may or

[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2021-06-15 Thread hai shi
Change by hai shi : -- pull_requests: +25320 pull_request: https://github.com/python/cpython/pull/26733 ___ Python tracker ___ ___

[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: Do you still have the code that created the crash? It would help to understand what you are/were seeing. -- ___ Python tracker ___

[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: Are you sure? It seems to me that they both incref the type object in _PyObject_Init: https://github.com/python/cpython/blob/689a84475e7b1da79d5ae82df67ab8897316f98c/Include/internal/pycore_object.h#L43 -- nosy: +iritkatriel

[issue44425] 'dirty' added to sys.version on Linux and Mac source builds depending on git version

2021-06-15 Thread Mark Final
New submission from Mark Final : Hi, We build Python 3.7 from source in-house for Windows, Linux and macOSX. It's been noticed that 'dirty' has been appended to sys.version in our builds, even though the source tree has not been modified from a git clone. This only happens for Linux and

[issue44424] Decompress streaming bz2 file

2021-06-15 Thread Carlos Franzreb
New submission from Carlos Franzreb : I am trying to lazily load items from a compressed file that resides in Zenodo. My goal is to iteratively yield the items without storing the file in my computer. My problem is that an EOFerror occurs right after the first non-empty line is read. How can

[issue44424] Decompress streaming bz2 file

2021-06-15 Thread Carlos Franzreb
Change by Carlos Franzreb : -- components: Library (Lib) nosy: carlosfranzreb priority: normal severity: normal status: open title: Decompress streaming bz2 file type: behavior versions: Python 3.9 ___ Python tracker

[issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC

2021-06-15 Thread Irit Katriel
Irit Katriel added the comment: Since this is fixed in 3.6 and it’s too late for 3.5, I think this issue can be closed. -- nosy: +iritkatriel resolution: -> out of date status: open -> pending ___ Python tracker

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Chris Angelico
On Tue, Jun 15, 2021 at 6:32 PM Dieter Maurer wrote: > > Chris Angelico wrote at 2021-6-15 05:35 +1000: > >On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: > >> > >> >>> n = [(1,2) for i in range(3)] > >> >>> n > >> [(1, 2), (1, 2), (1, 2)] > >> >>> id(n[0]) == id(n[1]) == id(n[2]) > >> True >

  1   2   >