From 1b35361ad2392074e596a615d202a86badd4e334 Mon Sep 17 00:00:00 2001 From: Changaco Date: Tue, 25 May 2021 10:01:31 +0200 Subject: [PATCH] drop remnants of Python 2 --- libarchive/entry.py | 2 +- libarchive/read.py | 2 +- libarchive/write.py | 2 +- tests/test_security_flags.py | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libarchive/entry.py b/libarchive/entry.py index 84ccd78..bd5e223 100644 --- a/libarchive/entry.py +++ b/libarchive/entry.py @@ -20,7 +20,7 @@ def format_time(seconds, nanos): return int(seconds) -class ArchiveEntry(object): +class ArchiveEntry: __slots__ = ('_archive_p', '_entry_p') diff --git a/libarchive/read.py b/libarchive/read.py index 957435f..c7b3c84 100644 --- a/libarchive/read.py +++ b/libarchive/read.py @@ -10,7 +10,7 @@ from .entry import ArchiveEntry, new_archive_entry -class ArchiveRead(object): +class ArchiveRead: def __init__(self, archive_p): self._pointer = archive_p diff --git a/libarchive/write.py b/libarchive/write.py index f4987b7..6d023b3 100644 --- a/libarchive/write.py +++ b/libarchive/write.py @@ -27,7 +27,7 @@ def new_archive_read_disk(path, flags=0, lookup=False): read_free(archive_p) -class ArchiveWrite(object): +class ArchiveWrite: def __init__(self, archive_p): self._pointer = archive_p diff --git a/tests/test_security_flags.py b/tests/test_security_flags.py index 2833887..d0302da 100644 --- a/tests/test_security_flags.py +++ b/tests/test_security_flags.py @@ -1,6 +1,5 @@ """Test security-related extraction flags.""" -from __future__ import division, print_function, unicode_literals import pytest import os