Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If your code relies on a minimum python version, you can add `python_requires=">=3.5"` to your setup.py [https://packaging.python.org/guides/distributing-packages-us...] to ensure it's not installed on older releases.

That field itself is kinda new; but if needing to block users with older versions, that shouldn't be an issue.




personally, i just drop a f-string in setup.py and that'll filter out any python for which this issue pertains.


This might not work if you’re distributing a wheel.


Python 3.4 is EOL anyway so there's no need to do this. Anybody running 3.4 is already unsupported.


and 3.5 dies in september. hurray!




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: