Use tomllib over toml for Python 3.11+#90
Conversation
|
@tr11 Is there anything else you'd like me to do to get this merged in? |
|
Looks good, I'll merge it in this week! |
|
Sorry for the late response, pytest has been fixed by adding some ignores.... Unfortunately, it's the "cleanest" way I can do it for now because we are working w/ two different python versions. TIA |
|
@tr11 |
|
Yeah, that seems like a good idea. Better be explicit with what we want to do instead of relying on catching in the except blocks. Thanks! |
|
@tr11 Agreed! Okay all should be fixed now. Let me know if there are any adjustments you'd like me to make :) I had to leave the ignore on line 877 due to the different types that come out of the toml.load function, but. ` 877: error: Argument 1 to "load" has incompatible type "TextIO"; expected "SupportsRead[bytes]" [arg-type] The above is the error that 3.11/12 gets, but is non-existent on <= 3.10 I can look into it more in the following week if you'd like |
|
@tr11 Didn't have azure/aws/gcp dependencies installed so I didn't catch that last issue. |
|
Any thoughts about using tomli instead for older versions? It seems to be a backport of the library so we wouldn't have to maintain a special |
|
Oh totally! I'll be a wee bit busy this week, but I'll see if I can whip something up by Friday |
|
No worries, I have some time today, I'll make the change and release a new
version.
…On Mon, Feb 19, 2024, 11:15 laundry-96 ***@***.***> wrote:
Oh totally! I'll be a wee bit busy this week, but I'll see if I can whip
something up by Friday
—
Reply to this email directly, view it on GitHub
<#90 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ6T2O4YLRHUALE6GRD5G3YUN3C7AVCNFSM6AAAAABCWLOPXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSG44TKNBVGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The uiri toml implementation doesn't support some minor features of TOML, such as "Not a homogeneous array".
Given that tomllib is added to Python's stdlib, and supports the above feature, it should be loaded by default, and uiri's toml lib should be loaded as a backup