Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove six from production code #12

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Maintainer: Trevor Woerner <twoerner@gmail.com>
Section: utils
Priority: optional
Build-Depends: debhelper (>= 9),
python-all (>= 2.7),
python-setuptools,
python3 (>= 3.8),
python3-setuptools,
Standards-Version: 3.8.4
XS-Python-Version: >= 2.7
XS-Python-Version: >= 3.8

Package: bmaptool
Architecture: all
Depends: python (>=2.7),
Depends: python (>=3.8),
python-gpgme,
${misc:Depends},
${python:Depends},
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/make -f

%:
dh $@ --with=python2
dh $@ --with=python3
Empty file added docs/RELEASE_NOTES
Empty file.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "bmaptool"
description = "BMAP tools"
dynamic = ["version"]
dependencies = [
"six >= 1.16.0",
"gpg >= 1.10.0",
]
required-python = ">= 3.8"
Expand Down Expand Up @@ -31,6 +30,7 @@ classifiers = [
[project.optional-dependencies]
dev = [
"black >= 22.3.0",
"six >= 1.16.0",
]

[project.urls]
Expand Down
9 changes: 4 additions & 5 deletions src/bmaptool/BmapCopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@
import hashlib
import logging
import datetime
from six import reraise
from six.moves import queue as Queue
from six.moves import _thread as thread
import queue
import _thread as thread
from typing import Optional
from xml.etree import ElementTree
from .BmapHelpers import human_size
Expand Down Expand Up @@ -684,7 +683,7 @@ def copy(self, sync=True, verify=True):

# Create the queue for block batches and start the reader thread, which
# will read the image in batches and put the results to '_batch_queue'.
self._batch_queue = Queue.Queue(self._batch_queue_len)
self._batch_queue = queue.Queue(self._batch_queue_len)
thread.start_new_thread(self._get_data, (verify,))

blocks_written = 0
Expand Down Expand Up @@ -714,7 +713,7 @@ def copy(self, sync=True, verify=True):
# The reader thread encountered an error and passed us the
# exception.
exc_info = batch[1]
reraise(exc_info[0], exc_info[1], exc_info[2])
raise exc_info[1]

(start, end, buf) = batch[1:4]

Expand Down
2 changes: 1 addition & 1 deletion tests/test_api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import tempfile
import filecmp
import subprocess
from six.moves import zip_longest
from itertools import zip_longest
from tests import helpers
from bmaptool import BmapHelpers, BmapCreate, Filemap

Expand Down
2 changes: 1 addition & 1 deletion tests/test_filemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import random
import itertools
import tests.helpers
from six.moves import zip_longest
from itertools import zip_longest
from bmaptool import Filemap

# This is a work-around for Centos 6
Expand Down
Loading