-
Notifications
You must be signed in to change notification settings - Fork 274
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
datetime/FakeDate equality failure on 3.13 #568
Comments
xmo-odoo
added a commit
to odoo-dev/odoo
that referenced
this issue
Mar 10, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568
robodoo
pushed a commit
to odoo/odoo
that referenced
this issue
Mar 10, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 closes #200978 Signed-off-by: Xavier Morel (xmo) <[email protected]>
fw-bot
pushed a commit
to odoo-dev/odoo
that referenced
this issue
Mar 10, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 X-original-commit: 833bea9
fw-bot
pushed a commit
to odoo-dev/odoo
that referenced
this issue
Mar 10, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 X-original-commit: 833bea9
fw-bot
pushed a commit
to odoo-dev/odoo
that referenced
this issue
Mar 10, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 X-original-commit: 833bea9
fw-bot
pushed a commit
to odoo-dev/odoo
that referenced
this issue
Mar 11, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 X-original-commit: 833bea9
robodoo
pushed a commit
to odoo/odoo
that referenced
this issue
Mar 11, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 closes #201077 X-original-commit: 833bea9 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
pushed a commit
to odoo/odoo
that referenced
this issue
Mar 11, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 closes #201093 X-original-commit: 833bea9 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
pushed a commit
to odoo/odoo
that referenced
this issue
Mar 11, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 closes #201093 X-original-commit: 833bea9 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
pushed a commit
to odoo/odoo
that referenced
this issue
Mar 11, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 closes #201088 X-original-commit: 833bea9 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
pushed a commit
to odoo/odoo
that referenced
this issue
Mar 11, 2025
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 closes #201081 X-original-commit: 833bea9 Signed-off-by: Xavier Morel (xmo) <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
succeeds when running on Python 3.10, 3.11, and 3.12 (running the latest freezegun, although in older versions as well e.g. 1.2) but fails when using faketime 1.5.1 on Python 3.13.
In fairness I don't know if that behaviour was ever expected, I just found it when trying 3.13 on an existing project. Replacing
FakeDate
bydate
fails in all of 3.10 to 3.13.The text was updated successfully, but these errors were encountered: