r/learnpython • • 21m ago

How do you keep a small open-source package maintained over time?

I recently published my first package on PyPI. It works and has tests and CI, but I've never maintained anything long term. For those of you with packages people actually use:

  • How to determine which features should be in a patch and which in a small release. And when to upgrade to 1.0?
  • How to ensure that your dependencies and GitHub actions are up-to-date without it becoming tedious. For example, is Dependabot or Renovate (or another tool) used?
  • Should dependencies be version locked or not?
  • How much time do you allocate to this? And how do you manage it if you are particularly busy?

All good practice and common errors are really appreciated!

2 Upvotes

5 comments sorted by

•

u/1One2Twenty2Two 16m ago
  • Start at 0.1.0 and increase the minor or patch according to semver. FastAPI still a major of 0 after like 6 years, so don't worry about that. Just be consistent.
  • Yes, use Dependabot or Renovate
  • Always. You can use a package manager like uv or pip compile to generate the equivalent of lock files.
  • Only you can answer this one!

•

u/MostimaSimp 12m ago

Thank you!

For Pinning - I think you're referring to pinning development and CI environment libraries but allowing version ranges (for example pandas>=2.2) to be used in published code. I believe that if a library pins versions then this can lead to issues when it is installed with other packages.

I've been setting up Dependabot this week. As for my final query, yes I'm targeting around one hour per day, together with a nightly CI process which connects to actual data sources. This means that I can rapidly ascertain if upstream issues are arising.

•

u/1One2Twenty2Two 9m ago

For Pinning - I think you're referring to pinning development and CI environment libraries but allowing version ranges (for example pandas>=2.2) to be used in published code

Exactly. You can provide ranges but try to always provide a minimal version.

•

u/MostimaSimp 5m ago

Alright, thanks! Whilst each requirement has a minimum set, only the pandas one is validated in CI. I will create a job which installs all requirements at their minimum versions so that the minimums are valid.