Skip to content

Commit b0a4870

Browse files
Merge pull request #308 from sergey-dryabzhinsky/version-1573
Prepage for version 1.5.7.3.
2 parents 7bc3958 + 5b18fdb commit b0a4870

File tree

9 files changed

+101
-28
lines changed

9 files changed

+101
-28
lines changed

.github/workflows/Build_wheels_for_cpython27_x86.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ jobs:
9090
- name: Pepare for ${{matrix.os.pypkg}} ${{matrix.os.arch}}
9191
if: matrix.os.matrix == 'linux'
9292
run: |
93-
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt-cache madison clang-18
94-
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt install -y ${{matrix.os.pypkg}}-dev gcc pkg-config ${{matrix.os.pypkgadd}}
93+
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt install --no-install-recommends -y ${{matrix.os.pypkg}}-dev gcc pkg-config ${{matrix.os.pypkgadd}}
9594
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "wget ${{matrix.os.getpipurl}} -O get-pip.py && ${{matrix.os.pypkg}} get-pip.py"
9695
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "${{matrix.os.pypkg}} -m pip install -U 'setuptools'"
9796
@@ -107,8 +106,6 @@ jobs:
107106
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} pkg-config libzstd --modversion
108107
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} echo GCC
109108
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} gcc -v
110-
false && sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} echo CLANG
111-
false && sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} clang-20 -v
112109
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version && _CC=clang-20 ZSTD_ASM=1 ZSTD_WARNINGS=1 _ZSTD_WERRORS=1 _ZSTD_SMALL=1 _ZSTD_ASM_BMI2=1 ZSTD_THREADS=1 _ZSTD_EXTERNAL=1 ${{matrix.os.pypkg}} setup.py bdist_wheel "
113110
114111
- name: Test wheel for ${{matrix.os.pypkg}} ${{matrix.os.arch}}

.github/workflows/Build_wheels_for_cpython313_x86_u16.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build wheels for CPython3.13 x86 on Ubuntu22 with GCC-10 All warnings
1+
name: Build wheels for CPython3.13 x86 on Ubuntu16 with GCC-5 All warnings
22

33
on: [push, pull_request]
44

