| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Expand Up | @@ -12,22 +12,17 @@ def abs_paths() -> None: ... # undocumented | |||||||||||||||||||||
| def addpackage(sitedir: StrPath, name: StrPath, known_paths: set[str] | None) -> set[str] | None: ... # undocumented | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if sys.version_info >= (3, 15): | ||||||||||||||||||||||
| def process_startup_files() -> None: ... # undocumented | ||||||||||||||||||||||
| def addsitedir(sitedir: str, known_paths: set[str] | None = None, *, defer_processing_start_files: bool = False) -> None: ... | ||||||||||||||||||||||
| def addsitepackages( | ||||||||||||||||||||||
| known_paths: set[str] | None, prefixes: Iterable[str] | None = None, *, defer_processing_start_files: bool = False | ||||||||||||||||||||||
| ) -> set[str] | None: ... # undocumented | ||||||||||||||||||||||
| def addusersitepackages( | ||||||||||||||||||||||
| known_paths: set[str] | None, *, defer_processing_start_files: bool = False | ||||||||||||||||||||||
| ) -> set[str] | None: ... # undocumented | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| else: | ||||||||||||||||||||||
| def addsitedir(sitedir: str, known_paths: set[str] | None = None) -> None: ... | ||||||||||||||||||||||
| def addsitepackages( | ||||||||||||||||||||||
| known_paths: set[str] | None, prefixes: Iterable[str] | None = None | ||||||||||||||||||||||
| ) -> set[str] | None: ... # undocumented | ||||||||||||||||||||||
| def addusersitepackages(known_paths: set[str] | None) -> set[str] | None: ... # undocumented | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| class StartupState: | ||||||||||||||||||||||
| __slots__ = ("_known_paths", "_processed_sitedirs", "_path_entries", "_importexecs", "_entrypoints") | ||||||||||||||||||||||
| def __init__(self, known_paths: set[str] | None = None) -> None: ... | ||||||||||||||||||||||
| def addsitedir(self, sitedir: str) -> None: ... | ||||||||||||||||||||||
| def addusersitepackages(self) -> None: ... | ||||||||||||||||||||||
| def addsitepackages(self, prefixes: Iterable[str] | None = None) -> None: ... | ||||||||||||||||||||||
| def process(self) -> None: ... | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def addsitedir(sitedir: str, known_paths: set[str] | None = None) -> None: ... | ||||||||||||||||||||||
| def addsitepackages(known_paths: set[str] | None, prefixes: Iterable[str] | None = None) -> set[str] | None: ... # undocumented | ||||||||||||||||||||||
| def addusersitepackages(known_paths: set[str] | None) -> set[str] | None: ... # undocumented | ||||||||||||||||||||||
|
Comment thread
Comment on lines
+24
to
+25
Copy link
Copy Markdown
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityShould this really allow a known_paths argument to be None? From the way it's supposed to be used that doesn't make too much sense to me.
Suggested change
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityHmm, this just matches the previous annotations here. I haven't changed the types of any of these parameters in this PR. I'm open to changing them, but I think it's outside the scope of this PR
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityOh, I think the lines are marked as "changed", since the indentation (for the >= (3, 15) block) got lost. Can you check that, it's always a bit hard to see in GitHub diffs.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityPrevious patch releases of 3.15 added a defer_processing_start_files: bool = False parameter to these three functions, which meant that we had to have two branches: one if sys.version_info >= (3, 15) branch, and an else branch for earlier definitions that didn't have the new parameter. That parameter addition has now been reverted; the definition is now the same on 3.15 as it was on earlier Python versions. So this PR collapses the two sys.version_info branches into one block at the module level for addsitedir, addsitepackages and addusersitepackages. That's why these lines show up as "changed" in the GitHub diff. The functions have exactly the same signature that they had previously in the Python <3.15 branch
Sorry, something went wrong.
srittau reacted with thumbs up emoji
All reactions
Comment thread
Comment on lines
+23
to
+25
Copy link
Copy Markdown
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI assume this was a mistake?
Suggested change
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualityno, not a mistake -- see my reply at #15863 (comment). We don't need split definitions over two sys.version_info branches anymore
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityHmm, they exist on 3.14, but why were they indented before? Maybe we should move the whole problem with these functions to another PR altogether.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityAgain, I explained this in #15863 (comment). We previously had this: if sys.version_info >= (3, 15):
def addsitedir(new_parameter): ...
else:
def addsitedir(): ...but the addition of the new parameter in 3.15 was reverted, so now we just have this again, removing the indentation that was previously necessary: def addsitedir(): ...
Sorry, something went wrong.
All reactions
|
||||||||||||||||||||||
| def check_enableusersite() -> bool | None: ... # undocumented | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if sys.version_info >= (3, 13): | ||||||||||||||||||||||
| Expand Down | ||||||||||||||||||||||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.