| 16 Apr 2022 |
K900 | Poetry's autogenerated setup.py stuff is jank | 06:16:05 |
adisbladis | Python is just layers upon layers of jank | 06:16:20 |
K900 | True, but at least we can try to reduce the jank | 06:16:29 |
adisbladis | I still like it though, don't get me wrong | 06:16:38 |
adisbladis | Some day soon I'll try to find some energy to add proper handling of this to upstream poetry | 06:17:14 |
adisbladis | Oh, there was some recent-ish movement on this front https://github.com/python-poetry/poetry/pull/2794#issuecomment-1069740251 | 06:17:49 |
K900 | https://github.com/NixOS/nixpkgs/pull/168881 | 06:18:06 |
K900 | 3.6k rebuilds eeey | 06:18:10 |
adisbladis | Lovely | 06:18:22 |
K900 | Honestly how the fuck is that still not in the stdlib | 06:18:40 |
adisbladis | In reply to @k900:0upti.me Honestly how the fuck is that still not in the stdlib What's really mind boggling is that toml isn't in stdlib but is mandated by PEP517/PEP518 | 06:19:07 |
K900 | It is now | 06:19:17 |
adisbladis | Oh? | 06:19:24 |
adisbladis | That's cool | 06:19:27 |
K900 | https://docs.python.org/3.11/library/tomllib.html | 06:19:34 |
adisbladis | I've not been computing much for a while, I need to catch up :) | 06:19:43 |
K900 | Should ship in 3.11 unless something goes horribly wrong | 06:19:55 |
K900 | But you know what my favorite bit of that is | 06:21:08 |
adisbladis | ? | 06:21:17 |
K900 | https://github.com/python/cpython/blob/main/Lib/tomllib/_re.py#L39= | 06:21:36 |
K900 | It has an iso8601 parse | 06:21:39 |
K900 | * It has an iso8601 parser | 06:21:40 |
adisbladis | Hahaha | 06:22:02 |
adisbladis | That's hilarious | 06:22:05 |
K900 | So technically the right way to parse 8601 dates in 3.11 is to tomllib.loads them | 06:22:11 |
adisbladis | That's not technically a compliant iso8601 parser though | 06:23:48 |
K900 | It almost is | 06:24:47 |
adisbladis | Neither is the iso8601 module though ^_^ | 06:25:16 |
adisbladis | iso8601.parse_date("2022-W15-6") ->
ParseError: Unable to parse date string '2022-W15-6'
| 06:26:04 |
K900 | Actually looks like the TOML spec mandates RFC3339, not ISO8601 | 06:26:39 |