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

broken with importlib_resources 6.0.0 #528

Closed
exarkun opened this issue Jul 7, 2023 · 4 comments · Fixed by #529
Closed

broken with importlib_resources 6.0.0 #528

exarkun opened this issue Jul 7, 2023 · 4 comments · Fixed by #529

Comments

@exarkun
Copy link
Member

exarkun commented Jul 7, 2023

codechecks run-test: commands[3] | python -m towncrier.check --config towncrier.toml
Traceback (most recent call last):
  File "/home/circleci/.pyenv/versions/3.9.17/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/circleci/.pyenv/versions/3.9.17/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/towncrier/check.py", line 142, in <module>
    _main()
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/towncrier/check.py", line 64, in _main
    __main(compare_with, directory, config)
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/towncrier/check.py", line 70, in __main
    base_directory, config = load_config_from_options(directory, config_path)
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/towncrier/_settings/load.py", line 86, in load_config_from_options
    config = load_config_from_file(os.path.dirname(config_path), config_path)
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/towncrier/_settings/load.py", line 112, in load_config_from_file
    return parse_toml(directory, config)
  File "/home/circleci/project/.tox/codechecks/lib/python3.9/site-packages/towncrier/_settings/load.py", line 172, in parse_toml
    if not resources.is_resource(package, resource):
AttributeError: module 'importlib_resources' has no attribute 'is_resource'

"legacy functions deprecated in 5.3" were just removed from importlib_resources - https://github.com/python/importlib_resources/pull/282/files

@brunns
Copy link

brunns commented Jul 17, 2023

@adiroiban
Copy link
Member

Thanks Simon for the report.
I see you are using towncrier==23.6.0

The fix was merged in trunk but was not yet released.
You can give it a try by installing from git...

And I guess that since this issue is quite annoying, we should look at doing a new release.

@hynek
Copy link
Member

hynek commented Jul 17, 2023

Wanna maybe merge the Incremental thing and do a release? Would be a good meta cleanup release.

@adiroiban
Copy link
Member

it would be nice to have the incremental + metalib PR in a release... but I think that we can do a release any time...so we can release now... and have another release once they are merged

abravalheri added a commit to abravalheri/setuptools that referenced this issue Aug 2, 2023
Towncrier is trying to access `importlib_resources.is_resource`,
but this was removed in the latest release.

Twisted maintainers already tackled this problem,
but we are waiting for a new release.
See twisted/towncrier#528.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants