Skip to content

Conversation

@hugovk
Copy link
Contributor

@hugovk hugovk commented Nov 12, 2025

Follow on from fsspec/s3fs#993.

@martindurant
Copy link
Member

It is right to fix the warning in gcsfs (although the timeout would be useful!), or to get the CI job to pass, you can do the same as here for now.

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.

Can you comment on why strict=True needs to be added to zip(), but mode="r" (or "rt") needs to be removed from open() when these are both the default values? I would rather not have the big diff if possible.

@hugovk
Copy link
Contributor Author

hugovk commented Nov 13, 2025

Can you comment on why strict=True needs to be added to zip()

It's a Ruff rule that triggers for 3.10: https://docs.astral.sh/ruff/rules/zip-without-explicit-strict/

  B905 `zip()` without an explicit `strict=` parameter
     --> fsspec/utils.py:570:21
      |
  568 |             for v in zip(
  569 |                 *sorted(
  570 |                     zip(paths, starts, ends),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^
  571 |                 )
  572 |             )
      |
  help: Add explicit value for parameter `strict=`

This is from pre-commit.

I can revert if you like? If so, we'll need to add B905 to the ignore list.


mode="r" (or "rt") needs to be removed from open() when these are both the default values?

This is UP015 from running ruff check --select UP --fix: https://docs.astral.sh/ruff/rules/redundant-open-modes/

I see UP015 is in the ignore list, I guess running with --select UP overrode it. There is a comment in the ignore list to "Fix these codes later", but happy to also revert it if you like?

@martindurant
Copy link
Member

Yes, please make it so that strict= is not required, but the mode argument is allowed. The coder should have the freedom to decide what level of explicitness/verbosity is apropriate.

@hugovk
Copy link
Contributor Author

hugovk commented Nov 13, 2025

Done!

@martindurant martindurant merged commit dbc633e into fsspec:master Nov 13, 2025
10 checks passed
@hugovk hugovk deleted the add-3.14 branch November 13, 2025 20:40
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.

2 participants