@@ -14,12 +14,12 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os:
17-
- name: Ubuntu 24+22 x86 CPython 3.13
17+
- name: Ubuntu 24+16 x86 CPython 3.13
1818
runs-on: ubuntu-latest
1919
matrix: linux
2020
arch: i386
2121
tag_arch: i686
22-
release: jammy
22+
release: xenial
2323
mirror: http://azure.archive.ubuntu.com/ubuntu
2424
getpipurl: https://bootstrap.pypa.io/pip/get-pip.py
2525
pypkg: python3.13
@@ -60,10 +60,10 @@ jobs:
6060
sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/proc -t proc
6161
sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/dev/pts -t devpts
6262
sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/sys -t sysfs
63-
echo "# deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/python ubuntu-${{matrix.os.release}} main" > rusoft-python.list
64-
echo "# deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/backports ubuntu-${{matrix.os.release}} main" > rusoft-backports.list
65-
echo "# deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/packages ubuntu-${{matrix.os.release}} main" > rusoft-packages.list
66-
echo " deb [trusted=yes] http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu ${{matrix.os.release}} main" > deadsnakes.list
63+
echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/python ubuntu-${{matrix.os.release}} main" > rusoft-python.list
64+
echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/backports ubuntu-${{matrix.os.release}} main" > rusoft-backports.list
65+
echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/packages ubuntu-${{matrix.os.release}} main" > rusoft-packages.list
66+
echo "# deb [trusted=yes] http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu ${{matrix.os.release}} main" > deadsnakes.list
6767
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt update
6868
sudo cp -v ./*.list ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/etc/apt/sources.list.d
6969
false && sudo rm -fv ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/etc/apt/trusted.gpg.d/* && sudo rm -fv ./ubuntu-xenial-x86/etc/apt/trusted.gpg
@@ -96,7 +96,7 @@ jobs:
9696
sudo tar -xvf dist/zstd-$version.tar.gz -C ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/
9797
false && sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} env
9898
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} pkg-config libzstd --modversion
99-
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} echo GCC
99+
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} echo GCC-5
100100
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} gcc -v
101101
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version/ && ZSTD_ASM=1 ZSTD_WARNINGS=1 _ZSTD_SMALL=1 LDFLAGS='-Wl,--as-needed -Wl,-s' ZSTD_BUILD_STRIP=1 _ZSTD_SPEED=0 _ZSTD_SPEEDMAX=0 _ZSTD_ASM_BMI2=1 ZSTD_THREADS=1 _ZSTD_EXTERNAL=0 ${{matrix.os.pypkg}} setup.py bdist_wheel"
102102

PKG-INFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Metadata-Version: 1.1
22
Name: zstd
3-
Version: 1.5.7.2
3+
Version: 1.5.7.3
44
Summary: Simple python bindings to Yann Collet ZSTD compression library
55
Home-page: https://github.com/sergey-dryabzhinsky/python-zstd
66
Author: Sergey Dryabzhinsky
77
Author-email: [email protected]
88
License: BSD
9-
Download-URL: https://github.com/sergey-dryabzhinsky/python-zstd/archive/v1.5.7.2.tar.gz
9+
Download-URL: https://github.com/sergey-dryabzhinsky/python-zstd/archive/v1.5.7.3.tar.gz
1010
Description: Simple ZSTandarD bindings for Python
1111
Keywords: zstd,zstandard,compression
1212
Platform: POSIX

README.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -497,28 +497,27 @@ version (): string|bytes
497497
Since: 1.3.4.3
498498

499499
ZSTD_version (): string|bytes
500-
Returns ZSTD library doted version string.
500+
Returns ZSTD library doted version string, with which are compiled.
501501

502502
Since: 1.3.4.3
503503

504-
ZSTD_version_compiled (): string|bytes
505-
Returns ZSTD library doted version string, wi which are compiled.
506-
507-
Since: 1.5.7.3
504+
Aliases:
505+
- ZSTD_version_compiled (): string|bytes Since: 1.5.7.3
508506

509507
ZSTD_version_loaded (): string|bytes
510508
Returns ZSTD library doted version string, with which currently loaded.
511509

512510
Since: 1.5.7.3
513511

514512
ZSTD_version_number (): int
515-
Returns ZSTD library version in format: MAJOR*100*100 + MINOR*100 + RELEASE.
513+
Returns ZSTD library version, compiled with, in format: MAJOR*100*100 + MINOR*100 + RELEASE.
516514

517515
Since: 1.3.4.3
518516

519517
ZSTD_threads_count (): int
520518
Returns ZSTD determined CPU cores count.
521-
Better to get this nuber as early as possible befor compression starts.
519+
Better to get this nuber as early as possible befor compression starts.
520+
522521
Since: 1.5.4.1
523522

524523
ZSTD_max_threads_count (): int

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# Package version, even external
2222
PKG_VERSION = VERSION
2323
# Minor revision
24-
PKG_VERSION += (2,)
24+
PKG_VERSION += (3,)
2525
PKG_VERSION_STR = ".".join([str(x) for x in PKG_VERSION])
2626
vpath="./version"
2727
if not os.path.exists(vpath):

src/python-zstd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,7 @@ static int init_py_zstd(PyObject *module) {
735735
Py_INCREF(ZstdError);
736736
PyModule_AddObject(module, "Error", ZstdError);
737737

738+
int32_t threads = UTIL_countAvailableCores();
738739
init_cContext(1, 3);
739740
return 0;
740741
}

tests/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class BaseTestZSTD(unittest.TestCase):
5959
VERSION_INT = 10507
6060
# minimal external version, must be >=1.4.0
6161
VERSION_INT_MIN = 1 * 100*100 + 4* 1*100 + 0
62-
PKG_VERSION = "1.5.7.2"
62+
PKG_VERSION = "1.5.7.3"
6363

6464
def helper_version(self):
6565
#if zstd.ZSTD_external():

tests/test_speed.py

Lines changed: 80 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_00_system_info(self):
1111
log.info("Bundled libzstd uses assembler? : %r" % zstd.ZSTD_with_asm())
1212
log.info("Bundled libzstd uses threads? :%r" % zstd.ZSTD_with_threads())
1313

14-
def test_compression_speed(self):
14+
def test_compression_speed3(self):
1515
wait = 10
1616
if "ZSTD_FULLTIME_TESTS" in os.environ:
1717
wait = 30
@@ -27,10 +27,48 @@ def test_compression_speed(self):
2727

2828
endMemoryUsage=get_real_memory_usage()
2929
log.info("end Compression memory usage = %6.2f kb" % (1.0*endMemoryUsage/1024,))
30-
log.info("Compression speed average = %6.2f Mb/sec" % (1.0*sum/1024/1024/wait,))
30+
log.info("Compression speed 3 average = %6.2f Mb/sec" % (1.0*sum/1024/1024/wait,))
31+
log.info("diff Compression memory usage = %6.2f kb" % (1.0*(endMemoryUsage-beginMemoryUsage)/1024,))
32+
33+
def test_compression_speed19(self):
34+
wait = 10
35+
if "ZSTD_FULLTIME_TESTS" in os.environ:
36+
wait = 30
37+
log.info("\nWait %d seconds..." % wait)
38+
sum = 0
39+
l=len(tDATA)
40+
tbegin = time()
41+
beginMemoryUsage=get_real_memory_usage()
42+
log.info("begin Compression memory usage = %6.2f kb" % (1.0*beginMemoryUsage/1024,))
43+
while time()-tbegin<wait:
44+
cdata = zstd.compress(tDATA,19,0)
45+
sum+=l
46+
47+
endMemoryUsage=get_real_memory_usage()
48+
log.info("end Compression memory usage = %6.2f kb" % (1.0*endMemoryUsage/1024,))
49+
log.info("Compression speed 19 average = %6.2f Mb/sec" % (1.0*sum/1024/1024/wait,))
50+
log.info("diff Compression memory usage = %6.2f kb" % (1.0*(endMemoryUsage-beginMemoryUsage)/1024,))
51+
52+
def test_compression_speed_minus1(self):
53+
wait = 10
54+
if "ZSTD_FULLTIME_TESTS" in os.environ:
55+
wait = 30
56+
log.info("\nWait %d seconds..." % wait)
57+
sum = 0
58+
l=len(tDATA)
59+
tbegin = time()
60+
beginMemoryUsage=get_real_memory_usage()
61+
log.info("begin Compression memory usage = %6.2f kb" % (1.0*beginMemoryUsage/1024,))
62+
while time()-tbegin<wait:
63+
cdata = zstd.compress(tDATA,-1,0)
64+
sum+=l
65+
66+
endMemoryUsage=get_real_memory_usage()
67+
log.info("end Compression memory usage = %6.2f kb" % (1.0*endMemoryUsage/1024,))
68+
log.info("Compression speed -1 average = %6.2f Mb/sec" % (1.0*sum/1024/1024/wait,))
3169
log.info("diff Compression memory usage = %6.2f kb" % (1.0*(endMemoryUsage-beginMemoryUsage)/1024,))
3270

33-
def test_compression2_speed_init_context_once(self):
71+
def test_compression2_speed3_init_context_once(self):
3472
wait = 10
3573
if "ZSTD_FULLTIME_TESTS" in os.environ:
3674
wait = 30
@@ -46,7 +84,45 @@ def test_compression2_speed_init_context_once(self):
4684

4785
endMemoryUsage=get_real_memory_usage()
4886
log.info("end Compression2 memory usage = %6.2f kb" % (1.0*endMemoryUsage/1024,))
49-
log.info("Compression2 speed average = %6.2f Mb/sec" % (1.0*sum/1024/1024/wait,))
87+
log.info("Compression2 speed 3 average = %6.2f Mb/sec" % (1.0*sum/1024/1024/wait,))
88+
log.info("diff Compression2 memory usage = %6.2f kb" % (1.0*(endMemoryUsage-beginMemoryUsage)/1024,))
89+
90+
def test_compression2_speed19_init_context_once(self):
91+
wait = 10
92+
if "ZSTD_FULLTIME_TESTS" in os.environ:
93+
wait = 30
94+
log.info("\nWait %d seconds..." % wait)
95+
sum = 0
96+
l=len(tDATA)
97+
tbegin = time()
98+
beginMemoryUsage=get_real_memory_usage()
99+
log.info("begin Compression2 memory usage = %6.2f kb" % (1.0*beginMemoryUsage/1024,))
100+
while time()-tbegin<wait:
101+
cdata = zstd.compress2(tDATA,19,0)
102+
sum+=l
103+
104+
endMemoryUsage=get_real_memory_usage()
105+
log.info("end Compression2 memory usage = %6.2f kb" % (1.0*endMemoryUsage/1024,))
106+
log.info("Compression2 speed 19 average = %6.2f Mb/sec" % (1.0*sum/1024/1024/wait,))
107+
log.info("diff Compression2 memory usage = %6.2f kb" % (1.0*(endMemoryUsage-beginMemoryUsage)/1024,))
108+
109+
def test_compression2_speed_minus1_init_context_once(self):
110+
wait = 10
111+
if "ZSTD_FULLTIME_TESTS" in os.environ:
112+
wait = 30
113+
log.info("\nWait %d seconds..." % wait)
114+
sum = 0
115+
l=len(tDATA)
116+
tbegin = time()
117+
beginMemoryUsage=get_real_memory_usage()
118+
log.info("begin Compression2 memory usage = %6.2f kb" % (1.0*beginMemoryUsage/1024,))
119+
while time()-tbegin<wait:
120+
cdata = zstd.compress2(tDATA,-1,0)
121+
sum+=l
122+
123+
endMemoryUsage=get_real_memory_usage()
124+
log.info("end Compression2 memory usage = %6.2f kb" % (1.0*endMemoryUsage/1024,))
125+
log.info("Compression2 speed -1 average = %6.2f Mb/sec" % (1.0*sum/1024/1024/wait,))
50126
log.info("diff Compression2 memory usage = %6.2f kb" % (1.0*(endMemoryUsage-beginMemoryUsage)/1024,))
51127

52128
def test_compression_speed_no_cpu_cores_cache(self):

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.7.2
1+
1.5.7.3

0 commit comments

Comments
 (0)