Skip to content

Fix duplicate slash URL handling for 25.8#2051

Open
benflexcompute wants to merge 1 commit into
release-candidate/25.8from
ben/25.8-requests-double-slash-current
Open

Fix duplicate slash URL handling for 25.8#2051
benflexcompute wants to merge 1 commit into
release-candidate/25.8from
ben/25.8-requests-double-slash-current

Conversation

@benflexcompute
Copy link
Copy Markdown
Collaborator

@benflexcompute benflexcompute commented May 30, 2026

Summary

  • Normalize Flow360 environment URL construction so leading path slashes do not create duplicate slash API paths.
  • Remove known leading slash folder API paths.
  • Constrain Requests to the 2.32 patch line.
  • Add focused URL normalization tests.

Verification

  • PYTHONDONTWRITEBYTECODE=1 /disk2/ben/Flow360/.venv/bin/python -m pytest tests/test_environment.py -q -p no:cacheprovider
  • Forced local repro with requests==2.34.2: prod and preprod folder requests used single-slash URLs and RestApi.get succeeded.

Note: poetry check --lock still fails on the existing unrelated pyswarms docs extra issue, but no longer reports stale lock metadata.


Note

Medium Risk
Touches how all REST URLs are built and folder API paths; wrong joining could break API calls, though behavior is covered by new tests.

Overview
Fixes double-slash API URLs when environment base URLs end with / and REST paths start with / (or the opposite). EnvironmentConfig URL helpers now join bases and paths with normalized slashes; folder listing code uses v2/items and v2/folders without a leading slash.

requests is capped to the 2.32 patch line (>=2.32.4,<2.33.0) with an updated lockfile. New tests cover slash normalization for environment URLs and RestApi paths.

Reviewed by Cursor Bugbot for commit b50a532. Bugbot is set up for automated code reviews on this repo. Configure here.

@benflexcompute benflexcompute enabled auto-merge (squash) May 30, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant