Re: [Python-Dev] PEP 550 v4

2017-08-25 Thread David Mertz
This is now looking really good and I can understands it. One question though. Sometimes creation of a context variable is done with a name argument, other times not. E.g. var1 = new_context_var('var1') var = new_context_var() The signature is given as: sys.new_context_var(name: str)

Re: [Python-Dev] PEP 550 and other python implementations

2017-08-25 Thread Jim Baker
re other implementations: the model presented in https://www.python.org/dev/peps/pep-0550/#implementation seems perfectly compatible with Jython. It's just one more thing we would add to PyThreadState (which is what it's also called in the Jython runtime). On Fri, Aug 25, 2017 at 7:45 PM, Jim J.

Re: [Python-Dev] PEP 550 leak-in vs leak-out, why not just a ChainMap

2017-08-25 Thread Jim J. Jewett
On Aug 24, 2017 11:02 AM, "Yury Selivanov" wrote: On Thu, Aug 24, 2017 at 10:05 AM, Jim J. Jewett wrote: > On Thu, Aug 24, 2017 at 1:12 AM, Yury Selivanov > On Thu, Aug 24, 2017 > at 12:32 AM, Jim J. Jewett wrote: If you

Re: [Python-Dev] PEP 550 v4

2017-08-25 Thread Ethan Furman
All in all, I like it. Nice job. On 08/25/2017 03:32 PM, Yury Selivanov wrote: A *context variable* is an object representing a value in the execution context. A new context variable is created by calling the ``new_context_var()`` function. A context variable object has two methods: *

[Python-Dev] PEP 550 and other python implementations

2017-08-25 Thread Jim J. Jewett
Should PEP 550 discuss other implementations? E.g., the object space used in pypy? -jJ ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

[Python-Dev] bpo-30987 review

2017-08-25 Thread Pier-Yves Lessard
Hello there! I've created a pull request almost a month ago that seems to have very little attention and I was wondering what could be done (if any). The suggested approach on the "Lifecycle of a pull request" page is said to wait for a month then

[Python-Dev] PEP 550 v4

2017-08-25 Thread Yury Selivanov
Hi, This is the 4th iteration of the PEP that Elvis and I have rewritten from scratch. The specification section has been separated from the implementation section, which makes them easier to follow. During the rewrite, we realized that generators and coroutines should work with the EC in

[Python-Dev] Summary of Python tracker Issues

2017-08-25 Thread Python tracker
ACTIVITY SUMMARY (2017-08-18 - 2017-08-25) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open6149 (+16) closed 36880 (+28) total 43029 (+44) Open issues

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Guido van Rossum
I think the issue with sys.std* is a distraction for this discussion. The issue also seems overstated, and I wouldn't want to change it. The ability to set these is mostly used in small programs that are also single-threaded. Libraries should never mess with them -- it's easy to explicitly pass an

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Eric Snow
On Fri, Aug 25, 2017 at 9:10 AM, Barry Warsaw wrote: > It’s ideas like this that do make me think of scopes when talking about > global state and execution contexts. I understand that the current PEP 550 > invokes an explicit separate namespace, Right. The observation that

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Yury Selivanov
On Fri, Aug 25, 2017 at 11:10 AM, Barry Warsaw wrote: [..] > It’s ideas like this that do make me think of scopes when talking about > global state and execution contexts. I understand that the current PEP 550 > invokes an explicit separate namespace, but thinking bigger, if

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Eric Snow
On Fri, Aug 25, 2017 at 8:18 AM, Yury Selivanov wrote: > Another idea: > > 1. We alter PyModule to make it possible to add properties (descriptor > protocol, or we implement custom __getattr__). I think we can make it > so that only sys module would be able to actually

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Barry Warsaw
On Aug 25, 2017, at 10:18, Yury Selivanov wrote: > > I has a similar idea when I discovered that PEP 550 can't be used > directly to fix sys.std* streams redirection. Another idea: > > 1. We alter PyModule to make it possible to add properties (descriptor > protocol,

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Yury Selivanov
Right, Nick, I missed the part that you want to have a file-like wrapper stored in sys.std* streams that would redirect lookups/calls to the relevant real file-object in the current context (correct?) I has a similar idea when I discovered that PEP 550 can't be used directly to fix sys.std*

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Nick Coghlan
On 25 August 2017 at 23:36, Yury Selivanov wrote: > On Fri, Aug 25, 2017 at 9:23 AM, Nick Coghlan wrote: > [..] >> And while PEP 550 doesn't handle the stream redirection case natively >> (since it doesn't allow for suspend/resume callbacks the way

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Yury Selivanov
On Fri, Aug 25, 2017 at 9:23 AM, Nick Coghlan wrote: [..] > And while PEP 550 doesn't handle the stream redirection case natively > (since it doesn't allow for suspend/resume callbacks the way PEP 525 > does), it at least allows for the development of a context-aware > output

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Nick Coghlan
On 25 August 2017 at 20:28, Antoine Pitrou wrote: > On Fri, 25 Aug 2017 15:36:55 +1000 > Nick Coghlan wrote: >> On 24 August 2017 at 23:52, Barry Warsaw wrote: >> > Guido van Rossum wrote: >> >> On Tue, Aug 22, 2017 at 7:12 PM,

Re: [Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

2017-08-25 Thread Antoine Pitrou
On Fri, 25 Aug 2017 15:36:55 +1000 Nick Coghlan wrote: > On 24 August 2017 at 23:52, Barry Warsaw wrote: > > Guido van Rossum wrote: > >> On Tue, Aug 22, 2017 at 7:12 PM, Nathaniel Smith wrote: > >> > >> I worry that that's going to lead