Skip to content

Conversation

@ap--
Copy link
Contributor

@ap-- ap-- commented Oct 25, 2025

Close #1934

Currently the protocol class attribute on the HTTPFileSystem depends on the first used http protocol, due to:

if getattr(cls, "protocol", None) in ("abstract", None):
cls.protocol = protocol

This PR adds a protocol classvar tuple to the filesystem class with http and https.

@ap-- ap-- changed the title Stable http protocol Add class attribute protocol to HTTPFileSystem Oct 25, 2025
Copy link
Member

@martindurant martindurant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is the right fix.

For the test, I think a subprocess should be avoided - why can't the same code be run inside the session as normal?

@martindurant
Copy link
Member

Note that the downstream error is new and unrelated.

@martindurant
Copy link
Member

I simplified the test - this is equivalent?

@ap--
Copy link
Contributor Author

ap-- commented Oct 28, 2025

Hi @martindurant, I used subprocess before to be able to create a failing test before the patch is applied. But your version is equivalent after the patch and ensures that the first (?default) protocol on the class will be 'http'. Thanks!

@martindurant martindurant merged commit 11eabae into fsspec:master Oct 28, 2025
17 of 20 checks passed
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.

http fs protocol depends on if "http" or "https" is used first

2 participants