New submission from Daniel Colascione :
The ensurepip module in the Python distribution bootstraps the pip package
manager. The Python build system runs this module during installation so that
the resulting Python installation is ready to install packages. Right now, the
pip command that
New submission from Daniel Colascione :
multiprocessing's freeze_support makes freshly-launched subprocesses integrate
correctly until the multiprocessing ecosystem even when the main executable is
some application binary instead of a Python interpreter. The documentation and
code assume
Daniel Colascione added the comment:
On Sun, Oct 1, 2017 at 2:01 PM, Antoine Pitrou
wrote:
> Perhaps other core developers will disagree with me and agree to include
> (i.e. review, maintain) this functionality. I simply am not convinced
> it deserves being included, but that
Daniel Colascione added the comment:
On Sun, Oct 1, 2017 at 2:01 PM, Antoine Pitrou
wrote:
>
> Antoine Pitrou added the comment:
>
> Le 01/10/2017 à 21:51, Daniel Colascione a écrit :
> >
> >> That does sound specialized to me :-) Can you give an example of suc
Daniel Colascione added the comment:
On Sun, Oct 1, 2017 at 11:12 AM, Antoine Pitrou
wrote:
>
> Antoine Pitrou added the comment:
>
> Le 01/10/2017 à 20:04, Daniel Colascione a écrit :
> >
> > It's not that specialized. You might want atomic updates for coor
Daniel Colascione added the comment:
On Sun, Oct 1, 2017 at 11:14 AM, Antoine Pitrou
wrote:
>
> Antoine Pitrou added the comment:
>
> Note that if there is already a C API to perform atomic ops, you can
> simply use ctypes to invoke that API. Unfortunately, the aforementioned
Daniel Colascione added the comment:
On Oct 1, 2017 10:46 AM, "Antoine Pitrou" wrote:
Antoine Pitrou added the comment:
While the use case is reasonable (if specialized),
It's not that specialized. You might want atomic updates for coordinating
with C APIs that expect calle
Daniel Colascione added the comment:
On Oct 1, 2017 10:19 AM, "Raymond Hettinger" wrote:
Raymond Hettinger added the comment:
> Compare-and-exchange is sufficient for avoiding the GIL contention
> I describe above.
If Python objects are involved, it is more complicated
New submission from Daniel Colascione :
Say we're using multiprocessing to share a counter between two processes and we
want to atomically increment that counter. Right now, we need to protect that
counter with a multiprocessing semaphore of some sort, then 1) acquire the
semaphore, 2)
New submission from Daniel Colascione :
Right now, the main loop in semlock_acquire looks like this:
do {
Py_BEGIN_ALLOW_THREADS
if (blocking && timeout_obj == Py_None)
res = sem_wait(self->handle);
else if (!blocking)
res = sem_t
New submission from Daniel Colascione:
Suppose we're running a Python program in an environment where PATH contains a
directory that contains msvcr90.dll version A and that python27.exe is
manifested to use msvcr90.dll version B, which is available in the SxS store
but not on PATH.
Nor
New submission from Daniel Colascione <[EMAIL PROTECTED]>:
Consider:
import dis
def foo():
if 0 and 1: return "hi"
dis.dis(foo)
What I get is
2 0 LOAD_CONST 1 (0)
3 JUMP_IF_FALSE 15 (to 21)
12 matches
Mail list logo