Support alternate datetime format for S3 files#262
Support alternate datetime format for S3 files#262mattharrison wants to merge 2 commits intoPyFilesystem:masterfrom
Conversation
|
I wonder if using a regex might be more reliable than simply looking for a hyphen? shrug |
|
The second of these two commits seems to be a duplicate of #232 ? I've never used S3, so can't test this myself, and I'd rather have feedback from other users that this still works with all versions of Python, before merging. |
|
@lurch - Thanks for your comments. I'm not sure how the second commit got into this PR. My Py3 patch was based on that one, so they are similar. Regarding using a regex. My opinion is that a regex is a tool to use when you have nothing else. In this case I know the other format doesn't have a dash in it, so a simple check should suffix. I guess the more correct code would be to use a smarter date parser (would introduce 3rd party dep) or try and format, then in the error handling code try again. Anyway, it works for me in Python 3 for adding, removing, renaming, and getting file info of both binary and text files, as well as directories. shrug :) |
|
If you can remove the second commit from this PR and force-push, I'd be happy to merge this alternate-datetime PR. I suspect the second commit snuck into this PR because you've created it from your |
This supports alternate formats for S3 buckets