Skip to content

Commit 12056d0

Browse files
authored
Release v4.0.0 (#1329)
2 parents 7025d79 + 5b9e017 commit 12056d0

565 files changed

Lines changed: 6661 additions & 8118 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.flake8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ per-file-ignores = *.pyi:E302,E305
88

99
[flake8:local-plugins]
1010
extension =
11-
SDK = _globus_sdk_flake8:Plugin
12-
paths = ./src/globus_sdk/
11+
SDK = globus_sdk_flake8:Plugin
12+
paths = ./src/globus_sdk/_internal/extensions/

.github/workflows/test.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ jobs:
8080
- "pylint"
8181
- "test-lazy-imports"
8282
- "twine-check"
83-
cache-paths:
84-
- ".mypy_cache/"
83+
# TODO: revisit caching strategy for '.mypy_cache'
84+
# we believe a bad cache can be restored when the package changes,
85+
# tricking 'mypy-test' into seeing an old version of the SDK
86+
#
87+
# cache-paths:
88+
# - ".mypy_cache/"
8589

8690
uses: "globus/workflows/.github/workflows/tox.yaml@f41714f6a8b102569807b348fce50960f9617df8" # v1.2
8791
with:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SDK_VERSION=$(shell grep '^__version__' src/globus_sdk/version.py | cut -d '"' -f2)
1+
SDK_VERSION=$(shell grep '^version' pyproject.toml | head -n 1 | cut -d '"' -f2)
22

33
# these are just tox invocations wrapped nicely for convenience
44
.PHONY: lint test docs all-checks

RELEASING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- Decide on the new version number and create a branch;
1919
`git checkout -b release-$SDK_VERSION`
2020

21-
- Update the version in `src/globus_sdk/version.py`
21+
- Update the version in `pyproject.toml`
2222

2323
- Update metadata and changelog, then verify changes in `changelog.rst`
2424

@@ -28,7 +28,7 @@ $EDITOR changelog.rst
2828
```
2929

3030
- Add changed files;
31-
`git add changelog.d/ changelog.rst src/globus_sdk/version.py`
31+
`git add changelog.d/ changelog.rst pyproject.toml`
3232

3333
- Commit; `git commit -m 'Bump version and changelog for release'`
3434

changelog.d/check-version-is-new.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,22 @@
66
import re
77
import sys
88

9+
if sys.version_info >= (3, 11):
10+
import tomllib
11+
else:
12+
# Older Python versions
13+
import tomli as tomllib
14+
915
PATTERN_FORMAT = "^v{version}\\s+\\({date}\\)$"
1016
CHANGELOG_D = os.path.dirname(__file__)
1117
REPO_ROOT = os.path.dirname(CHANGELOG_D)
1218

1319

1420
def parse_version():
15-
# single source of truth for package version
16-
version_string = ""
17-
version_pattern = re.compile(r'__version__ = "([^"]*)"')
18-
with open(os.path.join(REPO_ROOT, "src", "globus_sdk", "version.py")) as f:
19-
for line in f:
20-
match = version_pattern.match(line)
21-
if match:
22-
version_string = match.group(1)
23-
break
24-
if not version_string:
25-
raise RuntimeError("Failed to parse version information")
26-
return version_string
21+
with open(os.path.join(REPO_ROOT, "pyproject.toml"), "rb") as f:
22+
pyproject = tomllib.load(f)
23+
24+
return pyproject["project"]["version"]
2725

2826

2927
def get_header_re(version):

0 commit comments

Comments
 (0)