Eric Snow added the comment:
FWIW, I've followed this pattern (one function is both decorator and factory)
in my own code for quite a while. I've never found it confusing nor has anyone
else (that I'm aware) that has used those decorators.
One reason I've done de
Eric Snow added the comment:
As to the issue of positional vs. keyword arguments, keyword arguments make the
implementation easier in some cases. Otherwise I haven't seen positional
arguments cause much of a problem.
--
___
Python tr
Change by Eric Snow :
--
nosy: +brett.cannon, eric.snow
___
Python tracker
<https://bugs.python.org/issue36809>
___
___
Python-bugs-list mailing list
Unsub
Change by Eric Snow :
--
keywords: +patch
pull_requests: +13042
___
Python tracker
<https://bugs.python.org/issue36818>
___
___
Python-bugs-list mailin
New submission from Eric Snow :
Currently we use the _PyRuntime static global to access the runtime state in
various places. At the same time, in thread contexts we get access to the
thread state from Thread-Local Storage and the interpreter state by indirection
from there. We should do
New submission from Eric Snow :
Currently the warnings module uses runtime-global state
(PyRuntimeState.warnings). That should be moved down to per-interpreter state.
There are three possible places:
1. the module's "module state"
2. the module's __dict__
3. PyInter
Change by Eric Snow :
--
keywords: +patch
pull_requests: +13076
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Eric Snow added the comment:
dupe of #36737
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Eric Snow :
--
keywords: +patch
pull_requests: +13078
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Eric Snow :
(also see #24554)
We need to move GC state from _PyRuntimeState to PyInterpreterState.
--
assignee: eric.snow
components: Interpreter Core
messages: 341911
nosy: eric.snow, pablogsal
priority: normal
severity: normal
status: open
title: GC operates out
Eric Snow added the comment:
FYI, issue #36854 is about moving GC runtime state from _PyRuntimeState to
PyInterpreterState. However, that doesn't trigger any collection when the
interpreter is finalized. So there is more to be done
Change by Eric Snow :
--
keywords: +patch
pull_requests: +13130
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36854>
___
___
Python-
Eric Snow added the comment:
New changeset 86ea58149c3e83f402cecd17e6a536865fb06ce1 by Eric Snow in branch
'master':
bpo-36737: Use the module state C-API for warnings. (gh-13159)
https://github.com/python/cpython/commit/86ea58149c3e83f402cecd17e6a536
Change by Eric Snow :
--
assignee: -> eric.snow
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python
New submission from Eric Snow :
We still have a bunch of "global" C variables (static globals, static locals,
maybe thread-local storage) in our code-base that break the isolation between
interpreters. I added Tools/c-globals/check-c-globals.py a while back to help
identify such
New submission from Eric Snow :
We have quite a bit of global state the runtime that effectively breaks the
isolation between interpreters. Some of it exists as "global" C variables (see
#36876) and the rest as fields on _PyRuntimeState. The offending state should
b
Eric Snow added the comment:
FYI, I've already started some of this work:
* #36737 warnings
* #36854 gc
* #33608 pending calls
* #10915 & #15751 gilstate
Other bits I'm planning on:
* the rest of the global "ceval" state
* the memory allocators
* the GIL
Note t
Eric Snow added the comment:
In conjunction with #36876, there are a bunch of currently ignored globals (in
Tools/c-globals/ignored-globals.txt) that should actually be moved to
per-interpreter runtime state. This mostly applies to any globals that point
to one or more objects, since
Eric Snow added the comment:
Also, Tools/c-globals/ignored-globals.txt is a bit out of date (some vars have
been removed, renamed, or moved to another file). That should get cleaned up.
It might also make sense to update check-c-globals.py to verify that all
variables in ignored
Change by Eric Snow :
--
keywords: +patch
pull_requests: +13283
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Eric Snow :
In the interest of getting something landed for 3.7, so we can start using it
in tests, I'm putting up a patch for a low-level interpreters module. In some
ways this is a precursor for issue #30439, which will add a proper public
stdlib module in 3.8.
Eric Snow added the comment:
FYI, I'm working on a low-level patch for use in the test suite for 3.7. See
issue #32604.
--
versions: +Python 3.8 -Python 3.7
___
Python tracker
<https://bugs.python.org/is
Eric Snow added the comment:
@Ned, it may be a little tight to land this given the time left before beta 1.
However, this is meant as a tool for us to use in the test suite (particularly
to test the subinterpreter C-API). So I'm arguing that, if necessary, it would
still be okay to
Eric Snow added the comment:
@Nick, I may make the name change you suggested in issue #30439
("_subinterpreters").
--
___
Python tracker
<https://bugs.python.o
Change by Eric Snow :
--
keywords: +patch
pull_requests: +5094
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue32604>
___
_
Eric Snow added the comment:
FYI, there are a few things I need to clean up in the PR. However, I expect
that those changes will be minor relative to the the whole patch, so I wanted
to get the ball rolling on a review. :)
--
___
Python tracker
Eric Snow added the comment:
Sounds good, Ned. Thanks for taking a look. I should have everything finished
up by Friday, so I'm hopeful for landing the change before the deadline. I may
have a few minor tweaks to make after that, but I'll discuss that with you
before making any
Eric Snow added the comment:
New changeset 7f8bfc9b9a8381ddb768421b5dd5cbd970266190 by Eric Snow in branch
'master':
bpo-32604: Expose the subinterpreters C-API in a "private" stdlib module.
(gh-1748)
https://github.com/python/cpython/commit/7f8bfc9b9a8381ddb768
Change by Eric Snow :
--
pull_requests: +5269
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
I've merged the patch without Windows support, which shouldn't be a problem
given the purpose of the extension module. I've also added a PR for get the
module building under Windows. I'd like to ge
Eric Snow added the comment:
Yeah, I'm looking into it. Also, I noticed some refleaks that I'll be sorting
out.
--
___
Python tracker
<https://bugs.python.o
Eric Snow added the comment:
On 4 of the buildbots:
==
ERROR: test_drop_multiple_times (test.test__xxsubinterpreters.ChannelTests)
--
Traceback (most recent
Eric Snow added the comment:
On the PPC64 AIX 3.x buildbot:
==
FAIL: test_repr (test.test__xxsubinterpreters.ChannelIDTests)
--
Traceback (most recent call
Change by Eric Snow :
--
pull_requests: +5270
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
I just put up a PR that should fix the 4 buildbots.
--
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bug
Eric Snow added the comment:
New changeset 83e64c8a544028ae677af2a0bc268dbe1c11cc3a by Eric Snow in branch
'master':
bpo-32604: NULL-terminate kwlist in channel_drop_interpreter(). (gh-5437)
https://github.com/python/cpython/commit/83e64c8a544028ae677af2a0bc268d
Eric Snow added the comment:
The buildbots should be happier now. I'll keep an eye on them.
--
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Change by Eric Snow :
--
pull_requests: +5338
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
New changeset 4e9da0d163731caa79811c723c703ee416c31826 by Eric Snow in branch
'master':
bpo-32604: Fix memory leaks in the new _xxsubinterpreters module. (#5507)
https://github.com/python/cpython/commit/4e9da0d163731caa79811c723c703e
Eric Snow added the comment:
I've landed a PR that fixes all the memory leaks in the module. It also fixes
the 2 defects reported by coverity. The only thing left here is to get the
module building under Windows.
--
___
Python tracker
&
Eric Snow added the comment:
New changeset f33ecedcad5a001735fa4ded5d21caa2cbf27911 by Eric Snow (Miss
Islington (bot)) in branch '3.7':
bpo-32604: Fix memory leaks in the new _xxsubinterpreters module. (GH-5507)
https://github.com/python/cpyt
Eric Snow added the comment:
FYI, out of 2389 source lines in the C extension, 1563 are the channel-related
code. That means the non-channel code is 826 lines (about a third). That
non-channel code does not depend on the channel code at all and I considered
splitting the source out, but
Change by Eric Snow :
--
pull_requests: +5498
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
New changeset 4c6955e2b0ccf88c705f8d1fac685a8e65f9699e by Eric Snow in branch
'master':
bpo-32604: Clean up created subinterpreters before runtime finalization.
(gh-5709)
https://github.com/python/cpython/commit/4c6955e2b0ccf88c705f8d1fac685a
Eric Snow added the comment:
New changeset 3db05a3a9c109f49d54b4965852e41c657e9b117 by Eric Snow (Miss
Islington (bot)) in branch '3.7':
bpo-32604: Clean up created subinterpreters before runtime finalization.
(gh-5710)
https://github.com/python/cpyt
Eric Snow added the comment:
@Yury, thanks! I thought I had checked before I made the PR, but apparently
not. I'll git it fixed.
--
___
Python tracker
<https://bugs.python.org/is
Eric Snow added the comment:
I'm not seeing any refleak (on linux/clang). I'm guessing this is
Windows-specific (based on use of "./python.exe"). How does
test_multiprocessing_fork even run on Windows? I thought "fork" is an
unsupported start
Eric Snow added the comment:
Davin, any thoughts on how my most recent commit (for this issue) might be
causing the leaks Yury found?
--
nosy: +davin
___
Python tracker
<https://bugs.python.org/issue32
Change by Eric Snow :
--
pull_requests: +5559
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
New changeset f53d9f2778a87bdd48eb9030f782a4ebf9e7622f by Eric Snow in branch
'master':
bpo-32604: Swap threads only if the interpreter is different. (gh-5778)
https://github.com/python/cpython/commit/f53d9f2778a87bdd48eb9030f782a4
Eric Snow added the comment:
New changeset eed3c7af4ec520d324a55e0357f41589a66906f7 by Eric Snow (Miss
Islington (bot)) in branch '3.7':
bpo-32604: Swap threads only if the interpreter is different. (gh-5783)
https://github.com/python/cpython/commit/eed3c7af4ec520d324a55e0357f415
Eric Snow added the comment:
As far as I know, everything related to this issue is in a stable state. I
have not been able to determine any way in which the reported memory leak (in
test_multiprocessing_fork) could be related. Sorry, I didn't notice the
release blocker priority.
I d
Eric Snow added the comment:
Still planned for 3.7:
1. add more tests in Lib/test/test__xxsubinterpreters.py
2. add test.support.interpreters (high-level module)
3. add more tests in Lib/test/test_interpreters.py
At that point I'll start using the high-level module in test
Eric Snow added the comment:
Sounds good, Ned. Sorry for my confusion.
--
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
PEP 489 ("Multi-phase extension module initialization") is relevant here, so
I've nosied Petr.
--
nosy: +encukou
___
Python tracker
<https://bugs.pyt
Change by Eric Snow :
--
pull_requests: +6499
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-lis
Eric Snow added the comment:
New changeset 6bd0c476c58ca0046969f70dc2a4e4dfb3268062 by Eric Snow in branch
'3.7':
bpo-32604: Remove xid registry. (#6813)
https://github.com/python/cpython/commit/6bd0c476c58ca0046969f70dc2a4e4
Eric Snow added the comment:
Yeah, I added an extra parameter. Since it's an internal API I didn't think
anything of it.
--
___
Python tracker
<https://bugs.python.o
Eric Snow added the comment:
Thanks for catching this, Serhiy! I've approved the PR.
--
___
Python tracker
<https://bugs.python.org/issue33454>
___
___
Eric Snow added the comment:
+1 on using ":" as the separator.
--
___
Python tracker
<https://bugs.python.org/issue32414>
___
___
Python-bugs-l
Change by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue32086>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric Snow :
(see the python-dev thread [1])
(related: issue #32086)
When I consolidated the global runtime state into a single global, _PyRuntime,
calls Py_DecodeLocale() started to break if the runtime hadn't been intialized
yet. This is because that function reli
Change by Eric Snow :
--
keywords: +patch
pull_requests: +4418
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32096>
___
___
Python-
Eric Snow added the comment:
I see at least 3 ways to sort this out:
1. partially revert the _PyRuntime change, sort of temporarily
("revert the change on memory allocators, and retry later to fix
it, once other initializations issues are fixed", as suggested by
Victor in
Eric Snow added the comment:
I thought issue #32086 was about documentation (which is worth having a
separate issue for), not about a fix to the regression.
--
___
Python tracker
<https://bugs.python.org/issue32
Change by Eric Snow :
--
pull_requests: +4432
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32096>
___
___
Python-bugs-list mai
Eric Snow added the comment:
> IMHO for the long term, the best would be to have a structure for
> pre-Py_Initialize configuration, maybe _PyCoreConfig, and pass it
> to functions that can be called before Py_Initialize().
+1
As an alternative to that, we could also deprecate usi
Eric Snow added the comment:
I've left a review (writing it as you merged the PR).
My main concern is that we not promise more than we must. Every pre-init
function or variable we promise to embedders represents global state that is
hard to get rid of. It also entrenches pre-init AP
Eric Snow added the comment:
Note that in the long term we are considering support for embedding multiple
runtimes in a single process. So anything that assumes there is only a single
runtime in each process is problematic.
--
___
Python tracker
Change by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue32248>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric Snow :
--
pull_requests: +6582
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue401713>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue23402>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue14597>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue1144263>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
New changeset 6d2cd9036c0ab78a83de43d1511befb7a7fc0ade by Eric Snow in branch
'master':
bpo-32604: Improve subinterpreter tests. (#6914)
https://github.com/python/cpython/commit/6d2cd9036c0ab78a83de43d1511bef
Change by Eric Snow :
--
pull_requests: +6607
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
New changeset 3ab0136ac5d6059ce96d4debca89c5f5ab0356f5 by Eric Snow in branch
'master':
bpo-32604: Implement force-closing channels. (gh-6937)
https://github.com/python/cpython/commit/3ab0136ac5d6059ce96d4debca89c5
Eric Snow added the comment:
Under Py_LIMITED_API:
typedef struct _is PyInterpreterState;
Also, the actual removal of the "modules" field was reverted. The field is
still there until I get back to fixing
https://github.com/python/cpython
Eric Snow added the comment:
FTR, see PEP 490 ("Chain exceptions at C level") which proposed implicitly
chaining exceptions in the PyErr_* API.
While that PEP was rejected (not all exceptions should be chained), it does
make a good point about the clunkiness of using _PyErr_Chain
New submission from Eric Snow :
When an object is created it happens relative to the current
thread (ergo interpreter) and the current allocator (part of
global state). We do not track either of these details for
the object. It may make sense to start doing so (reasons next).
Regarding
New submission from Eric Snow :
In order to keep subinterpreters properly isolated, objects
from one interpreter should not be used in C-API calls in
another interpreter. That is relatively straight-forward
except in one case: indicating that the other interpreter
doesn't need the obje
Eric Snow added the comment:
As a lesser (IMHO) alternative, we could also modify Py_DECREF
to respect a new "shared" marker of some sort (perhaps relative
to #33607), but that would probably still require one of the
refcount-based solutions (and add a branch to Py_DECREF).
-
Eric Snow added the comment:
good point :)
--
___
Python tracker
<https://bugs.python.org/issue23188>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
I'll take a look. Thanks!
--
assignee: -> eric.snow
___
Python tracker
<https://bugs.python.org/issue33615>
___
___
Py
Eric Snow added the comment:
FTR, this started happening after the following commit:
commit 6d2cd9036c0ab78a83de43d1511befb7a7fc0ade
Author: Eric Snow
Date: Wed May 16 15:04:57 2018 -0400
bpo-32604: Improve subinterpreter tests. (#6914)
Add more tests for subinterpreters. This
Eric Snow added the comment:
There are a couple of other buildbots with the same failure:
ARMv7 Ubuntu 3.x: http://buildbot.python.org/all/#/builders/106/builds/1066
PPC64 AIX 3.x: http://buildbot.python.org/all/#/builders/10/builds/1005
Eric Snow added the comment:
Correct. These failures are only on master.
--
___
Python tracker
<https://bugs.python.org/issue33615>
___
___
Python-bugs-list m
Eric Snow added the comment:
no worries :)
--
___
Python tracker
<https://bugs.python.org/issue33615>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Note that I wouldn't call this issue absolutely specific to subinterpreters.
The "ownership" part is, but tracking the allocator has practical application
under a single interpreter. I suppose I could split this issue apart. I
lumped the two t
Eric Snow added the comment:
I haven't been able to reproduce the issue thus far. From the assert in the
buildbot logs, it's clear that I've decref'ed an object one too many times.
Given the relevant PR, it's probably something I changed in the channel
implemen
Change by Eric Snow :
--
pull_requests: +6877
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric Snow :
--
keywords: +patch
pull_requests: +6876
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33615>
___
___
Python-
Change by Eric Snow :
--
pull_requests: +6914
___
Python tracker
<https://bugs.python.org/issue33615>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric Snow :
--
pull_requests: +6915
___
Python tracker
<https://bugs.python.org/issue32604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue12029>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
New changeset 110bc01407ac8c75545d0386577c6e17254d97d9 by Eric Snow in branch
'master':
bpo-33615: Temporarily disable a test that is triggering crashes on a few
buildbots. (gh-7288)
https://github.com/python/cpyt
Eric Snow added the comment:
New changeset 110bc01407ac8c75545d0386577c6e17254d97d9 by Eric Snow in branch
'master':
bpo-33615: Temporarily disable a test that is triggering crashes on a few
buildbots. (gh-7288)
https://github.com/python/cpyt
Eric Snow added the comment:
Thanks, Victor. I'll take a look. FYI, it seems that the same 3 buildbots
from bpo-33615 are seeing these same test failures.
--
___
Python tracker
<https://bugs.python.org/is
Eric Snow added the comment:
FYI, I plan on closing this issue only *after* I've re-enabled the crashing
test and it passes. :)
--
___
Python tracker
<https://bugs.python.org/is
1101 - 1200 of 2629 matches
Mail list logo