Skip to content

Commit e903ec9

Browse files
authored
fix: avoid modifing the input dict (#903)
Reported in rapidfuzz/RapidFuzz#397. Signed-off-by: Henry Schreiner <[email protected]>
1 parent ca529d6 commit e903ec9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/scikit_build_core/build/metadata.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import copy
34
from typing import TYPE_CHECKING, Any
45

56
from packaging.version import Version
@@ -24,7 +25,7 @@ def get_standard_metadata(
2425
pyproject_dict: Mapping[str, Any],
2526
settings: ScikitBuildSettings,
2627
) -> StandardMetadata:
27-
new_pyproject_dict = dict(pyproject_dict)
28+
new_pyproject_dict = copy.deepcopy(pyproject_dict)
2829
# Handle any dynamic metadata
2930
for field, provider, config in load_dynamic_metadata(settings.metadata):
3031
if provider is None:

0 commit comments

Comments
 (0)