r/learnpython • u/MostimaSimp • 2d 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!
7
Upvotes
8
u/1One2Twenty2Two 2d ago
3
u/kilkil 2d ago
2
u/billsil 2d ago
I don’t really care about version releases. I hate packaging. I like being creative.
I pick python 3.11-3.15 and try to support various package combinations and all versions of all dependencies. It doesn’t add that much if a limitation. Test low and test high and you’re good. I play whack-a-mole occasionally. It’s not bad if you stay up on it. Oh package x changed. It obviously broke it. Fix the warnings.
If I’m busy I don’t do it. It’s not my day job.
1
u/Sufficient-Tale6131 1d ago
For that minimum versions job, uv can do the resolving for you: uv sync --resolution lowest-direct (or uv pip install --resolution lowest-direct . if you're not using uv projects) installs the lowest version allowed by each of your direct dependencies, straight from pyproject. So there's no second pinned list to keep in sync. Run it on the oldest Python you support though, old pandas releases often have no wheels for newer Pythons and it'll try to build from source.
1
u/Downtown_Cat_7425 1d ago
For a small package, the biggest maintenance win is keeping the surface area tiny. Keep runtime dependencies at zero if you can, put CI on at least two Python versions, write a CHANGELOG from day one, and add a CONTRIBUTING file with the exact test command. Use semantic versioning even for 0.x so breaking changes are obvious, and tag releases in git. Add issue templates that ask for reproduction details - it cuts the back-and-forth massively. A quiet repo with a clear README is fine; burnout is the main reason small packages die.
2
u/Top-Cauliflower-1808 2d ago
Patch is bug fixes only and minor is new backward compatible features. Save 1.0 for when you are ready to support the public interface for years. Renovate groups updates better than Dependabot and locking dependencies is right for applications but wrong for a library. Thirty minutes a week is enough if you ignore most update noise and only act on security and breaking changes.
1
u/Protopia 21h ago