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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_unannex_etc fails on windows #7440
Comments
Certianly possible there is a bug on windows. And I wouldn't be very surprised if something about windows using utf-16 for filenames causes a problem with quoting of unicode on windows. But looks like the filename in question is |
Also note that git-annex unannex supports --json since the latest release, so you could use that to avoid needing to unquote the path. |
yes, we have plans to RF many commands to use ❯ git grep 'ANNEX_MIN_VERSION ='
datalad/support/annexrepo.py: GIT_ANNEX_MIN_VERSION = '8.20200309' filed #7442 to collect/track where/what was already migrated or not to use --json |
re quote/unquote -- indeed may be there is some wrong assumption coded in. And the difference in behavior on CI could be due to the fact that we do not add unicode symbols while testing on windows: https://github.com/datalad/datalad/blob/HEAD/datalad/tests/utils_pytest.py#L1467 but on a quick try of doing the same generally so also for linux I didn't get that test to fail locally❯ git diff
diff --git a/datalad/tests/utils_pytest.py b/datalad/tests/utils_pytest.py
index 191f3b1e8..cff064d2f 100644
--- a/datalad/tests/utils_pytest.py
+++ b/datalad/tests/utils_pytest.py
@@ -1459,6 +1459,7 @@ UNICODE_FILENAME = u"ΔЙקم๗あ"
# so Й might get recoded
# (ref: https://github.com/datalad/datalad/pull/1921#issuecomment-385809366)
if sys.getfilesystemencoding().lower() == 'utf-8':
+ UNICODE_FILENAME = ''
if on_osx:
# TODO: figure it really out
UNICODE_FILENAME = UNICODE_FILENAME.replace(u"Й", u"") the filename in question then (on linux) is a bit different and with newish git-annex we do get it quoted on linux:
so hence test passes... didn't have a check to see how behaves on windows |
but there is indeed no quoting if filename doesn't contain any of those tricky characters
so the code assumption that it would always be quoted does not hold I think -- let me send a quick PR... |
Lead to a failure on Windows. Apparently with core.quotepath=false we would not get simple filenames quoted, so we should decide to remove or not quotes "dynamically" on whether we find them Closes datalad#7440
The |
Issue fixed in |
After all fixes for recent git-annex we have 1 still failing on windows in datalad/git-annex tests
so smells like it just quoting behaves differently on windows @joeyh? (I have no windows env handy ATM to check)
The text was updated successfully, but these errors were encountered: