[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-24 Thread STINNER Victor
STINNER Victor added the comment: I opened a thread on python-dev about this issue: "Configure Python initialization (PyConfig) in Python" https://mail.python.org/archives/list/python-...@python.org/thread/HQNFTXOCDD5ROIQTDXPVMA74LMCDZUKH/#X45X2K4PICTDJQYK3YPRPR22IGT2CDXB --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 14d81dcaf827f6b66bda45e8f5689d07d7d5735c by Serhiy Storchaka in branch 'master': bpo-42260: Improve error handling in _PyConfig_FromDict (GH-23488) https://github.com/python/cpython/commit/14d81dcaf827f6b66bda45e8f5689d07d7d5735c --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22376 pull_request: https://github.com/python/cpython/pull/23488 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please don't use PyDict_GetItemString(), it will be deprecated. You can use _PyDict_GetItemStringWithError(). Also always check the raised exception type before overwriting the exception, so you will not swallow MemoryError or other unexpected error.

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-14 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset ef75a625cdf8377d687a04948b4db9bc1917bf19 by Victor Stinner in branch 'master': bpo-42260: Initialize time and warnings earlier at startup (GH-23249) https://github.com/python/cpython/commit/ef75a625cdf8377d687a04948b4db9bc1917bf19 --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22146 pull_request: https://github.com/python/cpython/pull/23249 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-11 Thread Chris Meyer
Chris Meyer added the comment: >> I would like to request that this ability to dynamically load Python DLLs >> remains even with any new initialization mechanism. > I don't plan to remove any feature :-) I am glad to hear that. I'm somewhat nervous about it nevertheless. In particular, the

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-11 Thread Chris Meyer
Chris Meyer added the comment: > How do you configure sys.path currently? Do you parse a configuration file? > Do you use a registry key on Windows? We have several launch scenarios - but for the currently most common one, which is to launch using a separate, existing Python environment, we

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-11 Thread Chris Meyer
Chris Meyer added the comment: Responding to your request for feedback on Python-Dev: We embed Python dynamically by finding the libPython DLL, loading it, and looking up the required symbols. We make appropriate define's so that the Python headers (and NumPy headers) point to our functions

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-11 Thread STINNER Victor
STINNER Victor added the comment: > I would like to request that this ability to dynamically load Python DLLs > remains even with any new initialization mechanism. I don't plan to remove any feature :-) > As another note, the main issues we run into are configuring the Python path > to

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: The main drawback of rewriting Modules/getpath.c as Lib/_getpath.py (and removing getpath.c) is that PyConfig_Read() could no longer compute the Python Path Configuration. It would return an "empty" path configuration. --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset ace3f9a0ce7b9fe8ae757fdd614f1e7a171f92b0 by Victor Stinner in branch 'master': bpo-42260: Fix _PyConfig_Read() if compute_path_config=0 (GH-23220) https://github.com/python/cpython/commit/ace3f9a0ce7b9fe8ae757fdd614f1e7a171f92b0 --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22118 pull_request: https://github.com/python/cpython/pull/23220 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: > If we remove Modules/getpath.c, it will no longer be possible to > automatically computes the path configuration when one of the following > getter function will be called: (...) It is not really an incompatible change according to the documentation:

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: If we remove Modules/getpath.c, it will no longer be possible to automatically computes the path configuration when one of the following getter function will be called: * Py_GetPath() * Py_GetPrefix() * Py_GetExecPrefix() * Py_GetProgramFullPath() *

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9e1b828265e6bfb58f1e0299bd78d8ff6347a2ba by Victor Stinner in branch 'master': bpo-42260: Compute the path config in the main init (GH-23211) https://github.com/python/cpython/commit/9e1b828265e6bfb58f1e0299bd78d8ff6347a2ba --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-09 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22109 pull_request: https://github.com/python/cpython/pull/23211 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22081 pull_request: https://github.com/python/cpython/pull/23169 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset dc42af8fd16b10127ce1fc93c13bc1bfd2674aa2 by Victor Stinner in branch 'master': bpo-42260: PyConfig_Read() only parses argv once (GH-23168) https://github.com/python/cpython/commit/dc42af8fd16b10127ce1fc93c13bc1bfd2674aa2 --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22080 pull_request: https://github.com/python/cpython/pull/23168 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset f3cb81431574453aac3b6dcadb3120331e6a8f1c by Victor Stinner in branch 'master': bpo-42260: Add _PyConfig_FromDict() (GH-23167) https://github.com/python/cpython/commit/f3cb81431574453aac3b6dcadb3120331e6a8f1c --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22079 pull_request: https://github.com/python/cpython/pull/23167 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset 048a35659aa8074afe7d7d054e7cea1f8ee6d366 by Victor Stinner in branch 'master': bpo-42260: Add _PyInterpreterState_SetConfig() (GH-23158) https://github.com/python/cpython/commit/048a35659aa8074afe7d7d054e7cea1f8ee6d366 --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22069 pull_request: https://github.com/python/cpython/pull/23158 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset af1d64d9f7a7cf673279725fdbaf4adcca51d41f by Victor Stinner in branch 'master': bpo-42260: Main init modify sys.flags in-place (GH-23150) https://github.com/python/cpython/commit/af1d64d9f7a7cf673279725fdbaf4adcca51d41f --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset cfb41e80c1ac5940ec6f2246c9ab4a3d16ef757e by Victor Stinner in branch 'master': bpo-42260: Reorganize PyConfig (GH-23149) https://github.com/python/cpython/commit/cfb41e80c1ac5940ec6f2246c9ab4a3d16ef757e --

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22062 pull_request: https://github.com/python/cpython/pull/23150 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-04 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +22061 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23149 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-04 Thread STINNER Victor
New submission from STINNER Victor : This issue is a follow-up of the PEP 567 which introduced the PyConfig C API and is related to PEP 432 which wants to rewrite Modules/getpath.c in Python. I would like to add a new PyInterpreterState_SetConfig() function to be able to reconfigure a Python