Skip to content

Commit 696da0c

Browse files
authored
Upgrades (#208)
1 parent 692bbbf commit 696da0c

File tree

987 files changed

+150167
-196146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

987 files changed

+150167
-196146
lines changed

Diff for: .appveyor.yml

+4-15
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ environment:
3232
PYTHON_DEF: "C:\\Python38-x64"
3333
PYTHON_VERSION: "3.8"
3434
# Python versions to build wheels for
35-
PYTHONVERS: C:\Python36-x64 C:\Python37-x64 C:\Python38-x64 C:\Python39-x64 C:\Python310-x64
35+
PYTHONVERS: C:\Python38-x64 C:\Python39-x64 C:\Python310-x64 C:\Python311-x64 C:\Python312-x64
3636
PYTHON_ARCH: "64"
3737
MSVC: "Visual Studio 16 2019"
3838

@@ -46,7 +46,7 @@ install:
4646
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
4747
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
4848
throw "There are newer queued builds for this pull request, failing early." }
49-
- set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%"
49+
- set OPENSSL_DIR="C:\OpenSSL-v34-Win64"
5050
- set VCLIBDIR=%WINDIR%\System32
5151
- cp %VCLIBDIR%/vcruntime*.dll ssh2/
5252
- cp %VCLIBDIR%/msvcp*.dll ssh2/
@@ -65,27 +65,16 @@ install:
6565
- 7z x ci\appveyor\zlib1211.zip
6666

6767
build_script:
68+
- dir %OPENSSL_DIR%\lib\VC\x64\MD
6869
- ci\\appveyor\\build_zlib.bat
6970
- for %%I in (%PYTHONVERS%) do cp C:/zlib/lib/zlibstatic.lib %%I/libs/
7071
- for %%I in (%PYTHONVERS%) do ls %%I/libs/
7172
- ci\\appveyor\\build_ssh2.bat
7273
- for %%I in (%PYTHONVERS%) do cp build_dir/src/libssh2.lib %%I/libs/ || cp build_dir/src/Release/libssh2.lib %%I/libs/
7374
- rm -f ssh2/*.c
74-
- ps: ls ssh2
75-
- for %%I in (%PYTHONVERS%) do %%I\python.exe -V
76-
- for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py build_ext
77-
- for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py build
78-
- for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py install
79-
- ps: ls ssh2
8075

8176
test_script:
82-
- cd dist
83-
- for %%I in (%PYTHONVERS%) do %%I\python.exe -c "from ssh2.session import Session; Session()"
84-
- cd ..
85-
86-
after_test:
87-
- for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py bdist_wheel
88-
- mv dist/* .
77+
- ci\\appveyor\\build_package.bat
8978

9079
artifacts:
9180
- path: "*.whl"

Diff for: .circleci/config.yml

+27-26
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,26 @@
1515
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
version: 2.1
1717

18-
orbs:
19-
python: circleci/[email protected]
2018

2119
jobs:
2220
python_test:
2321
parameters:
2422
python_ver:
2523
type: string
26-
default: "3.6"
24+
default: "3.10"
2725
docker:
28-
- image: circleci/python:<< parameters.python_ver >>
26+
- image: cimg/python:<< parameters.python_ver >>
2927
steps:
3028
- checkout
31-
- python/load-cache:
32-
dependency-file: requirements_dev.txt
33-
key: depsv3-{{ .Branch }}.{{ arch }}-PY<< parameters.python_ver >>
3429
- run:
3530
name: Deps
3631
command: |
3732
sudo apt-get update
3833
sudo apt-get install cmake openssh-server
3934
pip install -r requirements_dev.txt
40-
- python/save-cache:
41-
dependency-file: requirements_dev.txt
42-
key: depsv3-{{ .Branch }}.{{ arch }}-PY<< parameters.python_ver >>
4335
- run:
4436
command: |
37+
pip uninstall -y cython
4538
python setup.py build_ext --inplace
4639
eval "$(ssh-agent -s)"
4740
name: Build
@@ -50,20 +43,32 @@ jobs:
5043
set -x
5144
ls -lhtr ssh2/
5245
pwd
53-
pytest tests
46+
python -m pytest tests
47+
name: Test
48+
- run:
49+
command: |
50+
python -m pytest ci/integration_tests
51+
name: Integration
52+
- run:
53+
command: |
5454
flake8 ssh2
55+
name: Flake
56+
- run:
57+
command: |
5558
python setup.py sdist
5659
cd dist; pip install *; python -c 'from ssh2.session import Session; Session()'; cd ..
60+
name: Sdist Install
61+
- run:
62+
command: |
5763
cd doc
5864
make html
5965
cd ..
60-
name: Test
66+
name: Docs
6167

6268
osx:
6369
parameters:
6470
xcode_ver:
6571
type: string
66-
default: "11.6.0"
6772
macos:
6873
xcode: << parameters.xcode_ver >>
6974
environment:
@@ -75,6 +80,8 @@ jobs:
7580
name: deps
7681
command: |
7782
brew install cmake git-lfs python libssh2
83+
brew link --force openssl
84+
brew link --force libssh2
7885
pip3 install twine
7986
which twine
8087
- run:
@@ -90,12 +97,9 @@ jobs:
9097
9198
manylinux-x86_64:
9299
machine:
93-
image: ubuntu-2004:202201-02
100+
image: ubuntu-2004:current
94101
steps: &manylinux-steps
95102
- checkout
96-
- python/load-cache:
97-
key: manylinuxdepsv6-{{ .Branch }}.{{ arch }}
98-
dependency-file: requirements_dev.txt
99103
- run:
100104
name: Git LFS
101105
command: |
@@ -110,11 +114,7 @@ jobs:
110114
pip install -U pip
111115
pip install twine
112116
which twine
113-
which python
114117
which python3
115-
- python/save-cache:
116-
key: manylinuxdepsv6-{{ .Branch }}.{{ arch }}
117-
dependency-file: requirements_dev.txt
118118
- run:
119119
name: Build Wheels
120120
command: |
@@ -134,22 +134,22 @@ jobs:
134134
135135
manylinux2014-aarch64:
136136
machine:
137-
image: ubuntu-2004:202101-01
137+
image: ubuntu-2004:current
138138
resource_class: arm.medium
139139
steps: *manylinux-steps
140140

141141
workflows:
142-
version: 2.1
142+
version: 2
143143
main:
144144
jobs:
145145
- python_test:
146146
matrix:
147147
parameters:
148148
python_ver:
149-
- "3.6"
150149
- "3.8"
151-
- "3.9"
152150
- "3.10"
151+
- "3.11"
152+
- "3.12"
153153
filters:
154154
tags:
155155
ignore: /.*/
@@ -166,7 +166,8 @@ workflows:
166166
parameters:
167167
xcode_ver:
168168
- "14.0.0"
169-
- "13.1.0"
169+
- "15.0.0"
170+
- "16.0.0"
170171
filters:
171172
tags:
172173
only: /.*/

