Skip to content
New issue

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

More refactoring for plugin manager. #13118

Merged
merged 10 commits into from
Sep 25, 2023
Merged

More refactoring for plugin manager. #13118

merged 10 commits into from
Sep 25, 2023

Conversation

jezdez
Copy link
Member

@jezdez jezdez commented Sep 18, 2023

Description

Following https://github.com/conda/conda/pull/13057/files#r1328506001 we noticed that #13057 removed the duplication check and makes the plugin loading prone to import time side effects.

Checklist - did you ...

  • [ ] Add a file to the news directory (using the template) for the next release's release notes?
  • [ ] Add / update necessary tests?
  • [ ] Add / update outdated documentation?

@jezdez jezdez requested a review from a team as a code owner September 18, 2023 11:53
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Sep 18, 2023
@beeankha beeankha added plugins pertains to a plugin/subcommand source::anaconda created by members of Anaconda, Inc. labels Sep 18, 2023
Copy link
Contributor

@kenodegard kenodegard left a comment

Choose a reason for hiding this comment

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

After reviewing pluggy.PluginManager.register again the only instances where a ValueError is raised is when the plugin has already been registered. Let's just silently consume this instead of converting it into a PluginError.

Co-authored-by: Ken Odegard <kodegard@anaconda.com>
@jezdez
Copy link
Member Author

jezdez commented Sep 20, 2023

Doc build error:

Running Sphinx v4.2.0

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/continuumio-conda/envs/13118/lib/python3.10/site-packages/sphinx/config.py", line 328, in eval_config_file
    exec(code, namespace)
  File "/home/docs/checkouts/readthedocs.org/user_builds/continuumio-conda/checkouts/13118/docs/source/conf.py", line 14, in <module>
    import conda
  File "/home/docs/checkouts/readthedocs.org/user_builds/continuumio-conda/checkouts/13118/conda/__init__.py", line 9, in <module>
    from .__version__ import __version__
  File "/home/docs/checkouts/readthedocs.org/user_builds/continuumio-conda/checkouts/13118/conda/__version__.py", line 4
    __version__ : str = version : str = '23.7.5.dev89'
                                ^
SyntaxError: invalid syntax

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/continuumio-conda/envs/13118/lib/python3.10/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/home/docs/checkouts/readthedocs.org/user_builds/continuumio-conda/envs/13118/lib/python3.10/site-packages/sphinx/application.py", line 216, in __init__
    self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/continuumio-conda/envs/13118/lib/python3.10/site-packages/sphinx/config.py", line 172, in read
    namespace = eval_config_file(filename, tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/continuumio-conda/envs/13118/lib/python3.10/site-packages/sphinx/config.py", line 331, in eval_config_file
    raise ConfigError(msg % err) from err
sphinx.errors.ConfigError: There is a syntax error in your configuration file: invalid syntax (__version__.py, line 4)


Configuration error:
There is a syntax error in your configuration file: invalid syntax (__version__.py, line 4)

CleanShot 2023-09-20 at 15 16 41@2x

@jezdez jezdez merged commit ef9a573 into main Sep 25, 2023
72 checks passed
@jezdez jezdez deleted the plugins-check branch September 25, 2023 17:08
@jezdez jezdez mentioned this pull request Sep 26, 2023
92 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA plugins pertains to a plugin/subcommand source::anaconda created by members of Anaconda, Inc.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants