Use time.monotonic()#15
Conversation
time.monotonic() relates to the real time spent inside the main thread, and can not be altered externally by e.g. - ntp system time synchronisation (frequent, small impact) - automatic time zone changes (infrequent, big impact) - users manually changing system time (infrequent, big impact) and is therefore preferred over time.time when measuring relative times (of a program). Smaller improvements: - Remove __init__ with unnecessary instance attribute assignment (time to load the extension itself is now representative due to explicit start() call) - Use __slots__ for lower memory consumption of class instance(s) - Simplify stop(), reducing the amount of checks, instance attribute lookups and variable assignments
bcff8a4 to
213de70
Compare
|
@ddelange I'm definitely interested in having some help maintaining this library. Are you interested? |
|
definitely would be down :) do you do uploads to pypi manually? if you can give me pypi write access, I could also add Github Actions into the mix to automatically deploy to pypi when a new release/tag is pushed to the repo on master branch (not sure if overkill for this repo tho, can keep doing it manually of course) |
|
Alright, I'll add you as a collaborator on the repo along with PyPI perms, doing it now. |
|
Actually @ddelange I am apparently not the person who added the PyPI package! |
|
@amitu could you add us as maintainers on the pypi package so we can release a new version? |
|
@cpcloud I've sent @amitu an email on his personal gmail in an attempt to reach him. If we can't reach him for 6 weeks, we can open an issue with a PEP 541 request: https://www.python.org/dev/peps/pep-0541/#reachability In the meantime, I didn't find a PyPi account for |
|
@amitu just another reminder, please grant us pypi maintainer access so we can release this :) |
|
@ddelange apologies for delayed reply. Who do I give access to? |
|
My pypi account is |
|
I have invited both of you as maintainers. Let me know if someone wants to take over the ownership. |
|
Thanks @amitu :) |
Hi!
Just some small improvements I spotted while inspecting this already beautifully lean lib.
Fixes #10, closes #13
How does your release flow work? Do you merge to default branch, git tag, and upload to Pypi from there? As an alternative to your
versioneersetup, you could usesetuptools_scm, designed for this specific purpose. See e.g. john-kurkowski/tldextract#187Description
time.monotonic() relates to the real time spent inside the main thread, and can not be altered externally by e.g.
and is therefore preferred over time.time when measuring relative times (of a program).
Smaller improvements: