Hello community,
here is the log from the commit of package python-libarchive for
openSUSE:Factory checked in at 2019-07-24 20:35:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-libarchive (Old)
and /work/SRC/openSUSE:Factory/.python-libarchive.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-libarchive"
Wed Jul 24 20:35:49 2019 rev:4 rq:718113 version:0.4.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-libarchive/python-libarchive.changes
2019-04-14 12:22:16.655750723 +0200
+++
/work/SRC/openSUSE:Factory/.python-libarchive.new.4126/python-libarchive.changes
2019-07-24 20:35:50.342572086 +0200
@@ -1,0 +2,6 @@
+Wed Jul 24 08:09:30 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.4.7:
+ * no upstream changelog
+
+-------------------------------------------------------------------
Old:
----
libarchive-0.4.6.tar.gz
New:
----
libarchive-0.4.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-libarchive.spec ++++++
--- /var/tmp/diff_new_pack.VsYsRu/_old 2019-07-24 20:35:50.818572033 +0200
+++ /var/tmp/diff_new_pack.VsYsRu/_new 2019-07-24 20:35:50.818572033 +0200
@@ -19,27 +19,26 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-libarchive
-Version: 0.4.6
+Version: 0.4.7
Release: 0
Summary: Python adapter for universal, libarchive-based archive access
License: GPL-2.0-only
Group: Development/Languages/Python
-Url: https://github.com/dsoprea/PyEasyArchive
+URL: https://github.com/dsoprea/PyEasyArchive
Source:
https://files.pythonhosted.org/packages/source/l/libarchive/libarchive-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: libarchive-devel
BuildRequires: python-rpm-macros
+Requires: libarchive-devel
+Conflicts: python-libarchive-c
+BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module nose}
# /SECTION
-Requires: libarchive-devel
-Conflicts: python-libarchive-c
%ifpython2
Conflicts: %{oldpython}-libarchive-c
%endif
-BuildArch: noarch
-
%python_subpackages
%description
++++++ libarchive-0.4.6.tar.gz -> libarchive-0.4.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libarchive-0.4.6/PKG-INFO
new/libarchive-0.4.7/PKG-INFO
--- old/libarchive-0.4.6/PKG-INFO 2018-07-26 08:01:18.000000000 +0200
+++ new/libarchive-0.4.7/PKG-INFO 2019-07-01 05:36:10.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: libarchive
-Version: 0.4.6
+Version: 0.4.7
Summary: Python adapter for universal, libarchive-based archive access.
Home-page: https://github.com/dsoprea/PyEasyArchive
Author: Dustin Oprea
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libarchive-0.4.6/libarchive/__init__.py
new/libarchive-0.4.7/libarchive/__init__.py
--- old/libarchive-0.4.6/libarchive/__init__.py 2018-07-26 08:00:55.000000000
+0200
+++ new/libarchive-0.4.7/libarchive/__init__.py 2019-07-01 05:35:54.000000000
+0200
@@ -1 +1 @@
-__version__ = '0.4.6'
+__version__ = '0.4.7'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/libarchive-0.4.6/libarchive/adapters/archive_entry.py
new/libarchive-0.4.7/libarchive/adapters/archive_entry.py
--- old/libarchive-0.4.6/libarchive/adapters/archive_entry.py 2018-07-26
08:00:49.000000000 +0200
+++ new/libarchive-0.4.7/libarchive/adapters/archive_entry.py 2019-04-22
05:01:14.000000000 +0200
@@ -5,14 +5,12 @@
import libarchive.types.archive_entry
import libarchive.calls.archive_entry
-_ASCII_ENCODING = 'ascii'
-
def _archive_entry_pathname(entry):
filepath = libarchive.calls.archive_entry.c_archive_entry_pathname(entry)
if filepath is None:
raise ValueError("Could not get entry file-path.")
- return filepath.decode(_ASCII_ENCODING)
+ return filepath.decode('utf-8')
def archive_entry_new():
entry = libarchive.calls.archive_entry.c_archive_entry_new()
@@ -22,7 +20,8 @@
return entry
def _archive_entry_sourcepath(entry):
- return libarchive.calls.archive_entry.c_archive_entry_sourcepath(entry)
+ raw = libarchive.calls.archive_entry.c_archive_entry_sourcepath(entry)
+ return raw.decode('utf-8')
def _archive_entry_free(entry):
libarchive.calls.archive_entry.c_archive_entry_free(entry)
@@ -34,7 +33,7 @@
return libarchive.calls.archive_entry.c_archive_entry_set_size(entry, size)
def _archive_entry_set_pathname(entry, name):
- name = name.encode(_ASCII_ENCODING)
+ name = name.encode('utf-8')
libarchive.calls.archive_entry.c_archive_entry_set_pathname(
entry,
@@ -54,12 +53,12 @@
def _archive_entry_symlink(entry):
encoded = libarchive.calls.archive_entry.c_archive_entry_symlink(entry)
- decoded = encoded.decode(_ASCII_ENCODING)
+ decoded = encoded.decode('utf-8')
return decoded
def _archive_entry_set_symlink(entry, target_filepath):
- encoded = target_filepath.encode(_ASCII_ENCODING)
+ encoded = target_filepath.encode('utf-8')
return libarchive.calls.archive_entry.c_archive_entry_set_symlink(entry,
encoded)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/libarchive-0.4.6/libarchive/adapters/archive_write.py
new/libarchive-0.4.7/libarchive/adapters/archive_write.py
--- old/libarchive-0.4.6/libarchive/adapters/archive_write.py 2018-07-26
08:00:49.000000000 +0200
+++ new/libarchive-0.4.7/libarchive/adapters/archive_write.py 2019-07-01
05:03:19.000000000 +0200
@@ -17,8 +17,6 @@
_LOGGER = logging.getLogger(__name__)
-_ASCII_ENCODING = 'ascii'
-
def _archive_write_new():
archive = libarchive.calls.archive_write.c_archive_write_new()
if archive is None:
@@ -114,7 +112,7 @@
raise libarchive.exception.ArchiveError(message)
def _archive_write_open_filename(archive, filepath):
- filepath = filepath.encode(_ASCII_ENCODING)
+ filepath = filepath.encode('utf-8')
try:
libarchive.calls.archive_write.c_archive_write_open_filename(
@@ -169,13 +167,6 @@
libarchive.types.archive.ARCHIVE_WRITE_CALLBACK(write_cb),
libarchive.types.archive.ARCHIVE_CLOSE_CALLBACK(close_cb))
-def _archive_write_open_memory(archive, buffer_, consumed_size_ptr):
- libarchive.calls.archive_write.c_archive_write_open_memory(
- archive,
- buffer_,
- len(buffer_),
- consumed_size_ptr)
-
def _archive_write_set_bytes_per_block(archive, bytes_per_block):
libarchive.calls.archive_write.c_archive_write_set_bytes_per_block(
archive,
@@ -219,7 +210,7 @@
added = []
for filepath in files:
- filepath = filepath.encode(_ASCII_ENCODING)
+ filepath = filepath.encode('utf-8')
disk = libarchive.calls.archive_read.c_archive_read_disk_new()
libarchive.calls.archive_read.c_archive_read_disk_open(
@@ -331,4 +322,3 @@
close_cb_internal)
return _create(opener, *args, **kwargs)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libarchive-0.4.6/libarchive/calls/archive_write.py
new/libarchive-0.4.7/libarchive/calls/archive_write.py
--- old/libarchive-0.4.6/libarchive/calls/archive_write.py 2018-07-26
07:57:48.000000000 +0200
+++ new/libarchive-0.4.7/libarchive/calls/archive_write.py 2019-07-01
05:29:01.000000000 +0200
@@ -96,10 +96,6 @@
c_archive_write_open.argtypes = [c_void_p, c_void_p, ARCHIVE_OPEN_CALLBACK,
ARCHIVE_WRITE_CALLBACK, ARCHIVE_CLOSE_CALLBACK]
c_archive_write_open.restype = _check_zero_success
-c_archive_write_open_memory = libarchive.archive_write_open_memory
-c_archive_write_open_memory.argtypes = [c_void_p, c_void_p, c_size_t,
POINTER(c_size_t)]
-c_archive_write_open_memory.restype = _check_zero_success
-
c_archive_write_set_bytes_per_block =
libarchive.archive_write_set_bytes_per_block
c_archive_write_set_bytes_per_block.argtypes = [c_void_p, c_int]
c_archive_write_set_bytes_per_block.restype = _check_zero_success
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libarchive-0.4.6/libarchive/test_support.py
new/libarchive-0.4.7/libarchive/test_support.py
--- old/libarchive-0.4.6/libarchive/test_support.py 2018-07-26
07:57:48.000000000 +0200
+++ new/libarchive-0.4.7/libarchive/test_support.py 2019-07-01
05:29:56.000000000 +0200
@@ -38,16 +38,27 @@
@contextlib.contextmanager
def test_archive():
with chdir(_APP_PATH):
- output_path = tempfile.mkdtemp()
+ temp_path = tempfile.mkdtemp()
output_filename = 'archive.7z'
- output_filepath = os.path.join(output_path, output_filename)
+ output_filepath = os.path.join(temp_path, output_filename)
+
+ # Also, write a source file with a unicode name that we can add to
+ # test internation support.
+ unicode_test_filepath = \
+ os.path.join(
+ temp_path,
+
"\u0905\u0906\u0907\u0536\u0537\u0538\u0539\u053a\u053b\uac12\uac13\uac14\uac15\uac16")
+
+ with open(unicode_test_filepath, 'w') as f:
+ f.write("test data \uf91f\uf920\uf921\uf922\uf923\uf924\uf925")
try:
files = [
'README.rst',
'libarchive/resources/README.rst',
'libarchive/resources/requirements.txt',
+ unicode_test_filepath,
]
libarchive.public.create_file(
@@ -62,6 +73,6 @@
yield output_filepath
finally:
try:
- shutil.rmtree(output_path)
+ shutil.rmtree(temp_path)
except:
pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libarchive-0.4.6/libarchive.egg-info/PKG-INFO
new/libarchive-0.4.7/libarchive.egg-info/PKG-INFO
--- old/libarchive-0.4.6/libarchive.egg-info/PKG-INFO 2018-07-26
08:01:18.000000000 +0200
+++ new/libarchive-0.4.7/libarchive.egg-info/PKG-INFO 2019-07-01
05:36:10.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: libarchive
-Version: 0.4.6
+Version: 0.4.7
Summary: Python adapter for universal, libarchive-based archive access.
Home-page: https://github.com/dsoprea/PyEasyArchive
Author: Dustin Oprea
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/libarchive-0.4.6/tests/adapters/test_archive_write.py
new/libarchive-0.4.7/tests/adapters/test_archive_write.py
--- old/libarchive-0.4.6/tests/adapters/test_archive_write.py 2018-07-26
07:57:48.000000000 +0200
+++ new/libarchive-0.4.7/tests/adapters/test_archive_write.py 2019-07-01
05:29:52.000000000 +0200
@@ -17,10 +17,10 @@
class TestArchiveWrite(unittest.TestCase):
def test_create_file(self):
with libarchive.test_support.chdir(_APP_PATH):
- output_path = tempfile.mkdtemp()
+ temp_path = tempfile.mkdtemp()
output_filename = 'archive.7z'
- output_filepath = os.path.join(output_path, output_filename)
+ output_filepath = os.path.join(temp_path, output_filename)
try:
files = [
@@ -42,7 +42,7 @@
actual = [entry.pathname for entry in e]
finally:
try:
- shutil.rmtree(output_path)
+ shutil.rmtree(temp_path)
except:
pass
@@ -52,3 +52,53 @@
]
self.assertEquals(actual, expected)
+
+ def test_create_file__unicode(self):
+ with libarchive.test_support.chdir(_APP_PATH):
+ temp_path = tempfile.mkdtemp()
+
+ output_filename = 'archive.7z'
+ output_filepath = os.path.join(temp_path, output_filename)
+
+ # Also, write a source file with a unicode name that we can add to
+ # test internation support.
+ unicode_test_filepath = \
+ os.path.join(
+ temp_path,
+
"\u0905\u0906\u0907\u0536\u0537\u0538\u0539\u053a\u053b\uac12\uac13\uac14\uac15\uac16")
+
+ with open(unicode_test_filepath, 'w') as f:
+ f.write("test data \uf91f\uf920\uf921\uf922\uf923\uf924\uf925")
+
+ try:
+ files = [
+ 'libarchive/resources/README.rst',
+ 'libarchive/resources/requirements.txt',
+ unicode_test_filepath,
+ ]
+
+ libarchive.adapters.archive_write.create_file(
+ output_filepath,
+ libarchive.constants.ARCHIVE_FORMAT_TAR,
+ files,
+ filter_code=libarchive.constants.ARCHIVE_FILTER_BZIP2)
+
+ assert \
+ os.path.exists(output_filepath) is True, \
+ "Test archive was not created correctly."
+
+ with
libarchive.adapters.archive_read.file_enumerator(output_filepath) as e:
+ actual = [entry.pathname for entry in e]
+ finally:
+ try:
+ shutil.rmtree(temp_path)
+ except:
+ pass
+
+ expected = [
+ 'libarchive/resources/README.rst',
+ 'libarchive/resources/requirements.txt',
+ unicode_test_filepath.lstrip(os.sep),
+ ]
+
+ self.assertEquals(actual, expected)