Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-flake8-pyi for 
openSUSE:Factory checked in at 2023-03-06 18:56:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flake8-pyi (Old)
 and      /work/SRC/openSUSE:Factory/.python-flake8-pyi.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-flake8-pyi"

Mon Mar  6 18:56:59 2023 rev:9 rq:1069697 version:23.1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-flake8-pyi/python-flake8-pyi.changes      
2022-12-06 14:24:41.502300177 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-flake8-pyi.new.31432/python-flake8-pyi.changes
   2023-03-06 18:57:00.473110616 +0100
@@ -1,0 +2,56 @@
+Mon Mar  6 15:53:17 UTC 2023 - Daniel Garcia <daniel.gar...@suse.com>
+
+- Add set-tests-python-path.patch to fix tests inside osc build
+  environment, running the flake8 process with shell=True and forcing
+  the PYTHONPATH.
+- Update to 23.1.2:
+  * Y011/Y014/Y015: Increase the maximum character length of literal
+    numbers in default values from 7 to 10, allowing hexadecimal
+    representation of 32-bit integers. Contributed by Avasam.
+- 23.1.1
+New error codes:
+  * Y052: Disallow default values in global or class namespaces where
+    the assignment does not have a type annotation. Stubs should be
+    explicit about the type of all variables in the stub; without type
+    annotations, the type checker is forced to make inferences, which
+    may have unpredictable consequences. Enum members are excluded
+    from this check, as are various special assignments such as
+    __all__ and __match_args__.
+Other changes:
+  * Disallow numeric default values where len(str(default)) > 7. If a
+    function has a default value where the string representation is
+    greater than 7 characters, it is likely to be an implementation
+    detail or a constant that varies depending on the system you're
+    running on, such as sys.maxsize.
+  * Disallow str or bytes defaults where the default is >50 characters
+    long, for similar reasons.
+  * Allow ast.Attribute nodes as default values for a small number of
+    special cases, such as sys.maxsize and sys.executable.
+  * Fewer Y020 false positives are now emitted when encountering
+    default values in stub files.
+- 23.1.0
+Bugfixes:
+  * Do not emit Y020 (quoted annotations) for strings in parameter defaults.
+  * Fix checking of defaults for functions with positional-only parameters.
+Other changes:
+  * Modify Y036 so that _typeshed.Unused is allowed as an annotation
+    for parameters in __(a)exit__ methods. Contributed by Avasam
+  * Several changes have been made to error codes relating to imports:
+    - The Y027 error code has been removed.
+    - All errors that used to result in Y027 being emitted now result
+      in Y022 being emitted instead.
+    - Some errors that used to result in Y023 being emitted now result
+      in Y022 being emitted instead.
+    - typing.Match and typing.Pattern have been added to the list of
+      imports banned by Y022. Use re.Match and re.Pattern instead.
+  * flake8-pyi no longer supports stub files that aim to support
+    Python 2. If your stubs need to support Python 2, pin flake8-pyi
+    to 22.11.0 or lower.
+  * Y011, Y014 and Y015 have all been significantly relaxed. None,
+    bools, ints, floats, complex numbers, strings and bytes are all
+    now allowed as default values for parameter annotations or
+    assignments.
+  * Hatchling is now used as the build backend. This should have
+    minimal, if any, user-facing impact.
+
+-------------------------------------------------------------------

Old:
----
  flake8-pyi-22.11.0.tar.gz

New:
----
  flake8_pyi-23.1.2.tar.gz
  set-tests-python-path.patch

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

Other differences:
------------------
++++++ python-flake8-pyi.spec ++++++
--- /var/tmp/diff_new_pack.qvEXhA/_old  2023-03-06 18:57:01.093113780 +0100
+++ /var/tmp/diff_new_pack.qvEXhA/_new  2023-03-06 18:57:01.101113820 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-flake8-pyi
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,16 +18,21 @@
 
 %define skip_python2 1
 Name:           python-flake8-pyi
-Version:        22.11.0
+Version:        23.1.2
 Release:        0
 Summary:        A plugin for flake8 to enable linting .pyi files
 License:        MIT
 Group:          Development/Languages/Python
 URL:            https://github.com/ambv/flake8-pyi
-Source:         
https://files.pythonhosted.org/packages/source/f/flake8-pyi/flake8-pyi-%{version}.tar.gz
+Source:         
https://files.pythonhosted.org/packages/source/f/flake8-pyi/flake8_pyi-%{version}.tar.gz
+# PATCH-FIX-OPENSUSE set-tests-python-path.patch, patch to fix
+# PYTHONPATH resolution for tests running inside osc
+Patch0:         set-tests-python-path.patch
 BuildRequires:  %{python_module ast-decompiler}
 BuildRequires:  %{python_module base >= 3.6.0}
-BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module hatchling}
+BuildRequires:  %{python_module pip}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  python-rpm-macros
 # SECTION test requirements
 BuildRequires:  %{python_module attrs}
@@ -35,6 +40,8 @@
 BuildRequires:  %{python_module pyflakes >= 2.1.1}
 # Use pytest directly to bypass setup.py test dependencies
 BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module black}
+BuildRequires:  %{python_module flake8-bugbear}
 BuildRequires:  %{python_module typing}
 # /SECTION
 BuildRequires:  fdupes
@@ -52,14 +59,14 @@
 files. Especially interesting for linting typeshed.
 
 %prep
-%autosetup -p1 -n flake8-pyi-%{version}
+%autosetup -p1 -n flake8_pyi-%{version}
 sed -i '1{\,^#!%{_bindir}/env python,d}' pyi.py
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
@@ -70,6 +77,6 @@
 %doc README.md
 %{python_sitelib}/pyi.py*
 %{pycache_only %{python_sitelib}/__pycache__/pyi.*.py*}
-%{python_sitelib}/flake8_pyi-%{version}-*.egg-info
+%{python_sitelib}/flake8_pyi-%{version}*-info
 
 %changelog

++++++ set-tests-python-path.patch ++++++
Index: flake8_pyi-23.1.2/tests/test_pyi_files.py
===================================================================
--- flake8_pyi-23.1.2.orig/tests/test_pyi_files.py
+++ flake8_pyi-23.1.2/tests/test_pyi_files.py
@@ -35,16 +35,21 @@ def test_pyi_file(path: str) -> None:
             message = line[match.end() : end_pos].strip()
             expected_output += f"{path}:{lineno}: {match.group(1)}{message}\n"
 
+    pythonpath = os.environ.get("PYTHONPATH")
+    pythonpath = f"PYTHONPATH={pythonpath}:."
+
     run_results = [
         # Passing a file on command line
         subprocess.run(
-            ["flake8", "-j0", *flags, path],
+            " ".join([pythonpath, "flake8", "-j0", *flags, path]),
+            shell=True,
             env={**os.environ, "PYTHONPATH": "."},
             stdout=subprocess.PIPE,
         ),
         # Passing "-" as the file, and reading from stdin instead
         subprocess.run(
-            ["flake8", "-j0", "--stdin-display-name", path, *flags, "-"],
+            " ".join([pythonpath, "flake8", "-j0", "--stdin-display-name", 
path, *flags, "-"]),
+            shell=True,
             env={**os.environ, "PYTHONPATH": "."},
             input=file_contents.encode("utf-8"),
             stdout=subprocess.PIPE,

Reply via email to