Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1234287
| From | Alexandre Detiste <alexandre.detiste@gmail.com> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#1098415: python3-pampy: missed python3-six dependency |
| Date | 2025-02-20 21:30 +0100 |
| Message-ID | <Killf-GAB-1@gated-at.bofh.it> (permalink) |
| References | <KicKZ-B0X-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
I've been tracking the "six" removal for two years now.
We are now hitting a long tail of packages with undeclared usage of "six" [0]
that pop ups on python3-six autoremovals.
See for example:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1093643
Here the patch took me less time to write than this very mail,
so I'd consider patch-this and don't wait for upstream
who seems pretty undecided [1] with what they want to do
(some other project will fight hard to keep Py2.7 forever)
So what do you think?
This package has a pretty high popcon, so it's valuable
to patch it to detect the exact same problem (ie "undeclared usage of six")
in random other places.
I will start tracking the index files for Ubuntu-dev + 25.04 to see where
python3-six is getting added to try find more faulty packages.
Greetings,
Alexandre
[0] and also undeclared usage of "pkg_resources"
[1] See:
https://github.com/FirefighterBlu3/python-pam/issues/41
"Is six a missing dependency somehow? #41"
https://github.com/FirefighterBlu3/python-pam/issues/35
"Python 2 installation fails due to f-strings and type annotations"
--- a/src/pam/__internals.py
+++ b/src/pam/__internals.py
@@ -1,5 +1,4 @@
import os
-import six
import sys
from ctypes import cdll
from ctypes import CFUNCTYPE
@@ -296,11 +295,11 @@ class PamAuthenticator:
return my_conv(n_messages, messages, p_response,
self.libc, msg_list, password, encoding)
- if isinstance(username, six.text_type):
+ if isinstance(username, str):
username = username.encode(encoding)
- if isinstance(password, six.text_type):
+ if isinstance(password, str):
password = password.encode(encoding)
- if isinstance(service, six.text_type):
+ if isinstance(service, str):
service = service.encode(encoding)
if b'\x00' in username or b'\x00' in password or b'\x00' in service:
@@ -482,8 +481,7 @@ class PamAuthenticator:
return PAM_SYSTEM_ERR
# can't happen unless someone is using internals directly
- if sys.version_info >= (3, ): # pragma: no branch
- if isinstance(key, six.text_type): # pragma: no branch
+ if isinstance(key, str): # pragma: no branch
key = key.encode(encoding)
value = self.pam_getenv(self.handle, key)
diff --git a/src/pam/pam.py b/src/pam/pam.py
index f16bf0c..7204129 100644
--- a/src/pam/pam.py
+++ b/src/pam/pam.py
@@ -30,7 +30,6 @@ a user against the Pluggable Authentication Modules
(PAM) on the system.
Implemented using ctypes, so no compilation is necessary.
'''
-import six
import __internals
if __name__ == "__main__": # pragma: no cover
@@ -43,7 +42,7 @@ if __name__ == "__main__": # pragma: no cover
readline.redisplay()
readline.set_pre_input_hook(hook)
- result = six.moves.input(prompt) # nosec (bandit; python2)
+ result = input(prompt) # nosec (bandit; python2)
readline.set_pre_input_hook()
Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Find similar | Unroll thread
Bug#1098415: python3-pampy: missed python3-six dependency Fabio Fantoni <fantonifabio@tiscali.it> - 2025-02-20 12:20 +0100 Bug#1098415: python3-pampy: missed python3-six dependency Alexandre Detiste <alexandre.detiste@gmail.com> - 2025-02-20 21:30 +0100
csiph-web