Diff for: .gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ zlib1211.zip filter=lfs diff=lfs merge=lfs -text
66
*.rpm filter=lfs diff=lfs merge=lfs -text
77
ci/docker/manylinux/libssh2.tar.gz filter=lfs diff=lfs merge=lfs -text
88
ci/docker/manylinux/cmake-2.8.11.1-5.4.x86_64.rpm filter=lfs diff=lfs merge=lfs -text
9+
ssh2/_version.py export-subst

Diff for: Changelog.rst

+18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
Change Log
22
=============
33

4+
1.1.0 (unreleased)
5+
++++++++++++++++++
6+
7+
Changes
8+
--------
9+
10+
* Support for Python >=3.12.
11+
* Upgraded embedded and wheel ``libssh2`` to ``1.11.1``.
12+
* Upgraded wheel OpenSSL to 3.4.0.
13+
* Removed testing for Python versions <3.8.
14+
15+
Packaging
16+
----------
17+
18+
* Added binary wheels for Python versions 3.11, 3.12.
19+
* Added OSX 12.0 and 13.0 wheels, Apple Silicon.
20+
21+
422
1.0.0
523
++++++
624

Diff for: MANIFEST.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ recursive-exclude docker *
33
include _setup_libssh2.py
44
include versioneer.py
55
include ssh2/_version.py
6-
recursive-exclude .circleci
6+
recursive-exclude .circleci *
7+
recursive-exclude ci *
78
include LICENSE
89
include ssh2/*.pyx
910
include ssh2/*.pxd

Diff for: _setup_libssh2.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
# License along with this library; if not, write to the Free Software
1515
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
import os
17-
18-
from sys import stderr
19-
from subprocess import check_call
2017
from glob import glob
2118
from shutil import copy2
19+
from subprocess import check_call
20+
21+
from sys import stderr
2222

2323

2424
def build_ssh2():
@@ -27,12 +27,14 @@ def build_ssh2():
2727
return
2828
if os.path.exists('/usr/local/opt/openssl'):
2929
os.environ['OPENSSL_ROOT_DIR'] = '/usr/local/opt/openssl'
30+
if os.path.exists('/opt/homebrew/opt/openssl'):
31+
os.environ['OPENSSL_ROOT_DIR'] = '/opt/homebrew/opt/openssl'
3032

3133
if not os.path.exists('build_dir'):
3234
os.mkdir('build_dir')
3335

3436
os.chdir('build_dir')
35-
check_call('cmake ../libssh2/libssh2 -DBUILD_SHARED_LIBS=ON \
37+
check_call('cmake ../libssh2 -DBUILD_SHARED_LIBS=ON \
3638
-DENABLE_ZLIB_COMPRESSION=ON -DENABLE_CRYPT_NONE=ON \
3739
-DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL',
3840
shell=True, env=os.environ)

Diff for: ci/appveyor/build_package.bat

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
IF NOT "%APPVEYOR_REPO_TAG%" == "true" (exit 0)
2+
3+
dir ssh2/
4+
5+
for %%I in (%PYTHONVERS%) do %%I\python.exe -V
6+
for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py build_ext
7+
for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py build
8+
for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py install
9+
10+
dir ssh2/
11+
12+
cd dist
13+
for %%I in (%PYTHONVERS%) do %%I\python.exe -c "from ssh2.session import Session; Session()"
14+
cd ..
15+
16+
for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py bdist_wheel
17+
mv dist/* .

Diff for: ci/appveyor/build_ssh2.bat

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mkdir build_dir
22
cd build_dir
33

44
ECHO "Building with platform %MSVC%"
5-
cmake ..\libssh2\libssh2 -G "NMake Makefiles" ^
5+
cmake ..\libssh2 -G "NMake Makefiles" ^
66
-DCMAKE_BUILD_TYPE=Release ^
77
-DCRYPTO_BACKEND=OpenSSL ^
88
-G"%MSVC%" ^
@@ -16,8 +16,8 @@ cmake ..\libssh2\libssh2 -G "NMake Makefiles" ^
1616
-DOPENSSL_ROOT_DIR=%OPENSSL_DIR%
1717
)
1818

19-
cp %OPENSSL_DIR%\lib\VC\libcrypto%PYTHON_ARCH%MD.lib %APPVEYOR_BUILD_FOLDER%
20-
cp %OPENSSL_DIR%\lib\VC\libssl%PYTHON_ARCH%MD.lib %APPVEYOR_BUILD_FOLDER%
19+
cp %OPENSSL_DIR%\lib\VC\x64\MD\libcrypto.lib %APPVEYOR_BUILD_FOLDER%
20+
cp %OPENSSL_DIR%\lib\VC\x64\MD\libssl.lib %APPVEYOR_BUILD_FOLDER%
2121

2222
cmake --build . --config Release
2323
cd ..

Diff for: ci/build-wheels.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Compile wheels
1919
# For testing
20-
# for PYBIN in `ls -1d /opt/python/cp36-cp36m/bin | grep -v cpython`; do
20+
# for PYBIN in `ls -1d /opt/python/cp310-cp310/bin | grep -v cpython`; do
2121
for PYBIN in $(ls -1d /opt/python/*/bin | grep -v cpython); do
2222
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
2323
done
@@ -29,6 +29,8 @@ done
2929

