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

0.6.0: pytest warnings #67

Closed
kloczek opened this issue Apr 25, 2021 · 6 comments · Fixed by #68
Closed

0.6.0: pytest warnings #67

kloczek opened this issue Apr 25, 2021 · 6 comments · Fixed by #68

Comments

@kloczek
Copy link

kloczek commented Apr 25, 2021

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-isodate-0.6.0-8.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-isodate-0.6.0-8.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/python3 -Bm pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /home/tkloczko/rpmbuild/BUILD/isodate-0.6.0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.0
collected 18 items

src/isodate/tests/test_date.py .                                                                                                                                     [  5%]
src/isodate/tests/test_datetime.py .                                                                                                                                 [ 11%]
src/isodate/tests/test_duration.py ..........                                                                                                                        [ 66%]
src/isodate/tests/test_pickle.py ....                                                                                                                                [ 88%]
src/isodate/tests/test_strf.py .                                                                                                                                     [ 94%]
src/isodate/tests/test_time.py .                                                                                                                                     [100%]

============================================================================= warnings summary =============================================================================
src/isodate/tests/test_duration.py: 18 warnings
  /home/tkloczko/rpmbuild/BUILD/isodate-0.6.0/src/isodate/duration.py:183: DeprecationWarning: an integer is required (got type decimal.Decimal).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
    newdt = other.replace(year=newyear, month=newmonth, day=newday)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
===================================================================== 18 passed, 18 warnings in 0.12s ======================================================================
@hugovk
Copy link
Contributor

hugovk commented Sep 13, 2021

Please see #68 for a fix. Note this becomes an error in Python 3.10, due out in three weeks.

@hugovk
Copy link
Contributor

hugovk commented Sep 13, 2021

This issue is a duplicate of #58.

@hugovk
Copy link
Contributor

hugovk commented Nov 6, 2021

Fixed in the fork at https://github.com/isodate/isodate/pull/1.

@kloczek
Copy link
Author

kloczek commented Dec 9, 2021

So https://github.com/isodate/isodate is fork or main line?

@hugovk
Copy link
Contributor

hugovk commented Dec 9, 2021

https://github.com/isodate/isodate is a fork.

@gweis gweis closed this as completed in #68 Dec 12, 2021
@kloczek
Copy link
Author

kloczek commented Dec 12, 2021

Tested 0.6.1 and all lokks clean :)

Thank you.

=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=146938904
rootdir: /data/home/tkloczko/rpmbuild/BUILD/isodate-0.6.1
plugins: shutil-1.7.0, virtualenv-1.7.0, mock-3.6.1, cov-2.12.1, anyio-3.3.4, flaky-3.7.0, tornasync-0.6.0.post2, console-scripts-1.2.0, trio-0.7.0, timeout-2.0.1, asyncio-0.16.0, freezegun-0.4.2, flake8-1.0.7, pyfakefs-4.5.3, benchmark-3.4.1, profiling-1.7.0, datadir-1.3.1, regressions-2.2.0, randomly-3.8.0, rerunfailures-9.1.1, yagot-0.5.0, requests-mock-1.9.3, subtests-0.5.0, easy-server-0.8.0, django-4.5.2, forked-1.4.0, ordering-0.6, xdist-2.5.0, hypothesis-6.31.4
collected 18 items

src/isodate/tests/test_date.py .                                                                                                                                     [  5%]
src/isodate/tests/test_datetime.py .                                                                                                                                 [ 11%]
src/isodate/tests/test_pickle.py ....                                                                                                                                [ 33%]
src/isodate/tests/test_strf.py .                                                                                                                                     [ 38%]
src/isodate/tests/test_time.py .                                                                                                                                     [ 44%]
src/isodate/tests/test_duration.py ..........                                                                                                                        [100%]

============================================================================ 18 passed in 0.49s ============================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants