On Thu, Jan 18, 2018 at 3:53 AM, Yury Selivanov
wrote:
[]
>
> Given the time frame of the Python 3.7 release schedule it was decided
> to defer this proposal to Python 3.8.
>
It occurs to me that I had misread this to refer to the whole PEP.
Although I thought it's kind of sad that after
On Thu, Jan 18, 2018 at 12:03 AM, Antoine Pitrou wrote:
> On Wed, 17 Jan 2018 20:53:42 -0500
> Yury Selivanov wrote:
>>
>> Proposed by Antoine Pitrou, this could enable transparent
>> cross-process use of ``Context`` objects, so the
>> `Offloading execution to other threads`_ example would work w
On Wed, 17 Jan 2018 20:53:42 -0500
Yury Selivanov wrote:
>
> Proposed by Antoine Pitrou, this could enable transparent
> cross-process use of ``Context`` objects, so the
> `Offloading execution to other threads`_ example would work with
> a ``ProcessPoolExecutor`` too.
>
> Enabling this is probl
On Wed, Jan 17, 2018 at 8:53 PM, Yury Selivanov wrote:
> On Wed, Jan 17, 2018 at 2:24 PM, Guido van Rossum
> wrote:
>> Perhaps you can update the PEP with a summary of the rejected ideas from
>> this thread?
>
> The Rejected Ideas section of the PEP is now updated with the below:
I've added two
On Wed, Jan 17, 2018 at 2:24 PM, Guido van Rossum wrote:
> Perhaps you can update the PEP with a summary of the rejected ideas from
> this thread?
The Rejected Ideas section of the PEP is now updated with the below:
Token.reset() instead of ContextVar.reset()
FYI In the PEP 540, I didn't try to elaborate on each design change, but I
wrote a very short version history at the end:
https://www.python.org/dev/peps/pep-0540/#version-history
Maybe something like that would help for the PEP 567?
Victor
Le 17 janv. 2018 8:26 PM, "Guido van Rossum" a
écrit :
Perhaps you can update the PEP with a summary of the rejected ideas from
this thread?
On Jan 17, 2018 7:23 AM, "Yury Selivanov" wrote:
> On Wed, Jan 17, 2018 at 6:03 AM, Antoine Pitrou
> wrote:
> > On Tue, 16 Jan 2018 17:18:06 -0800
> > Nathaniel Smith wrote:
> >> On Tue, Jan 16, 2018 at 5:06
On Wed, Jan 17, 2018 at 6:03 AM, Antoine Pitrou wrote:
> On Tue, 16 Jan 2018 17:18:06 -0800
> Nathaniel Smith wrote:
>> On Tue, Jan 16, 2018 at 5:06 PM, Yury Selivanov
>> wrote:
>> >
>> > I think it would be a very fragile thing In practice: if you have even
>> > one variable in the context tha
On Tue, 16 Jan 2018 17:18:06 -0800
Nathaniel Smith wrote:
> On Tue, Jan 16, 2018 at 5:06 PM, Yury Selivanov
> wrote:
> >
> > I think it would be a very fragile thing In practice: if you have even
> > one variable in the context that isn't pickleable, your code that uses
> > a ProcessPool would s
On 17 January 2018 at 11:27, Nathaniel Smith wrote:
> On Tue, Jan 16, 2018 at 2:44 PM, Yury Selivanov
> wrote:
>> 4. ContextVar.reset(token) now raises a ValueError if the token was
>> created in a different Context.
>
> A minor bit of polish: given that Token objects have to track the
> associa
On Tue, Jan 16, 2018 at 5:33 PM, Yury Selivanov
wrote:
> On Tue, Jan 16, 2018 at 8:27 PM, Nathaniel Smith wrote:
> [..]
> > token = cvar.set(...)
> > token.reset()
>
> I see the point, but I think that having the 'reset' method defined on
> the ContextVar class is easier to grasp. It also feels
On Tue, Jan 16, 2018 at 8:27 PM, Nathaniel Smith wrote:
[..]
> token = cvar.set(...)
> token.reset()
I see the point, but I think that having the 'reset' method defined on
the ContextVar class is easier to grasp. It also feels natural that a
pair of set/reset methods is defined on the same class
On Tue, Jan 16, 2018 at 2:44 PM, Yury Selivanov wrote:
> 4. ContextVar.reset(token) now raises a ValueError if the token was
> created in a different Context.
A minor bit of polish: given that Token objects have to track the
associated ContextVar anyway, I think it'd be cleaner if instead of
doin
On Tue, Jan 16, 2018 at 5:06 PM, Yury Selivanov wrote:
> On Tue, Jan 16, 2018 at 7:45 PM, Guido van Rossum wrote:
>> On Tue, Jan 16, 2018 at 4:37 PM, Antoine Pitrou wrote:
>>>
>>> On Tue, 16 Jan 2018 17:44:14 -0500
>>> Yury Selivanov wrote:
>>>
>>> > Offloading execution to other threads
>>> >
On Tue, Jan 16, 2018 at 7:45 PM, Guido van Rossum wrote:
> On Tue, Jan 16, 2018 at 4:37 PM, Antoine Pitrou wrote:
>>
>> On Tue, 16 Jan 2018 17:44:14 -0500
>> Yury Selivanov wrote:
>>
>> > Offloading execution to other threads
>> > -
>> >
>> > It is possible to
Thanks, Victor!
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
On Tue, Jan 16, 2018 at 6:53 PM, Guido van Rossum wrote:
> On Tue, Jan 16, 2018 at 3:26 PM, Victor Stinner
[..]
>> I don't think that it's worth it to prevent misuage of reset(). IMHO
>> it's fine if calling reset() twice reverts the variable state twice.
>
>
> Maybe the effect of calling it twic
On Tue, Jan 16, 2018 at 4:37 PM, Antoine Pitrou wrote:
> On Tue, 16 Jan 2018 17:44:14 -0500
> Yury Selivanov wrote:
>
> > Offloading execution to other threads
> > -
> >
> > It is possible to run code in a separate OS thread using a copy
> > of the current thr
On Tue, 16 Jan 2018 17:44:14 -0500
Yury Selivanov wrote:
> Offloading execution to other threads
> -
>
> It is possible to run code in a separate OS thread using a copy
> of the current thread context::
>
> executor = ThreadPoolExecutor()
> current_co
On Tue, Jan 16, 2018 at 3:26 PM, Victor Stinner
wrote:
> Thanks for the updated PEP v3, it's now much better than PEP v2!
>
> I have no more complain against your PEP. I vote +1 for PEP 567
> contextvars!
>
Yeah!
> The only open question I personally have is whether ContextVar.reset()
> > shoul
Hi Yury,
Thanks for the updated PEP v3, it's now much better than PEP v2!
I have no more complain against your PEP. I vote +1 for PEP 567 contextvars!
> The only open question I personally have is whether ContextVar.reset()
> should be idempotent or not. Maybe we should be strict and raise an
>
Hi,
This is a third version of PEP 567.
Changes from v2:
1. PyThreadState now references Context objects directly (instead of
referencing _ContextData). This fixes out of sync Context.get() and
ContextVar.get().
2. Added a new Context.copy() method.
3. Renamed Token.old_val property to Token.
22 matches
Mail list logo