Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Cecil Westerhof via Python-list
Cecil Westerhof writes: It was already not a good name, but I am rewriting the class completely, so now the name is a complete bumper. (No more timer.) I am thinking about naming the class repeating_thread, but I cannot say that I find it a very good name. So if someone has a good idea for a name

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Ethan Furman
On 2/4/22 6:28 AM, Cecil Westerhof via Python-list wrote: > It was already not a good name, but I am rewriting the class > completely, so now the name is a complete bumper. (No more timer.) I > am thinking about naming the class repeating_thread, but I cannot say > that I find it a very good name

PYTHONPATH vs Python Virtual Environment

2022-02-04 Thread Sina Mobasheri
it's not good title defiantly and I don't mean to compare apples and oranges when I start using python virtual environment it was because isolation proposes and everyone say about its benefits in isolation and working with different versions of the same package in different projects but recentl

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Cecil Westerhof via Python-list
Ethan Furman writes: > On 2/4/22 6:28 AM, Cecil Westerhof via Python-list wrote: > >> It was already not a good name, but I am rewriting the class >> completely, so now the name is a complete bumper. (No more timer.) I >> am thinking about naming the class repeating_thread, but I cannot say >> th

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Grant Edwards
On 2022-02-04, Chris Angelico wrote: > On Fri, 4 Feb 2022 at 09:37, Grant Edwards wrote: >> I've looked through the ssl.Context documentation multiple times, and >> haven't been able to spot any option or flag that disables client >> certificate validation or allows the user to override the actua

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Grant Edwards
On 2022-02-04, Kushal Kumaran wrote: >> It's a troubleshooting utility for displaying a client's certificate. >> >>> Which kinds of client certificates do you want to permit >> >> All of them. Anything that's parsable as an X509 certificate no matter >> how "invalid" it is. >> > > Does `openssl x

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Barry
> On 4 Feb 2022, at 18:17, Grant Edwards wrote: > > On 2022-02-04, Chris Angelico wrote: >>> On Fri, 4 Feb 2022 at 09:37, Grant Edwards >>> wrote: >>> I've looked through the ssl.Context documentation multiple times, and >>> haven't been able to spot any option or flag that disables client

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Christian Heimes
On 03/02/2022 19.57, Grant Edwards wrote: I've got a small ssl server app. I want to require a certificate from the client, so I'm using a context with context.verify_mode = ssl.CERT_REQUIRED But, I want all certificates accepted. How do I disable client certificate verification? You can't. P

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Christian Heimes
On 04/02/2022 19.24, Grant Edwards wrote: The problem is _getting_ the client certificate that was provided during the client/server handshake. That's trivial if the handshake was successful. The problem is obtaining the client certificate when the handshake fails. I was hoping there was a way to

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Igor Berger
On Friday, February 4, 2022 at 12:28:53 PM UTC-5, Cecil Westerhof wrote: > Ethan Furman writes: > > > On 2/4/22 6:28 AM, Cecil Westerhof via Python-list wrote: > > > >> It was already not a good name, but I am rewriting the class > >> completely, so now the name is a complete bumper. (No more

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Cecil Westerhof via Python-list
Igor Berger writes: > On Friday, February 4, 2022 at 12:28:53 PM UTC-5, Cecil Westerhof wrote: >> Ethan Furman writes: >> >> > On 2/4/22 6:28 AM, Cecil Westerhof via Python-list wrote: >> > >> >> It was already not a good name, but I am rewriting the class >> >> completely, so now the name

Re: PYTHONPATH vs Python Virtual Environment

2022-02-04 Thread Dieter Maurer
Sina Mobasheri wrote at 2022-2-4 15:55 +: >it's not good title defiantly and I don't mean to compare apples and oranges > >when I start using python virtual environment it was because isolation >proposes and everyone say about its benefits in isolation and working with >different versions of

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Dieter Maurer
Grant Edwards wrote at 2022-2-3 14:36 -0800: >On 2022-02-03, Barry wrote: > ... >I've looked through the ssl.Context documentation multiple times, and >haven't been able to spot any option or flag that disables client >certificate validation or allows the user to override the actual >client certif

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Grant Edwards
On 2022-02-04, Christian Heimes wrote: > On 04/02/2022 19.24, Grant Edwards wrote: >> The problem is _getting_ the client certificate that was provided >> during the client/server handshake. That's trivial if the handshake >> was successful. The problem is obtaining the client certificate when >>

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Grant Edwards
On 2022-02-04, Barry wrote: >> >>> What you're doing is a little unusual, so my first thought would be to >>> subclass Context and override whatever method does the checks. >> >> I've done a dir() on the Context object, and I don't see anything that >> looks like a method to do the checks. I susp

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Grant Edwards
On 2022-02-04, Christian Heimes wrote: > On 03/02/2022 19.57, Grant Edwards wrote: >> I've got a small ssl server app. I want to require a certificate from >> the client, so I'm using a context with >> >> context.verify_mode = ssl.CERT_REQUIRED >> >> But, I want all certificates accepted. How do

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Grant Edwards
On 2022-02-04, Dieter Maurer wrote: > Grant Edwards wrote at 2022-2-3 14:36 -0800: >>On 2022-02-03, Barry wrote: >> ... >>I've looked through the ssl.Context documentation multiple times, and >>haven't been able to spot any option or flag that disables client >>certificate validation or allows th

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Chris Angelico
On Sat, 5 Feb 2022 at 04:33, Cecil Westerhof via Python-list wrote: > > Ethan Furman writes: > > > On 2/4/22 6:28 AM, Cecil Westerhof via Python-list wrote: > > > >> It was already not a good name, but I am rewriting the class > >> completely, so now the name is a complete bumper. (No more timer.

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Martin Di Paola
In _run I first set the new timer and then I execute the function. So that will go mostly OK. Yes, that's correct however you are not taking into consideration the imprecision of the timers. Timer will call the next _run() after self._interval *plus* some unknown arbitrary time (and extra

RuntimeError, or user defined exception

2022-02-04 Thread Cecil Westerhof via Python-list
I am creating a class that will call a user defined function on user defined intervals. In my opinion it is an error when the function takes more as 10% of interval, or more as half a second. What is better: just using RuntimeError, or creating two exception classes for this? -- Cecil Westerhof S

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Cecil Westerhof via Python-list
Chris Angelico writes: > On Sat, 5 Feb 2022 at 04:33, Cecil Westerhof via Python-list > wrote: >> >> Ethan Furman writes: >> >> > On 2/4/22 6:28 AM, Cecil Westerhof via Python-list wrote: >> > >> >> It was already not a good name, but I am rewriting the class >> >> completely, so now the name i

Writing a package

2022-02-04 Thread Paulo da Silva
Hello! Let's say I have a dir src containing another dir named foo and a script test.py. So, I have src/foo (dir) src/test.py (script) test.py has the folloing code: import foo as f c=f.C() I am inside src and want to run python test.py. How can I create the class C inside src/foo dir if i

Re: Writing a package

2022-02-04 Thread Cameron Simpson
On 05Feb2022 00:37, Paulo da Silva wrote: >Let's say I have a dir src containing another dir named foo and a >script test.py. > >So, I have >src/foo (dir) >src/test.py (script) > >test.py has the folloing code: > >import foo as f >c=f.C() > >I am inside src and want to run python test.py. > >How

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Avi Gross via Python-list
time_after_time But to be more pythonic, throw some double underscores before and after. -Original Message- From: Igor Berger To: python-list@python.org Sent: Fri, Feb 4, 2022 12:40 pm Subject: Re: Waht do you think about my repeated_timer class On Friday, February 4, 2022 at 12:28:53 PM

Re: Writing a package

2022-02-04 Thread Paulo da Silva
Às 02:01 de 05/02/22, Cameron Simpson escreveu: On 05Feb2022 00:37, Paulo da Silva wrote: Let's say I have a dir src containing another dir named foo and a script test.py. So, I have src/foo (dir) src/test.py (script) test.py has the folloing code: import foo as f c=f.C() I am inside src an

Re: RuntimeError, or user defined exception

2022-02-04 Thread Cameron Simpson
On 04Feb2022 21:39, Cecil Westerhof wrote: >I am creating a class that will call a user defined function on user >defined intervals. In my opinion it is an error when the function >takes more as 10% of interval, or more as half a second. What is >better: just using RuntimeError, or creating two ex