public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-lesscpy] rawhide: Fix deprecations
Date: Thu, 18 Jun 2026 06:41:10 GMT	[thread overview]
Message-ID: <178176487020.1.8630010550990889868.rpms-python-lesscpy-87265c5ee313@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-lesscpy
Branch : rawhide
Commit : 87265c5ee313f102ee88f0aa1908276b1830eef2
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date   : 2026-06-10T10:33:13-04:00
Stats  : +222/-3 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/python-lesscpy/c/87265c5ee313f102ee88f0aa1908276b1830eef2?branch=rawhide

Log:
Fix deprecations

---
diff --git a/0002-Update-supported-Python-versions.patch b/0002-Update-supported-Python-versions.patch
new file mode 100644
index 0000000..80607f3
--- /dev/null
+++ b/0002-Update-supported-Python-versions.patch
@@ -0,0 +1,135 @@
+From e56bc6f2f3dd2305e2cf3346bb602d81fdef6edf Mon Sep 17 00:00:00 2001
+From: Sascha Peilicke <sascha@peilicke.de>
+Date: Thu, 15 Jul 2021 09:42:16 +0300
+Subject: [PATCH] Remove old interpreter versions
+
+Add interpreter versions 3.8 and 3.9.
+---
+ README.rst | 2 +-
+ setup.py   | 4 ++--
+ tox.ini    | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/README.rst b/README.rst
+index 94a7eb1..59ecf73 100644
+--- a/README.rst
++++ b/README.rst
+@@ -73,7 +73,7 @@ Not supported
+ Requirements
+ ------------
+ 
+-- Python 2.7, 3.4, 3.5, 3.6 or 3.7
++- Python 3.4 - 3.9,
+ - ply (Python Lex-Yacc) (check requirements.txt)
+ - six
+ 
+diff --git a/setup.py b/setup.py
+index 187506f..efd77ed 100755
+--- a/setup.py
++++ b/setup.py
+@@ -48,13 +48,13 @@
+         'License :: OSI Approved :: MIT License',
+         'Operating System :: OS Independent',
+         'Programming Language :: Python',
+-        'Programming Language :: Python :: 2',
+-        'Programming Language :: Python :: 2.7',
+         'Programming Language :: Python :: 3',
+         'Programming Language :: Python :: 3.4',
+         'Programming Language :: Python :: 3.5',
+         'Programming Language :: Python :: 3.6',
+         'Programming Language :: Python :: 3.7',
++        'Programming Language :: Python :: 3.8',
++        'Programming Language :: Python :: 3.9',
+         'Programming Language :: Python :: Implementation :: CPython',
+         'Programming Language :: Python :: Implementation :: PyPy',
+         'Topic :: Software Development :: Code Generators',
+diff --git a/tox.ini b/tox.ini
+index 14f04fe..99e579c 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -1,5 +1,5 @@
+ [tox]
+-envlist = py27,py35,py36,py37,py38,pypy,pypy3
++envlist = py36,py37,py38,py39,pypy,pypy3
+ skip_missing_interpreters = True
+ 
+ [testenv]
+
+
+From ea27fc0840dfa6f3fcca489983a6b6bcc39821f9 Mon Sep 17 00:00:00 2001
+From: Sascha Peilicke <sascha@peilicke.de>
+Date: Fri, 21 Oct 2022 13:23:59 +0200
+Subject: [PATCH] Update supported Python versions
+
+Axe everything older than Python 3.7 and up new releases up until 3.11.
+
+Resolves #122
+---
+ .travis.yml           | 6 +++---
+ README.rst            | 2 +-
+ requirements.txt      | 1 -
+ setup.py              | 4 ++--
+ test-requirements.txt | 1 +
+ tox.ini               | 2 +-
+ 6 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/README.rst b/README.rst
+index 59ecf73..68640e2 100644
+--- a/README.rst
++++ b/README.rst
+@@ -73,7 +73,7 @@ Not supported
+ Requirements
+ ------------
+ 
+-- Python 3.4 - 3.9,
++- Python 3.7 - 3.11,
+ - ply (Python Lex-Yacc) (check requirements.txt)
+ - six
+ 
+diff --git a/requirements.txt b/requirements.txt
+index 4efa1dc..90412f0 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,2 +1 @@
+ ply
+-six
+diff --git a/setup.py b/setup.py
+index efd77ed..583e36e 100755
+--- a/setup.py
++++ b/setup.py
+@@ -49,12 +49,12 @@
+         'Operating System :: OS Independent',
+         'Programming Language :: Python',
+         'Programming Language :: Python :: 3',
+-        'Programming Language :: Python :: 3.4',
+-        'Programming Language :: Python :: 3.5',
+         'Programming Language :: Python :: 3.6',
+         'Programming Language :: Python :: 3.7',
+         'Programming Language :: Python :: 3.8',
+         'Programming Language :: Python :: 3.9',
++        'Programming Language :: Python :: 3.10',
++        'Programming Language :: Python :: 3.11',
+         'Programming Language :: Python :: Implementation :: CPython',
+         'Programming Language :: Python :: Implementation :: PyPy',
+         'Topic :: Software Development :: Code Generators',
+diff --git a/test-requirements.txt b/test-requirements.txt
+index a7052aa..6cce76e 100644
+--- a/test-requirements.txt
++++ b/test-requirements.txt
+@@ -2,3 +2,4 @@
+ coverage
+ flake8
+ nose
++tox
+\ No newline at end of file
+diff --git a/tox.ini b/tox.ini
+index 99e579c..c4c5627 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -1,5 +1,5 @@
+ [tox]
+-envlist = py36,py37,py38,py39,pypy,pypy3
++envlist = py37,py38,py39,py3.10,py3.11,pypy3
+ skip_missing_interpreters = True
+ 
+ [testenv]

diff --git a/0003-Remove-mentioning-of-six.patch b/0003-Remove-mentioning-of-six.patch
new file mode 100644
index 0000000..b3177a0
--- /dev/null
+++ b/0003-Remove-mentioning-of-six.patch
@@ -0,0 +1,29 @@
+From da452384b0ffb1c92e23788442d2fa378fdf6230 Mon Sep 17 00:00:00 2001
+From: Sascha Peilicke <sascha@peilicke.de>
+Date: Fri, 21 Oct 2022 13:33:19 +0200
+Subject: [PATCH] README: Remove mentioning of 'six'
+
+---
+ README.rst | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/README.rst b/README.rst
+index 68640e2..4e40bf3 100644
+--- a/README.rst
++++ b/README.rst
+@@ -75,7 +75,6 @@ Requirements
+ 
+ - Python 3.7 - 3.11,
+ - ply (Python Lex-Yacc) (check requirements.txt)
+-- six
+ 
+ Installation
+ ------------
+@@ -154,7 +153,6 @@ If you want to use the compiler from within Python, you can do it like this:
+ .. code-block:: python
+ 
+     import lesscpy
+-    from six import StringIO
+ 
+     print(lesscpy.compile(StringIO(u"a { border-width: 2px * 3; }"), minify=True))
+ 

diff --git a/0004-Drop-pkg_resources-usage.patch b/0004-Drop-pkg_resources-usage.patch
new file mode 100644
index 0000000..d306183
--- /dev/null
+++ b/0004-Drop-pkg_resources-usage.patch
@@ -0,0 +1,48 @@
+From bd8949579713c9d4ff9e15799a26fcecdf73530e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Tue, 9 Jun 2026 18:01:09 +0200
+Subject: [PATCH] Drop pkg_resources usage from setup.py
+
+pkg_resources were removed from setuptools.
+There is no need to parse the requirements.
+---
+ setup.py | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 583e36e..7213ec9 100755
+--- a/setup.py
++++ b/setup.py
+@@ -2,7 +2,6 @@
+ # -*- coding: utf-8 -*-
+ 
+ from setuptools import find_packages, setup
+-import pkg_resources
+ 
+ import codecs
+ 
+@@ -13,14 +12,18 @@
+ 
+ with open("requirements.txt", "r") as f:
+     install_requires = [
+-        str(req) for req in pkg_resources.parse_requirements(f)
++        line.strip()
++        for line in f
++        if line.strip() and not line.startswith('#')
+     ]
+ with open("test-requirements.txt", "r") as f:
+-    test_requires = []
+-    for line in f.readlines():
+-        # Skip '-r ...' includes which pkg_resources doesn't understand:
+-        if not line.startswith('-r '):
+-            test_requires.append(str(pkg_resources.Requirement.parse(line)))
++    test_requires = [
++        line.strip()
++        for line in f
++        if line.strip()
++           and not line.startswith('#')
++           and not line.strip().startswith('-r ')
++    ]
+ 
+ setup(
+     name='lesscpy',

diff --git a/python-lesscpy.spec b/python-lesscpy.spec
index d601d9c..63ef0e7 100644
--- a/python-lesscpy.spec
+++ b/python-lesscpy.spec
@@ -6,15 +6,19 @@
 
 Name:           python-%{pypi_name}
 Version:        0.14.0
-Release:        27%{?dist}
+Release:        28%{?dist}
 Summary:        Lesscss compiler
 
 License:        MIT
 URL:            https://github.com/robotis/lesscpy
 Source0:        https://pypi.python.org/packages/source/l/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
-Patch1:         0001-Remove-tabfile-support-as-PLY-removed-it-as-well.patch
+Patch:          0001-Remove-tabfile-support-as-PLY-removed-it-as-well.patch
+# upstream fixes for deprecations
+Patch:          0002-Update-supported-Python-versions.patch
+Patch:          0003-Remove-mentioning-of-six.patch
+Patch:          0004-Drop-pkg_resources-usage.patch
 # drop the dependency on python-six
-Patch2:         https://github.com/lesscpy/lesscpy/pull/126.patch
+Patch:          https://github.com/lesscpy/lesscpy/pull/126.patch
 
 BuildArch:      noarch
  
@@ -71,6 +75,9 @@ ln -s ./lesscpy %{buildroot}/%{_bindir}/py3-lesscpy
 
 
 %changelog
+* Tue Jun 09 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 0.14.0-28
+- Fix deprecations
+
 * Wed Jun 03 2026 Python Maint <python-maint@redhat.com> - 0.14.0-27
 - Rebuilt for Python 3.15
 

                 reply	other threads:[~2026-06-18  6:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178176487020.1.8630010550990889868.rpms-python-lesscpy-87265c5ee313@fedoraproject.org \
    --to=yselkowi@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox