Re: Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Thomas Passin

On 12/2/2025 3:27 PM, Rich Shepard wrote:

I'm learning PyQt5 and will have questions now and then when I can't find
answers in Fitzpatrick's book or in a web search. There are several web 
fora
for Qt and PyQt support but I much prefer maillists where threads are 
pushed

to me and I don't need to open a browser tag and pull down threads.

Can I post the occasional question or issue on this maillist?


Why not? Nothing very complicated, please. But you should be learning 
PyQt6, not v5. There's not a huge difference but go with v6 since almost 
it's getting all the new development.

--
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Proposal: private keyword for import statements to hide module dependencies

2025-12-02 Thread Bjørnar Remmen via Python-list
Richard Damon wrote:
> On 11/25/25 3:42 PM, bjotta via Python-list wrote:
> > It seem like you are talking about classes and sub-classes. I was talking 
> > about dependencies in projects.
> > The technique is currently defined only for class and sub-classes, but 
> could be extended
> > e..g I create a library that has some dependencies (numpy here)
> > Inside the library there is a file importing numpy for example.
> > '''
> > import numpy as np
> > def stock_earnings(winnings, losses):
> >  return winnings - losses
> > '''
> > I want to be able to restrict / name mangle the usage.
> > To avoid this being possible.
> > And the question is how? (and why?) The problem is that to do what you 
> want means looking up a name in a namespace now becomes context 
> dependent. Some of the names that are defined there are to not be found 
> by some contexts, while other can be. This is complicated, which isn't 
> what python wants to be.
> > '''
> > from library.math import np.
> > '''
> > There are reasons for this, but for example at work we explicitly install 
> > all dependencies we use in our program.
> > If someone starts to use sub-dependency from a library without explicitly 
> > installing it. The next time the library updates and the maintainers 
> > decides to update to using numba or something else the code wont work.
> > And they could have imported np directly and not installed it to, so it 
> doesn't help.
> 
> And if the library doesn't import that module, your sub-dependency 
> import will FAIL and thus show the problem.
> > That was the Idea behind the "private" keyword. Any other suggestion to 
> > that part?
> > And proper discipline prevents that.
> 
> That is EXACTLY the danger of peeking into things marked (by the 
> convention) as internal.
> 
> Python by its nature doesn't stop you from doing "dumb" things, it just 
> makes it clear when you do it (if you know the language).
> 
> Letting module globals that begin with __ (and not end with __) be 
> mangled like was suggested just make the operation more obvious.

Do you have any feedback to my reply? Tried understanding your suggestions.
-- 
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Rich Shepard

On Wed, 3 Dec 2025, Chris Angelico wrote:


You certainly may post them, but there's no guarantee that people here
will be able to answer (I certainly am no expert on Qt). A forum
dedicated to Qt/PyQt will have more experts on it.


ChrisA,

That's what I thought, and what I'll do.

Thanks,

Rich
--
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Failing to install Python

2025-12-02 Thread Thomas Passin

On 12/2/2025 2:38 PM, Mats Wichmann wrote:

On 12/1/25 02:40, [email protected] wrote:
I have installed Python on two Win10 computers over the last 20 years. 
Only after several spits and starts each time did it finally work. The 
new Win11 desktop is now running. I can't help but think there is an 
easier way to get it installed than my previous efforts.


Is there a simple PHD (Push Here Dummy) version available for this 
new, clean machine?
I went to Python.org and struggled with the small pale-blue-on-white 
font. (Why do they do that?) but had no luck.


There is no reason to "struggle" with small font sizes.  Just enlarge 
the page with CTRL-+ a few times and the size will be fine.  On my 
system, the python.org page comes up at a good size be default.  Once 
the size is all right, the white-on-blue should be reasonably readable.


You want to download the Windows 64-bit installer.


Guidance appreciated.
Steve Am


The Microsoft Store installation is the simplest *graphical* install - 
find it, and click the button.


 From a command line shell, installation is also simple:

winget install python.

there are plenty of nuances beyond that but I guess that would be 
outside the spirit of your question? You can always ask again if you 
want those details...





--
https://mail.python.org/mailman3//lists/python-list.python.org


[RELEASE] Python 3.13.10 is now available!

2025-12-02 Thread Thomas Wouters


Python 3.13.10 is now available:

https://www.python.org/downloads/release/python-31310/

Python 3.13.10 is the tenth maintenance release of 3.13, containing around 300 
bugfixes, build improvements and documentation changes since 3.13.9.

Enjoy the new release!
-- 
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Chris Angelico via Python-list
On Wed, 3 Dec 2025 at 07:41, Rich Shepard  wrote:
>
> I'm learning PyQt5 and will have questions now and then when I can't find
> answers in Fitzpatrick's book or in a web search. There are several web fora
> for Qt and PyQt support but I much prefer maillists where threads are pushed
> to me and I don't need to open a browser tag and pull down threads.
>
> Can I post the occasional question or issue on this maillist?
>
> TIA,

You certainly may post them, but there's no guarantee that people here
will be able to answer (I certainly am no expert on Qt). A forum
dedicated to Qt/PyQt will have more experts on it.

ChrisA
-- 
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Rich Shepard

On Tue, 2 Dec 2025, Thomas Passin wrote:


Why not? Nothing very complicated, please. But you should be learning
PyQt6, not v5. There's not a huge difference but go with v6 since almost
it's getting all the new development.


Thomas,

Thanks. Most questions are simple (and more Python than PyQt.). This desktop
currently runs PyQt5; during this month I'll upgrade the OS to the current
stable release and install either PyQt6 or PySide6.

The question that prompted me to write is how to write a slot (funcion in 
response
to a widget's signal/action.) The application is databased so accepting
entries on a form (dialog) using the 'Save' button will be a SQL query. What
I've not found is the method to call when the 'Close' button is pressed to
reject all entries and close the dialog box/window.

Regards,

Rich
--
https://mail.python.org/mailman3//lists/python-list.python.org


Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Rich Shepard

I'm learning PyQt5 and will have questions now and then when I can't find
answers in Fitzpatrick's book or in a web search. There are several web fora
for Qt and PyQt support but I much prefer maillists where threads are pushed
to me and I don't need to open a browser tag and pull down threads.

Can I post the occasional question or issue on this maillist?

TIA,

Rich
--
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Proposal: private keyword for import statements to hide module dependencies

2025-12-02 Thread Richard Damon

On 12/2/25 2:55 PM, Bjørnar Remmen via Python-list wrote:

Richard Damon wrote:

On 11/25/25 3:42 PM, bjotta via Python-list wrote:

It seem like you are talking about classes and sub-classes. I was talking about 
dependencies in projects.
The technique is currently defined only for class and sub-classes, but

could be extended

e..g I create a library that has some dependencies (numpy here)
Inside the library there is a file importing numpy for example.
'''
import numpy as np
def stock_earnings(winnings, losses):
  return winnings - losses
'''
I want to be able to restrict / name mangle the usage.
To avoid this being possible.
And the question is how? (and why?) The problem is that to do what you

want means looking up a name in a namespace now becomes context
dependent. Some of the names that are defined there are to not be found
by some contexts, while other can be. This is complicated, which isn't
what python wants to be.

'''
from library.math import np.
'''
There are reasons for this, but for example at work we explicitly install all 
dependencies we use in our program.
If someone starts to use sub-dependency from a library without explicitly 
installing it. The next time the library updates and the maintainers decides to 
update to using numba or something else the code wont work.
And they could have imported np directly and not installed it to, so it

doesn't help.

And if the library doesn't import that module, your sub-dependency
import will FAIL and thus show the problem.

That was the Idea behind the "private" keyword. Any other suggestion to that 
part?
And proper discipline prevents that.

That is EXACTLY the danger of peeking into things marked (by the
convention) as internal.

Python by its nature doesn't stop you from doing "dumb" things, it just
makes it clear when you do it (if you know the language).

Letting module globals that begin with __ (and not end with __) be
mangled like was suggested just make the operation more obvious.

Do you have any feedback to my reply? Tried understanding your suggestions.


I gave you my feedback.

Your idea needs to add a keyword, "private" and a concept (names that 
can't be found from some concepts) that just don't exist in python now.


It just isn't the way python works. If you need that feature, you need a 
different language.


The problem you are trying to solve, is people not following the basic 
design guidelines, and that isn't how python works.


You don't break language design to try to keep people from breaking the 
"rules", you teach them to do things right.


There are large number of ways to do something "badly", and trying to 
"outlaw" them is hard.


To implement your idea, requires deep changes in the code to impleent 
the language, and a careful analysis to define it and make sure it 
works, as you want a basic name lookup to change its behavior on the 
somewhat distance context that the lookup is being used in. This is fragile.


--
Richard Damon

--
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Failing to install Python

2025-12-02 Thread Mats Wichmann

On 12/1/25 02:40, [email protected] wrote:

I have installed Python on two Win10 computers over the last 20 years. Only 
after several spits and starts each time did it finally work. The new Win11 
desktop is now running. I can't help but think there is an easier way to get it 
installed than my previous efforts.

Is there a simple PHD (Push Here Dummy) version available for this new, clean 
machine?
I went to Python.org and struggled with the small pale-blue-on-white font. (Why 
do they do that?) but had no luck.

Guidance appreciated.
Steve Am


The Microsoft Store installation is the simplest *graphical* install - 
find it, and click the button.


From a command line shell, installation is also simple:

winget install python.

there are plenty of nuances beyond that but I guess that would be 
outside the spirit of your question? You can always ask again if you 
want those details...



--
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Thomas Passin

On 12/2/2025 5:03 PM, Rich Shepard wrote:

On Tue, 2 Dec 2025, Thomas Passin wrote:


Why not? Nothing very complicated, please. But you should be learning
PyQt6, not v5. There's not a huge difference but go with v6 since almost
it's getting all the new development.


Thomas,

Thanks. Most questions are simple (and more Python than PyQt.). This 
desktop

currently runs PyQt5; during this month I'll upgrade the OS to the current
stable release and install either PyQt6 or PySide6.

The question that prompted me to write is how to write a slot (funcion 
in response

to a widget's signal/action.) The application is databased so accepting
entries on a form (dialog) using the 'Save' button will be a SQL query. 
What

I've not found is the method to call when the 'Close' button is pressed to
reject all entries and close the dialog box/window.

Regards,

Rich


Is your dialog modeless or modal?

BTW, in Internet searches it can be helpful to search for Qt, not just 
pyqt.  It's usually not hard to see how to make the Qt things work in PyQt.


--
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Rich Shepard

On Tue, 2 Dec 2025, Thomas Passin wrote:


Is your dialog modeless or modal?


Modal,

BTW, in Internet searches it can be helpful to search for Qt, not just pyqt. 
It's usually not hard to see how to make the Qt things work in PyQt.


That's what I do.

Rich
--
https://mail.python.org/mailman3//lists/python-list.python.org