[Python-Dev] Premature Destruction of Shared Memory

2020-08-06 Thread Vinay Sharma via Python-Dev
As suggested by Guido I am posting a potential solution to the following 
problem for review.

Problem 

A quick fix for this problem is to prevent resource tracker from handling 
destruction/unlinking of shared memory. A PR 
 for the same was opened by Davin 
(@applio), and at this moment it is the only implemented solution to fix some 
of the critical issues in shared memory.

But, as soon as resource tracker is removed from the picture cleanup of shared 
memory is dependent on the user itself and this also makes Linux’s shared 
memory behaviour inconsistent with windows. 

Windows uses a reference counting mechanism to count the number of processes 
using a shared memory segment. When all of them are done using it, Windows 
simply unlinks and frees the memory allocated to the shared memory segment. On 
the other hand, in Linux, even after all the processes are done using the 
shared memory segment, the segment will continue to exist unless it is cleaned 
by the respective processes.

Having said that, the current implementation of Linux’s shared memory is also 
not consistent with windows. So, I think it makes sense to go ahead with the 
removal of resource tracker for now until we reach a better solution.

On that note, I have mentioned some of the possible solutions here 
. Out of these solutions I think 5 is the 
best. This issue and solution 5 is currently being discussed here 
.___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/O67CR7QWEOJ7WDAJEBKSY74NQ2C4W3AI/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-08-06 Thread Brett Cannon
On Thu, Aug 6, 2020 at 3:46 AM Mark Shannon  wrote:

> Hi Barry,
>
> How long do we have to present objections to PEP 622?
>

We haven't discussed a timeline among ourselves yet (unless it was
discussed at the last meeting which missed ).


>
> I don't feel that the PEP gives adequate prominence to the objections so
> far raised, and there are more issues I would like to bring up.
>

I don't think we would want to keep pushing out every time someone has more
to say as that would mean this would never end.  But I doubt we will be
making a decision next week, so if you can get any comments in between now
and the 17th you will probably get it in before the earliest we will very
optimistically make a decision.

-Brett


>
> Cheers,
> Mark.
>
>
> On 05/08/2020 5:58 pm, Barry Warsaw wrote:
> > PEP 622 is already on the SC’s agenda for review.
> >
> > -Barry
> >
> >> On Aug 5, 2020, at 09:47, Ethan Furman  wrote:
> >>
> >> On 7/30/20 8:35 AM, Rob Cliffe via Python-Dev wrote:
> >>
> >>> The debate is still going on as to whether "capture" variables should
> be marked...
> >> I don't think the PEP authors are debating it any more.  Quite frankly,
> I wish they would present to the SC and get accepted so we can get Pattern
> Matching added to 3.10.  :)
> >>
> >> --
> >> ~Ethan~
> >> ___
> >> Python-Dev mailing list -- python-dev@python.org
> >> To unsubscribe send an email to python-dev-le...@python.org
> >> https://mail.python.org/mailman3/lists/python-dev.python.org/
> >> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/PGEVEI2W7L32FFCLFOWGFRANMBZHPILQ/
> >> Code of Conduct: http://python.org/psf/codeofconduct/
> >
> >
> > ___
> > Python-Dev mailing list -- python-dev@python.org
> > To unsubscribe send an email to python-dev-le...@python.org
> > https://mail.python.org/mailman3/lists/python-dev.python.org/
> > Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/CVYGPSODOHTLEGPRM4EI5GTMR6PHSZLF/
> > Code of Conduct: http://python.org/psf/codeofconduct/
> >
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/OSDBFZRZFJVSZ5ZBJ6QFRPWEGL2FJCJZ/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/ESAKYRYV6L6ZMMXO4NTMYOD6OBSOBRQO/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Call for papers for PyCon 2020

2020-08-06 Thread Amna Ahsan
Hi,

I am writing to you on behalf of PyCon Estonia  to invite
you to take part in the call for papers for our 2020 edition and join us as
a speaker at PyCon: https://pyconestonia.typeform.com/to/e0jriV

This is the third PyCon Estonia event after successful delivery in 2018 and
2019. PyCon Estonia is organised by our NGO Python Estonia
 which is dedicated to education and awareness
about Python in the region.

In previous years , keynote
speakers at PyCon Estonia have included Travis Oliphant (Creator of NumPy)
and Kristo Vaher (Govt. CTO of Estonia). We've had around 300
participants join us for a live conference in Tallinn, Estonia with 7-9
excellent speakers from all walks of life talking about Python. This year
we already have Miguel Grinberg  as one of
our speakers.

Due to coronavirus, this PyCon will be an entirely virtual conference,
possibly with a bigger and more international audience. The theme for
PyCon Estonia
2020 is "The power of Python" and we want to talk about the real life
applications of Python and how digital products built on Python are
impacting the tech sector or the world in general.

