Skip to content

feat: Write CACHEDIR.TAG file#2805

Merged
gaborbernat merged 2 commits intopypa:mainfrom
neilramsay:feature/cachedir.tag
Nov 26, 2024
Merged

feat: Write CACHEDIR.TAG file#2805
gaborbernat merged 2 commits intopypa:mainfrom
neilramsay:feature/cachedir.tag

Conversation

@neilramsay
Copy link
Copy Markdown
Contributor

Write a Cache Directory Tag file "CACHEDIR.TAG" to created directory.

The CACHEDIR.TAG file is used by various tools to mark a directory as cache, so that it can be handled differently. Some backup tools look for this file to exclude the directory. For example, tar includes the --exclude-caches option.

See https://bford.info/cachedir/ for more details.

Thanks for contributing, make sure you address all the checklists (for details on how see development documentation)

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

@neilramsay neilramsay mentioned this pull request Nov 26, 2024
5 tasks
@neilramsay neilramsay marked this pull request as draft November 26, 2024 01:41
@neilramsay
Copy link
Copy Markdown
Contributor Author

Hi @gaborbernat,
I've been having a look at the build error logs, and I'm seeing errors in placed I wouldn't expect.
Such as test_creator.py::test_destination_exists_file or test_creator.py::test_os_path_sep_not_allowed.

Do you have any guidance on how I can be helpful?

Write a Cache Directory Tag file "CACHEDIR.TAG"
to created directory.

The CACHEDIR.TAG file is used by various tools to mark
a directory as cache, so that it can be handled differently.
Some backup tools look for this file to exclude the directory.
For example, tar includes the --exclude-caches option.

See https://bford.info/cachedir/ for more details.
@neilramsay
Copy link
Copy Markdown
Contributor Author

I think the current failures are due to the current working directory of tox relative to where I'm expecting .venv to be.
I'll push something up in a few hours.

@gaborbernat gaborbernat force-pushed the feature/cachedir.tag branch 4 times, most recently from 655afc0 to dc3dab9 Compare November 26, 2024 04:14
Copy link
Copy Markdown
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

Ok, when the CI passes we can merge it.

Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
@gaborbernat gaborbernat marked this pull request as ready for review November 26, 2024 04:16
@gaborbernat gaborbernat enabled auto-merge (squash) November 26, 2024 04:16
@gaborbernat gaborbernat disabled auto-merge November 26, 2024 04:31
@gaborbernat gaborbernat merged commit 2a29a1b into pypa:main Nov 26, 2024
@neilramsay
Copy link
Copy Markdown
Contributor Author

Thanks @gaborbernat for guiding me through this PR, and the improvements shown in the PR Feedback commit.

@gaborbernat
Copy link
Copy Markdown
Contributor

Thank you very much for your contribution.

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