[Python-Dev] Re: Why doesn't venv also install python3*-config?
Le jeu. 9 janv. 2020 à 17:19, Xavier de Gaye a écrit : > A cross-compilation means that there is probably no build framework on the > target platform and therefore the build configuration of the > cross-compilation of Python is not very useful there. Ok, so the shell script python-config is useful cross-compile things for Python on the host. But it doesn't go against the idea of providing the same feature as "python3 -m xxx ...": both can coexist ;-) Victor -- Night gathers, and now my watch begins. It shall not end until my death. ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/MKSN5BE7C3B35ZBAGIOA6LL4RHHD2MKE/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Should we pass tstate in the VECTORCALL calling convention before making it public?
On 09Jan2020 1659, Victor Stinner wrote: Le jeu. 9 janv. 2020 à 19:33, Steve Dower a écrit : Requiring an _active_ Python thread (~GIL held) to only run on a single OS thread is fine, but tying it permanently to a single OS thread makes things very painful. (Of course, this isn't the only thing that makes it painful, but if we're going to make this a deliberate design of CPython then we are essentially excluding entire interesting classes of embedding.) Do you have an use case where you reuse the same Python thread state in different native threads? I do, but I can't share exactly what it is (yet) :) But essentially, the main application has its own threading setup where callbacks happen on its own threadpool. Some of those callbacks sometimes have to raise Python events, but all of those events should be serialized (i.e. *no* Python code should run in parallel, even though the app's callbacks can). Note that this is not arbitrary CPython code. It is a very restricted context (only first-party modules, no threading/ctypes/etc.). Ideally, we'd just lock the Python thread and run the Python code and get the result back directly. Instead, we've had to set up a parallel Python thread that is constantly running, and build a complicated cross-thread marshalling setup in order to simulate synchronous calls. (And also argue with the application architects who are very against mixing threading models in their app, unsurprisingly.) Currently, the Python runtime expects to have a different Python thread state per native thread. For example, PyGILState_Ensure() creates one if there is no Python thread state associated to the current thread. And ultimately, everything above is just because of this assumption. Turns out that simply transferring the thread state and setting it in TLS is *nearly* okay most of the time, but not quite. Breaking down the assumption that each CPython thread is the only code running on its particular OS thread would help a lot here - making the CPython thread state a parameter rather than ambient state is the right direction. Cheers, Steve ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/Q7VIABF346X4GQRXDIQIHD4I74GDNF54/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Summary of Python tracker Issues
ACTIVITY SUMMARY (2020-01-03 - 2020-01-10) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open7251 (+24) closed 43792 (+66) total 51043 (+90) Open issues with patches: 2846 Issues opened (63) == #25872: multithreading traceback KeyError when modifying file https://bugs.python.org/issue25872 reopened by xtreak #27657: urlparse fails if the path is numeric https://bugs.python.org/issue27657 reopened by orsenthil #29778: _Py_CheckPython3 uses uninitialized dllpath when embedder sets https://bugs.python.org/issue29778 reopened by vstinner #39158: ast.literal_eval() doesn't support empty sets https://bugs.python.org/issue39158 reopened by pablogsal #39204: Automate adding Type Annotations to Documentation https://bugs.python.org/issue39204 opened by cooperlees #39205: Hang when interpreter exits after ProcessPoolExecutor.shutdown https://bugs.python.org/issue39205 opened by bquinlan #39206: Modulefinder does not consider source file encoding https://bugs.python.org/issue39206 opened by Nicholas Feix #39207: concurrent.futures.ProcessPoolExecutor does not properly reap https://bugs.python.org/issue39207 opened by yus2047889 #39210: Sorting falls back to use __gt__ when __lt__ is not present https://bugs.python.org/issue39210 opened by yanmitrofanov #39212: Show qualified function name when giving arguments error https://bugs.python.org/issue39212 opened by cool-RR #39213: cmd should have a hook in the finally block of cmdloop https://bugs.python.org/issue39213 opened by Joseph Sible #39214: Add curses.window.in_wch https://bugs.python.org/issue39214 opened by Anthony Sottile #39217: GC of a ctypes object causes application crash https://bugs.python.org/issue39217 opened by Kevin Schlossser #39218: Assertion failure when calling statistics.variance() on a floa https://bugs.python.org/issue39218 opened by reed #39219: Fix attributes of syntax errors raized in the tokenizer https://bugs.python.org/issue39219 opened by serhiy.storchaka #39220: constant folding affects annotations despite 'from __future__ https://bugs.python.org/issue39220 opened by Carl.Friedrich.Bolz #39221: Cross compiled python installed wrong version of lib2to3/Gramm https://bugs.python.org/issue39221 opened by puchenyaka #39222: unittest.mock.Mock.parent is broken or undocumented https://bugs.python.org/issue39222 opened by florian.brucker #39224: HTTPConnection.timeout None support https://bugs.python.org/issue39224 opened by Daniel Farley #39228: traceback.FrameSummary does not handle exceptions from `repr() https://bugs.python.org/issue39228 opened by blueyed #39229: library/functions.rst causes translated builds to fail https://bugs.python.org/issue39229 opened by rffontenelle #39231: Mistaken notion in tutorial https://bugs.python.org/issue39231 opened by r0b #39232: asyncio crashes when tearing down the proactor event loop https://bugs.python.org/issue39232 opened by mikeshardmind #39233: glossary entry for parameter out-of-date for positional-only p https://bugs.python.org/issue39233 opened by mark.dickinson #39236: [venv] Adding a .gitignore file to virtual environments https://bugs.python.org/issue39236 opened by brett.cannon #39238: test_asyncio: test_cancel_make_subprocess_transport_exec() han https://bugs.python.org/issue39238 opened by vstinner #39241: Popen of python3.6 hangs on os.read(errpipe_read, 5) https://bugs.python.org/issue39241 opened by liuxu1005 #39243: CDLL __init__ no longer supports name being passed as None whe https://bugs.python.org/issue39243 opened by David Heffernan #39244: multiprocessing.get_all_start_methods() wrong default on macOS https://bugs.python.org/issue39244 opened by stefanholek #39245: Public API for Vectorcall (PEP 590) https://bugs.python.org/issue39245 opened by petr.viktorin #39247: dataclass defaults and property don't work together https://bugs.python.org/issue39247 opened by Michael Robellard #39248: test_distutils fails on PPC64 Fedora 3.x: /tmp/subprocess.py https://bugs.python.org/issue39248 opened by vstinner #39249: difflib SequenceMatcher 200 char length limitation for ratio c https://bugs.python.org/issue39249 opened by Daniel Pezoa #39252: email.contentmanager.raw_data_manager bytes handler breaks on https://bugs.python.org/issue39252 opened by rmccampbell7 #39253: Running the test suite with --junit-xml and -R incorrectly rep https://bugs.python.org/issue39253 opened by pablogsal #39254: python shebang in python3 tarball files https://bugs.python.org/issue39254 opened by arekm #39257: contextvars.Context.run hangs forever in ProccessPoolExecutor https://bugs.python.org/issue39257 opened by ronserruya #39259: poplib.POP3/POP3_SSL should reject timeout = 0 (non-blocking m https://bugs.python.org/issue39259 opened by corona10 #39260: distutil
[Python-Dev] Re: Should we pass tstate in the VECTORCALL calling convention before making it public?
Victor Stinner wrote:
> I started to modify Python internals to pass explicitly the Python
> thread state ("tstate") to internal C a functions:
Is work this summarized somewhere like a PEP?
> https://vstinner.github.io/cpython-pass-tstate.html
describes the motivation, but not the details on why what is changed.
In particular, I am wondering what proportion of functions
actually need the tstate, vs. how often it would just be adding
some extra pack-pass-unpack work for no purpose.
> To me, it sounds like a good practice to pass the current Python
> thread state to internal C functions.
Only if they need it (see above) and the passed data is at least as
reliable as what they would get by using the current process. If the
current process always gets the right answer, and the new process
can sometimes gets the wrong one (even just through human error),
that seems like a high price to pay.
> ... Later, even "None"
> singleton (and all other singletons) should be made "per interpreter".
> [ later no objects should be shared ]
At that point, it makes sense to feed them from different memory pools,
and I am not sure how much advantage there is to a separate interpreter
as opposed to a separate process.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/6NM2PUXODK5EU7W2R6JKK2OE4MILTZXA/
Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Should we pass tstate in the VECTORCALL calling convention before making it public?
Le ven. 10 janv. 2020 à 20:44, Jim J. Jewett a écrit : > Is work this summarized somewhere like a PEP? This work is related to: PEP 554 -- Multiple Interpreters in the Stdlib https://www.python.org/dev/peps/pep-0554/ Victor ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/WT52XVUM3SGPJX43WPLTPDUVNBCXLH7O/ Code of Conduct: http://python.org/psf/codeofconduct/
