Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-hatchling for
openSUSE:Factory checked in at 2022-09-25 15:34:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hatchling (Old)
and /work/SRC/openSUSE:Factory/.python-hatchling.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hatchling"
Sun Sep 25 15:34:36 2022 rev:9 rq:1005754 version:1.10.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hatchling/python-hatchling.changes
2022-09-16 13:32:21.673272665 +0200
+++
/work/SRC/openSUSE:Factory/.python-hatchling.new.2275/python-hatchling.changes
2022-09-25 15:34:39.447529635 +0200
@@ -1,0 +2,13 @@
+Fri Sep 23 19:56:00 UTC 2022 - Beno??t Monin <[email protected]>
+
+- update to version 1.10.0:
+ * Added:
+ + Add the following to the list of directories that cannot be
+ traversed: __pypackages__, .hg, .hatch, .tox, .nox
+ + Add deprecated option to allow ambiguous features
+ * Fixed:
+ + Improve tracking of dynamic metadata
+ + Fix core metadata for entries in
+ project.optional-dependencies that use direct references
+
+-------------------------------------------------------------------
Old:
----
hatchling-1.9.0.tar.gz
New:
----
hatchling-1.10.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-hatchling.spec ++++++
--- /var/tmp/diff_new_pack.bzfBta/_old 2022-09-25 15:34:40.699532650 +0200
+++ /var/tmp/diff_new_pack.bzfBta/_new 2022-09-25 15:34:40.707532670 +0200
@@ -19,7 +19,7 @@
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-hatchling
-Version: 1.9.0
+Version: 1.10.0
Release: 0
Summary: Build backend used by Hatch
License: MIT
++++++ hatchling-1.9.0.tar.gz -> hatchling-1.10.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hatchling-1.9.0/PKG-INFO
new/hatchling-1.10.0/PKG-INFO
--- old/hatchling-1.9.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/hatchling-1.10.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hatchling
-Version: 1.9.0
+Version: 1.10.0
Summary: Modern, extensible Python build backend
Project-URL: Homepage, https://hatch.pypa.io/latest/
Project-URL: Sponsor, https://github.com/sponsors/ofek
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hatchling-1.9.0/src/hatchling/__about__.py
new/hatchling-1.10.0/src/hatchling/__about__.py
--- old/hatchling-1.9.0/src/hatchling/__about__.py 2020-02-02
01:00:00.000000000 +0100
+++ new/hatchling-1.10.0/src/hatchling/__about__.py 2020-02-02
01:00:00.000000000 +0100
@@ -1 +1 @@
-__version__ = '1.9.0'
+__version__ = '1.10.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hatchling-1.9.0/src/hatchling/builders/config.py
new/hatchling-1.10.0/src/hatchling/builders/config.py
--- old/hatchling-1.9.0/src/hatchling/builders/config.py 2020-02-02
01:00:00.000000000 +0100
+++ new/hatchling-1.10.0/src/hatchling/builders/config.py 2020-02-02
01:00:00.000000000 +0100
@@ -787,7 +787,7 @@
return []
def default_global_exclude(self):
- patterns = ['*.py[cdo]', *EXCLUDED_DIRECTORIES]
+ patterns = ['*.py[cdo]', f'/{DEFAULT_BUILD_DIRECTORY}']
patterns.sort()
return patterns
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hatchling-1.9.0/src/hatchling/builders/constants.py
new/hatchling-1.10.0/src/hatchling/builders/constants.py
--- old/hatchling-1.9.0/src/hatchling/builders/constants.py 2020-02-02
01:00:00.000000000 +0100
+++ new/hatchling-1.10.0/src/hatchling/builders/constants.py 2020-02-02
01:00:00.000000000 +0100
@@ -1,6 +1,23 @@
DEFAULT_BUILD_DIRECTORY = 'dist'
-EXCLUDED_DIRECTORIES = frozenset(('.git', '__pycache__'))
+EXCLUDED_DIRECTORIES = frozenset(
+ (
+ # Python bytecode
+ '__pycache__',
+ # PEP 582
+ '__pypackages__',
+ # Git
+ '.git',
+ # Mercurial
+ '.hg',
+ # Hatch
+ '.hatch',
+ # tox
+ '.tox',
+ # nox
+ '.nox',
+ )
+)
class BuildEnvVars:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hatchling-1.9.0/src/hatchling/metadata/core.py
new/hatchling-1.10.0/src/hatchling/metadata/core.py
--- old/hatchling-1.9.0/src/hatchling/metadata/core.py 2020-02-02
01:00:00.000000000 +0100
+++ new/hatchling-1.10.0/src/hatchling/metadata/core.py 2020-02-02
01:00:00.000000000 +0100
@@ -28,6 +28,7 @@
self._hatch = None
self._core_raw_metadata = None
+ self._dynamic = None
self._name = None
self._version = None
self._project_file = None
@@ -64,6 +65,22 @@
return self._core_raw_metadata
@property
+ def dynamic(self):
+ # Keep track of the original dynamic fields before depopulation
+ if self._dynamic is None:
+ dynamic = self.core_raw_metadata.get('dynamic', [])
+ if not isinstance(dynamic, list):
+ raise TypeError('Field `project.dynamic` must be an array')
+
+ for i, field in enumerate(dynamic, 1):
+ if not isinstance(field, str):
+ raise TypeError(f'Field #{i} of field `project.dynamic`
must be a string')
+
+ self._dynamic = list(dynamic)
+
+ return self._dynamic
+
+ @property
def name(self):
# Duplicate the name parsing here for situations where it's
# needed but metadata plugins might not be available
@@ -83,6 +100,8 @@
"""
if self._version is None:
self._set_version()
+ if 'version' in self.dynamic and 'version' in
self.core_raw_metadata['dynamic']:
+ self.core_raw_metadata['dynamic'].remove('version')
return self._version
@@ -114,6 +133,9 @@
if self._core is None:
metadata = CoreMetadata(self.root, self.core_raw_metadata,
self.hatch.metadata, self.context)
+ # Save the fields
+ _ = self.dynamic
+
metadata_hooks = self.hatch.metadata.hooks
if metadata_hooks:
static_fields = set(self.core_raw_metadata)
@@ -172,6 +194,7 @@
if version is None:
version = self.hatch.version.cached
source = f'source `{self.hatch.version.source_name}`'
+ core_metadata._version_set = True
else:
source = 'field `project.version`'
@@ -304,6 +327,9 @@
self._optional_dependencies = None
self._dynamic = None
+ # Indicates that the version has been successfully set dynamically
+ self._version_set = False
+
@property
def raw_name(self):
"""
@@ -349,7 +375,7 @@
"""
if self._version is None:
if 'version' not in self.config:
- if 'version' not in self.dynamic:
+ if not self._version_set and 'version' not in self.dynamic:
raise ValueError(
'Field `project.version` can only be resolved
dynamically '
'if `version` is in field `project.dynamic`'
@@ -1123,7 +1149,10 @@
entries[get_normalized_dependency(requirement)] =
requirement
- normalized_option = normalize_project_name(option)
+ if self.hatch_metadata.allow_ambiguous_features:
+ normalized_option = option
+ else:
+ normalized_option = normalize_project_name(option)
if normalized_option in normalized_options:
raise ValueError(
f'Optional dependency groups
`{normalized_options[normalized_option]}` and `{option}` of '
@@ -1155,15 +1184,7 @@
https://peps.python.org/pep-0621/#dynamic
"""
if self._dynamic is None:
- dynamic = self.config.get('dynamic', [])
- if not isinstance(dynamic, list):
- raise TypeError('Field `project.dynamic` must be an array')
-
- for i, field in enumerate(dynamic, 1):
- if not isinstance(field, str):
- raise TypeError(f'Field #{i} of field `project.dynamic`
must be a string')
-
- self._dynamic = dynamic
+ self._dynamic = self.config.get('dynamic', [])
return self._dynamic
@@ -1327,6 +1348,7 @@
self.plugin_manager = plugin_manager
self._allow_direct_references = None
+ self._allow_ambiguous_features = None
self._hook_config = None
self._hooks = None
@@ -1342,6 +1364,18 @@
return self._allow_direct_references
@property
+ def allow_ambiguous_features(self):
+ # TODO: remove in the first minor release after Jan 1, 2024
+ if self._allow_ambiguous_features is None:
+ allow_ambiguous_features =
self.config.get('allow-ambiguous-features', False)
+ if not isinstance(allow_ambiguous_features, bool):
+ raise TypeError('Field
`tool.hatch.metadata.allow-ambiguous-features` must be a boolean')
+
+ self._allow_ambiguous_features = allow_ambiguous_features
+
+ return self._allow_ambiguous_features
+
+ @property
def hook_config(self):
if self._hook_config is None:
hook_config = self.config.get('hooks', {})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hatchling-1.9.0/src/hatchling/metadata/spec.py
new/hatchling-1.10.0/src/hatchling/metadata/spec.py
--- old/hatchling-1.9.0/src/hatchling/metadata/spec.py 2020-02-02
01:00:00.000000000 +0100
+++ new/hatchling-1.10.0/src/hatchling/metadata/spec.py 2020-02-02
01:00:00.000000000 +0100
@@ -138,6 +138,8 @@
for dependency in dependencies:
if ';' in dependency:
metadata_file += f'Requires-Dist: {dependency} and extra
== {option!r}\n'
+ elif '@ ' in dependency:
+ metadata_file += f'Requires-Dist: {dependency} ; extra ==
{option!r}\n'
else:
metadata_file += f'Requires-Dist: {dependency}; extra ==
{option!r}\n'
@@ -214,6 +216,8 @@
for dependency in dependencies:
if ';' in dependency:
metadata_file += f'Requires-Dist: {dependency} and extra
== {option!r}\n'
+ elif '@ ' in dependency:
+ metadata_file += f'Requires-Dist: {dependency} ; extra ==
{option!r}\n'
else:
metadata_file += f'Requires-Dist: {dependency}; extra ==
{option!r}\n'
@@ -282,6 +286,8 @@
for dependency in dependencies:
if ';' in dependency:
metadata_file += f'Requires-Dist: {dependency} and extra
== {option!r}\n'
+ elif '@ ' in dependency:
+ metadata_file += f'Requires-Dist: {dependency} ; extra ==
{option!r}\n'
else:
metadata_file += f'Requires-Dist: {dependency}; extra ==
{option!r}\n'