[Python-Dev] Re: Adding a scarier warning to object.__del__?

2020-01-01 Thread Yonatan Zunger
Oh, I'm absolutely thinking about clarity. Something like: This method is called when the instance is about to be destroyed. Because it may be called by either the ordinary Python execution flow or by the garbage collector, it has very unusual semantics, and must be treated with great care.

[Python-Dev] Re: PEP 558: Defined semantics for locals() (December 2019 edition)

2020-01-01 Thread Yonatan Zunger
Makes sense. Thanks for the clarification! On Wed, Jan 1, 2020 at 1:30 AM Nick Coghlan wrote: > On Wed, 1 Jan 2020 at 10:42, Yonatan Zunger wrote: > > > > Thanks for writing this up, Nick! > > > > My main question is about the remaining difference between semantics at > the class/module versus

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-01 Thread Mark Sapiro
On 1/1/20 11:22 AM, Barry Warsaw wrote: > I am looking at the MM2 mailing list creation confirmation messages in my > personal archives. Both d...@python.org (at 09:49 server local time?) and > python-dev@python.org (at 14:17) were created on April 19, 1999. I don’t > remember what happened to

[Python-Dev] Re: Adding a scarier warning to object.__del__?

2020-01-01 Thread Andrew Svetlov
If the warning text tells about the delayed execution -- I'm +1. -1 for something like "just don't use __del__, it is dangerous". On Wed, Jan 1, 2020, 21:51 Gregory P. Smith wrote: > > > On Wed, Jan 1, 2020 at 6:40 AM Andrew Svetlov > wrote: > >> __del__ is very useful not for interpreter shutd

[Python-Dev] Re: Adding a scarier warning to object.__del__?

2020-01-01 Thread Gregory P. Smith
On Wed, Jan 1, 2020 at 6:40 AM Andrew Svetlov wrote: > __del__ is very useful not for interpreter shutdown but as a regular > destructor in object's lifecycle. > The reason we should warn people against ever implementing __del__ is that people rarely actually understand object lifecycle. Its pr

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-01 Thread Barry Warsaw
I am looking at the MM2 mailing list creation confirmation messages in my personal archives. Both d...@python.org (at 09:49 server local time?) and python-dev@python.org (at 14:17) were created on April 19, 1999. I don’t remember what happened to dev@ but based on the timeline, I’m retroguessi

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-01 Thread Mark Sapiro
On 1/1/20 8:42 AM, Nick Coghlan wrote: > On Thu, 2 Jan 2020 at 02:24, Skip Montanaro wrote: >> >> Any pointers to older messages appreciated... > > The old MM2 pipermail archives are still online: > https://mail.python.org/pipermail/python-dev/ The problem is the cumulative archive mbox which wa

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-01 Thread Nick Coghlan
On Thu, 2 Jan 2020 at 02:42, Nick Coghlan wrote: > > On Thu, 2 Jan 2020 at 02:24, Skip Montanaro wrote: > > > > I could swear python-dev was older than late April 1999, yet that's as far > > back as the MM3 archives go. As evidence, here's an email from Jack Jansen > > on 28 April 1999 which wa

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-01 Thread Guido van Rossum
The pipermail archives go back to April 1999. Maybe that's when python-dev split off python-list? https://mail.python.org/pipermail/python-dev/ Scroll to the end to see April 1999, and it seems python-dev was fresh then: https://mail.python.org/pipermail/python-dev/1999-April/095127.html (There's

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-01 Thread Nick Coghlan
On Thu, 2 Jan 2020 at 02:24, Skip Montanaro wrote: > > I could swear python-dev was older than late April 1999, yet that's as far > back as the MM3 archives go. As evidence, here's an email from Jack Jansen on > 28 April 1999 which was a reply to an earlier message not present in the > current

[Python-Dev] Python-dev mailing lis archives earlier than late April 1999?

2020-01-01 Thread Skip Montanaro
I could swear python-dev was older than late April 1999, yet that's as far back as the MM3 archives go. As evidence, here's an email from Jack Jansen on 28 April 1999 which was a reply to an earlier message not present in the current archive: https://mail.python.org/archives/list/python-dev@python

[Python-Dev] Use of AT_SECURE on Linux

2020-01-01 Thread Max Mazurov
Hello, list. I noticed that CPython does not sanitize environment when transition between SELinux contexts or AppArmor profiles happens, which I think is a good thing to do in cases when one sandboxed application runs a Python script with different (potentially less strict) sandbox configuration.

[Python-Dev] Re: Adding a scarier warning to object.__del__?

2020-01-01 Thread Andrew Svetlov
__del__ is very useful not for interpreter shutdown but as a regular destructor in object's lifecycle. Action on the shutdown is another beast. Personally, I prefer to do all finalization works by explicit calls instead. On Wed, Jan 1, 2020 at 2:39 AM Yonatan Zunger wrote: > > Hey everyone, > >

[Python-Dev] Re: PEP 558: Defined semantics for locals() (December 2019 edition)

2020-01-01 Thread Nick Coghlan
On Wed, 1 Jan 2020 at 10:42, Yonatan Zunger wrote: > > Thanks for writing this up, Nick! > > My main question is about the remaining difference between semantics at the > class/module versus function level: is it worth the additional cognitive > complexity to have the class/module behavior be di