Skip to content

Cleanup#9

Merged
motdotla merged 1 commit intomasterfrom
cleanup
May 3, 2023
Merged

Cleanup#9
motdotla merged 1 commit intomasterfrom
cleanup

Conversation

@ian-ross
Copy link
Contributor

@ian-ross ian-ross commented May 3, 2023

Various changes:

  • Fix key extraction bug (use last 64 characters in password field).
  • Reorganize and simplify code.
  • Make public API behavior correspond more closely to python-dotenv behavior.
  • Improve error handling.
  • Add tests and CI.
  • Add comments.
  • Update build system and Makefile to use Python build and pyproject.toml.

@motdotla This needs some review before merging. Let me know what you do and don't like about it!

@motdotla
Copy link
Member

motdotla commented May 3, 2023

solid cleanup. thanks, Ian.

@motdotla motdotla merged commit 090c65c into master May 3, 2023
@motdotla motdotla deleted the cleanup branch May 3, 2023 16:51

build: clean
python setup.py sdist bdist_wheel
python -m build
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ian-ross what does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It uses this thing to wrap the build process. More recent versions of pip complain about packages with only a setup.py, so I needed to add a pyproject.toml, and this build package is a nice front-end to the whole pyproject.toml-drive package build approach. (It works with other build systems like Poetry as well, so you can just say python -m build to build your distribution whatever build system you're using.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh cool! do I need to install poetry?

I was curious about this because when i tried doing make build I get a No module named build

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ha. You're totally right. That's a mistake.

You don't need to install Poetry. The build still uses setuptools (you can see that in the pyproject.yml file). However, you do need to have the build package installed. I have this installed because I use Poetry on some other projects and Poetry depends on build so I get it for free. It's not working for you because the build package isn't installed by default, and I forgot to add something to the Makefile to install it. There's a line in the CI setup that installs it, but I need to add something to the Makefile as well.

I'll do that right now and make a new release. Thanks for looking at this!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in v0.5.2! Thanks again!

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 this pull request may close these issues.

3 participants