We would really like to have you offer a possible topic for a talk at
PyCon. We intend to have a total of 8 talks of 30-minutes followed by a
10-minute Q If this would be something you are interested in, please
submit a proposal here: https://pyconestonia.typeform.com/to/e0jriV before
the *15th August, 2020*.

I am happy to add that we are a diverse group organising PyCon Estonia
2020, and we are trying to make the conference as diverse as possible.

If you have any questions, please don't hesitate to write to me.

Best Regards,

*Amna Ahsan*
Chief Marketing Officer

*Python Estonia*
+372 5784 0436
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/VR3Y7HSHVPL3T4NGN7YQ7HJ5SOBIO4XD/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 622 (Structural Pattern Matching) questions

2020-08-06 Thread Guido van Rossum
On Thu, Aug 6, 2020 at 04:31 Mark Shannon  wrote:

> Hi,
>
> I have two questions about PEP 622, as it stands.
>
> 1. Is the current version the final version?


That is up to the Steering Council.


> 2. Is the difference in semantics between the Django example and the
> proposed replacement deliberate or accidental?
>(The difference being the change in behaviour for sequences other
> than list or tuple).
>
> Cheers,
> Mark.
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/NQBL4S6WTM5647J2YKJNWM446WX3ELHO/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-- 
--Guido (mobile)
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PLD6HF6U6I6QQMCTZRKM646GHCLF3GDN/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 622 (Structural Pattern Matching) questions

2020-08-06 Thread Mark Shannon

Hi Daniel,

On 06/08/2020 1:11 pm, Daniel Moisset wrote:

Hi Mark,

As the specific author of that example (and the author of the big it had 
on a previous version) let me clarify:


The change in semantics is intentional. I could be more explicit, and 
preserve semantics, but I actually find very likely that the original 
code does not support other sequences because it would make their code 
more complicated (so it's a matter of opinion but for me it's a feature, 
not a bug)


Are you going to mention in the PEP that the two pieces of code are not 
equivalent, or show an equivalent version?


I don't know whether the original author intended to accept 
`array.array("u", "hi")` as a legal value, but I suspect that they did not.



Cheers,
Mark.



As for the previous fixed bug, of like to mentioned that I misread the 
original code (I tend to use >= rather than > for those comparisons) so 
I read "at least one element" rather than "more than one". Again, it may 
be subjective taste but I find our version more readable in that respect 
and less likely to be misinterpreted (making the bug easier to spot there)


Best,

Daniel



On Thu, 6 Aug 2020, 12:32 Mark Shannon, > wrote:


Hi,

I have two questions about PEP 622, as it stands.

1. Is the current version the final version?

2. Is the difference in semantics between the Django example and the
proposed replacement deliberate or accidental?
    (The difference being the change in behaviour for sequences other
than list or tuple).

Cheers,
Mark.
___
Python-Dev mailing list -- python-dev@python.org

To unsubscribe send an email to python-dev-le...@python.org

https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at

https://mail.python.org/archives/list/python-dev@python.org/message/NQBL4S6WTM5647J2YKJNWM446WX3ELHO/
Code of Conduct: http://python.org/psf/codeofconduct/


___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PQYIDEOJMMXTCNLHJWF7LQQQH7XKEXKW/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 622 (Structural Pattern Matching) questions

2020-08-06 Thread Daniel Moisset
Hi Mark,

As the specific author of that example (and the author of the big it had on
a previous version) let me clarify:

The change in semantics is intentional. I could be more explicit, and
preserve semantics, but I actually find very likely that the original code
does not support other sequences because it would make their code more
complicated (so it's a matter of opinion but for me it's a feature, not a
bug)

As for the previous fixed bug, of like to mentioned that I misread the
original code (I tend to use >= rather than > for those comparisons) so I
read "at least one element" rather than "more than one". Again, it may be
subjective taste but I find our version more readable in that respect and
less likely to be misinterpreted (making the bug easier to spot there)

Best,

Daniel



On Thu, 6 Aug 2020, 12:32 Mark Shannon,  wrote:

> Hi,
>
> I have two questions about PEP 622, as it stands.
>
> 1. Is the current version the final version?
>
> 2. Is the difference in semantics between the Django example and the
> proposed replacement deliberate or accidental?
>(The difference being the change in behaviour for sequences other
> than list or tuple).
>
> Cheers,
> Mark.
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/NQBL4S6WTM5647J2YKJNWM446WX3ELHO/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/WA6HJBW4HQWL3ESYKH3PUWVE47TPJOXZ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] PEP 622 (Structural Pattern Matching) questions

2020-08-06 Thread Mark Shannon

Hi,

I have two questions about PEP 622, as it stands.

1. Is the current version the final version?

2. Is the difference in semantics between the Django example and the 
proposed replacement deliberate or accidental?
  (The difference being the change in behaviour for sequences other 
than list or tuple).


Cheers,
Mark.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/NQBL4S6WTM5647J2YKJNWM446WX3ELHO/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-08-06 Thread Mark Shannon

