forked from pool/python-pylint-ignore
Accepting request 992426 from devel:languages:python
- Update to 2022.1025: * Pin pylint to <2.13 - Add patch no-more-pathlib2.patch: * Use pathlib rather than pathlib2. - Drop {Build,}Requires on pathlib2 OBS-URL: https://build.opensuse.org/request/show/992426 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pylint-ignore?expand=0&rev=2
This commit is contained in:
104
no-more-pathlib2.patch
Normal file
104
no-more-pathlib2.patch
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
From 16370c44b65acf5e53c4d27a9ce298ca25df6fc6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steve Kowalik <steven@wedontsleep.org>
|
||||||
|
Date: Wed, 3 Aug 2022 15:03:39 +1000
|
||||||
|
Subject: [PATCH] Remove use of pathlib2
|
||||||
|
|
||||||
|
pathlib has been included in the Python standard library since 3.4,
|
||||||
|
and since the lowest supported version of Python is now above that, we
|
||||||
|
can remove the external dependency and use pathlib directly. As a
|
||||||
|
drive-by, also remove a bunch of __future__ imports.
|
||||||
|
---
|
||||||
|
requirements/pypi.txt | 1 -
|
||||||
|
setup.cfg | 2 +-
|
||||||
|
src/pylint_ignore/__main__.py | 2 +-
|
||||||
|
src/pylint_ignore/ignorefile.py | 2 +-
|
||||||
|
test/test_ignorefile.py | 7 +------
|
||||||
|
test/test_main.py | 7 +------
|
||||||
|
6 files changed, 5 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/requirements/pypi.txt b/requirements/pypi.txt
|
||||||
|
index e652814..392001a 100644
|
||||||
|
--- a/requirements/pypi.txt
|
||||||
|
+++ b/requirements/pypi.txt
|
||||||
|
@@ -9,5 +9,4 @@
|
||||||
|
|
||||||
|
astroid>2.1.0
|
||||||
|
pylint<2.13
|
||||||
|
-pathlib2
|
||||||
|
pylev
|
||||||
|
diff --git a/src/pylint_ignore/__main__.py b/src/pylint_ignore/__main__.py
|
||||||
|
index f17c12b..03021a5 100755
|
||||||
|
--- a/src/pylint_ignore/__main__.py
|
||||||
|
+++ b/src/pylint_ignore/__main__.py
|
||||||
|
@@ -23,8 +23,8 @@
|
||||||
|
import functools as ft
|
||||||
|
import subprocess as sp
|
||||||
|
import multiprocessing as mp
|
||||||
|
+import pathlib as pl
|
||||||
|
|
||||||
|
-import pathlib2 as pl
|
||||||
|
import pylint.lint
|
||||||
|
from pylint.lint.pylinter import PyLinter
|
||||||
|
|
||||||
|
diff --git a/src/pylint_ignore/ignorefile.py b/src/pylint_ignore/ignorefile.py
|
||||||
|
index a26139b..df2c5a7 100644
|
||||||
|
--- a/src/pylint_ignore/ignorefile.py
|
||||||
|
+++ b/src/pylint_ignore/ignorefile.py
|
||||||
|
@@ -9,9 +9,9 @@
|
||||||
|
import hashlib
|
||||||
|
import logging
|
||||||
|
import collections
|
||||||
|
+import pathlib as pl
|
||||||
|
|
||||||
|
import pylev
|
||||||
|
-import pathlib2 as pl
|
||||||
|
|
||||||
|
logger = logging.getLogger('pylint_ignore')
|
||||||
|
|
||||||
|
diff --git a/test/test_ignorefile.py b/test/test_ignorefile.py
|
||||||
|
index d7835a4..5b4fd3f 100644
|
||||||
|
--- a/test/test_ignorefile.py
|
||||||
|
+++ b/test/test_ignorefile.py
|
||||||
|
@@ -2,18 +2,13 @@
|
||||||
|
# pylint:disable=redefined-outer-name ; pytest.fixture tmp_ignorefile
|
||||||
|
# pylint:disable=protected-access ; ok for testing
|
||||||
|
|
||||||
|
-from __future__ import division
|
||||||
|
-from __future__ import print_function
|
||||||
|
-from __future__ import absolute_import
|
||||||
|
-from __future__ import unicode_literals
|
||||||
|
-
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
import shutil
|
||||||
|
import textwrap
|
||||||
|
+import pathlib as pl
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
-import pathlib2 as pl
|
||||||
|
|
||||||
|
from pylint_ignore import ignorefile
|
||||||
|
|
||||||
|
diff --git a/test/test_main.py b/test/test_main.py
|
||||||
|
index f224a6e..5215bc7 100644
|
||||||
|
--- a/test/test_main.py
|
||||||
|
+++ b/test/test_main.py
|
||||||
|
@@ -2,17 +2,12 @@
|
||||||
|
# pylint:disable=redefined-outer-name ; pytest.fixture ignore_file
|
||||||
|
# pylint:disable=protected-access ; ok for testing
|
||||||
|
|
||||||
|
-from __future__ import division
|
||||||
|
-from __future__ import print_function
|
||||||
|
-from __future__ import absolute_import
|
||||||
|
-from __future__ import unicode_literals
|
||||||
|
-
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import shutil
|
||||||
|
+import pathlib as pl
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
-import pathlib2 as pl
|
||||||
|
|
||||||
|
import pylint_ignore.__main__ as main
|
||||||
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:06abefb1de9401ad6c02a8ade1dd8630989eaf3f4393d0fffc2dc5ba819e5ef9
|
|
||||||
size 36151
|
|
3
pylint-ignore-2022.1025.tar.gz
Normal file
3
pylint-ignore-2022.1025.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5a85c5c6df163a2bb91b41175070948b93abc2452380b5d20ebd8a02461216ac
|
||||||
|
size 36283
|
@@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 3 05:32:29 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 2022.1025:
|
||||||
|
* Pin pylint to <2.13
|
||||||
|
- Add patch no-more-pathlib2.patch:
|
||||||
|
* Use pathlib rather than pathlib2.
|
||||||
|
- Drop {Build,}Requires on pathlib2
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 23 14:35:03 UTC 2022 - pgajdos@suse.com
|
Wed Feb 23 14:35:03 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -18,23 +18,23 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-pylint-ignore
|
Name: python-pylint-ignore
|
||||||
Version: 2021.1024
|
Version: 2022.1025
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Start with silence, not with noise But do start!
|
Summary: Start with silence, not with noise But do start!
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/mbarkhau/pylint-ignore
|
URL: https://github.com/mbarkhau/pylint-ignore
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pylint-ignore/pylint-ignore-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pylint-ignore/pylint-ignore-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM gh#mbarkhau/pylint-ignore#15
|
||||||
|
Patch0: no-more-pathlib2.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module pathlib2}
|
|
||||||
BuildRequires: %{python_module pylev}
|
BuildRequires: %{python_module pylev}
|
||||||
BuildRequires: %{python_module pylint > 2.4}
|
BuildRequires: %{python_module pylint > 2.4}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
Requires: python-astroid > 2.1.0
|
Requires: python-astroid > 2.1.0
|
||||||
Requires: python-pathlib2
|
|
||||||
Requires: python-pylev
|
Requires: python-pylev
|
||||||
Requires: python-pylint > 2.4
|
Requires: python-pylint > 2.4
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@@ -48,7 +48,7 @@ This file is used to ignore Pylint messages without adding comments to the
|
|||||||
source code itself. It's similar to Rupocop's .rubocop_todo.yml.
|
source code itself. It's similar to Rupocop's .rubocop_todo.yml.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pylint-ignore-%{version}
|
%autosetup -p1 -n pylint-ignore-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
Reference in New Issue
Block a user