3030
# Install packages and test
3131
for PYBIN in $(ls -1d /opt/python/*/bin | grep -v cpython); do
32+
# for PYBIN in `ls -1d /opt/python/cp310-cp310/bin | grep -v cpython`; do
3233
"${PYBIN}/pip" install ssh2-python --no-index -f /io/wheelhouse
33-
(cd "$HOME"; "${PYBIN}/python" -c 'from ssh2.session import Session; Session()')
34+
(cd "$HOME"; "${PYBIN}/python" -c 'from ssh2.session import Session; Session()' &&
35+
echo "Import sanity check succeeded.")
3436
done

Diff for: ci/docker/manylinux/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
FROM quay.io/pypa/manylinux2010_x86_64
1717

18-
ENV OPENSSL openssl-1.1.1q
18+
ENV OPENSSL openssl-3.4.0
1919
ENV SYSTEM_LIBSSH2 1
20-
ENV LIBSSH2_VERSION 1.10.0
20+
ENV LIBSSH2_VERSION 1.11.1
2121

22-
RUN yum install zlib-devel -y
22+
RUN yum install zlib-devel perl-IPC-Cmd -y
2323

2424
ADD libssh2-${LIBSSH2_VERSION}.tar.gz libssh2-${LIBSSH2_VERSION}.tar.gz
2525
ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz

Diff for: ci/docker/manylinux/Dockerfile.2014_x86_64

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
FROM quay.io/pypa/manylinux2014_x86_64
1717

18-
ENV OPENSSL openssl-1.1.1q
18+
ENV OPENSSL openssl-3.4.0
1919
ENV SYSTEM_LIBSSH2 1
20-
ENV LIBSSH2_VERSION 1.10.0
20+
ENV LIBSSH2_VERSION 1.11.1
2121

22-
RUN yum install zlib-devel -y
22+
RUN yum install zlib-devel perl-IPC-Cmd -y
2323

2424
ADD libssh2-${LIBSSH2_VERSION}.tar.gz libssh2-${LIBSSH2_VERSION}.tar.gz
2525
ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz

Diff for: ci/docker/manylinux/Dockerfile.aarch64

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
FROM quay.io/pypa/manylinux2014_aarch64
1717

18-
ENV OPENSSL openssl-1.1.1q
18+
ENV OPENSSL openssl-3.4.0
1919
ENV SYSTEM_LIBSSH2 1
20-
ENV LIBSSH2_VERSION 1.10.0
20+
ENV LIBSSH2_VERSION 1.11.1
2121

2222
RUN yum install zlib-devel -y
2323

Diff for: ci/docker/manylinux/libssh2-1.10.0.tar.gz

-3
This file was deleted.

Diff for: ci/docker/manylinux/libssh2-1.11.1.tar.gz

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:d9ec76cbe34db98eec3539fe2c899d26b0c837cb3eb466a56b0f109cabf658f7
3+
size 1093012
File renamed without changes.

0 commit comments

Comments
 (0)