Skip to content

Commit b5cbfb6

Browse files
authored
Merge pull request #44 from corka149/43-portforwardforward-incorrectly-rejects-context-names-that-contain
Allow / in strings
2 parents 3e73609 + 50eb093 commit b5cbfb6

File tree

6 files changed

+10
-13
lines changed

6 files changed

+10
-13
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
matrix:
2323
target: [x86_64, x86, aarch64]
24-
version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
24+
version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
2525
steps:
2626
- uses: actions/checkout@v3
2727
- uses: actions/setup-python@v4
@@ -45,7 +45,7 @@ jobs:
4545
strategy:
4646
matrix:
4747
target: [x64, x86]
48-
version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
48+
version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
4949
steps:
5050
- uses: actions/checkout@v3
5151
- uses: actions/setup-python@v4
@@ -69,7 +69,7 @@ jobs:
6969
strategy:
7070
matrix:
7171
target: [x86_64, aarch64]
72-
version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
72+
version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
7373
steps:
7474
- uses: actions/checkout@v3
7575
- uses: actions/setup-python@v4

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
History
33
=======
44

5+
0.7.1 (2024-12-15)
6+
------------------
7+
* Allow "/" in strings
8+
* Drop support for Python 3.8
9+
510
0.7.0 (2024-10-18)
611
------------------
712
* Allow binding to a local random free port

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ Wheels are available for:
4040

4141
with Python versions:
4242

43-
* 3.8
4443
* 3.9
4544
* 3.10
4645
* 3.11
4746
* 3.12
47+
* 3.13
4848

4949
**Requirements for installation from source**
5050

python/portforward/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ def _validate_str(arg_name, arg) -> str:
199199
if len(arg) == 0:
200200
raise ValueError(f"{arg_name} cannot be an empty str")
201201

202-
if "/" in arg:
203-
raise ValueError(f"{arg_name} contains illegal character '/'")
204-
205202
return arg
206203

207204

@@ -253,7 +250,4 @@ def _kube_context(context):
253250
if not isinstance(context, str):
254251
raise ValueError(f"kube_context={context} is not a valid str")
255252

256-
if "/" in context:
257-
raise ValueError("kube_context contains illegal character '/'")
258-
259253
return context

tests/test_portforward.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,10 @@ def test_portforward_from_port_zero_assigns_port(kind_cluster: KindCluster):
157157
[
158158
# Namespace
159159
("", "web", 9000, 80),
160-
("/test", "web", 9000, 80),
161160
(1337, "web", 9000, 80),
162161
(None, "web", 9000, 80),
163162
# Pod name
164163
("test", "", 9000, 80),
165-
("test", "web/", 9000, 80),
166164
("test", 1337, 9000, 80),
167165
("test", None, 9000, 80),
168166
# From port

0 commit comments

Comments
 (0)