Replacing python-dateutil to remove six
16 points by ubernostrum
16 points by ubernostrum
This is probably going to break in June. Or even just 1/1/2026.
I'm not sure what you mean by this comment. The three examples given are:
timedelta construct to represent the 180-day span) is not affected by year boundaries and does not need to special-case for them.Perhaps you could elaborate on which of these you think will imminently break, and why?
+1 on import datetime as dt, I got that from the same source about a year ago and it's been a minor but real QoL improvement. If you use ruff you can enforce it with
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
"datetime" = "dt"
Goodbye six, and we also get slightly quicker install, import and run times.
Is there something especially problematic about six, or is it just about having one fewer dependency to install?
No, Six isn't problematic, but the fact that it's still in use is. It was only ever meant to help bridge a compatibility gap between Python 2 and Python 3. Python 2 has been EOL for so long six should be unnecessary by now, but it's still used in a bunch of places because nobody's bothered removing it.