From dc496ee6c485ec4f00faa410b865cc4bc8967f14 Mon Sep 17 00:00:00 2001 From: James Braza Date: Sun, 28 Jul 2024 06:54:30 -0700 Subject: [PATCH 1/3] Added prettier and end-of-file-fixer to pre-commit --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d28a324c..6e3e43d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,12 +5,17 @@ repos: - id: trailing-whitespace - id: check-yaml - id: debug-statements + - id: end-of-file-fixer - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.3.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] - id: ruff-format +- repo: https://github.com/rbubley/mirrors-prettier + rev: v3.3.3 + hooks: + - id: prettier - repo: https://github.com/tox-dev/pyproject-fmt rev: 1.7.0 From bd16a84661d6a6597d655e3c1f8b88fd519d49b0 Mon Sep 17 00:00:00 2001 From: James Braza Date: Tue, 1 Oct 2024 10:50:25 -0700 Subject: [PATCH 2/3] All pre-commit fixes --- .github/workflows/python-tests.yml | 42 +- .pre-commit-config.yaml | 61 ++- .readthedocs.yaml | 8 +- CHANGELOG.md | 479 +++++++++--------- README.md | 6 +- ...1003_203751_ronny_fix_950_encoding_safe.md | 3 +- .../20240105_133254_subprocess_timeout_var.md | 1 - .../20240108_134756_cli_version_file_force.md | 4 +- ...0305_102047_allow_non_normalized_semver.md | 1 - docs/config.md | 135 +++-- docs/customizing.md | 15 +- docs/extending.md | 68 ++- docs/index.md | 2 - docs/overrides.md | 1 - docs/usage.md | 42 +- hatch.toml | 2 +- mkdocs.yml | 28 +- nextgen/vcs-versioning/README.md | 2 +- 18 files changed, 423 insertions(+), 477 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index c8818651..95393fb3 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -4,9 +4,9 @@ on: pull_request: push: branches: - - "*" + - "*" tags: - - "v*" + - "v*" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} @@ -16,7 +16,6 @@ env: FORCE_COLOR: 1 jobs: - package: name: Build & inspect our package. runs-on: ubuntu-latest @@ -34,11 +33,11 @@ jobs: strategy: fail-fast: false matrix: - python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.10' ] + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.10"] os: [windows-latest, ubuntu-latest] #, macos-latest] include: - - os: windows-latest - python_version: 'msys2' + - os: windows-latest + python_version: "msys2" name: ${{ matrix.os }} - Python ${{ matrix.python_version }} steps: @@ -97,19 +96,18 @@ jobs: timeout-minutes: 15 dist_upload: - runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') permissions: id-token: write needs: [test] steps: - - uses: actions/download-artifact@v4 - with: - name: Packages - path: dist - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - uses: actions/download-artifact@v4 + with: + name: Packages + path: dist + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 test-pypi-upload: runs-on: ubuntu-latest @@ -117,12 +115,12 @@ jobs: permissions: id-token: write steps: - - uses: actions/download-artifact@v4 - with: - name: Packages - path: dist - - name: Publish package to PyPI - continue-on-error: true - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ + - uses: actions/download-artifact@v4 + with: + name: Packages + path: dist + - name: Publish package to PyPI + continue-on-error: true + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6e3e43d7..50856ff4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,43 +1,40 @@ repos: -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - - id: trailing-whitespace - - id: check-yaml - - id: debug-statements - - id: end-of-file-fixer -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.4 - hooks: - - id: ruff - args: [--fix, --exit-non-zero-on-fix, --show-fixes] - - id: ruff-format -- repo: https://github.com/rbubley/mirrors-prettier - rev: v3.3.3 - hooks: - - id: prettier - -- repo: https://github.com/tox-dev/pyproject-fmt - rev: 1.7.0 - hooks: - - id: pyproject-fmt - exclude: docs/examples/ - -- repo: https://github.com/pre-commit/mirrors-mypy + - id: trailing-whitespace + - id: check-yaml + - id: debug-statements + - id: end-of-file-fixer + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.3.4 + hooks: + - id: ruff + args: [--fix, --exit-non-zero-on-fix, --show-fixes] + - id: ruff-format + - repo: https://github.com/rbubley/mirrors-prettier + rev: v3.3.3 + hooks: + - id: prettier + - repo: https://github.com/tox-dev/pyproject-fmt + rev: 1.7.0 + hooks: + - id: pyproject-fmt + exclude: docs/examples/ + - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.9.0 hooks: - - id: mypy + - id: mypy args: [--strict] language_version: "3.10" additional_dependencies: - - types-setuptools - - tokenize-rt==3.2.0 - - pytest == 7.1 - - importlib_metadata - - typing-extensions>=4.5 - - rich - -- repo: https://github.com/scientific-python/cookie + - types-setuptools + - tokenize-rt==3.2.0 + - pytest == 7.1 + - importlib_metadata + - typing-extensions>=4.5 + - rich + - repo: https://github.com/scientific-python/cookie rev: 2024.04.23 hooks: - id: sp-repo-review diff --git a/.readthedocs.yaml b/.readthedocs.yaml index b9ae71f4..37095cda 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,7 +10,7 @@ mkdocs: # Optionally declare the Python requirements required to build your docs python: install: - - method: pip - path: . - extra_requirements: - - docs \ No newline at end of file + - method: pip + path: . + extra_requirements: + - docs diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d1b1be..dd25c598 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ - # v8.0.4 ## Changed @@ -16,8 +15,6 @@ - fix #932: ensure type annotations in version file don't cause linter issues - fix #930: temporary restore `DEFAULT_VERSION_SCHEME` and `DEFAULT_LOCAL_SCHEME` on the `setuptools-scm` package - - # v8.0.3 ## bugfix @@ -36,7 +33,6 @@ - fix #913: use 240s timeout instead of 20 for `git unshallow` to account for large repos or slow connections - # v8.0.1 ## bugfix @@ -72,11 +68,11 @@ - add support for version schemes by import - chores - - migrate own metadata to pyproject.toml - - consolidate version schemes - - stricter tag typing - - pre-compiled regex - - move helpers to private modules + - migrate own metadata to pyproject.toml + - consolidate version schemes + - stricter tag typing + - pre-compiled regex + - move helpers to private modules - support passing log levels to SETUPTOOLS_SCM_DEBUG - support using rich.logging as console log handler if installed @@ -138,12 +134,12 @@ # v6.4.1 -- fix regression #669: restore get_version signature -- fix #668: harden the self-test for distribution extras +- fix regression #669: restore get_version signature +- fix #668: harden the self-test for distribution extras # 6.4.0 -- compatibility adjustments for setuptools \>58 +- compatibility adjustments for setuptools \>58 - only put minimal setuptools version into toml extra to warn people with old strict pins - correctly handle hg-git self-use - better mercurial detection @@ -190,55 +186,55 @@ haven\'t been using it # v6.2.0 -- fix #608: resolve tomli dependency issue by making it a hard - dependency as all intended/supported install options use pip/wheel - this is only a feature release -- ensure python 3.10 works +- fix #608: resolve tomli dependency issue by making it a hard + dependency as all intended/supported install options use pip/wheel + this is only a feature release +- ensure python 3.10 works # v6.1.1 -- fix #605: completely disallow bdist_egg - modern enough - setuptools\>=45 uses pip -- fix #606: re-integrate and harden toml parsing -- fix #597: harden and expand support for figuring the current - distribution name from [pyproject.toml]{.title-ref} - ([project.name]{.title-ref} or - [tool.setuptools_scm.dist_name]{.title-ref}) section or - [setup.cfg]{.title-ref} ([metadata.name]{.title-ref}) +- fix #605: completely disallow bdist_egg - modern enough + setuptools\>=45 uses pip +- fix #606: re-integrate and harden toml parsing +- fix #597: harden and expand support for figuring the current + distribution name from [pyproject.toml]{.title-ref} + ([project.name]{.title-ref} or + [tool.setuptools_scm.dist_name]{.title-ref}) section or + [setup.cfg]{.title-ref} ([metadata.name]{.title-ref}) # v6.1.0 -- fix #587: don\'t fail file finders when distribution is not given -- fix #524: new parameters `normalize` and `version_cls` to customize - the version normalization class. -- fix #585: switch from toml to tomli for toml 1.0 support -- fix #591: allow to opt in for searching parent directories in the - api -- fix #589: handle yaml encoding using the expected defaults -- fix #575: recommend storing the version_module inside of - `mypkg/_version.py` -- fix #571: accept branches starting with `v` as release branches -- fix #557: Use `packaging.version` for `version_tuple` -- fix #544: enhance errors on unsupported python/setuptools versions +- fix #587: don\'t fail file finders when distribution is not given +- fix #524: new parameters `normalize` and `version_cls` to customize + the version normalization class. +- fix #585: switch from toml to tomli for toml 1.0 support +- fix #591: allow to opt in for searching parent directories in the + api +- fix #589: handle yaml encoding using the expected defaults +- fix #575: recommend storing the version_module inside of + `mypkg/_version.py` +- fix #571: accept branches starting with `v` as release branches +- fix #557: Use `packaging.version` for `version_tuple` +- fix #544: enhance errors on unsupported python/setuptools versions # v6.0.1 -- fix #537: drop node_date on old git to avoid errors on missing %cI +- fix #537: drop node_date on old git to avoid errors on missing %cI # v6.0.0 -- fix #517: drop dead python support \>3.6 required -- drop dead setuptools support \> 45 required (can install wheels) -- drop egg building (use wheels) -- add git node_date metadata to get the commit time-stamp of HEAD -- allow version schemes to be priority ordered lists of version - schemes -- support for calendar versioning (calver) by date +- fix #517: drop dead python support \>3.6 required +- drop dead setuptools support \> 45 required (can install wheels) +- drop egg building (use wheels) +- add git node_date metadata to get the commit time-stamp of HEAD +- allow version schemes to be priority ordered lists of version + schemes +- support for calendar versioning (calver) by date # v5.0.2 -- fix #415: use git for matching prefixes to support the windows - situation +- fix #415: use git for matching prefixes to support the windows + situation # v5.0.1 @@ -248,133 +244,133 @@ haven\'t been using it Breaking changes: -- fix #339: strict errors on missing scm when parsing a scm dir to - avoid false version lookups -- fix #337: if relative_to is a directory instead of a file, consider - it as direct target instead of the containing folder and print a - warning +- fix #339: strict errors on missing scm when parsing a scm dir to + avoid false version lookups +- fix #337: if relative_to is a directory instead of a file, consider + it as direct target instead of the containing folder and print a + warning Bugfixes: -- fix #352: add support for generally ignoring specific vcs roots -- fix #471: better error for version bump failing on complex but - accepted tag -- fix #479: raise indicative error when tags carry non-parsable - information -- Add `no-guess-dev` which does no next version guessing, - just adds `.post1.devN` in case there are new commits after the tag -- add python3.9 -- enhance documentation -- consider SOURCE_DATE_EPOCH for versioning -- add a version_tuple to write_to templates -- fix #321: add support for the - `SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${DISTRIBUTION_NAME}` env var to - target the pretend key -- fix #142: clearly list supported scm -- fix #213: better error message for non-zero dev numbers in tags -- fix #356: add git branch to version on describe failure +- fix #352: add support for generally ignoring specific vcs roots +- fix #471: better error for version bump failing on complex but + accepted tag +- fix #479: raise indicative error when tags carry non-parsable + information +- Add `no-guess-dev` which does no next version guessing, + just adds `.post1.devN` in case there are new commits after the tag +- add python3.9 +- enhance documentation +- consider SOURCE_DATE_EPOCH for versioning +- add a version_tuple to write_to templates +- fix #321: add support for the + `SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${DISTRIBUTION_NAME}` env var to + target the pretend key +- fix #142: clearly list supported scm +- fix #213: better error message for non-zero dev numbers in tags +- fix #356: add git branch to version on describe failure # v4.1.2 -- disallow git tags without dots by default again - #449 +- disallow git tags without dots by default again - #449 # v4.1.1 -- drop jaraco.windows from pyproject.toml, allows for wheel builds on - python2 +- drop jaraco.windows from pyproject.toml, allows for wheel builds on + python2 # v4.1.0 -- include python 3.9 via the deadsnakes action -- return release_branch_semver scheme (it got dropped in a bad rebase) -- undo the devendoring of the samefile backport for python2.7 on - windows -- re-enable the building of universal wheels -- fix handling of missing git/hg on python2.7 (python 3 exceptions - where used) -- correct the tox flake8 invocation -- trigger builds on tags again +- include python 3.9 via the deadsnakes action +- return release_branch_semver scheme (it got dropped in a bad rebase) +- undo the devendoring of the samefile backport for python2.7 on + windows +- re-enable the building of universal wheels +- fix handling of missing git/hg on python2.7 (python 3 exceptions + where used) +- correct the tox flake8 invocation +- trigger builds on tags again # v4.0.0 -- Add `parentdir_prefix_version` to support installs from GitHub - release tarballs. -- use Coordinated Universal Time (UTC) -- switch to github actions for ci -- fix documentation for `tag_regex` and add support for single digit - versions -- document handling of enterprise distros with unsupported setuptools - versions #312 -- switch to declarative metadata -- drop the internal copy of samefile and use a dependency on - jaraco.windows on legacy systems -- select git tags based on the presence of numbers instead of dots -- enable getting a version form a parent folder prefix -- add release-branch-semver version scheme -- make global configuration available to version metadata -- drop official support for python 3.4 +- Add `parentdir_prefix_version` to support installs from GitHub + release tarballs. +- use Coordinated Universal Time (UTC) +- switch to github actions for ci +- fix documentation for `tag_regex` and add support for single digit + versions +- document handling of enterprise distros with unsupported setuptools + versions #312 +- switch to declarative metadata +- drop the internal copy of samefile and use a dependency on + jaraco.windows on legacy systems +- select git tags based on the presence of numbers instead of dots +- enable getting a version form a parent folder prefix +- add release-branch-semver version scheme +- make global configuration available to version metadata +- drop official support for python 3.4 # v3.5.0 -- add `no-local-version` local scheme and improve documentation for - schemes +- add `no-local-version` local scheme and improve documentation for + schemes # v3.4.4 -- fix #403: also sort out resource warnings when dealing with git file - finding +- fix #403: also sort out resource warnings when dealing with git file + finding # v3.4.3 -- fix #399: ensure the git file finder terminates subprocess after - reading archive +- fix #399: ensure the git file finder terminates subprocess after + reading archive # v3.4.2 -- fix #395: correctly transfer tag regex in the Configuration - constructor -- rollback \--first-parent for git describe as it turns out to be a - regression for some users +- fix #395: correctly transfer tag regex in the Configuration + constructor +- rollback \--first-parent for git describe as it turns out to be a + regression for some users # v3.4.1 -- pull in #377 to fix #374: correctly set up the default version - scheme for pyproject usage. this bugfix got missed when rushing the - release. +- pull in #377 to fix #374: correctly set up the default version + scheme for pyproject usage. this bugfix got missed when rushing the + release. # v3.4.0 -- fix #181 - add support for projects built under setuptools - declarative config by way of the - setuptools.finalize_distribution_options hook in Setuptools 42. -- fix #305 - ensure the git file finder closes file descriptors even - when errors happen -- fix #381 - clean out env vars from the git hook system to ensure - correct function from within -- modernize docs wrt importlib.metadata +- fix #181 - add support for projects built under setuptools + declarative config by way of the + setuptools.finalize_distribution_options hook in Setuptools 42. +- fix #305 - ensure the git file finder closes file descriptors even + when errors happen +- fix #381 - clean out env vars from the git hook system to ensure + correct function from within +- modernize docs wrt importlib.metadata -*edited* +_edited_ -- use \--first-parent for git describe +- use \--first-parent for git describe # v3.3.3 -- add eggs for python3.7 and 3.8 to the deploy +- add eggs for python3.7 and 3.8 to the deploy # v3.3.2 -- fix #335 - fix python3.8 support and add builds for up to python3.8 +- fix #335 - fix python3.8 support and add builds for up to python3.8 # v3.3.1 -- fix #333 (regression from #198) - use a specific fallback root when - calling fallbacks. Remove old hack that resets the root when - fallback entrypoints are present. +- fix #333 (regression from #198) - use a specific fallback root when + calling fallbacks. Remove old hack that resets the root when + fallback entrypoints are present. # v3.3.0 -- fix #198 by adding the `fallback_version` option, which sets the - version to be used when everything else fails. +- fix #198 by adding the `fallback_version` option, which sets the + version to be used when everything else fails. # v3.2.0 @@ -384,221 +380,222 @@ called. # v3.1.0 -- fix #297 - correct the invocation in version_from_scm and deprecate - it as its exposed by accident -- fix #298 - handle git file listing on empty repositories -- fix #268 - deprecate ScmVersion.extra +- fix #297 - correct the invocation in version_from_scm and deprecate + it as its exposed by accident +- fix #298 - handle git file listing on empty repositories +- fix #268 - deprecate ScmVersion.extra # v3.0.6 -- fix #295 - correctly handle self install from tarballs +- fix #295 - correctly handle self install from tarballs # v3.0.5 -- fix #292 - match leading `V` character as well +- fix #292 - match leading `V` character as well - + # v3.0.4 -- re-release of 3.0.3 after fixing the release process +- re-release of 3.0.3 after fixing the release process v3.0.3 (pulled from pypi due to a packaging issue) ====== -- fix #286 - duo an oversight a helper function was returning a - generator instead of a list +- fix #286 - duo an oversight a helper function was returning a + generator instead of a list # v3.0.2 -- fix a regression from tag parsing - support for multi-dashed - prefixes - #284 +- fix a regression from tag parsing - support for multi-dashed + prefixes - #284 # v3.0.1 -- fix a regression in setuptools_scm.git.parse - reorder arguments so - the positional invocation from before works as expected #281 +- fix a regression in setuptools_scm.git.parse - reorder arguments so + the positional invocation from before works as expected #281 # v3.0.0 -- introduce pre-commit and use black -- print the origin module to help testing -- switch to src layout (breaking change) -- no longer alias tag and parsed_version in order to support - understanding a version parse failure -- require parse results to be ScmVersion or None (breaking change) -- fix #266 by requiring the prefix word to be a word again (breaking - change as the bug allowed arbitrary prefixes while the original - feature only allowed words\") -- introduce an internal config object to allow the configuration for - tag parsing and prefixes (thanks to \@punkadiddle for introducing it - and passing it through) +- introduce pre-commit and use black +- print the origin module to help testing +- switch to src layout (breaking change) +- no longer alias tag and parsed_version in order to support + understanding a version parse failure +- require parse results to be ScmVersion or None (breaking change) +- fix #266 by requiring the prefix word to be a word again (breaking + change as the bug allowed arbitrary prefixes while the original + feature only allowed words\") +- introduce an internal config object to allow the configuration for + tag parsing and prefixes (thanks to \@punkadiddle for introducing it + and passing it through) # v2.1.0 -- enhance docs for sphinx usage -- add symlink support to file finder for git #247 (thanks Stéphane - Bidoul) -- enhance tests handling win32 (thanks Stéphane Bidoul) +- enhance docs for sphinx usage +- add symlink support to file finder for git #247 (thanks Stéphane + Bidoul) +- enhance tests handling win32 (thanks Stéphane Bidoul) # v2.0.0 -- fix #237 - correct imports in code examples -- improve mercurial commit detection (thanks Aaron) -- breaking change: remove support for setuptools before parsed - versions -- reintroduce manifest as the travis deploy can\'t use the file finder -- reconfigure flake8 for future compatibility with black -- introduce support for branch name in version metadata and support a - opt-in simplified semver version scheme +- fix #237 - correct imports in code examples +- improve mercurial commit detection (thanks Aaron) +- breaking change: remove support for setuptools before parsed + versions +- reintroduce manifest as the travis deploy can\'t use the file finder +- reconfigure flake8 for future compatibility with black +- introduce support for branch name in version metadata and support a + opt-in simplified semver version scheme # v1.17.0 -- fix regression in git support - use a function to ensure it works in - egg installed mode +- fix regression in git support - use a function to ensure it works in + egg installed mode -- actually fail if file finding fails in order to see broken setups - instead of generating broken dists +- actually fail if file finding fails in order to see broken setups + instead of generating broken dists - (thanks Mehdi ABAAKOUK for both) + (thanks Mehdi ABAAKOUK for both) # v1.16.2 -- fix regression in handling git export ignores (thanks Mehdi - ABAAKOUK) +- fix regression in handling git export ignores (thanks Mehdi + ABAAKOUK) # v1.16.1 -- fix regression in support for old setuptools versions (thanks Marco - Clemencic) +- fix regression in support for old setuptools versions (thanks Marco + Clemencic) # v1.16.0 -- drop support for eol python versions -- #214 - fix misuse in surrogate-escape api -- add the node-and-timestamp local version scheme -- respect git export ignores -- avoid shlex.split on windows -- fix #218 - better handling of mercurial edge-cases with tag commits - being considered as the tagged commit -- fix #223 - remove the dependency on the internal `SetuptoolsVersion` - as it was removed after long-standing deprecation +- drop support for eol python versions +- #214 - fix misuse in surrogate-escape api +- add the node-and-timestamp local version scheme +- respect git export ignores +- avoid shlex.split on windows +- fix #218 - better handling of mercurial edge-cases with tag commits + being considered as the tagged commit +- fix #223 - remove the dependency on the internal `SetuptoolsVersion` + as it was removed after long-standing deprecation v1.15.7 ====== -- Fix #174 with #207: Reuse samefile backport as developed in - jaraco.windows, and only use the backport where samefile is not - available. +- Fix #174 with #207: Reuse samefile backport as developed in + jaraco.windows, and only use the backport where samefile is not + available. # v1.15.6 -- fix #171 by unpinning the py version to allow a fixed one to get - installed +- fix #171 by unpinning the py version to allow a fixed one to get + installed # v1.15.5 -- fix #167 by correctly respecting preformatted version metadata from - PKG-INFO/EGG-INFO +- fix #167 by correctly respecting preformatted version metadata from + PKG-INFO/EGG-INFO # v1.15.4 -- fix issue #164: iterate all found entry points to avoid errors when - pip remakes egg-info -- enhance self-use to enable pip install from github again +- fix issue #164: iterate all found entry points to avoid errors when + pip remakes egg-info +- enhance self-use to enable pip install from github again # v1.15.3 -- bring back correctly getting our version in the own sdist, finalizes - #114 -- fix issue #150: strip local components of tags +- bring back correctly getting our version in the own sdist, finalizes + #114 +- fix issue #150: strip local components of tags # v1.15.2 -- fix issue #128: return None when a scm specific parse fails in a - worktree to ease parse reuse +- fix issue #128: return None when a scm specific parse fails in a + worktree to ease parse reuse # v1.15.1 -- fix issue #126: the local part of any tags is discarded when - guessing new versions -- minor performance optimization by doing fewer git calls in the usual - cases +- fix issue #126: the local part of any tags is discarded when + guessing new versions +- minor performance optimization by doing fewer git calls in the usual + cases # v1.15.0 -- more sophisticated ignoring of mercurial tag commits when - considering distance in commits (thanks Petre Mierlutiu) -- fix issue #114: stop trying to be smart for the sdist and ensure it's - always correctly using itself -- update trove classifiers -- fix issue #84: document using the installed package metadata for - sphinx -- fix issue #81: fail more gracious when git/hg are missing -- address issue #93: provide an experimental api to customize - behaviour on shallow git repos a custom parse function may pick pre - parse actions to do when using git +- more sophisticated ignoring of mercurial tag commits when + considering distance in commits (thanks Petre Mierlutiu) +- fix issue #114: stop trying to be smart for the sdist and ensure it's + always correctly using itself +- update trove classifiers +- fix issue #84: document using the installed package metadata for + sphinx +- fix issue #81: fail more gracious when git/hg are missing +- address issue #93: provide an experimental api to customize + behaviour on shallow git repos a custom parse function may pick pre + parse actions to do when using git # v1.14.1 - fix #109: when detecting a dirty git workdir don't consider untracked file (this was a regression due to #86 in v1.13.1) + - consider the distance 0 when the git node is unknown (happens when you haven't committed anything) # v1.14.0 -- publish bdist_egg for python 2.6, 2.7 and 3.3-3.5 -- fix issue #107 - dont use node if it is None +- publish bdist_egg for python 2.6, 2.7 and 3.3-3.5 +- fix issue #107 - dont use node if it is None # v1.13.1 -- fix issue #86 - detect dirty git workdir without tags +- fix issue #86 - detect dirty git workdir without tags # v1.13.0 -- fix regression caused by the fix of #101 - - assert types for version dumping - - strictly pass all versions through parsed version metadata +- fix regression caused by the fix of #101 + - assert types for version dumping + - strictly pass all versions through parsed version metadata # v1.12.0 -- fix issue #97 - add support for mercurial plugins -- fix issue #101 - write version cache even for pretend version - (thanks anarcat for reporting and fixing) +- fix issue #97 - add support for mercurial plugins +- fix issue #101 - write version cache even for pretend version + (thanks anarcat for reporting and fixing) # v1.11.1 -- fix issue #88 - better docs for sphinx usage (thanks Jason) -- fix issue #89 - use normpath to deal with windows (thanks Te-jé - Rodgers for reporting and fixing) +- fix issue #88 - better docs for sphinx usage (thanks Jason) +- fix issue #89 - use normpath to deal with windows (thanks Te-jé + Rodgers for reporting and fixing) # v1.11.0 -- always run tag_to_version so in order to handle prefixes on old - setuptools (thanks to Brian May) -- drop support for python 3.2 -- extend the error message on missing scm metadata (thanks Markus - Unterwaditzer) -- fix bug when using callable version_scheme (thanks Esben Haabendal) +- always run tag_to_version so in order to handle prefixes on old + setuptools (thanks to Brian May) +- drop support for python 3.2 +- extend the error message on missing scm metadata (thanks Markus + Unterwaditzer) +- fix bug when using callable version_scheme (thanks Esben Haabendal) # v1.10.1 -- fix issue #73 - in hg pre commit merge, consider parent1 instead of - failing +- fix issue #73 - in hg pre commit merge, consider parent1 instead of + failing # v1.10.0 -- add support for overriding the version number via the environment - variable SETUPTOOLS_SCM_PRETEND_VERSION +- add support for overriding the version number via the environment + variable SETUPTOOLS_SCM_PRETEND_VERSION -- fix issue #63 by adding the `--match` parameter to the git describe - call and prepare the possibility of passing more options to scm - backends +- fix issue #63 by adding the `--match` parameter to the git describe + call and prepare the possibility of passing more options to scm + backends -- fix issue #70 and #71 by introducing the parse keyword to specify - custom scm parsing, it's an expert feature, use with caution +- fix issue #70 and #71 by introducing the parse keyword to specify + custom scm parsing, it's an expert feature, use with caution - this change also introduces the setuptools_scm.parse_scm_fallback - entrypoint which can be used to register custom archive fallbacks + this change also introduces the setuptools_scm.parse_scm_fallback + entrypoint which can be used to register custom archive fallbacks # v1.9.0 diff --git a/README.md b/README.md index e1f06f82..688cdf3e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # setuptools-scm + [![github ci](https://github.com/pypa/setuptools-scm/actions/workflows/python-tests.yml/badge.svg)](https://github.com/pypa/setuptools-scm/actions/workflows/python-tests.yml) [![Documentation Status](https://readthedocs.org/projects/setuptools-scm/badge/?version=latest)](https://setuptools-scm.readthedocs.io/en/latest/?badge=latest) [![tidelift](https://tidelift.com/badges/package/pypi/setuptools-scm) ](https://tidelift.com/subscription/pkg/pypi-setuptools-scm?utm_source=pypi-setuptools-scm&utm_medium=readme) @@ -39,7 +40,6 @@ that support [PEP 518] like [pip] and [build]. [build]: https://pypi.org/project/build [PEP 518]: https://peps.python.org/pep-0518/ - To enable version inference, you need to set the version dynamically in the `project` section of `pyproject.toml`: @@ -75,7 +75,6 @@ For further configuration see the [documentation]. [documentation]: https://setuptools-scm.readthedocs.io/ [git-archive-docs]: https://setuptools-scm.readthedocs.io/en/stable/usage/#builtin-mechanisms-for-obtaining-version-numbers - ## Interaction with Enterprise Distributions Some enterprise distributions like RHEL7 @@ -88,17 +87,14 @@ modern [setuptools-scm] is unable to support them sensibly. It's strongly recommended to build a wheel artifact using modern Python and setuptools, then installing the artifact instead of trying to run against old setuptools versions. - ## Code of Conduct - Everyone interacting in the [setuptools-scm] project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [PSF Code of Conduct]. [PSF Code of Conduct]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md - ## Security Contact To report a security vulnerability, please use the diff --git a/changelog.d/20231003_203751_ronny_fix_950_encoding_safe.md b/changelog.d/20231003_203751_ronny_fix_950_encoding_safe.md index 4617ee3b..9d7a8e08 100644 --- a/changelog.d/20231003_203751_ronny_fix_950_encoding_safe.md +++ b/changelog.d/20231003_203751_ronny_fix_950_encoding_safe.md @@ -1,4 +1,3 @@ - ### Changed -- fix #950: ensure to pass encodings to io usage \ No newline at end of file +- fix #950: ensure to pass encodings to io usage diff --git a/changelog.d/20240105_133254_subprocess_timeout_var.md b/changelog.d/20240105_133254_subprocess_timeout_var.md index 78ecab27..6c6557f9 100644 --- a/changelog.d/20240105_133254_subprocess_timeout_var.md +++ b/changelog.d/20240105_133254_subprocess_timeout_var.md @@ -1,4 +1,3 @@ - ### Changed - fix #957 - add subprocess timeout control env var diff --git a/changelog.d/20240108_134756_cli_version_file_force.md b/changelog.d/20240108_134756_cli_version_file_force.md index c313c178..2dc7dd81 100644 --- a/changelog.d/20240108_134756_cli_version_file_force.md +++ b/changelog.d/20240108_134756_cli_version_file_force.md @@ -1,9 +1,9 @@ - ### Added -- fix #960: add a ``--force-write-version-files`` flag for the cli +- fix #960: add a `--force-write-version-files` flag for the cli --> +