Skip to content

Commit 0f62d8d

Browse files
committed
Merged recent changes from 'main' branch
2 parents 35bfb2a + a49b3f9 commit 0f62d8d

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

.bumpclient.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "0.16.2"
2+
current_version = "0.16.3"
33
commit = true
44
tag = false
55

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "0.16.2"
2+
current_version = "0.16.3"
33
commit = true
44
tag = true
55

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ requires = [
77

88
[project]
99
name = "murfey"
10-
version = "0.16.2"
10+
version = "0.16.3"
1111
description = "Client-Server architecture hauling Cryo-EM data"
1212
readme = "README.md"
1313
keywords = [

src/murfey/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from __future__ import annotations
22

3-
__version__ = "0.16.2"
4-
__supported_client_version__ = "0.16.2"
3+
__version__ = "0.16.3"
4+
__supported_client_version__ = "0.16.3"

src/murfey/server/api/bootstrap.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,16 @@ def parse_cygwin_request(request_path: str):
228228
"""
229229

230230
# Validate request path
231-
if bool(re.fullmatch(r"^[\w\s\.\-/]+$", request_path)) is False:
231+
if bool(re.fullmatch(r"^[\w\s\.\-\+/]+$", request_path)) is False:
232232
raise ValueError(f"{request_path!r} is not a valid request path")
233233

234234
try:
235-
url = f'{find_cygwin_mirror()}{quote(request_path, safe="")}'
235+
url = f'{find_cygwin_mirror()}{quote(request_path, safe="/")}'
236236
except Exception:
237237
raise HTTPException(
238238
status_code=503, detail="Could not identify a suitable Cygwin mirror"
239239
)
240+
240241
logger.info(f"Forwarding Cygwin download request to {_sanitise_str(url)}")
241242
cygwin_data = requests.get(url)
242243
return Response(
@@ -434,7 +435,7 @@ def _rewrite_url(match):
434435
raise ValueError(f"{system!r} is not a valid msys2 environment")
435436

436437
# Construct URL to main MSYS repo and get response
437-
arch_url = f'{msys2_url}/{quote(system, safe="")}'
438+
arch_url = f'{msys2_url}/{quote(system, safe="/")}'
438439
response = requests.get(arch_url)
439440

440441
# Parse and rewrite package index content
@@ -497,7 +498,7 @@ def _rewrite_url(match):
497498

498499
# Construct URL to main MSYS repo and get response
499500
package_list_url = (
500-
f'{msys2_url}/{quote(system, safe="")}/{quote(environment, safe="")}'
501+
f'{msys2_url}/{quote(system, safe="/")}/{quote(environment, safe="/")}'
501502
)
502503
response = requests.get(package_list_url)
503504

@@ -551,7 +552,7 @@ def get_msys2_package_file(
551552
raise ValueError(f"{package!r} is not a valid package name")
552553

553554
# Construct URL to main MSYS repo and get response
554-
package_url = f'{msys2_url}/{quote(system, safe="")}/{quote(environment, safe="")}/{quote(package, safe="")}'
555+
package_url = f'{msys2_url}/{quote(system, safe="/")}/{quote(environment, safe="/")}/{quote(package, safe="/")}'
555556
package_file = requests.get(package_url)
556557

557558
if package_file.status_code == 200:
@@ -581,7 +582,7 @@ def _get_full_pypi_path_response(package: str) -> requests.Response:
581582
# alphanumerics (including underscores; \w), dashes (\-), and periods (\.)
582583
if re.match(r"^[\w\-\.]+$", package) is not None:
583584
# Sanitise and normalise package name according to PEP 503
584-
package_clean = quote(re.sub(r"[-_.]+", "-", package.lower()), safe="")
585+
package_clean = quote(re.sub(r"[-_.]+", "-", package.lower()), safe="/")
585586

586587
# Get HTTP response
587588
url = f"https://pypi.org/simple/{package_clean}"

0 commit comments

Comments
 (0)