-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Date/DateTime + relativedelta() #11
Comments
Here's what a PR would look like it we didn't care about people who don't have dateutil installed: |
@SonOfLilit I think we could do this, if you protected the import with an cc @pganssle will I regret this approach? |
I kinda hate the |
I'm afraid dateutil are not much more likely to accept our patches than the standard library, so we will need to create a dateutiltype? |
Why not? I'm not entirely opposed to landing the changes here, assuming we have at least tacit buy-in from the dateutil maintainers |
I'll ask
…On Wed, Aug 7, 2024, 09:43 Glyph ***@***.***> wrote:
I'm afraid dateutil are not much more likely to accept our patches than
the standard library
Why not?
I'm not entirely opposed to landing the changes here, assuming we have at
least tacit buy-in from the dateutil maintainers
—
Reply to this email directly, view it on GitHub
<#11 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADU7JQQ37HVESVYABGML3ZQG6Y3AVCNFSM6AAAAABLZRZPCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSG4ZTMNJQGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi,
You're my hero. Thanks.
Also, I want to actually use your library in my code, but I'm getting errors for
my_date + relativedelta(days=1)
(and same withdatetime
s). I wonder what it would take to fix it.Can your
pyi
add additional overloads to [https://github.com/python/typeshed/blob/main/stubs/python-dateutil/dateutil/relativedelta.pyi](typeshed's relativedelta.pyi)?I guess we can add a fake
Date.__add__(self, other: relativedelta)
instead and it would do the right thing? Do we need to entirely replace typeshed'srelativedelta
for this to work?How can I approach getting this to work? Will you accept a PR? Is there a workaround I can use in the meantime?
You should be aware of this before you answer, I guess. One of the weirder corners of Python:
I guess we could have something like:
The text was updated successfully, but these errors were encountered: