[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1106832: unblock: yapf/0.40.2-3



Package: release.debian.org
Severity: normal
X-Debbugs-Cc: yapf@packages.debian.org
Control: affects -1 + src:yapf
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package yapf

[ Reason ]
yapf is a key package and needs manual unblock

[ Impact ]
The version currenlty in testing states
 "This package installs the tool for Python 2."
which is midly confusing.

[ Tests ]
Autopkgtest and autopkgtests of rdeps all successfull.
+ Santiago did a mass rebuild of everything.

[ Risks ]
Some unrelated package _might_ still have an undeclared
dependency on python3-importlib-metadata;
but then bug would be in these other packages.
(again mass rebuild found nothing)

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing  --> hereunder

[ Other info ]
I did not noticed this was a key package,
so the debdiff is bigger that it could have been.

unblock yapf/0.40.2-3



diff -Nru yapf-0.40.2/debian/changelog yapf-0.40.2/debian/changelog
--- yapf-0.40.2/debian/changelog        2025-01-17 14:18:39.000000000 +0100
+++ yapf-0.40.2/debian/changelog        2025-05-10 20:15:59.000000000 +0200
@@ -1,3 +1,11 @@
+yapf (0.40.2-3) unstable; urgency=medium
+
+  * Team Upload
+  * Remove usage of python3-importlib-metadata
+  * Remove Python2 vs 3 crumbs from debian/{control,rules}
+
+ -- Alexandre Detiste <tchet@debian.org>  Sat, 10 May 2025 20:15:59 +0200
+
 yapf (0.40.2-2) unstable; urgency=medium
 
   * Team Upload
diff -Nru yapf-0.40.2/debian/control yapf-0.40.2/debian/control
--- yapf-0.40.2/debian/control  2025-01-17 14:03:20.000000000 +0100
+++ yapf-0.40.2/debian/control  2025-05-10 20:15:55.000000000 +0200
@@ -2,40 +2,43 @@
 Section: python
 Priority: optional
 Maintainer: Debian Python Team <team+python@tracker.debian.org>
-Uploaders: Ana Custura <ana@netstat.org.uk>,
-Build-Depends: debhelper-compat (= 13),
-               dh-sequence-python3,
-               pybuild-plugin-pyproject,
-               python3-all,
-               python3-importlib-metadata,
-               python3-platformdirs,
-               python3-pytest,
-               python3-setuptools,
-               python3-tomli
+Uploaders:
+ Ana Custura <ana@netstat.org.uk>,
+Build-Depends:
+ debhelper-compat (= 13),
+ dh-sequence-python3,
+ pybuild-plugin-pyproject,
+ python3-all,
+ python3-platformdirs,
+ python3-pytest,
+ python3-setuptools,
+ python3-tomli,
 Rules-Requires-Root: no
-Standards-Version: 4.6.2
+Standards-Version: 4.7.2
 Homepage: https://github.com/google/yapf
 Vcs-Git: https://salsa.debian.org/python-team/packages/yapf.git
 Vcs-Browser: https://salsa.debian.org/python-team/packages/yapf
+X-Style: black
 
 Package: python3-yapf
 Architecture: all
-Depends: ${misc:Depends},
-         ${python3:Depends},
+Depends:
+ ${misc:Depends},
+ ${python3:Depends},
 Description: public modules for yapf (Python 3)
  Yapf is a tool that reformats code to the best formatting that conforms to the
  style guide. It is not only concerned with lint errors, but also with the
  stylistic appearance of Python code. The idea is also similar to the 'gofmt'
- tool for the Go programming language. This package installs the tool for Python
- 2.
+ tool for the Go programming language.
  .
  This package provides the modules for Python 3.
 
 Package: yapf3
 Architecture: all
-Depends: ${misc:Depends},
-         ${python3:Depends},
-         python3-yapf (= ${binary:Version})
+Depends:
+ python3-yapf (= ${binary:Version}),
+ ${misc:Depends},
+ ${python3:Depends},
 Description: Python code formatter for different styles (Python 3)
  Yapf is a tool that reformats code to the best formatting that conforms to the
  style guide. It is not only concerned with lint errors, but also with the
@@ -43,4 +46,4 @@
  tool for the Go programming language. This package installs the tool for Python
  3.
  .
- This package provides the command-line interface for Python 3.
+ This package provides the command-line interface.
diff -Nru yapf-0.40.2/debian/patches/remove-importlib_metadata.patch yapf-0.40.2/debian/patches/remove-importlib_metadata.patch
--- yapf-0.40.2/debian/patches/remove-importlib_metadata.patch  1970-01-01 01:00:00.000000000 +0100
+++ yapf-0.40.2/debian/patches/remove-importlib_metadata.patch  2025-05-10 20:07:18.000000000 +0200
@@ -0,0 +1,34 @@
+Forwared: no, usage already removed upstream
+
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -28,7 +28,6 @@
+     'Topic :: Software Development :: Quality Assurance',
+ ]
+ dependencies = [
+-    'importlib-metadata>=6.6.0',
+     'platformdirs>=3.5.1',
+     'tomli>=2.0.1',
+ ]
+--- a/third_party/yapf_third_party/_ylib2to3/pgen2/driver.py
++++ b/third_party/yapf_third_party/_ylib2to3/pgen2/driver.py
+@@ -31,7 +31,7 @@
+ from typing import List
+ from typing import Optional
+ 
+-from importlib_metadata import metadata
++from importlib.metadata import metadata
+ from platformdirs import user_cache_dir
+ 
+ # Pgen imports
+--- a/yapf/__init__.py
++++ b/yapf/__init__.py
+@@ -33,7 +33,7 @@
+ import os
+ import sys
+ 
+-from importlib_metadata import metadata
++from importlib.metadata import metadata
+ 
+ from yapf.yapflib import errors
+ from yapf.yapflib import file_resources
diff -Nru yapf-0.40.2/debian/patches/series yapf-0.40.2/debian/patches/series
--- yapf-0.40.2/debian/patches/series   1970-01-01 01:00:00.000000000 +0100
+++ yapf-0.40.2/debian/patches/series   2025-05-10 20:05:45.000000000 +0200
@@ -0,0 +1 @@
+remove-importlib_metadata.patch
diff -Nru yapf-0.40.2/debian/rules yapf-0.40.2/debian/rules
--- yapf-0.40.2/debian/rules    2024-05-23 21:08:39.000000000 +0200
+++ yapf-0.40.2/debian/rules    2025-05-10 20:07:49.000000000 +0200
@@ -2,12 +2,11 @@
 #export DH_VERBOSE = 1
 
 export PYBUILD_NAME=yapf
