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

Get rid of deprecation warnings #2360

Merged
merged 10 commits into from Apr 15, 2019

Conversation

@krischer
Copy link
Member

krischer commented Mar 15, 2019

Fixes #2357.

Also catches a couple more warnings. We can remove the whole compatibility layer once 1.2 is released.

@krischer krischer added the cleanup label Mar 15, 2019

@krischer krischer added this to the 1.2.0 milestone Mar 15, 2019

@krischer krischer added this to Waiting on CI in Release 1.2.0 Mar 15, 2019

Show resolved Hide resolved obspy/core/compatibility.py Outdated
Show resolved Hide resolved obspy/core/compatibility.py Outdated

krischer added some commits Mar 15, 2019

@krischer krischer force-pushed the get-rid-of-deprecation-warnings branch from c89ae67 to ad6bba7 Apr 11, 2019

@krischer

This comment has been minimized.

Copy link
Member Author

krischer commented Apr 11, 2019

Thanks for the reviews! Also rebased and force pushed.

Show resolved Hide resolved obspy/core/util/attribdict.py Outdated
@QuLogic

This comment has been minimized.

Copy link
Member

QuLogic commented Apr 12, 2019

Test failure (on Python 2) looks real:

======================================================================
ERROR: test_rotate2zne_raise (obspy.signal.tests.test_rotate.RotateTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/obspy/signal/tests/test_rotate.py", line 168, in test_rotate2zne_raise
    rotate2zne, z, azi_1, dip_1, n, azi_2, dip_2, e, azi_3, dip_3)
TypeError: assertRaisesRegex() takes exactly 3 arguments (13 given)
@QuLogic
Copy link
Member

QuLogic left a comment

Test failures.


if PY2:
class RegExTestCase(unittest.TestCase):
def assertRaisesRegex(self, exception, regex): # NOQA

This comment has been minimized.

Copy link
@QuLogic

QuLogic Apr 12, 2019

Member
Suggested change
def assertRaisesRegex(self, exception, regex): # NOQA
def assertRaisesRegex(self, exception, regex, *args, **kwargs): # NOQA
if PY2:
class RegExTestCase(unittest.TestCase):
def assertRaisesRegex(self, exception, regex): # NOQA
return self.assertRaisesRegexp(exception, regex)

This comment has been minimized.

Copy link
@QuLogic

QuLogic Apr 12, 2019

Member
Suggested change
return self.assertRaisesRegexp(exception, regex)
return self.assertRaisesRegexp(exception, regex, *args, **kwargs)

krischer added some commits Apr 12, 2019

@krischer krischer merged commit c1bca06 into master Apr 15, 2019

2 of 4 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
docker-testbot docker testbot results not available yet
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@krischer krischer deleted the get-rid-of-deprecation-warnings branch Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.