Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-125413: Add private metadata methods topathlib.Path.info#129897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
barneygale merged 16 commits intopython:mainfrombarneygale:gh-125413-merge-copyreader
Feb 17, 2025
Merged
Changes from1 commit
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
4dd7c21
GH-125413: Add private metadata methods to `pathlib.Path.info`
barneygaleFeb 9, 2025
30faab7
Fix atime/mtime copying
barneygaleFeb 9, 2025
22e065d
Simplify patch
barneygaleFeb 9, 2025
cd4a1b5
Improve naming
barneygaleFeb 9, 2025
07f89a4
Return `None` if results aren't available.
barneygaleFeb 9, 2025
2026886
Merge `_create_metadata()` and `_create_symlink_metadata()`
barneygaleFeb 9, 2025
ba4d393
Simplify patch a bit
barneygaleFeb 9, 2025
6cde4fb
Further reduce diff
barneygaleFeb 9, 2025
0871a39
Stop suppressing stat() errors from new methods
barneygaleFeb 9, 2025
89e49bf
Stop using `samefile()`, add `_file_id()` and `_device_id()`
barneygaleFeb 11, 2025
86b671f
Attempt to fix access time test
barneygaleFeb 12, 2025
f6b2249
Delete `_device_id()`
barneygaleFeb 13, 2025
47616de
Merge branch 'main' into gh-125413-merge-copyreader
barneygaleFeb 13, 2025
bc9032b
Merge branch 'main' into gh-125413-merge-copyreader
barneygaleFeb 16, 2025
6c03d51
Merge branch 'main' into gh-125413-merge-copyreader
encukouFeb 17, 2025
13db1fe
`_create_metadata` -> `_copy_metadata`
barneygaleFeb 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Attempt to fix access time test
  • Loading branch information
@barneygale
barneygale committedFeb 12, 2025
commit86b671f124e91213eb108c0cda1923aaa7781c41
8 changes: 5 additions & 3 deletionsLib/test/test_pathlib/test_pathlib.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1440,11 +1440,13 @@ def test_copy_dir_preserve_metadata(self):
if hasattr(os, 'chflags') and hasattr(stat, 'UF_NODUMP'):
os.chflags(source / 'fileC', stat.UF_NODUMP)
target = base / 'copyA'

subpaths = ['.', 'fileC', 'dirD', 'dirD/fileD']
source_sts = [source.joinpath(subpath).stat() for subpath in subpaths]
source.copy(target, preserve_metadata=True)
target_sts = [target.joinpath(subpath).stat() for subpath in subpaths]

for subpath in ['.', 'fileC', 'dirD', 'dirD/fileD']:
source_st = source.joinpath(subpath).stat()
target_st = target.joinpath(subpath).stat()
for source_st, target_st in zip(source_sts, target_sts):
self.assertLessEqual(source_st.st_atime, target_st.st_atime)
self.assertLessEqual(source_st.st_mtime, target_st.st_mtime)
self.assertEqual(source_st.st_mode, target_st.st_mode)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp