Skip to content
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

Python 3.8 breaks datetime test #352

Closed
konstin opened this issue Feb 12, 2019 · 8 comments
Closed

Python 3.8 breaks datetime test #352

konstin opened this issue Feb 12, 2019 · 8 comments
Labels

Comments

@konstin
Copy link
Member

konstin commented Feb 12, 2019

From the travis ci build log:

=================================== FAILURES ===================================
___________________________ test_date_from_timestamp ___________________________
    @given(d=dates())
>   def test_date_from_timestamp(d):
tests/test_datetime.py:84: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
d = datetime.date(2000, 1, 1)
    @given(d=dates())
    def test_date_from_timestamp(d):
        ts = get_timestamp(pdt.datetime.combine(d, pdt.time(0)))
>       assert rdt.date_from_timestamp(int(ts)) == pdt.date.fromtimestamp(ts)
E       TypeError: an integer is required (got type tuple)
tests/test_datetime.py:86: TypeError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_date_from_timestamp(d=datetime.date(2000, 1, 1))
================ 1 failed, 55 passed, 4 xfailed in 0.94 seconds ================
ERROR: InvocationError for command '/home/travis/build/PyO3/pyo3/examples/rustapi_module/.tox/py/bin/pytest' (exited with code 1)

I didn't check whether this is a bug in the alpha or a breaking change.

@pganssle
Copy link
Member

Hm, I can't tell which part is raising the error here. Is it date_from_timestamp? ts is not a tuple, I'm getting a float on 3.8.0a1+.

@pganssle
Copy link
Member

OK, this is definitely the date_from_timestamp function. There should not have been a breaking change in this, I suspect it has something to do with the fact that this function was converted over to using the argument clinic between 3.7 and 3.8, which may have accidentally broken the API.

@pganssle
Copy link
Member

I've filed issue 36025 for this on the Python tracker, along with the PR python/cpython#11922, which should fix it.

We can either let it continue failing for a while or add in a conditional skip until the next alpha release.

@konstin
Copy link
Member Author

konstin commented Feb 18, 2019

Wow thanks for fixing that in python!

We can just lets this fail for now, it's an allowed_failure on travis anyway.

@konstin konstin added the bug label Feb 18, 2019
@pganssle
Copy link
Member

@konstin OK, the CPython PR has been merged, so master should work now. Alpha 4 is scheduled for I think tomorrow, so depending on what "3.8-dev" pulls in, I assume this should be fixed in the next few days.

@konstin
Copy link
Member Author

konstin commented Apr 28, 2019

We'll likely have to wait a bit longer for travis ci, but other that sounds great!

@pganssle
Copy link
Member

@konstin Looks like it's fixed on Travis!

@konstin
Copy link
Member Author

konstin commented Jul 15, 2019

3.8 is still failing but this time it's tox and toml

@konstin konstin closed this as completed Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants