Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Only pass template to setuptools_scm.dump_version() if defined #55

Merged
merged 2 commits into from
Nov 5, 2023

Conversation

effigies
Copy link
Contributor

@effigies effigies commented Oct 6, 2023

It seems more correct to return the actual value (None for absent) than a fake value. This will allow us to distinguish the case template = "" (which setuptools_scm could reasonably treat as an error) from it missing.

This patch uses a sentinel object to allow the result caching to work with None values. Once Python 3.7 is dropped, much of this machinery can be replaced with functools.cached_property.

Fixes #49.

@effigies
Copy link
Contributor Author

Only failure is unrelated linting failures.

@hoechenberger
Copy link

hoechenberger commented Nov 4, 2023

Hello, what is the status on this one? :)

@effigies
Copy link
Contributor Author

effigies commented Nov 4, 2023

Waiting on review. It worked when I wrote it, but I haven't tested against more recent setuptools_scm, if there have been further releases.

@ofek ofek merged commit 5a7d60f into ofek:master Nov 5, 2023
14 of 15 checks passed
@ofek
Copy link
Owner

ofek commented Nov 5, 2023

Thank you!

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.

'UserWarning: template='' looks like a error, using default instead' for setuptools-scm v8.0.0+
3 participants