importlib doc: Fix required Python version of an example#10030
Conversation
§31.5.6.3. Importing a source file directly `module_from_spec` is new in 3.5 [ci skip]
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
|
I closed/reopened the PR to schedule a new AppVeyor job. |
|
Copy of the original description: 31.5.6.3. Importing a source file directly import importlib.util
import sys
# For illustrative purposes.
import tokenize
file_path = tokenize.__file__
module_name = tokenize.__name__
spec = importlib.util.spec_from_file_location(module_name, file_path)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
# Optional; only necessary if you want to be able to import the module
# by name later.
sys.modules[module_name] = moduleThe above example requires at least 3.5 because of The example code in 31.5.6.5. Approximating |
|
This change will be merged once the CI pass, please don't change the title nor the description. |
Do I have to remove |
|
Sadly, the AppVeyor CI job never started :-( I closed/reopened the PR to schedule new CI jobs. |
"automerge" uses the PR title and description. |
|
I thought this is very "trivial" and unnecessary to run CI 😰. I removed |
|
@vstinner I'm sorry but would you reopen? |
|
Please just create a new one, it will be simpler for me. |
No description provided.