Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Steven D'Aprano
On Thu, 28 Jun 2018 18:33:31 -0700, Ethan Furman wrote: > On 06/28/2018 05:58 PM, Ben Finney wrote: > >> So I remain dumbfounded as to why anyone would want a class to *both* >> be an enumerated type, *and* have callable attributes in its API. > > Perhaps I am using Enum incorrectly, but here is

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-06-28 Thread Marko Rauhamaa
Dan Stromberg : > [on how SO_REUSEADDR is a security risk] > Start an echo server process P that listens on tcp/. > > Initiate a connection from a client machine to process P at tcp/. It > works as expected. > > Kill P. > > Initiate a connection from a client machine to process P at tcp/55

Re: [OT] Why are BBSes? [was Where's the junk coming from?]

2018-06-28 Thread Terry Reedy
On 6/28/2018 9:05 PM, Avon wrote: On 06/28/18, Grant Edwards pondered and said... GE> OK, I've got to ask... GE> Why are there still BBSes? GE> GE> Who even has a modem these days? [OK, I'll admit my 11 year old GE> Thinkpad T500 has a built-in POTS modem, but it's never been used.

Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Ben Finney
Ethan Furman writes: > On 06/28/2018 05:58 PM, Ben Finney wrote: > > > So I remain dumbfounded as to why anyone would want a class to *both* be > > an enumerated type, *and* have callable attributes in its API. > > Perhaps I am using Enum incorrectly, but here is my FederalHoliday > Enum. […] Th

Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Ethan Furman
On 06/28/2018 05:58 PM, Ben Finney wrote: So I remain dumbfounded as to why anyone would want a class to *both* be an enumerated type, *and* have callable attributes in its API. Perhaps I am using Enum incorrectly, but here is my FederalHoliday Enum. Note that date(), next_business_day, and

Re: [OT] Why are BBSes? [was Where's the junk coming from?]

2018-06-28 Thread Avon
On 06/28/18, Grant Edwards pondered and said... GE> OK, I've got to ask... GE> Why are there still BBSes? GE> GE> Who even has a modem these days? [OK, I'll admit my 11 year old GE> Thinkpad T500 has a built-in POTS modem, but it's never been used.] Hi Grant. How long do you have? :) Mo

Re: Where's the junk coming from?

2018-06-28 Thread Avon
On 06/28/18, Tim Golden pondered and said... TG> (Wearing my List Moderator hat) TG> TG> Thanks very much for addressing this for us, and to Cameron and others TG> who did the detective work. I admit I assumed at first it was some kind TG> of odd attack perhaps related to a dissatisfied pos

Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Steven D'Aprano
On Thu, 28 Jun 2018 20:34:58 +1000, Ben Finney wrote: > Ethan Furman writes: > >> Consider the following Enum definition: >> >> class Color(Enum): >> RED = 1 >> GREEN = 2 >> BLUE = 3 >> @property >> def lower(self): >> return self.name.lower() >> d

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-06-28 Thread Dan Stromberg
On Thu, Jun 28, 2018 at 1:27 PM, Marko Rauhamaa wrote: > Dan Stromberg : > > On Wed, Jun 27, 2018 at 10:31 PM, Marko Rauhamaa > wrote: > >> Dan Stromberg : > >> >> > The problem can be solved by turning on the SO_REUSEADDR flag of > >> >> > the socket. > >> > BTW, it's a security feature you're

Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Steven D'Aprano
On Thu, 28 Jun 2018 08:36:47 -0700, Ethan Furman wrote: >>> Answer: >>> >>> - RED, GREEN, and BLUE are members >>> - lower and spam() are not >>> - SomeClass /is/ a member (but not its instances) >> >> Is that by accident or by design? > > By design. It is entirely possible to want a

Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Ben Finney
Ian Kelly writes: > On Thu, Jun 28, 2018 at 4:38 AM Ben Finney wrote: > > > > Ethan Furman writes: > > > > Specifically, I can't make sense of why someone would want to have a > > class that is simultaneously behaving as an enumerated type, *and* > > has an API of custom callable attributes. >

Re: I lost nearly all my modules installing 3.7

2018-06-28 Thread Terry Reedy
On 6/28/2018 6:45 PM, Elliott Roper wrote: On 28 Jun 2018, Terry Reedy wrote There is a pip command for making an editable file of installed packages. Run that in 3.6, perhaps after updating everything. There is another pip command for using that file to install everything listed. Run that i

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-06-28 Thread Steven D'Aprano
On Thu, 28 Jun 2018 23:27:38 +0300, Marko Rauhamaa wrote: > Dan Stromberg : >> On Wed, Jun 27, 2018 at 10:31 PM, Marko Rauhamaa >> wrote: >>> Dan Stromberg : >>> >> > The problem can be solved by turning on the SO_REUSEADDR flag of >>> >> > the socket. >>> > BTW, it's a security feature you're tu

Re: configparser v/s file variables

2018-06-28 Thread Jim Lee
On 06/28/18 16:44, Steven D'Aprano wrote: I agree with you that it's a bad idea. Aside from the little fact that you described concerns about using Python code for settings as "silly". Umm, no.  I said that worrying about arbitrary code execution in an interpreted language seemed silly. 

Re: configparser v/s file variables

2018-06-28 Thread Steven D'Aprano
On Thu, 28 Jun 2018 10:58:36 -0700, Jim Lee wrote: > On 06/28/18 07:30, Grant Edwards wrote: >> I still maintain it's a bad idea to run arbitrary code found in >> user-edited config files. >> >> There may be cases where somebody has figured out how to muck with a >> config file that's shared among

Re: I lost nearly all my modules installing 3.7

2018-06-28 Thread Elliott Roper
On 28 Jun 2018, Terry Reedy wrote (in article): > On 6/28/2018 1:08 PM, Elliott Roper wrote: > > I have done something stupid. Don't know what. > > It appears that you ran 3.7 expecting that modules installed for 3.6 > would magically be available for 3.7. Yes indeed. It worked for 3.4, 3.5, and 3

Re: [OT] Why are BBSes? [was Where's the junk coming from?]

2018-06-28 Thread Jim Lee
On 06/28/18 11:45, Grant Edwards wrote: On 2018-06-28, Jim Lee wrote: On 06/28/18 07:34, Grant Edwards wrote: OK, I've got to ask... Why are there still BBSes? Who even has a modem these days? [OK, I'll admit my 11 year old Thinkpad T500 has a built-in POTS modem, but it's never been use

[ANN] PyYAML-4.1: ***RETRACTED***

2018-06-28 Thread Ingy dot Net
I am sorry to report that the PyYAML-4.1 release from 48 hours ago has been removed from PyPI There were too many problems to make this a viable release. The biggest known issue with this retraction is that PyYAML will not work with the new Python 3.7 until PyYAML-4.2 is released. https://github

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-06-28 Thread Marko Rauhamaa
Dan Stromberg : > On Wed, Jun 27, 2018 at 10:31 PM, Marko Rauhamaa wrote: >> Dan Stromberg : >> >> > The problem can be solved by turning on the SO_REUSEADDR flag of >> >> > the socket. >> > BTW, it's a security feature you're turning off. If you're on a >> > multiuser box, it prevents a second us

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-06-28 Thread Dan Stromberg
On Wed, Jun 27, 2018 at 10:31 PM, Marko Rauhamaa wrote: > Dan Stromberg : > >> > The problem can be solved by turning on the SO_REUSEADDR flag of > >> > the socket. > > BTW, it's a security feature you're turning off. If you're on a > > multiuser box, it prevents a second user from stealing linge

Re: OSError: [Errno 48] Address already in use

2018-06-28 Thread Dan Stromberg
On Wed, Jun 27, 2018 at 8:49 AM, T Berger wrote: > Why am I getting this error? I'm not sure what additional information I > need to supply, so please let me know. AIUI, there are 2 possible causes. You either have some other process listening on the requested port, or a process that Was using

Re: [OT] Why are BBSes? [was Where's the junk coming from?]

2018-06-28 Thread Grant Edwards
On 2018-06-28, Jim Lee wrote: > > > On 06/28/18 07:34, Grant Edwards wrote: >> OK, I've got to ask... >> >> Why are there still BBSes? >> >> Who even has a modem these days? [OK, I'll admit my 11 year old >> Thinkpad T500 has a built-in POTS modem, but it's never been used.] >> > BBS's are most o

Re: configparser v/s file variables

2018-06-28 Thread Jim Lee
On 06/28/18 07:30, Grant Edwards wrote: I still maintain it's a bad idea to run arbitrary code found in user-edited config files. There may be cases where somebody has figured out how to muck with a config file that's shared among multiple users, or has tricked somebody into including somethin

Re: [OT] Why are BBSes? [was Where's the junk coming from?]

2018-06-28 Thread Jim Lee
On 06/28/18 07:34, Grant Edwards wrote: OK, I've got to ask... Why are there still BBSes? Who even has a modem these days? [OK, I'll admit my 11 year old Thinkpad T500 has a built-in POTS modem, but it's never been used.] BBS's are most often connected to via telnet these days.  There are

Re: configparser v/s file variables

2018-06-28 Thread Jim Lee
On 06/28/18 00:46, Steven D'Aprano wrote: Yes, attacks by trusted insiders are the hardest to defend against. Betrayal of trust sucks. Trusted users with sufficient privileges could just modify the source code of your application or of Python itself. They could also attack your system in a tho

Re: I lost nearly all my modules installing 3.7

2018-06-28 Thread Terry Reedy
On 6/28/2018 1:08 PM, Elliott Roper wrote: I have done something stupid. Don't know what. It appears that you ran 3.7 expecting that modules installed for 3.6 would magically be available for 3.7. There is a pip command for making an editable file of installed packages. Run that in 3.6, pe

Re: overlooked patch?

2018-06-28 Thread Terry Reedy
Yep. We do not have enough people reviewing patches. Perhaps you could do so with this one. On 6/28/2018 12:02 PM, Marco Prosperi wrote: hello, just to give evidence that there is a bug in python 3.6/3.7 for which there is a patch prepared a long time ago but probably it has never been applie

I lost nearly all my modules installing 3.7

2018-06-28 Thread Elliott Roper
I have done something stupid. Don't know what. My $PATH looks like this XXXMac:~ elliott$ echo $PATH /Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Pyth on.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3. 5/bin:/Library/Frameworks/Python.framew

Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Ian Kelly
On Thu, Jun 28, 2018 at 4:38 AM Ben Finney wrote: > > Ethan Furman writes: > > > Consider the following Enum definition: > > > > class Color(Enum): > > RED = 1 > > GREEN = 2 > > BLUE = 3 > > @property > > def lower(self): > > return self.name.lower() > >

overlooked patch?

2018-06-28 Thread Marco Prosperi
hello, just to give evidence that there is a bug in python 3.6/3.7 for which there is a patch prepared a long time ago but probably it has never been applied because the status/stage of the bug is 'needs patch'. https://bugs.python.org/issue29097 Marco -- https://mail.python.org/mailman/listinfo

Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Ethan Furman
On 06/28/2018 01:11 AM, Steven D'Aprano wrote: On Wed, 27 Jun 2018 07:48:53 -0700, Ethan Furman wrote: [Note: there is a similar thread on Python-Ideas, if you would like to respond there.] Consider the following Enum definition: class Color(Enum): RED = 1 GREEN = 2

[OT] Why are BBSes? [was Where's the junk coming from?]

2018-06-28 Thread Grant Edwards
On 2018-06-28, Kerr Avon wrote: > Yep confirming I found the issue lay with the sysop of a BBS that connects > to the gateway linked to news.bbs.nz OK, I've got to ask... Why are there still BBSes? Who even has a modem these days? [OK, I'll admit my 11 year old Thinkpad T500 has a built-in P

Re: configparser v/s file variables

2018-06-28 Thread Grant Edwards
On 2018-06-28, Steven D'Aprano wrote: > So why give them the ability to escalate their privilege to that of > your application (which probably can do lots of things they can't > do) by directly executing Python code they supply? To be fair, that situation isn't common. The vast majority of appl

Re: Something new which all programmers world wide will appreciate

2018-06-28 Thread Gene Heskett
On Thursday 28 June 2018 06:35:13 Alister via Python-list wrote: > On Wed, 27 Jun 2018 14:30:15 -0700, Rob Gaddi wrote: > > On 06/27/2018 02:14 PM, skybuck2...@hotmail.com wrote: > >> Now I don't like the French much ! LOL. > >> > >> But this time they have invented something which will fill > >>

Re: Error Launching python 3.7.0

2018-06-28 Thread Mark Lawrence
On 28/06/18 10:14, ojas gupta wrote: I just downloaded and installed python 3.7.0 on my PC and whenever I tried to launch the application it showed "error" saying python runtime dll missing... and that too is happening despite i downloaded the official licenced product from python.org I a

Error Launching python 3.7.0

2018-06-28 Thread ojas gupta
I just downloaded and installed python 3.7.0 on my PC and whenever I tried to launch the application it showed "error" saying python runtime dll missing... and that too is happening despite i downloaded the official licenced product from python.org I am attaching a photo clicked by me when t

Re: help install on Win 7

2018-06-28 Thread Rhodri James
On 28/06/18 02:23, Andrew von Bevern wrote: I have tried to install python on my home laptop several times, using 3.6 or 3.7. Each time I get the following error - anyone know what I am doing wrong? [image: image.png] I'm sorry, but this mailing list removes attachments (for perfectly sensible

Re: Something new which all programmers world wide will appreciate

2018-06-28 Thread Alister via Python-list
On Wed, 27 Jun 2018 14:30:15 -0700, Rob Gaddi wrote: > On 06/27/2018 02:14 PM, skybuck2...@hotmail.com wrote: >> Now I don't like the French much ! LOL. >> >> But this time they have invented something which will fill programmers >> with tears of joy ! =D >> >> http://www.euronews.com/2018/06/27

Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Ben Finney
Ethan Furman writes: > Consider the following Enum definition: > > class Color(Enum): > RED = 1 > GREEN = 2 > BLUE = 3 > @property > def lower(self): > return self.name.lower() > def spam(self): > return "I like %s eggs and spam!" % self.l

Re: Where's the junk coming from?

2018-06-28 Thread Tim Golden
On 28/06/2018 09:05, Kerr Avon wrote: On Wed, 27 Jun 2018 21:43:12 +1200, Avon wrote: Hey Cameron, Apologies for this. I have contacted the Fido system connected to the gateway I run into news.bbs.nz and have asked them to urgently sort / check what's up. If I don't get any joy from them withi

Re: Where's the junk coming from?

2018-06-28 Thread Kerr Avon
On Wed, 27 Jun 2018 21:43:12 +1200, Avon wrote: > Hey Cameron, > > Apologies for this. I have contacted the Fido system connected to the > gateway I run into news.bbs.nz and have asked them to urgently sort / > check what's up. If I don't get any joy from them within the next 24 > hours I will de

Re: Should nested classes in an Enum be Enum members?

2018-06-28 Thread Steven D'Aprano
On Wed, 27 Jun 2018 07:48:53 -0700, Ethan Furman wrote: > [Note: there is a similar thread on Python-Ideas, if you would like to > respond there.] > > Consider the following Enum definition: > >class Color(Enum): >RED = 1 >GREEN = 2 >BLUE = 3 >@property >

Re: configparser v/s file variables

2018-06-28 Thread Steven D'Aprano
On Wed, 27 Jun 2018 16:09:09 -0700, Jim Lee wrote: > On 06/27/18 15:19, Steven D'Aprano wrote: >> On Wed, 27 Jun 2018 12:15:23 -0700, Jim Lee wrote: >> >>>   It seems a bit silly to me to worry about arbitrary code >>>   execution in >>> an interpreted language like Python whose default runtim

Re: help install on Win 7

2018-06-28 Thread Abdur-Rahmaan Janhangeer
text-only list, can you please copy paste the error? thank you, Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ > -- https://mail.python.org/mailman/listinfo/python-list

help install on Win 7

2018-06-28 Thread Andrew von Bevern
I have tried to install python on my home laptop several times, using 3.6 or 3.7. Each time I get the following error - anyone know what I am doing wrong? [image: image.png] thanks in advance Andrew -- https://mail.python.org/mailman/listinfo/python-list