-export PYBUILD_DESTDIR_python3=debian/python3-${PYBUILD_NAME}
+export PYBUILD_DESTDIR=debian/python3-${PYBUILD_NAME}
 
 %:
        dh $@  --buildsystem=pybuild --verbose
 
-override_dh_auto_install:
-       dh_auto_install
-       dh_movefiles --package=yapf3 --sourcedir=$(PYBUILD_DESTDIR_python3) usr/bin
+execute_after_dh_auto_install:
+       dh_movefiles --package=yapf3 --sourcedir=$(PYBUILD_DESTDIR) usr/bin
        (cd $(CURDIR)/debian/yapf3 && mv ./usr/bin/yapf ./usr/bin/yapf3)
diff -Nru yapf-0.40.2/debian/tests/control yapf-0.40.2/debian/tests/control
--- yapf-0.40.2/debian/tests/control    2024-05-23 21:07:38.000000000 +0200
+++ yapf-0.40.2/debian/tests/control    2025-05-10 20:15:55.000000000 +0200
@@ -6,5 +6,9 @@
  ; $py -c "import yapf; print(yapf)"
  ; $py -m pytest -v
  ; done
-Depends: python3-all, python3-yapf, python3-pytest
-Restrictions: allow-stderr
+Depends:
+ python3-all,
+ python3-pytest,
+ python3-yapf,
+Restrictions:
+ allow-stderr,


Reply to: