Pablo Galindo Salgado added the comment:
Regarding the leak, I was under the assumption that as File_actionsp is
pointing to a stack initialized _file_actions and is this last variable the one
that is passed to posix_spawn_file_actions_init, it was not needed to
explicitly call
Pablo Galindo Salgado added the comment:
@vstinner I have removed the #define HAVE_POSIX_SPAWN 1 in PR 5418.
--
nosy: -vstinner
___
Python tracker
<https://bugs.python.org/issue20
Pablo Galindo Salgado added the comment:
Thank Yury for the information!
This should be fixed now in PR418.
--
___
Python tracker
<https://bugs.python.org/issue20
Pablo Galindo Salgado added the comment:
@lisroach A possible test for this is repeat `test_ensure_disabled_thread` with
warnings as errors:
```python
warnings.filterwarnings('error')
```
and then checking for a `RuntimeWarning` exception instead of the warning. I
think this
Change by Pablo Galindo Salgado :
--
components: +asyncio
___
Python tracker
<https://bugs.python.org/issue32810>
___
___
Python-bugs-list mailing list
Unsub
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +5430
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32798>
___
_
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +5431
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32815>
___
_
Pablo Galindo Salgado added the comment:
Is not leaked as the object is still alive. Only one side is closed when you
call "closed". If you destroy the object:
>>> del x
You will see that there are no more file descriptors in /proc/PID/fd associated
with that queue.
Pablo Galindo Salgado added the comment:
The way is to delete the object. IMHO I would not say is "leaked" as the object
is still alive and holds resources and these resources are properly handled on
destruction.
I cannot think of an immediate use case of closing both file descr
Pablo Galindo Salgado added the comment:
Notice that the writer gets closed when it receives a sentinel value (which how
the queue knows when to close as part of the design):
>>> x.put(multiprocessing.queues._sentinel)
If you call close after this line there will not be any fd a
Pablo Galindo Salgado added the comment:
When I run your script I do not see any file descriptor associated with the
queue when
subprocess.call(["ls", "-la", "/proc/%d/fd" % os.getpid()])
is executed.
This is my output if I just execute your pro
Pablo Galindo Salgado added the comment:
Notice that the documentation for close says:
> Indicate that no more data will be put on this queue by the current process.
> The background thread will quit once it has flushed all buffered data to the
> pipe. This is called automatically
Pablo Galindo Salgado added the comment:
>"I want to terminate the queue and make sure that no resources are leaked.
Then you don't need to do anything special, those will be cleared on object
destruction. This is not an unusual pattern even in other languages. For
example, R
Pablo Galindo Salgado added the comment:
> RAII in C++ ensures that, on object destruction, resources that have been
> acquired will be closed and deallocated.
Which is exactly what is happening here. When the queue gets destroyed (because
the reference count reaches 0 or because
Pablo Galindo Salgado added the comment:
The garbage collector in Python does not work like that. If an object reaches
zero references is destroyed immediately. The only problem is when circular
references exist and is in this case when object deletion is delayed until the
garbage collector
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +5907
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33083>
___
_
Pablo Galindo Salgado added the comment:
Duplicate of issue3971
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue33149>
___
___
Python-bug
Change by Pablo Galindo Salgado :
--
superseder: -> s_push: parser stack overflow MemoryError
___
Python tracker
<https://bugs.python.org/issue33149>
___
_
Change by Pablo Galindo Salgado :
--
resolution: -> duplicate
___
Python tracker
<https://bugs.python.org/issue33149>
___
___
Python-bugs-list mailing list
Un
Change by Pablo Galindo Salgado :
--
title: clean code -> Use list comprehension in timeit module instead of loop
with append
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
It seems that the problem is that `_Py_InitializeEx_Private` calls
`_Py_InitializeCore` and `_Py_InitializeMainInterpreter`. The first one calls
at the end `initimport` that in turns calls
`importlib._install_external_importers` that sets the
Pablo Galindo Salgado added the comment:
The same problem happens in `new_interpreter` as far as I understand.
--
___
Python tracker
<https://bugs.python.org/issue33
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +6001
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +6030
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33176>
___
_
Pablo Galindo Salgado added the comment:
I have created an initial implementation in PR 6314.
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue33
Change by Pablo Galindo Salgado :
--
pull_requests: +6044
___
Python tracker
<https://bugs.python.org/issue33191>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
In PR6331 I am trying to address all issues identified by Serhiy.
--
___
Python tracker
<https://bugs.python.org/issue20
Pablo Galindo Salgado added the comment:
Notice that some of the errors identified at the end of 5109 were already
corrected by the other PRs in this issue.
--
___
Python tracker
<https://bugs.python.org/issue20
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +6190
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33234>
___
_
Pablo Galindo Salgado added the comment:
Microbenchmarked with @vstinner's perf module:
python -m perf timeit "list([0]*10)" -o new.json
checkout master and build
python -m perf timeit "list([0]*10)" -o old.json
python -m perf compare_to new.json old.json
Mean +- s
New submission from Pablo Galindo Salgado :
The "What's new in 3.7" is missing the functions exposed in issue31368 and
issue20104: pwritev, preadv and posix_spawn.
--
messages: 315465
nosy: gregory.p.smith, pablogsal, serhiy.storchaka
priority: normal
severity: norm
Change by Pablo Galindo Salgado :
--
assignee: -> pablogsal
components: +Documentation
priority: normal -> high
stage: -> needs patch
type: -> enhancement
versions: +Python 3.7
___
Python tracker
<https://bugs.python
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +6218
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +6219
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Pablo Galindo Salgado :
Currently, there are rendering issues in the os module documentation for the
constants os.RWF_HIPRI and os.RWF_NOWAIT:
https://docs.python.org/3.7/library/os.html#os.RWF_HIPRI
https://docs.python.org/3.7/library/os.html#os.RWF_NOWAIT
New submission from Pablo Galindo Salgado :
Given this async function:
async def elements(n):
yield n
yield n*2
yield n*3
yield n*4
This definition is considered invalid:
async def test():
return { n: [x async for x in elements(n)] for n in range(3)}
SyntaxError
Pablo Galindo Salgado added the comment:
I think PR6332 is already addressing this
https://github.com/python/cpython/pull/6332 , right?
--
___
Python tracker
<https://bugs.python.org/issue33
Change by Pablo Galindo Salgado :
--
superseder: -> expose posix_spawn(p)
___
Python tracker
<https://bugs.python.org/issue33357>
___
___
Python-bugs-list mai
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +6308
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +6309
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33354>
___
_
Pablo Galindo Salgado added the comment:
@serhiy.storchaka @rhettinger @vstinner Should we better make the
pre-allocation if the length of the iterable is known (so we call
PyObject_Length and not PyObject_LengthHint)? This will keep the logic simpler
(so not shrinking if PyObject_LengthHint
Change by Pablo Galindo Salgado :
--
pull_requests: +6386
___
Python tracker
<https://bugs.python.org/issue20104>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
I have open https://github.com/python/cpython/pull/6693 to start iterating over
the missing capabilities of posix_spawn (Passing various attributes of the
created child process).
Please, review to make sure that the design is OK and I will proceed to
Pablo Galindo Salgado added the comment:
One open question is how to construct and pass through the struct "sched_param"
that “posix_spawnattr_setschedparam” needs.
--
___
Python tracker
<https://bugs.python.o
Pablo Galindo Salgado added the comment:
Thanks! I have updated the PR and added tests.
--
___
Python tracker
<https://bugs.python.org/issue20104>
___
___
Pytho
Pablo Galindo Salgado added the comment:
I think that is the biggest argument towards using a tuple: that just setting
the priority is not enough (and also is decontextualized as different policies
have different priorities). On the other hand one could say that the API is a
low level API
Change by Pablo Galindo Salgado :
--
pull_requests: +6479
___
Python tracker
<https://bugs.python.org/issue20104>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
Notice that https://github.com/python/cpython/pull/6794 is already open to
remove posix_spawn from 3.7.
--
___
Python tracker
<https://bugs.python.org/issue20
Pablo Galindo Salgado added the comment:
Regarding the rationale for when posix_spawn can be useful (from the RATIONALE
section of the man page):
The posix_spawn() function and its close relation posix_spawnp() have been
introduced to overcome the following perceived difficulties with fork
Change by Pablo Galindo Salgado :
--
Removed message: https://bugs.python.org/msg316526
___
Python tracker
<https://bugs.python.org/issue20104>
___
___
Python-bug
Pablo Galindo Salgado added the comment:
Some interesting benchmarks of posix spawn:
https://github.com/rtomayko/posix-spawn/blob/master/README.md
--
components: -Library (Lib)
priority: normal -> release blocker
versions: +Python 3.7
___
Pyt
Pablo Galindo Salgado added the comment:
Also this reading may be relevant/interesting:
https://about.gitlab.com/2018/01/23/how-a-fix-in-go-19-sped-up-our-gitaly-service-by-30x/
--
___
Python tracker
<https://bugs.python.org/issue20
Pablo Galindo Salgado added the comment:
I have updated both the test and the implementation to address your feedback.
--
___
Python tracker
<https://bugs.python.org/issue31
Change by Pablo Galindo Salgado :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue31800>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Pablo Galindo Salgado :
--
pull_requests: +3997
stage: backport needed -> patch review
___
Python tracker
<https://bugs.python.org/issue31786>
___
_
New submission from Pablo Galindo Salgado :
Following PR for https://bugs.python.org/issue31786 time_sleep,
lock_acquire_parse_args and socket_parse_timeout should use
_PyTime_ROUND_TIMEOUT instead of _PyTime_ROUND_CEILING.
--
components: Library (Lib)
messages: 304540
nosy: pablogsal
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4001
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31806>
___
_
Pablo Galindo Salgado added the comment:
IMHO this change makes things a bit more consistent. In lots of places when a
tuple is returned, a `structseq` is used to improve readability on the returned
result. Some examples of this are:
* grp.struct_group
* os.terminal_size
* pwd.struct_passwd
Pablo Galindo Salgado added the comment:
With the exception of string.FormatterItem, which is the change at hand.
--
___
Python tracker
<https://bugs.python.org/issue29
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4025
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue17799>
___
_
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4033
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/iss
Pablo Galindo Salgado added the comment:
This issue is fixed in the master branch (version 3.7.0 alpha 2). The issue was
fixed in this PR:
https://github.com/python/cpython/pull/1669
The cause is that async was not a proper keyword and the parser segfaults when
checking for the new token
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4091
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31852>
___
_
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4137
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
I have tracked the issue down to the call inside the call to initscr in
_cursesmodule.c. The issue *seems* related to the fact that all processes are
sharing the same initialization of the curses internal structures, that
(probably) is also related to
Pablo Galindo Salgado added the comment:
Also, it seems that calling initscr registers signal handlers for SIGTERM:
Without calling initscr:
...
rt_sigaction(SIGINT, {sa_handler=0x55d9351a9155, sa_mask=[],
sa_flags=SA_RESTORER, sa_restorer=0x7f7d22b36da0}, {sa_handler=SIG_DFL,
sa_mask
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4192
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
I have prepared a PR in GitHub with an initial implementation of the context
manager trying to fulfil the discussed requirements:
https://github.com/python/cpython/pull/3980
--
nosy: +pablogsal
___
Python
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4284
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
I have updated the PR with the requested changes.
--
___
Python tracker
<https://bugs.python.org/issue31824>
___
___
Pablo Galindo Salgado added the comment:
I just realize that the link I provided is incorrect. This is the correct one
(also is the one that appears in this issue anyway):
https://github.com/python/cpython/pull/4224
--
___
Python tracker
<ht
Pablo Galindo Salgado added the comment:
Sorry about that. The context manager is "gc.Disabled()", which I admit is
probably a bad name. The documentation is an example of the "equivalent" Python
code as stated by Raymond in the first comment but I see now that this w
Pablo Galindo Salgado added the comment:
Just to clarify the current situation: At this point, the contextmanager is
referred as "disabled" in the C code but is exported as "Disabled" to the
garbage collection module. The "gc_disabled" is the Python "eq
Pablo Galindo Salgado added the comment:
I have prepared a patch (attached) with a possible implementation of the C
function that can filter traceback objects modifying the traceback chain. I can
make a PR if the patch looks good enough to start iterating over it. In case an
alternative
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4447
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4644
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
pull_requests: +4645
___
Python tracker
<https://bugs.python.org/issue31972>
___
___
Python-bugs-list mailing list
Unsub
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +4646
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
I think I am missing something because the callbacks are always called with
(exc_type, exc, tb) (check here
https://github.com/python/cpython/blob/176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf/Lib/contextlib.py#L475)
and therefore a wrapper that just drops
Change by Pablo Galindo Salgado :
--
pull_requests: +4976
___
Python tracker
<https://bugs.python.org/issue20104>
___
___
Python-bugs-list mailing list
Unsub
Change by Pablo Galindo Salgado :
--
pull_requests: +4976, 4977
___
Python tracker
<https://bugs.python.org/issue20104>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
I originally removed it from the configure script in PR6794 but it was
reintroduced in commit 57009526f6a405e0ffe8c16012cce509b62cb577. Check the PR
for Greg's rationale.
--
___
Python tracker
&
Pablo Galindo Salgado added the comment:
@serhiy.storchaka Is the race condition/freed memory reusage in the test suite
or in the posix module?
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue33
New submission from Pablo Galindo Salgado :
It seems that since c489a767af46f33e73d96a5746e46a7365814db2 the AMD64
Windows10 buildbot for Python3.6 fails to compile. Error log:
Using "C:\Program Files (x86)\MSBuild\14.0\bin\\msbuild.exe" (found in the
registry)
Cannot locate MSBu
Pablo Galindo Salgado added the comment:
http://buildbot.python.org/all/#/builders/31/builds/321
--
___
Python tracker
<https://bugs.python.org/issue33
Pablo Galindo Salgado added the comment:
Could http://buildbot.python.org/all/#/builders/90/builds/350 be related to
this?
--
___
Python tracker
<https://bugs.python.org/issue33
Pablo Galindo Salgado added the comment:
Buildbot AMD64 FreeBSD 10.x Shared 3.x is failing with the same problem:
Assertion failed: (_PyGCHead_REFS(gc) != 0), function visit_decref, file
Modules/gcmodule.c, line 277.
Fatal Python error: Aborted
--
nosy: +pablogsal
Change by Pablo Galindo Salgado :
--
pull_requests: +6883
___
Python tracker
<https://bugs.python.org/issue31368>
___
___
Python-bugs-list mailing list
Unsub
Change by Pablo Galindo Salgado :
--
pull_requests: +6884
___
Python tracker
<https://bugs.python.org/issue26826>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
The test fails also on x86 Windows7 3.x:
http://buildbot.python.org/all/#/builders/58/builds/947
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue33
Pablo Galindo Salgado added the comment:
Same error in AMD64 Windows10 3.x:
http://buildbot.python.org/all/#/builders/3/builds/941
--
___
Python tracker
<https://bugs.python.org/issue33
Change by Pablo Galindo Salgado :
--
pull_requests: +7278
___
Python tracker
<https://bugs.python.org/issue33630>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
In PR 7663 I am only fixing the race condition.
--
___
Python tracker
<https://bugs.python.org/issue33630>
___
___
Pytho
Pablo Galindo Salgado added the comment:
A separate PR is needed for the apparent reusing of freed memory in the
implementation of posix_spawn. I am currently looking into it.
--
___
Python tracker
<https://bugs.python.org/issue33
Pablo Galindo Salgado added the comment:
Should we merge PR6693 and PR6725 before fixing the memory problem?
--
___
Python tracker
<https://bugs.python.org/issue33
Pablo Galindo Salgado added the comment:
Serhiy, I am checking and the only temporary Python object (the result of
encoding/decoding) that is passed to C library function that I can find is in:
if (!PyArg_ParseTuple(file_action, "OiO&ik"
Change by Pablo Galindo Salgado :
--
pull_requests: +7285
___
Python tracker
<https://bugs.python.org/issue25246>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
New failure on x86 Windows7 3.x:
http://buildbot.python.org/all/#/builders/58/builds/1000
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue30
Pablo Galindo Salgado added the comment:
If we want to support older versions of glibc a temporary (and somewhat
inelegant) workaround is storing the temporaries in a list that the caller
passes and destroy the list after calling `posix_spawn
Pablo Galindo Salgado added the comment:
I have updated the PR with a workaround.
--
___
Python tracker
<https://bugs.python.org/issue33630>
___
___
Python-bug
4101 - 4200 of 4563 matches
Mail list logo