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 2023-02-11 21:55:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-hatchling (Old) and /work/SRC/openSUSE:Factory/.python-hatchling.new.1848 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hatchling" Sat Feb 11 21:55:50 2023 rev:14 rq:1064172 version:1.13.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-hatchling/python-hatchling.changes 2023-01-09 17:23:23.427018522 +0100 +++ /work/SRC/openSUSE:Factory/.python-hatchling.new.1848/python-hatchling.changes 2023-02-11 21:55:52.651082429 +0100 @@ -1,0 +2,6 @@ +Thu Feb 9 17:13:34 UTC 2023 - Benoît Monin <benoit.mo...@gmx.fr> + +- update to 1.13.0: + * Update the set of known trove classifiers to version 2023.2.8 + +------------------------------------------------------------------- Old: ---- hatchling-1.12.2.tar.gz New: ---- hatchling-1.13.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-hatchling.spec ++++++ --- /var/tmp/diff_new_pack.gpnnaD/_old 2023-02-11 21:55:53.743089227 +0100 +++ /var/tmp/diff_new_pack.gpnnaD/_new 2023-02-11 21:55:53.747089252 +0100 @@ -17,7 +17,7 @@ Name: python-hatchling -Version: 1.12.2 +Version: 1.13.0 Release: 0 Summary: Build backend used by Hatch License: MIT ++++++ hatchling-1.12.2.tar.gz -> hatchling-1.13.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/PKG-INFO new/hatchling-1.13.0/PKG-INFO --- old/hatchling-1.12.2/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: hatchling -Version: 1.12.2 +Version: 1.13.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.12.2/src/hatchling/__about__.py new/hatchling-1.13.0/src/hatchling/__about__.py --- old/hatchling-1.12.2/src/hatchling/__about__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/__about__.py 2020-02-02 01:00:00.000000000 +0100 @@ -1 +1 @@ -__version__ = '1.12.2' +__version__ = '1.13.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/src/hatchling/bridge/app.py new/hatchling-1.13.0/src/hatchling/bridge/app.py --- old/hatchling-1.12.2/src/hatchling/bridge/app.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/bridge/app.py 2020-02-02 01:00:00.000000000 +0100 @@ -95,7 +95,7 @@ Meant to be used for messages that are not useful for most user experiences. The `level` option must be between 1 and 3 (inclusive). """ - if not 1 <= level <= 3: + if not 1 <= level <= 3: # noqa: PLR2004 error_message = 'Debug output can only have verbosity levels between 1 and 3 (inclusive)' raise ValueError(error_message) elif self.__verbosity >= level: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/src/hatchling/builders/plugin/interface.py new/hatchling-1.13.0/src/hatchling/builders/plugin/interface.py --- old/hatchling-1.12.2/src/hatchling/builders/plugin/interface.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/builders/plugin/interface.py 2020-02-02 01:00:00.000000000 +0100 @@ -3,7 +3,7 @@ import os import re from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Any, Callable, Generator, Generic, cast +from typing import TYPE_CHECKING, Any, Callable, Generator, Generic, Iterable, cast from hatchling.builders.config import BuilderConfig, BuilderConfigBound, env_var_enabled from hatchling.builders.constants import EXCLUDED_DIRECTORIES, BuildEnvVars @@ -93,10 +93,11 @@ self.metadata.validate_fields() if directory is None: - if BuildEnvVars.LOCATION in os.environ: - directory = self.config.normalize_build_directory(os.environ[BuildEnvVars.LOCATION]) - else: - directory = self.config.directory + directory = ( + self.config.normalize_build_directory(os.environ[BuildEnvVars.LOCATION]) + if BuildEnvVars.LOCATION in os.environ + else self.config.directory + ) if not os.path.isdir(directory): os.makedirs(directory) @@ -166,7 +167,7 @@ yield artifact - def recurse_included_files(self) -> Generator[IncludedFile, None, None]: + def recurse_included_files(self) -> Iterable[IncludedFile]: """ Returns a consistently generated series of file objects for every file that should be distributed. Each file object has three `str` attributes: @@ -182,7 +183,7 @@ yield from self.recurse_forced_files(self.config.get_force_include()) - def recurse_project_files(self) -> Generator[IncludedFile, None, None]: + def recurse_project_files(self) -> Iterable[IncludedFile]: for root, dirs, files in safe_walk(self.root): relative_path = get_relative_path(root, self.root) @@ -197,7 +198,7 @@ os.path.join(root, f), relative_file_path, self.config.get_distribution_path(relative_file_path) ) - def recurse_forced_files(self, inclusion_map: dict[str, str]) -> Generator[IncludedFile, None, None]: + def recurse_forced_files(self, inclusion_map: dict[str, str]) -> Iterable[IncludedFile]: for source, target_path in inclusion_map.items(): external = not source.startswith(self.root) if os.path.isfile(source): @@ -222,7 +223,7 @@ self.config.get_distribution_path(relative_file_path), ) - def recurse_explicit_files(self, inclusion_map: dict[str, str]) -> Generator[IncludedFile, None, None]: + def recurse_explicit_files(self, inclusion_map: dict[str, str]) -> Iterable[IncludedFile]: for source, target_path in inclusion_map.items(): external = not source.startswith(self.root) if os.path.isfile(source): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/src/hatchling/builders/sdist.py new/hatchling-1.13.0/src/hatchling/builders/sdist.py --- old/hatchling-1.12.2/src/hatchling/builders/sdist.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/builders/sdist.py 2020-02-02 01:00:00.000000000 +0100 @@ -33,13 +33,7 @@ """ self.name = name self.reproducible = reproducible - - timestamp: int | None - if reproducible: - timestamp = get_reproducible_timestamp() - else: - timestamp = None - self.timestamp = timestamp + self.timestamp: int | None = get_reproducible_timestamp() if reproducible else None raw_fd, self.path = tempfile.mkstemp(suffix='.tar.gz') self.fd = os.fdopen(raw_fd, 'w+b') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/src/hatchling/builders/utils.py new/hatchling-1.13.0/src/hatchling/builders/utils.py --- old/hatchling-1.12.2/src/hatchling/builders/utils.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/builders/utils.py 2020-02-02 01:00:00.000000000 +0100 @@ -3,7 +3,7 @@ import os import shutil from base64 import urlsafe_b64encode -from typing import TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Iterable if TYPE_CHECKING: from zipfile import ZipInfo @@ -18,7 +18,7 @@ os.remove(src) -def safe_walk(path: str) -> Generator: +def safe_walk(path: str) -> Iterable[tuple[str, list[str], list[str]]]: seen = set() for root, dirs, files in os.walk(path, followlinks=True): stat = os.stat(root) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/src/hatchling/metadata/classifiers.py new/hatchling-1.13.0/src/hatchling/metadata/classifiers.py --- old/hatchling-1.12.2/src/hatchling/metadata/classifiers.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/metadata/classifiers.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,4 +1,4 @@ -VERSION = '2022.12.22' +VERSION = '2023.2.8' SORTED_CLASSIFIERS = [ 'Development Status :: 1 - Planning', @@ -65,6 +65,9 @@ 'Environment :: Web Environment :: Buffet', 'Environment :: Web Environment :: Mozilla', 'Environment :: Web Environment :: ToscaWidgets', + 'Environment :: WebAssembly', + 'Environment :: WebAssembly :: Emscripten', + 'Environment :: WebAssembly :: WASI', 'Environment :: Win32 (MS Windows)', 'Environment :: X11 Applications', 'Environment :: X11 Applications :: GTK', @@ -178,7 +181,10 @@ 'Framework :: Plone :: 6.0', 'Framework :: Plone :: Addon', 'Framework :: Plone :: Core', + 'Framework :: Plone :: Distribution', 'Framework :: Plone :: Theme', + 'Framework :: Pydantic', + 'Framework :: Pydantic :: 1', 'Framework :: Pylons', 'Framework :: Pyramid', 'Framework :: Pytest', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/src/hatchling/metadata/core.py new/hatchling-1.13.0/src/hatchling/metadata/core.py --- old/hatchling-1.12.2/src/hatchling/metadata/core.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/metadata/core.py 2020-02-02 01:00:00.000000000 +0100 @@ -202,10 +202,11 @@ message = 'The `tool.hatch` configuration must be a table' raise TypeError(message) - if self._project_file is not None: - hatch_file = os.path.join(os.path.dirname(self._project_file), DEFAULT_CONFIG_FILE) - else: - hatch_file = locate_file(self.root, DEFAULT_CONFIG_FILE) or '' + hatch_file = ( + os.path.join(os.path.dirname(self._project_file), DEFAULT_CONFIG_FILE) + if self._project_file is not None + else locate_file(self.root, DEFAULT_CONFIG_FILE) or '' + ) if hatch_file and os.path.isfile(hatch_file): config = load_toml(hatch_file) @@ -379,11 +380,8 @@ if 'name' in self.dynamic: message = 'Static metadata field `name` cannot be present in field `project.dynamic`' raise ValueError(message) - elif 'name' in self.config: - raw_name = self.config['name'] - else: - raw_name = '' + raw_name = self.config.get('name', '') if not raw_name: message = 'Missing required field `project.name`' raise ValueError(message) @@ -624,10 +622,12 @@ @property def python_constraint(self) -> SpecifierSet: + from packaging.specifiers import SpecifierSet + if self._python_constraint is None: _ = self.requires_python - return self._python_constraint + return cast(SpecifierSet, self._python_constraint) @property def license(self) -> str: # noqa: A003 @@ -1271,10 +1271,9 @@ entries[get_normalized_dependency(requirement)] = requirement - if self.hatch_metadata.allow_ambiguous_features: - normalized_option = option - else: - normalized_option = normalize_project_name(option) + normalized_option = ( + option if self.hatch_metadata.allow_ambiguous_features else normalize_project_name(option) + ) if normalized_option in normalized_options: message = ( f'Optional dependency groups `{normalized_options[normalized_option]}` and `{option}` of ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/src/hatchling/plugin/manager.py new/hatchling-1.13.0/src/hatchling/plugin/manager.py --- old/hatchling-1.12.2/src/hatchling/plugin/manager.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/plugin/manager.py 2020-02-02 01:00:00.000000000 +0100 @@ -16,7 +16,7 @@ self.manager.add_hookspecs(specs) - def __getattr__(self, name: str) -> 'ClassRegister': + def __getattr__(self, name: str) -> ClassRegister: if not self.initialized: self.initialize() self.initialized = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/src/hatchling/utils/context.py new/hatchling-1.13.0/src/hatchling/utils/context.py --- old/hatchling-1.12.2/src/hatchling/utils/context.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/utils/context.py 2020-02-02 01:00:00.000000000 +0100 @@ -124,8 +124,8 @@ # # TODO remove type ignore after https://github.com/python/typeshed/pull/9228 used_args = set() # type: ignore[var-annotated] - result, _ = self._vformat(format_string, args, kwargs, used_args, 10) # type: ignore[attr-defined] - self.check_unused_args(used_args, args, kwargs) # type: ignore[arg-type] + result, _ = self._vformat(format_string, args, kwargs, used_args, 10) + self.check_unused_args(used_args, args, kwargs) return result def get_value(self, key: int | str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/src/hatchling/version/scheme/standard.py new/hatchling-1.13.0/src/hatchling/version/scheme/standard.py --- old/hatchling-1.12.2/src/hatchling/version/scheme/standard.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/src/hatchling/version/scheme/standard.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, Tuple, cast from hatchling.version.scheme.plugin.interface import VersionSchemeInterface @@ -16,7 +16,7 @@ PLUGIN_NAME = 'standard' def update(self, desired_version: str, original_version: str, version_data: dict) -> str: - from packaging.version import Version, _parse_letter_version + from packaging.version import Version original = Version(original_version) versions = desired_version.split(',') @@ -33,16 +33,16 @@ original, release=update_release(original, [original.major, original.minor, original.micro + 1]) ) elif version in ('a', 'b', 'c', 'rc', 'alpha', 'beta', 'pre', 'preview'): - phase, number = _parse_letter_version(version, 0) + phase, number = parse_letter_version(version, 0) if original.pre: - current_phase, current_number = _parse_letter_version(*original.pre) + current_phase, current_number = parse_letter_version(*original.pre) if phase == current_phase: number = current_number + 1 reset_version_parts(original, pre=(phase, number)) elif version in ('post', 'rev', 'r'): number = 0 if original.post is None else original.post + 1 - reset_version_parts(original, post=_parse_letter_version(version, number)) + reset_version_parts(original, post=parse_letter_version(version, number)) elif version == 'dev': number = 0 if original.dev is None else original.dev + 1 reset_version_parts(original, dev=(version, number)) @@ -86,3 +86,9 @@ new_release_parts.append(0) return tuple(new_release_parts) + + +def parse_letter_version(*args: Any, **kwargs: Any) -> tuple[str, int]: + from packaging.version import _parse_letter_version + + return cast(Tuple[str, int], _parse_letter_version(*args, **kwargs)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.2/tests/downstream/integrate.py new/hatchling-1.13.0/tests/downstream/integrate.py --- old/hatchling-1.12.2/tests/downstream/integrate.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.13.0/tests/downstream/integrate.py 2020-02-02 01:00:00.000000000 +0100 @@ -23,7 +23,7 @@ def handle_remove_readonly(func, path, exc): # no cov # PermissionError: [WinError 5] Access is denied: '...\\.git\\...' if func in (os.rmdir, os.remove, os.unlink) and exc[1].errno == errno.EACCES: - os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) + os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) # noqa: S103 func(path) else: raise @@ -61,7 +61,7 @@ def download_file(url, file_name): - response = requests.get(url, stream=True) + response = requests.get(url, stream=True, timeout=20) with open(file_name, 'wb') as f: for chunk in response.iter_content(16384): f.write(chunk)