| |
@@ -16,7 +16,6 @@
|
| |
import io
|
| |
import os
|
| |
import pycurl
|
| |
- import six
|
| |
import sys
|
| |
|
| |
from pyrpkg.errors import InvalidHashType, UploadError, LayoutError
|
| |
@@ -257,12 +256,6 @@
|
| |
# https://bugzilla.redhat.com/show_bug.cgi?id=1241059
|
| |
_name = utils.get_repo_name(name) if is_dist_git(os.getcwd()) else name
|
| |
|
| |
- if six.PY2 and isinstance(filename, six.text_type):
|
| |
- filename = filename.encode('utf-8')
|
| |
-
|
| |
- if six.PY2 and isinstance(self.branch, six.text_type):
|
| |
- self.branch = self.branch.encode('utf-8')
|
| |
-
|
| |
post_data = [('name', _name),
|
| |
('%ssum' % self.hashtype, hash),
|
| |
('filename', filename)]
|
| |
@@ -328,13 +321,6 @@
|
| |
"""
|
| |
filename = os.path.basename(filepath)
|
| |
|
| |
- # As in remote_file_exists, we need to convert unicode strings to str
|
| |
- if six.PY2:
|
| |
- if isinstance(name, six.text_type):
|
| |
- name = name.encode('utf-8')
|
| |
- if isinstance(filepath, six.text_type):
|
| |
- filepath = filepath.encode('utf-8')
|
| |
-
|
| |
if self.remote_file_exists(name, filename, hash):
|
| |
self.log.info("File already uploaded: %s", filepath)
|
| |
return
|
| |
It was recently discovered that our usage of SafeConfigParser no longer works in Python 3.12. This class was actually renamed to ConfigParser all the way back during Python 3.2. There are still differences in Python 2. Rather than adding conditionals for which name to import between Python 2 and 3, it is easier to just drop Python 2 compatibility. This also removes the need for the six dependency.
https://docs.python.org/3.2/whatsnew/3.2.html#configparser