Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def _get_version():
else:
return setuptools_scm.get_version(
root=root,
dist_name="matplotlib",
version_scheme="release-branch-semver",
local_scheme="node-and-date",
fallback_version=_version.version,
Expand Down
10 changes: 9 additions & 1 deletion lib/matplotlib/tests/test_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@ def test_pickle_load_from_subprocess(fig_test, fig_ref, tmp_path):
proc = subprocess_run_helper(
_pickle_load_subprocess,
timeout=60,
extra_env={'PICKLE_FILE_PATH': str(fp), 'MPLBACKEND': 'Agg'}
extra_env={
"PICKLE_FILE_PATH": str(fp),
"MPLBACKEND": "Agg",
# subprocess_run_helper will set SOURCE_DATE_EPOCH=0, so for a dirty tree,
# the version will have the date 19700101. As we aren't trying to test the
# version compatibility warning, force setuptools-scm to use the same
# version as us.
"SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MATPLOTLIB": mpl.__version__,
},
)

loaded_fig = pickle.loads(ast.literal_eval(proc.stdout))
Expand Down