Skip to content

Conversation

@ananthsub
Copy link
Contributor

What does this PR do?

Follow up to #7869
fsspec/filesystem_spec#647 in fsspec was part of the 2021.06 release recently, which checks for

from https://docs.pytest.org/en/6.2.x/tmpdir.html#the-tmpdir-fixture

tmpdir is a py.path.local object which offers os.path methods and more.

This causes the instance check to fail. As a workaround, we convert the tmpdir to str until fsspec can accommodate this again

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Jun 8, 2021

Codecov Report

Merging #7876 (cc0c795) into master (ce97676) will decrease coverage by 49%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master   #7876     +/-   ##
========================================
- Coverage      93%     44%    -49%     
========================================
  Files         202     202             
  Lines       13123   13121      -2     
========================================
- Hits        12156    5786   -6370     
- Misses        967    7335   +6368     

@ananthsub ananthsub marked this pull request as draft June 8, 2021 05:44
https://github.com/PyTorchLightning/pytorch-lightning/issues/1464
https://github.com/PyTorchLightning/pytorch-lightning/issues/1463
"""
tmpdir = str(tmpdir)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can it be done in conftest.py directly ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Tangentially related, what if we converted all tmpdir inputs to pathlib.Path in conftest?

Copy link
Contributor

Choose a reason for hiding this comment

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

already is a Path.
can't be convertet to str in conftest because otherwise it will fail in places where we expect tmpdir to be a Path.

Copy link
Contributor

Choose a reason for hiding this comment

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

it is a py.path.LocalPath not a pathlib.Path, there are small differences but the latter is much more common

Copy link
Contributor

Choose a reason for hiding this comment

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

@awaelchli awaelchli mentioned this pull request Jun 22, 2021
11 tasks
@ananthsub ananthsub closed this Sep 30, 2021
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.

4 participants