Skip to content

Commit 300cbf0

Browse files
committed
Update dependencies
This change largely updates the dependencies and adds on to the dependabot config to have it manage dependency updates in the future. I also did a few minor tweaks that don't really affect users much.
1 parent 4019f77 commit 300cbf0

File tree

9 files changed

+34
-19
lines changed

9 files changed

+34
-19
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
version: 2
66
updates:
77

8+
# Maintain Rust Cargo dependencies
9+
- package-ecosystem: "cargo"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
13+
labels:
14+
- "dependencies"
815
# Maintain dependencies for our GitHub Actions
916
- package-ecosystem: "github-actions"
1017
directory: "/"

.github/workflows/build_and_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
with:
8282
target: ${{ matrix.platform.target }}
8383
# args: --release --out dist --find-interpreter <-- TODO: Add this back when maturin supports it
84-
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
84+
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
8585
# sccache: 'true'
8686
manylinux: auto
8787
before-script-linux: |
@@ -137,7 +137,7 @@ jobs:
137137
PKG_CONFIG_PATH: "/usr/share/miniconda/lib/pkgconfig/"
138138
with:
139139
target: ${{ matrix.platform.target }}
140-
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
140+
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
141141
# sccache: 'true'
142142
manylinux: musllinux_1_2
143143
before-script-linux: |
@@ -224,7 +224,7 @@ jobs:
224224
uses: PyO3/maturin-action@main
225225
with:
226226
target: ${{ matrix.target }}
227-
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
227+
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
228228
sccache: 'true'
229229
- name: Upload wheels
230230
uses: actions/upload-artifact@v4

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
OPENSSL_NO_VENDOR: 1
7373
with:
7474
target: ${{ matrix.platform.target }}
75-
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
75+
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
7676
# sccache: 'true'
7777
manylinux: auto
7878
before-script-linux: |
@@ -121,7 +121,7 @@ jobs:
121121
PKG_CONFIG_PATH: "/usr/share/miniconda/lib/pkgconfig/"
122122
with:
123123
target: ${{ matrix.platform.target }}
124-
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
124+
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
125125
# sccache: 'true'
126126
manylinux: musllinux_1_2
127127
before-script-linux: |
@@ -200,7 +200,7 @@ jobs:
200200
uses: PyO3/maturin-action@main
201201
with:
202202
target: ${{ matrix.target }}
203-
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
203+
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
204204
sccache: 'true'
205205
- name: Upload wheels
206206
uses: actions/upload-artifact@v4

.github/workflows/weekly_build_and_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
OPENSSL_NO_VENDOR: 1
7979
with:
8080
target: ${{ matrix.platform.target }}
81-
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
81+
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
8282
# sccache: 'true'
8383
manylinux: auto
8484
before-script-linux: |
@@ -134,7 +134,7 @@ jobs:
134134
PKG_CONFIG_PATH: "/usr/share/miniconda/lib/pkgconfig/"
135135
with:
136136
target: ${{ matrix.platform.target }}
137-
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
137+
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
138138
# sccache: 'true'
139139
manylinux: musllinux_1_2
140140
before-script-linux: |
@@ -221,7 +221,7 @@ jobs:
221221
uses: PyO3/maturin-action@main
222222
with:
223223
target: ${{ matrix.target }}
224-
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
224+
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
225225
sccache: 'true'
226226
- name: Upload wheels
227227
uses: actions/upload-artifact@v4

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ name = "hussh"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
openssl = { version = "0.10", features = ["vendored"] }
13-
pyo3 = "0.22"
14-
shellexpand = "2.1"
12+
openssl = { version = "0.10.68", features = ["vendored"] }
13+
pyo3 = "0.23.1"
14+
shellexpand = "3.1.0"
1515
# ssh2 = "0.9"
1616
# temporary until ssh2#312 makes it into a release. probably 0.9.5
1717
ssh2 = { git = "https://github.com/alexcrichton/ssh2-rs", branch = "master" }

src/connection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl SSHResult {
117117
// The __str__ method for the SSHResult class
118118
fn __str__(&self) -> PyResult<String> {
119119
Ok(format!(
120-
"stdout:\n{}stderr:\n{}status: {}",
120+
"stdout:\n{}\nstderr:\n{}\nstatus: {}",
121121
self.stdout, self.stderr, self.status
122122
))
123123
}

src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ fn hussh(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
1010
m.add_class::<connection::SSHResult>()?;
1111
m.add_class::<connection::InteractiveShell>()?;
1212
m.add_class::<connection::FileTailer>()?;
13-
m.add(
14-
"AuthenticationError",
15-
_py.get_type_bound::<AuthenticationError>(),
16-
)?;
13+
m.add("AuthenticationError", _py.get_type::<AuthenticationError>())?;
1714
Ok(())
1815
}

tests/conftest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,20 @@ def run_test_server(ensure_test_server_image):
3030
client = docker.from_env()
3131
try: # check to see if the container is already running
3232
container = client.containers.get("hussh-test-server")
33+
managed = False
3334
except docker.errors.NotFound: # if not, start it
3435
container = client.containers.run(
3536
TEST_SERVER_IMAGE,
3637
detach=True,
3738
ports={"22/tcp": 8022},
3839
name="hussh-test-server",
3940
)
41+
managed = True
4042
time.sleep(5) # give the server time to start
4143
yield container
42-
container.stop()
43-
container.remove()
44+
if managed:
45+
container.stop()
46+
container.remove()
4447
client.close()
4548

4649

tests/test_connection.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,14 @@ def test_pty_shell_context(conn):
180180
assert sh.result.status != 0
181181

182182

183+
@pytest.mark.skip("not yet implemented")
184+
def test_hangup_shell_context(conn):
185+
"""Test that we can hang up a running shell while a previous command is still running."""
186+
with conn.shell() as sh:
187+
sh.send("tail -f /dev/random")
188+
assert sh.result.stdout
189+
190+
183191
def test_session_timeout():
184192
"""Test that we can trigger a timeout on session handshake."""
185193
with pytest.raises(TimeoutError):

0 commit comments

Comments
 (0)