Re: [Python-Dev] git history conundrum

2019-04-27 Thread Martin Panter
On Sat, 27 Apr 2019 at 19:07, Chris Withers wrote: > Right, so I've merged up to 15f44ab043, what comes next? > > $ git log --oneline --no-merges 15f44ab043.. -- Lib/unittest/mock.py > Lib/unittest/test/testmock/ | tail -n 3 This Git command line means list all the revisions except 15f44ab043

Re: [Python-Dev] datetime.fromisocalendar

2019-04-27 Thread Guido van Rossum
I think it’s a good idea. On Sat, Apr 27, 2019 at 11:43 AM Paul Ganssle wrote: > Greetings, > > Some time ago, I proposed adding a `.fromisocalendar` alternate > constructor to `datetime` (bpo-36004 ), > with a corresponding implementation (PR #11888 >

Re: [Python-Dev] PEP 580 and PEP 590 comparison.

2019-04-27 Thread Jeroen Demeyer
On 2019-04-27 11:26, Mark Shannon wrote: Performance improvements include, but aren't limited to: 1. Much faster calls to common classes: range(), set(), type(), list(), etc. That's not specific to PEP 590. It can be done with any proposal. I know that there is the ABI issue with PEP 580,

Re: [Python-Dev] PEP 580 and PEP 590 comparison.

2019-04-27 Thread Jeroen Demeyer
On 2019-04-27 11:26, Mark Shannon wrote: Specifically, and this is important, PEP 580 cannot implement efficient calls to class objects without breaking the ABI. First of all, the layout of PyTypeObject isn't actually part of the stable ABI (see PEP 384). So, we wouldn't be breaking anything

Re: [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode

2019-04-27 Thread Nathaniel Smith
On Sat, Apr 27, 2019, 04:27 Armin Rigo wrote: > Hi Neil, > > On Wed, 24 Apr 2019 at 21:17, Neil Schemenauer > wrote: > > Regarding the Py_TRACE_REFS fields, I think we can't do them without > > breaking the ABI because of the following. For GC objects, they are > > always allocated by

Re: [Python-Dev] Actor Model in Python

2019-04-27 Thread Jean-Paul Smets
Hello, ERP5 https://erp5.nexedi.com) implements the "Actalk" actor model in a library called "CMFActivity". Processing (ex. financial transactions, machine learning) can be distributed on a cluster of servers. Actalk is interesting because it provides a way to unify and combine multiple OOCP

Re: [Python-Dev] Actor Model in Python

2019-04-27 Thread Jean-Paul Smets
Hello, ERP5 https://erp5.nexedi.com) implements the "Actalk" actor model in a library called "CMFActivity". Processing (ex. financial transactions, machine learning) can be distributed on a cluster of servers. Actalk is interesting because it provides a way to unify and combine multiple OOCP

[Python-Dev] git history conundrum

2019-04-27 Thread Chris Withers
Hi All, I'm in the process of bringing the mock backport up to date, but this has got me stumped: $ git log --oneline  --no-merges 5943ea76d529f9ea18c73a61e10c6f53bdcc864f.. -- Lib/unittest/mock.py Lib/unittest/test/testmock/ | tail 362f058a89 Issue #28735: Fixed the comparison of

[Python-Dev] datetime.fromisocalendar

2019-04-27 Thread Paul Ganssle
Greetings, Some time ago, I proposed adding a `.fromisocalendar` alternate constructor to `datetime` (bpo-36004 ), with a corresponding implementation (PR #11888 ). I advertised it on datetime-SIG some time ago but

Re: [Python-Dev] PEP 580/590 discussion

2019-04-27 Thread Mark Shannon
Hi Jeroen, On 25/04/2019 3:42 pm, Jeroen Demeyer wrote: On 2019-04-25 00:24, Petr Viktorin wrote: I believe we can achieve that by having PEP 590's (o+offset) point not just to function pointer, but to a {function pointer; flags} struct with flags defined for two optimizations: What's the

Re: [Python-Dev] PEP 590 discussion

2019-04-27 Thread Mark Shannon
Hi Petr, On 24/04/2019 11:24 pm, Petr Viktorin wrote: On 4/10/19 7:05 PM, Jeroen Demeyer wrote: On 2019-04-10 18:25, Petr Viktorin wrote: Hello! I've had time for a more thorough reading of PEP 590 and the reference implementation. Thank you for the work! And thank you for the review! I'd

Re: [Python-Dev] PEP 580/590 discussion

2019-04-27 Thread Jeroen Demeyer
On 2019-04-27 14:07, Mark Shannon wrote: class D(C): __call__(self, ...): ... and then create an instance `d = D()` then calling d will have two contradictory behaviours; the one installed by C in the function pointer and the one specified by D.__call__ It's true that the

Re: [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode

2019-04-27 Thread Stefan Behnel
Matthias Klose schrieb am 25.04.19 um 13:48: > Are there use cases where you only want to load *some* > debug extensions, even if more are installed? Not sure if there are _important_ use cases (that could justify certain design decisions), but I can certainly imagine using a non-debug (and

Re: [Python-Dev] PEP 580/590 discussion

2019-04-27 Thread Mark Shannon
Hi Petr, On 24/04/2019 11:24 pm, Petr Viktorin wrote: So, I spent another day pondering the PEPs. I love PEP 590's simplicity and PEP 580's extensibility. As I hinted before, I hope they can they be combined, and I believe we can achieve that by having PEP 590's (o+offset) point not just to

Re: [Python-Dev] PEP 580 and PEP 590 comparison.

2019-04-27 Thread Mark Shannon
Hi, On 15/04/2019 9:34 am, Jeroen Demeyer wrote: On 2019-04-14 13:34, Mark Shannon wrote: I'll address capability first. I don't think that comparing "capability" makes a lot of sense since neither PEP 580 nor PEP 590 adds any new capabilities to CPython. They are meant to allow doing

Re: [Python-Dev] PEP 590 discussion

2019-04-27 Thread Mark Shannon
Hi Jeroen, On 15/04/2019 9:38 am, Jeroen Demeyer wrote: On 2019-04-14 13:30, Mark Shannon wrote: PY_VECTORCALL_ARGUMENTS_OFFSET exists so that callables that make onward calls with an additional argument can do so efficiently. The obvious example is bound-methods, but classes are at least as

Re: [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode

2019-04-27 Thread Armin Rigo
Hi Neil, On Wed, 24 Apr 2019 at 21:17, Neil Schemenauer wrote: > Regarding the Py_TRACE_REFS fields, I think we can't do them without > breaking the ABI because of the following. For GC objects, they are > always allocated by _PyObject_GC_New/_PyObject_GC_NewVar. So, we > can allocate the

Re: [Python-Dev] Increasing the C-optimized pickle extensibility

2019-04-27 Thread Peter Wang
I strongly second not breaking backwards compatibility and interoperability, especially for persistent artifacts, unless there is a *REALLY* good reason. A potential unintended side effect of such breakages is that it slows down adoption of the new version. -Peter On Fri, Apr 26, 2019 at 10:27

Re: [Python-Dev] Actor Model in Python

2019-04-27 Thread Wes Turner
https://trio.readthedocs.io/en/latest/reference-core.html#synchronizing-and-communicating-between-tasks https://pypi.org/search/?q=Actor+model https://en.wikipedia.org/wiki/Actor_model https://en.wikipedia.org/wiki/Bulk_synchronous_parallel#The_model On Friday, April 26, 2019, Eric Snow