Skip to content

Release 1.12.5 Requires a TOML Library #183

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

Closed
sdelano opened this issue May 16, 2023 · 6 comments
Closed

Release 1.12.5 Requires a TOML Library #183

sdelano opened this issue May 16, 2023 · 6 comments
Labels

Comments

@sdelano
Copy link

sdelano commented May 16, 2023

The newest release now has a dependency on a TOML parsing library, but that dependency isn't being picked up by PyPi, so installing this new version without also manually installing tomlkit or specifying it as a dependency in a pyproject.toml will cause the execution of this tool to fail.

Examples

PyPi doesn't think that this package requires any TOML libraries:

> pip show pydeps
Name: pydeps
Version: 1.12.5
Summary: Display module dependencies
Home-page: https://github.com/thebjorn/pydeps
Author: bjorn
Author-email: [email protected]
License: BSD
Location: /Users/stephen/.asdf/installs/python/3.9.9/lib/python3.9/site-packages
Requires: stdlib-list
Required-by: 

This results in the following error when run without tomlkit installed:

    raise ImportError("No toml module found")
ImportError: No toml module found

Even when tomlkit is installed manually, if you haven't correctly set up a pydeps config file it will also fail:

    raise NonExistentKey(key)
tomlkit.exceptions.NonExistentKey: 'Key "pydeps" does not exist.'
@mivade
Copy link

mivade commented May 24, 2023

I think the title here is burying the lede a bit:

Even when tomlkit is installed manually, if you haven't correctly set up a pydeps config file it will also fail:

I came here looking for other issues reported about this since that's what I was seeing in version 1.12.7 so it hasn't been fixed yet.

@sdelano
Copy link
Author

sdelano commented May 24, 2023

@mivade apologies. The lack of tomlkit was the first issue I hit, and I started the issue. Trying to fix it, I hit more and more until I determined that the release was basically completely broken based on the documentation at the time.

The title could very well have been "Release 1.12.5 doesn't work at all by following docs"

@mivade
Copy link

mivade commented May 24, 2023

No need to apologize! I was just trying to point out that this is a much bigger issue than the title implies (but you correctly point out in your report).

@thebjorn thebjorn added the bug label May 25, 2023
@thebjorn
Copy link
Owner

I see there is a problem if a config file is found and doesn't contain a pydeps config (configs.pyL365).

Hmm.. I tried to make it so (a) pythons with included tomllib would work, (b) any of the other common(?) toml-libraries (i.e. tomlkit and toml) would work if they were found.

My thinking being that people who wanted to pick up configs from pyproject.toml already had their preferred toml-library installed.

Is there a better way of doing this?

@thebjorn
Copy link
Owner

I've fixed the crashing on missing config in config files, and the two most obvious import-error issues.
Version 1.12.8 is available on PyPI.

@sdelano
Copy link
Author

sdelano commented May 26, 2023

@thebjorn thank you! A PR was opened in our codebase this morning via Renovate and it's working just as before. 🎉

@sdelano sdelano closed this as completed May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants