hooks/data_source: Test failure with Python 3.14 #1149
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I was forced to switch from pypi archive to git archive because pypi archive newly does not contain tests as they used too, but we need them for gentoo package. However, git archive additionally contains
tests/unit/hooks/data_sourcetests andtest_dump.py::test_convert_glob_patterns_to_borg_pattern_makes_multipart_regular_expressionfails with python 3.14The issue is only related to python 3.14, older versions works.
Btw, I would be awesome if you could return test files back to pypi releases.
Thanks for filing this! borgmatic doesn't yet support Python 3.14 alpha releases. (As you've discovered. 😄) However this test failure seems like a good thing to fix when borgmatic does add Python 3.14 support.
And the reason that tests were removed from borgmatic pypy releases is that those packages are intended for production installation, and IMO tests should not be part of production software, as among other reasons it's a larger surface area for attacks and exploits.
However, I do want to make automated builds for Gentoo and other distros convenient. Are you aware of the source release packages on the borgmatic releases page, which do contain tests?
I guess a point could be made that the production packages are the wheel files and that the sdist should contain all files to install & verify the package. This is how we handle it in Django at least.
FYI, Python usually switches from alpha to beta in May. Beta release is feature freeze and several downstream distributions including Gentoo start porting python ecosystem to a new version. There is Python 3.14.0-rc3 available as of today and the final release is planned for Tuesday, 2025-10-07, see https://peps.python.org/pep-0745/.
I share the point of view to wheel vs. sdist with @apollo13, thanks for the comment!
Yes, I am aware of them and I switched to them for now.
Yeah, that's what I'm intending in this case. I added a brief note to borgmatic's developer documentation mentioning this. (To be deployed shortly.) Eventually this could be expanded into a full packaging guide.
Oh, thanks for letting me know! For some reason I was only finding information about the alpha releases. I'll see if I can get ahold of a release candidate.
Okay, this test is fixed in main for Python 3.14!
@apollo13 Do you have an example of this? For instance, it looks like with
[tool.setuptools.packages.find]inpyproject.toml,includeapplies to both any sdists and wheels built. I don't see a convenient way to put tests in one and not the other. Or are you using a different build backend?You just
includethe production code and add the rest via MANIFEST.in I think. https://github.com/django/django/blob/main/pyproject.toml & https://github.com/django/django/blob/main/MANIFEST.inThanks, that did it! (Totally not intuitive IMO.) Okay @arkamar, automated tests should now be included in the source dist tarball on PyPI—in the next borgmatic release. Thanks again for filing this.
Released in borgmatic 2.0.9!