Re: How Do I Get A Bug In Multiprocessing Fixed?

2021-06-17 Thread Alexander Neilson
Hi Michael

It may be helpful to populate the ticket with further details:
* actual output from when you execute the server and client (possibly with
extra verbosity enabled)
* system you are running this on (windows, macos, linux) flavour / version
details
* minor version of Python interpreter used
* whether you are using a packaged version from your os distributor or from
python.org (or even built your own)
* If you believe it's a regression the version it is working on

Some more guidance can be found here covering some of the above
https://docs.python.org/3/bugs.html

I am very interested to note that a report filed in February hasn't had at
least one person take a brief look at it and post a note or set a status
like "needs more info" etc.

Also I am by no means an expert in multi processing at all as so far my
webapps work worker processes, I am wondering if the wrong approach to this
may be happening and so the client is trying to reuse the same pipe and it
may need a different tear down / process to release that and create a new
pipe / socket / underlying connection cleanly rather than the re connect in
the same object.

For example I am running python 3.7.7 on windows:

Manager Output:
>python manager.py
In test_method

>python manager.py


Client Output:
result: ', TEST'
Kill and restart the server and press return

Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting
Got exception , ConnectionResetError(10054,
'An existing connection was forcibly closed by the remote host', None,
10054, None)
Reconnecting  # At this point I terminated the manager
Got exception ,
ConnectionRefusedError(10061, 'No connection could be made because the
target machine actively refused it', None, 10061, None)
Reconnecting
Traceback (most recent call last):
  File
"C:\Users\Alexander\AppData\Local\Programs\Python\Python37\lib\multiprocessing\connection.py",
line 619, in SocketClient
s.connect(address)
ConnectionRefusedError: [WinError 10061] No connection could be made
because the target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "client.py", line 27, in 
manager.connect()
  File
"C:\Users\Alexander\AppData\Local\Programs\Python\Python37\lib\multiprocessing\managers.py",
line 532, in connect
conn = Client(self._address, authkey=self._authkey)
  File
"C:\Users\Alexander\AppData\Local\Programs\Python\Python37\lib\multiprocessing\connection.py",
line 492, in Client
c = SocketClient(address)
  File
"C:\Users\Alexander\AppData\Local\Programs\Python\Python37\lib\multiprocessing\connection.py",
line 619, in SocketClient
s.connect(address)
KeyboardInterrupt




Regards
Alexander

Alexander Neilson
Neilson Productions Limited

alexan...@neilson.net.nz
021 329 681
022 456 2326


On Fri, 18 Jun 2021 at 15:27, Michael Boom  wrote:

> The below issue is pretty serious and it is preventing me from using a
> system I wrote on a larger scale.  How do I get this bug fixed?  Thanks.
> https://bugs.python.org/issue43329
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Pycharm Won't Do Long Underscore

2020-06-23 Thread Alexander Neilson
Hi Tony

The “long underscore” (often called Dunder as “double underscore”) is actually 
two underscores as you are seeing shown in PyCharm. 

However the display of it as one long underscore is a ligature (special font 
display to communicate clearer) and to enable these in PyCharm go to the 
settings dialog (depending on windows or Mac this could be in different 
locations) and select Editor > Font

In that screen select “enable font ligatures” and if your font supports it 
(like the default JetBrains Mono does) that will start to display the double 
underscores as a single long underscore. 

Regards
Alexander

Alexander Neilson
Neilson Productions Limited
021 329 681
alexan...@neilson.net.nz

> On 24/06/2020, at 07:57, Tony Kaloki  wrote:
> 
> 
> 
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
> From: Tony Kaloki<mailto:tkal...@live.co.uk>
> Sent: 23 June 2020 19:45
> To: python-list@python.org<mailto:python-list@python.org>
> Subject: Pycharm Won't Do Long Underscore
> 
> 
> Hi Guys,
>   I’ve just begun to learn basic computer programming by 
> downloading Python and Pycharm and following Youtube tutorials. But I’ve come 
> across a problem that’s stopped me in my tracks.
> When I try to do a long underscore __  for classes in Pycharm, it only 
> gives me two separate single underscores _ _. This is only in Pycharm, no 
> problems anywhere else. Could you tell me how to fix this, because I can’t 
> find any answers on the web and I’m not sure if I can go any further in my 
> learning without being able to get long underscores.
>Sorry if I’m just being really dense, but like I said I’m an absolute 
> beginner. Thanks for your time,
> Tony
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Pycharm Won't Do Long Underscore

2020-06-23 Thread Alexander Neilson
Hi Tony

Absolutely. The “long underscore” is just a display thing. Underneath it is 
always two underscores. The only difference is what your editor is showing (or 
how the underscore is drawn in the display font - as some fonts make the 
underscore the full width or slightly over the edge of where the character will 
be displayed so that many underscores look all joined up like a line)

These links may provide you with some useful reading around this and what 
underscores signal in Python. 

https://dbader.org/blog/meaning-of-underscores-in-python

https://dbader.org/blog/python-dunder-methods

Happy to have helped and good luck with your Python journey. 

Regards
Alexander

Alexander Neilson
Neilson Productions Limited
021 329 681
alexan...@neilson.net.nz

> On 24/06/2020, at 08:49, Tony Kaloki  wrote:
> 
> 
> Alexander,
>Thank you so much! It worked! Thank you. One question: in 
> your reply, are you saying that Python would have treated the two separate 
> underscores the same way as a long  underscore i.e. it's a stylistic choice 
> rather than a functional necessity?
>In any case, thanks again for your quick and easy to follow - even for me 
> - reply.
> Tony
> 
> Get Outlook for Android
> 
> From: Alexander Neilson 
> Sent: Tuesday, June 23, 2020 9:28:37 PM
> To: Tony Kaloki 
> Cc: python-list@python.org 
> Subject: Re: Pycharm Won't Do Long Underscore
>  
> Hi Tony
> 
> The “long underscore” (often called Dunder as “double underscore”) is 
> actually two underscores as you are seeing shown in PyCharm. 
> 
> However the display of it as one long underscore is a ligature (special font 
> display to communicate clearer) and to enable these in PyCharm go to the 
> settings dialog (depending on windows or Mac this could be in different 
> locations) and select Editor > Font
> 
> In that screen select “enable font ligatures” and if your font supports it 
> (like the default JetBrains Mono does) that will start to display the double 
> underscores as a single long underscore. 
> 
> Regards
> Alexander
> 
> Alexander Neilson
> Neilson Productions Limited
> 021 329 681
> alexan...@neilson.net.nz
> 
> > On 24/06/2020, at 07:57, Tony Kaloki  wrote:
> > 
> > 
> > 
> > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 
> > 10
> > 
> > From: Tony Kaloki<mailto:tkal...@live.co.uk>
> > Sent: 23 June 2020 19:45
> > To: python-list@python.org<mailto:python-list@python.org>
> > Subject: Pycharm Won't Do Long Underscore
> > 
> > 
> > Hi Guys,
> >   I’ve just begun to learn basic computer programming by 
> > downloading Python and Pycharm and following Youtube tutorials. But I’ve 
> > come across a problem that’s stopped me in my tracks.
> > When I try to do a long underscore __  for classes in Pycharm, it only 
> > gives me two separate single underscores _ _. This is only in Pycharm, no 
> > problems anywhere else. Could you tell me how to fix this, because I can’t 
> > find any answers on the web and I’m not sure if I can go any further in my 
> > learning without being able to get long underscores.
> >Sorry if I’m just being really dense, but like I said I’m an absolute 
> > beginner. Thanks for your time,
> > Tony
> > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 
> > 10
> > 
> > 
> > -- 
> > https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: strip() method makes me confused

2020-11-07 Thread Alexander Neilson
Because the strip methods argument is the set of characters to remove from 
either end. So it checks from the ends character by character until it finds a 
character that isn’t in the set. Then it removes everything prior to that (or 
after that at end of the string) and then returns the result. 

So your first example leaves “banana” as the string because all characters 
after and before that string in the original string were found in the set. 

However in your second example the set only contains the comma and the string 
neither begins nor ends with commas so if (first character) in (set containing 
comma) returns false so it stops searching from that end and does the same at 
the other end. 

https://www.programiz.com/python-programming/methods/string/strip

Hope that helps. 

Regards
Alexander

Alexander Neilson
Neilson Productions Limited
021 329 681
alexan...@neilson.net.nz

> On 8/11/2020, at 00:06, Bischoop  wrote:
> 
> 
> According to documentation strip method removes heading and trailing
> characters.
> 
> Why then:
> 
> txt = ",rrttggs...,..s,bananas...s.rrr"
> 
> x = txt.strip(",s.grt")
> 
> print(x)
> 
> output: banana
> 
> another example:
> 
> text = "this is text, there should be not commas, but as you see there
> are still"
> y = txt.strip(",")
> print(text)
> 
> output: 
> this is text, there should be not commas, but as you see there are still
> 
> 
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python 3.8 or later on Debian?

2024-09-18 Thread Alexander Neilson via Python-list
Python 3.7 is part of Buster (Debian old old stable)
If you moved to Debian bullseye you would get offered 3.9 (old stable)

Currently the stable version (Bookworm) would give you 3.11

I am not aware of anyone maintaining a repo for old Debian versions to get 
newer Python versions. But I know in the past I did build newer Python versions 
(mostly on raspberry pi’s)

Regards
Alexander

Alexander Neilson
Neilson Productions Limited
021 329 681
alexan...@neilson.net.nz

> On 19 Sep 2024, at 10:42, Ulrich Goebel via Python-list 
>  wrote:
> 
> Hi,
> 
> Debian Linux seems to love Python 3.7 - that is shown by apt-get list, and 
> it's installed on my Debian Server.
> 
> But I need at least Python 3.8
> 
> Is there a repository which I can give to apt to get Python 3.8 or later?
> 
> Or do I really have to install and compile these versions manually? I'm not a 
> friend of things so deep in the system...
> 
> Greetings
> Ulrich
> 
> --
> Ulrich Goebel 
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list