Skip to content

MAINT: Update versioneer 0.19 → 0.26 #22438

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

Merged
merged 3 commits into from
Oct 17, 2022

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Oct 14, 2022

@charris
Copy link
Member

charris commented Oct 15, 2022

I notice that you closed this. Rather than update versioneer, we would be happy to have simpler code to achieve the same end if you would be interested in attempting that.

@DimitriPapadopoulos
Copy link
Contributor Author

I don't know, Versioneer seems OK to me. Perhaps it's not worth using custom code instead. And there's Miniver is you want something smaller.

It's just that the update appears to be more complex than expected, I probably need to update a few other things first.

DimitriPapadopoulos and others added 2 commits October 15, 2022 22:19
Keep classic vendored mode.

This update will shut up this codespell warning:
	unparseable ==> unparsable
We patch the LICENSE file for both sdist and wheel releases, making them
all "dirty", i.e., containing files that have not been committed. Having
"dirty" in the product name is bad marketing and the versioneer tool
does not have an option or style that will omit that bit of information,
so patch the versioneer files to make that tag an empty string.
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review October 15, 2022 21:52
@charris
Copy link
Member

charris commented Oct 15, 2022

There is no reason to update versioneer unless it stops working. OTOH, it is over designed for our needs and could be replaced with a small amount of code. SciPy took a different approach. The only need is to order the wheel names correctly so that downloads from the nightly (development) repository get the latest version. It may also be the case that meson would work better with a simpler system. @rgommers Thoughts about meson?

@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Oct 16, 2022

The initial reason for me was to shut up this codespell warning:
unparseable ==> unparsable

Meson is a replacement for autotools, using it in a Python project also feels like overdesign.

@rgommers
Copy link
Member

It may also be the case that meson would work better with a simpler system. @rgommers Thoughts about meson?

It doesn't matter too much. We'll want to enable custom version strings, there are many Python packages that deal with this: versioneer, setuptools-scm, setuptools-vcs-version, etc. Most of them are a bit over-engineered, but I'm also not in a hurry to deal with that. We have versioneer now, let's stay with it for the time being.

I'm not keen to look at a huge diff like this in order to deal with a codespell warning, but if you want to merge @charris then that's fine too.

@DimitriPapadopoulos
Copy link
Contributor Author

Is it worth looking at the diff in detail? At least the commit which copies/pastes Versioneer 0.26 is supposed to have been reviewed upstream, you could just check that I am committing the genuine Versioneer 0.26 code and not some code modified through error or malice:

The other two commits might be worth looking into:

  • 2145d9e (re-apply previous patch to vanilla Versioneer)
  • 2172528 (shows that upstream reviews/tests have not been thorough enough 😄)

@eli-schwartz
Copy link

Meson is a replacement for autotools, using it in a Python project also feels like overdesign.

There seems to be some implicit assumption here that using autotools is fine on its own, but in a python project is overdesign. I don't think I agree, though...

There are other problems with using autotools in a python project, primarily that autotools depends heavily on POSIX shell scripts and isn't easily portable to Windows, while python projects usually are portable to Windows.

@eli-schwartz
Copy link

The initial reason for me was to shut up this codespell warning:
unparseable ==> unparsable

Does codespell not have an option to exclude files or directories that contain third-party code, for which it is always inappropriate to suggest localized modifications unless those modifications fix runtime bugs?

@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Oct 16, 2022

Sure, codespell does have such an option. Additionally, it can be added to pyproject.tom since the latest release 2.2.2.

However, I need to work on a few issues I have with codespell before I can push such a fix.

@charris charris added the 36 - Build Build related PR label Oct 16, 2022
@charris charris merged commit 947d83b into numpy:main Oct 17, 2022
@charris
Copy link
Member

charris commented Oct 17, 2022

Might as well put this in. Next time a simple and small PR against the original would be preferable. After all, if we don't do updates a few local enhancements are fine, there is already the one for "dirty".

@DimitriPapadopoulos DimitriPapadopoulos deleted the versioneer branch October 17, 2022 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants