GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-110722: Add PYTHON_PRESITE to import a module before site.py is run by ambv · Pull Request #110769 · python/cpython

Conversation

@ambv

@ambv ambv commented Oct 12, 2023 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This is only available --with-pydebug.

  • Issue: Make regrtest collect test line coverage using sys.monitoring #110722

📚 Documentation preview 📚: https://cpython-previews--110769.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ambv
pythongh-110722: Add PYTHON_PRESITE=package.module to import a module…
3daa65a
… before site.py is run

This is only available --with-pydebug.
@bedevere-app bedevere-app Bot added the awaiting review label Oct 12, 2023
@ambv
ambv requested a review from vstinner October 12, 2023 14:36
@bedevere-app bedevere-app Bot mentioned this pull request Oct 12, 2023
Make regrtest collect test line coverage using sys.monitoring #110722
Closed
@ambv
ambv requested a review from gpshead October 12, 2023 14:36
ambv added 2 commits October 12, 2023 17:15
@ambv
Add Blurb and fix a refleak before anybody notices
1ef282b
@ambv
Fix versionadded
8a201b4
vstinner
vstinner reviewed Oct 12, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be interesting to make this feature to release build.

For the doc, I suggest to replace package.module with module. You can explain in the doc that the argument can be a module of a package, with an example. I don't know.

Overall, the implementation looks correct.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/using/cmdline.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/pylifecycle.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/c-api/init_config.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/pylifecycle.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

ambv added 2 commits October 13, 2023 09:46
@ambv
Merge branch 'main' into pythongh-110722-presite
f192e38
@ambv
Add test, refine docs, add whatsnew, separate run_presite in pylifecy…
b89548d
…cle.c
ambv
ambv commented Oct 13, 2023
View reviewed changes
Comment thread Python/initconfig.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

ambv added 2 commits October 13, 2023 10:42
@ambv
PEP 7
ebcc373
@ambv
Only define the static function --with-pydebug
bebb594
gpshead
gpshead reviewed Oct 13, 2023
View reviewed changes

@gpshead gpshead left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - some minor cleanup to do, feel free to merge after that if CI says "ano" (CZ)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/c-api/init_config.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/using/cmdline.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/pylifecycle.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

ambv added 2 commits October 13, 2023 17:03
@ambv
Fix visual indentation
08679d8
@ambv
Mention PYTHON_PRESITE needs a pydebug build
3d3f5d3
vstinner
vstinner reviewed Oct 14, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with the C implementation and the overall feature, I just have some remarks on the doc.

I suggest to replace site.py with the site module. In Sphinx, you can even create a link if you want:

the :mod:`site` module

The presite module is imported, it's exactly run. But I'm fine with run_presite name :-) Well, in fact, it can be seed as being "run" ;-)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/using/cmdline.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ambv
Address Victor's nits
2e1d180
@ambv
ambv merged commit 84b7e9e into python:main Oct 14, 2023
@bedevere-app bedevere-app Bot removed the awaiting review label Oct 14, 2023
@vstinner

vstinner commented Oct 15, 2023

Copy link
Copy Markdown
Member

Congrats!

ambv reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv
ambv deleted the gh-110722-presite branch October 15, 2023 17:00
@ambv
ambv restored the gh-110722-presite branch October 25, 2023 12:13
@ambv
ambv deleted the gh-110722-presite branch November 1, 2023 13:15
@sobolevn sobolevn mentioned this pull request Jan 21, 2024
gh-108303: Remove the non-test Lib/test/reperf.py #114356
Merged
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@ambv @aisk
pythongh-110722: Add PYTHON_PRESITE to import a module before site.py…
0eeb817
… is run (python#110769)
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@ambv @Glyphack
pythongh-110722: Add PYTHON_PRESITE to import a module before site.py…
47a884d
… is run (python#110769)
MrPiNkY2022
MrPiNkY2022 approved these changes Nov 9, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added the awaiting core review label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead gpshead left review comments
@vstinner vstinner vstinner left review comments
+1 more reviewer
@MrPiNkY2022 MrPiNkY2022 MrPiNkY2022 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting core review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@ambv @vstinner @gpshead @MrPiNkY2022
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.