Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-flit-core for 
openSUSE:Factory checked in at 2023-09-08 21:15:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flit-core (Old)
 and      /work/SRC/openSUSE:Factory/.python-flit-core.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-flit-core"

Fri Sep  8 21:15:23 2023 rev:16 rq:1109507 version:3.9.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-flit-core/python-flit-core.changes        
2023-04-23 22:43:21.045317141 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-flit-core.new.1766/python-flit-core.changes  
    2023-09-08 21:16:05.547653053 +0200
@@ -1,0 +2,22 @@
+Thu Sep  7 10:50:43 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 3.9.0:
+  * New options :option:`flit build --use-vcs` and :option:`flit
+    build --no-use-vcs` to enable & disable including all
+    committed files in the sdist. For now --use-vcs is the
+    default, but this is likely to change in a
+    future version, to bring flit build in line with standard
+    build frontends like python -m build
+  * Sdist file names, and the name of the top-level folder in an
+    sdist, are now normalised, in accordance with PEP 625
+  * A statically defined version number can now be parsed from
+    files called version.py, _version.py or __version__.py inside
+    a packge, as well as from __init__.py, so executing code is
+    required in fewer cases
+  * Fix setting the flag for regular files in zip metadata
+  * The timestamp embedded in the gzip wrapper for sdists now
+    defaults to a fixed date, so building an sdist twice on the
+    same machine should produce identical results, even without
+    any special steps.
+
+-------------------------------------------------------------------

Old:
----
  flit_core-3.8.0.tar.gz

New:
----
  flit_core-3.9.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-flit-core.spec ++++++
--- /var/tmp/diff_new_pack.RhISQ5/_old  2023-09-08 21:16:06.723695085 +0200
+++ /var/tmp/diff_new_pack.RhISQ5/_new  2023-09-08 21:16:06.723695085 +0200
@@ -53,7 +53,7 @@
 %endif
 %{?sle15_python_module_pythons}
 Name:           %{pprefix}-flit-core%{?psuffix}
-Version:        3.8.0
+Version:        3.9.0
 Release:        0
 Summary:        Distribution-building parts of Flit
 License:        BSD-3-Clause AND MIT

++++++ flit_core-3.8.0.tar.gz -> flit_core-3.9.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flit_core-3.8.0/PKG-INFO new/flit_core-3.9.0/PKG-INFO
--- old/flit_core-3.8.0/PKG-INFO        1970-01-01 01:00:00.000000000 +0100
+++ new/flit_core-3.9.0/PKG-INFO        1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +1,22 @@
 Metadata-Version: 2.1
 Name: flit_core
-Version: 3.8.0
+Version: 3.9.0
 Summary: Distribution-building parts of Flit. See flit package for more 
information
 Author-email: Thomas Kluyver & contributors <tho...@kluyver.me.uk>
 Requires-Python: >=3.6
+Description-Content-Type: text/x-rst
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Project-URL: Documentation, https://flit.pypa.io
 Project-URL: Source, https://github.com/pypa/flit
+
+flit_core
+---------
+
+This provides a `PEP 517 <https://peps.python.org/pep-0517/>`_ build backend
+for packages using `Flit <https://pypi.org/project/flit/>`_.  The only public
+interface is the API specified by PEP 517, at ``flit_core.buildapi``.
+
+See the `Flit documentation <https://flit.pypa.io/en/stable/>`_ for more
+information.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flit_core-3.8.0/README.rst 
new/flit_core-3.9.0/README.rst
--- old/flit_core-3.8.0/README.rst      1970-01-01 01:00:00.000000000 +0100
+++ new/flit_core-3.9.0/README.rst      2023-05-14 16:43:38.926691000 +0200
@@ -0,0 +1,9 @@
+flit_core
+---------
+
+This provides a `PEP 517 <https://peps.python.org/pep-0517/>`_ build backend
+for packages using `Flit <https://pypi.org/project/flit/>`_.  The only public
+interface is the API specified by PEP 517, at ``flit_core.buildapi``.
+
+See the `Flit documentation <https://flit.pypa.io/en/stable/>`_ for more
+information.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flit_core-3.8.0/flit_core/__init__.py 
new/flit_core-3.9.0/flit_core/__init__.py
--- old/flit_core-3.8.0/flit_core/__init__.py   2022-11-05 14:06:27.382138300 
+0100
+++ new/flit_core-3.9.0/flit_core/__init__.py   2023-05-14 16:47:29.185487700 
+0200
@@ -4,4 +4,4 @@
 All the convenient development features live in the main 'flit' package.
 """
 
-__version__ = '3.8.0'
+__version__ = '3.9.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flit_core-3.8.0/flit_core/common.py 
new/flit_core-3.9.0/flit_core/common.py
--- old/flit_core-3.8.0/flit_core/common.py     2022-11-05 13:52:43.629104400 
+0100
+++ new/flit_core-3.9.0/flit_core/common.py     2023-05-14 16:43:38.927691200 
+0200
@@ -71,6 +71,21 @@
         else:
             return self.path
 
+    @property
+    def version_files(self):
+        """Files which will be parsed to find a version number
+
+        Files later in this list take precedence over earlier ones.
+        """
+        if self.is_package:
+            paths = [self.path / '__init__.py']
+            for filename in ('version.py', '_version.py', '__version__.py'):
+                if (self.path / filename).is_file():
+                    paths.insert(0, self.path / filename)
+            return paths
+        else:
+            return [self.path]
+
     def iter_files(self):
         """Iterate over the files contained in this module.
 
@@ -127,26 +142,26 @@
     Return a tuple like (docstring, version) for the given module,
     extracted by parsing its AST.
     """
-    # read as bytes to enable custom encodings
-    with target.file.open('rb') as f:
-        node = ast.parse(f.read())
-    for child in node.body:
-        # Only use the version from the given module if it's a simple
-        # string assignment to __version__
-        is_version_str = (
-                isinstance(child, ast.Assign)
-                and any(
-                    isinstance(target, ast.Name)
-                    and target.id == "__version__"
-                    for target in child.targets
-                )
-                and isinstance(child.value, ast.Str)
-        )
-        if is_version_str:
-            version = child.value.s
-            break
-    else:
-        version = None
+    version = None
+    for target_path in target.version_files:
+        # read as bytes to enable custom encodings
+        with target_path.open('rb') as f:
+            node = ast.parse(f.read())
+        for child in node.body:
+            # Only use the version from the given module if it's a simple
+            # string assignment to __version__
+            is_version_str = (
+                    isinstance(child, ast.Assign)
+                    and any(
+                        isinstance(target, ast.Name)
+                        and target.id == "__version__"
+                        for target in child.targets
+                    )
+                    and isinstance(child.value, ast.Str)
+            )
+            if is_version_str:
+                version = child.value.s
+                break
     return ast.get_docstring(node), version
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flit_core-3.8.0/flit_core/sdist.py 
new/flit_core-3.9.0/flit_core/sdist.py
--- old/flit_core-3.8.0/flit_core/sdist.py      2022-11-05 13:52:43.630104300 
+0100
+++ new/flit_core-3.9.0/flit_core/sdist.py      2023-05-14 16:43:38.928691100 
+0200
@@ -157,16 +157,17 @@
 
     @property
     def dir_name(self):
-        return '{}-{}'.format(self.metadata.name, self.metadata.version)
+        return common.normalize_dist_name(self.metadata.name, 
self.metadata.version)
 
     def build(self, target_dir, gen_setup_py=True):
         os.makedirs(str(target_dir), exist_ok=True)
-        target = target_dir / '{}-{}.tar.gz'.format(
-                self.metadata.name, self.metadata.version
-        )
+        target = target_dir / '{}.tar.gz'.format(self.dir_name)
         source_date_epoch = os.environ.get('SOURCE_DATE_EPOCH', '')
         mtime = int(source_date_epoch) if source_date_epoch else None
-        gz = GzipFile(str(target), mode='wb', mtime=mtime)
+        # For the gzip timestamp, default to 2016-1-1 00:00 (UTC)
+        # This makes the sdist reproducible even without SOURCE_DATE_EPOCH,
+        # if the source file mtimes don't change, i.e. from the same checkout.
+        gz = GzipFile(str(target), mode='wb', mtime=(mtime or 1451606400))
         tf = tarfile.TarFile(str(target), mode='w', fileobj=gz,
                              format=tarfile.PAX_FORMAT)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/flit_core-3.8.0/flit_core/tests/samples/imported_version/package1/__init__.py
 
new/flit_core-3.9.0/flit_core/tests/samples/imported_version/package1/__init__.py
--- 
old/flit_core-3.8.0/flit_core/tests/samples/imported_version/package1/__init__.py
   2022-11-05 13:52:43.630104300 +0100
+++ 
new/flit_core-3.9.0/flit_core/tests/samples/imported_version/package1/__init__.py
   2023-05-14 16:43:38.928691100 +0200
@@ -1,3 +1,5 @@
 """This module has a __version__ that requires a relative import"""
 
 from ._version import __version__
+
+import a_package_that_doesnt_exist
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/flit_core-3.8.0/flit_core/tests/samples/imported_version/package1/_version.py
 
new/flit_core-3.9.0/flit_core/tests/samples/imported_version/package1/_version.py
--- 
old/flit_core-3.8.0/flit_core/tests/samples/imported_version/package1/_version.py
   2022-11-05 13:52:43.630104300 +0100
+++ 
new/flit_core-3.9.0/flit_core/tests/samples/imported_version/package1/_version.py
   2023-05-14 16:43:38.928691100 +0200
@@ -1 +1,3 @@
+"""Imposter docstring that shouldn't be used"""
+
 __version__ = '0.5.8'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/flit_core-3.8.0/flit_core/tests/samples/normalization/pyproject.toml 
new/flit_core-3.9.0/flit_core/tests/samples/normalization/pyproject.toml
--- old/flit_core-3.8.0/flit_core/tests/samples/normalization/pyproject.toml    
2022-11-05 13:52:43.630104300 +0100
+++ new/flit_core-3.9.0/flit_core/tests/samples/normalization/pyproject.toml    
2023-05-14 16:43:38.928691100 +0200
@@ -5,7 +5,7 @@
 [project]
 name = "my-python-module"
 version = "0.0.1"
-description = "Hyphenated package name, infered import name"
+description = "Hyphenated package name, inferred import name"
 authors = [
     {name = "Sir Robin", email = "ro...@camelot.uk"}
 ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flit_core-3.8.0/flit_core/tests/test_sdist.py 
new/flit_core-3.9.0/flit_core/tests/test_sdist.py
--- old/flit_core-3.8.0/flit_core/tests/test_sdist.py   2022-11-05 
13:52:43.631104500 +0100
+++ new/flit_core-3.9.0/flit_core/tests/test_sdist.py   2023-05-14 
16:43:38.929691000 +0200
@@ -59,3 +59,12 @@
     files = builder.apply_includes_excludes(builder.select_files())
 
     assert osp.join('data', 'share', 'man', 'man1', 'foo.1') in files
+
+
+def test_pep625(tmp_path):
+    builder = sdist.SdistBuilder.from_ini_path(
+        samples_dir / 'normalization' / 'pyproject.toml'
+    )
+    path = builder.build(tmp_path)
+    assert path == tmp_path / 'my_python_module-0.0.1.tar.gz'
+    assert_isfile(path)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flit_core-3.8.0/flit_core/wheel.py 
new/flit_core-3.9.0/flit_core/wheel.py
--- old/flit_core-3.8.0/flit_core/wheel.py      2022-11-05 13:52:43.631104500 
+0100
+++ new/flit_core-3.9.0/flit_core/wheel.py      2023-05-14 16:43:38.930691200 
+0200
@@ -33,7 +33,7 @@
 
 
 def _set_zinfo_mode(zinfo, mode):
-    # Set the bits for the mode and bit 0xFFFF for “regular file”
+    # Set the bits for the mode
     zinfo.external_attr = mode << 16
 
 
@@ -147,7 +147,8 @@
         # give you the exact same result.
         date_time = self.source_time_stamp or (2016, 1, 1, 0, 0, 0)
         zi = zipfile.ZipInfo(rel_path, date_time)
-        _set_zinfo_mode(zi, mode)
+        # Also sets bit 0x8000 for "regular file" (S_IFREG)
+        _set_zinfo_mode(zi, mode | stat.S_IFREG)
         b = sio.getvalue().encode('utf-8')
         hashsum = hashlib.sha256(b)
         hash_digest = 
urlsafe_b64encode(hashsum.digest()).decode('ascii').rstrip('=')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flit_core-3.8.0/pyproject.toml 
new/flit_core-3.9.0/pyproject.toml
--- old/flit_core-3.8.0/pyproject.toml  2022-11-05 13:52:43.631104500 +0100
+++ new/flit_core-3.9.0/pyproject.toml  2023-05-14 16:43:38.931691200 +0200
@@ -11,6 +11,7 @@
 description = "Distribution-building parts of Flit. See flit package for more 
information"
 dependencies = []
 requires-python = '>=3.6'
+readme = "README.rst"
 license = {file = "LICENSE"}
 classifiers = [
     "License :: OSI Approved :: BSD License",
@@ -19,6 +20,7 @@
 dynamic = ["version"]
 
 [project.urls]
+Documentation = "https://flit.pypa.io";
 Source = "https://github.com/pypa/flit";
 
 [tool.flit.sdist]

Reply via email to