Hi Barry,

How long do we have to present objections to PEP 622?

I don't feel that the PEP gives adequate prominence to the objections so 
far raised, and there are more issues I would like to bring up.


Cheers,
Mark.


On 05/08/2020 5:58 pm, Barry Warsaw wrote:

PEP 622 is already on the SC’s agenda for review.

-Barry


On Aug 5, 2020, at 09:47, Ethan Furman  wrote:

On 7/30/20 8:35 AM, Rob Cliffe via Python-Dev wrote:


The debate is still going on as to whether "capture" variables should be 
marked...

I don't think the PEP authors are debating it any more.  Quite frankly, I wish 
they would present to the SC and get accepted so we can get Pattern Matching 
added to 3.10.  :)

--
~Ethan~
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PGEVEI2W7L32FFCLFOWGFRANMBZHPILQ/
Code of Conduct: http://python.org/psf/codeofconduct/



___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/CVYGPSODOHTLEGPRM4EI5GTMR6PHSZLF/
Code of Conduct: http://python.org/psf/codeofconduct/


___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/OSDBFZRZFJVSZ5ZBJ6QFRPWEGL2FJCJZ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-08-06 Thread Daniel Moisset
Javascript hasn't it yet, but there is an active proposal for it in the
standardization committee: https://github.com/tc39/proposal-pattern-matching


On Wed, 5 Aug 2020 at 21:34, Luciano Ramalho  wrote:

> On Tue, Aug 4, 2020 at 1:37 PM Tobias Kohn  wrote:
> > And experience from other programming languages who took the leap to
> having
> > pattern matching shows that it quickly becomes a quite intuitive and
> easy to use feature.
>
> The languages I know about that have pattern matching had it from the
> start as a core feature.
>
> I am curious to learn about languages that adopted pattern matching
> later in their evolution.
>
> Cheers,
>
> Luciano
>
>
> >
> > Cheers,
> > Tobias
> >
> > P.S. Please excuse my late reply; I am currently on vacation.
> >
> >
> >
> > Quoting Larry Hastings :
> >
> >
> >
> > On 7/31/20 12:36 AM, Tobias Kohn wrote:
> >
> > And since pattern matching is really
> > a new feature to be introduced to Python, a feature that can
> > be seen in different lights, there is no 'Python-Programmer
> > intuition' that would apply in this case.
> >
> > It's not fair to say "intuition doesn't apply because it's new syntax".
> There are plenty of examples of intuition serving a Python programmer well
> when encountering new syntax.  A Python programmer's intuition is informed
> by existing syntax and conventions in the language.  When they see a new
> construct, its similarity to existing constructs can make understanding the
> new syntax quite intuitive indeed.
> >
> > Take for example list comprehensions.  Python 1 programmers hadn't seen
> >
> > a = [x for x in y]
> >
> > But they knew what square brackets meant in that context, it meant
> "creates a new list".  And they knew what "for x in y" meant, that meant
> iteration.  Understanding those separate two concepts, a Python 1
> programmer would be well on their way to guessing what the new syntax
> meant--and they'd likely be right.  And once they understood list
> comprehensions, the first time they saw generator expressions and set and
> dict comprehensions they'd surely intuit what those did immediately.
> >
> > The non-intuitiveness of PEP 622, as I see it, is that it repurposes
> what looks like existing Python syntax but frequently has wholly different
> semantics.  For example, a "class pattern" looks like it's calling a
> function--perhaps instantiating an object?--but the actual semantics and
> behavior is very different.  Similarly, a "mapping pattern" looks like it's
> instantiating a dict, but it does something very different, and has
> unfamiliar and seemingly arbitrary rules about what is permitted, e.g. you
> can't use full expressions or undotted-identifiers when defining a key.
> Add the "capture pattern" to both of these, and a Python programmer's
> intuition about what this syntax traditionally does will be of little help
> when encountering a PEP 622 match statement for the first time.
> >
> > Cheers,
> >
> >
> >
> > /arry
> >
> >
> >
> > ___
> > Python-Dev mailing list -- python-dev@python.org
> > To unsubscribe send an email to python-dev-le...@python.org
> > https://mail.python.org/mailman3/lists/python-dev.python.org/
> > Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/2VRPDW4EE243QT3QNNCO7XFZYZGIY6N3/
> > Code of Conduct: http://python.org/psf/codeofconduct/
>
>
>
> --
> Luciano Ramalho
> |  Author of Fluent Python (O'Reilly, 2015)
> | http://shop.oreilly.com/product/0636920032519.do
> |  Technical Principal at ThoughtWorks
> |  Twitter: @ramalhoorg
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/PI44AV5C2F2IMO6PJSYVJOPXGQ62JMHQ/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/FBBV7LEGZXMMNOW4DZQN6C4FOPT765T2/
Code of Conduct: http://python.org/psf/codeofconduct/