diff --git a/.travis.yml b/.travis.yml
index c4eb873..c40d721 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,22 +1,19 @@
 sudo: false
 language: python
-# enable Python 3.5 on travis until it will be pre-installed
-python: 3.5
-env:
-  matrix:
-  - TESTENV=py27-pytest2
-  - TESTENV=py34-pytest2
-  - TESTENV=py35-pytest2
-  - TESTENV=py27-pytest3
-  - TESTENV=py34-pytest3
-  - TESTENV=py35-pytest3
+dist: xenial
+python:
+  - "2.7"
+  - "3.5"
+  - "3.6"
+  - "3.7"
+
 install:
-- pip install tox
-script: tox -e $TESTENV
+  - pip install tox tox-travis
+script: tox
 branches:
-    except:
-        - /^\d/
+  except:
+    - /^\d/
 notifications:
-    email:
-        - bubenkoff@gmail.com
-        - oleg.pidsadnyi@gmail.com
+  email:
+    - bubenkoff@gmail.com
+    - oleg.pidsadnyi@gmail.com
diff --git a/CHANGES.rst b/CHANGES.rst
index a408fc4..0645b25 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,12 @@
 Changelog
 =========
 
+2.0.3
+-----
+
+- Fix compatibility with pytest 5.
+
+
 2.0.2
 -----
 
diff --git a/README.rst b/README.rst
index b927c9f..1156d3d 100644
--- a/README.rst
+++ b/README.rst
@@ -5,8 +5,6 @@ factory_boy_ integration with the pytest_ runner
    :target: https://pypi.python.org/pypi/pytest-factoryboy
 .. image:: https://img.shields.io/pypi/pyversions/pytest-factoryboy.svg
   :target: https://pypi.python.org/pypi/pytest-factoryboy
-.. image:: https://img.shields.io/coveralls/pytest-dev/pytest-factoryboy/master.svg
-   :target: https://coveralls.io/r/pytest-dev/pytest-factoryboy
 .. image:: https://travis-ci.org/pytest-dev/pytest-factoryboy.svg?branch=master
     :target: https://travis-ci.org/pytest-dev/pytest-factoryboy
 .. image:: https://readthedocs.org/projects/pytest-factoryboy/badge/?version=latest
@@ -75,7 +73,7 @@ class name.
     from pytest_factoryboy import register
 
     @register
-    class AuthorFactory(Factory):
+    class AuthorFactory(factory.Factory):
 
         class Meta:
             model = Author
diff --git a/pytest_factoryboy/__init__.py b/pytest_factoryboy/__init__.py
index c2ad41e..bea2cc3 100644
--- a/pytest_factoryboy/__init__.py
+++ b/pytest_factoryboy/__init__.py
@@ -1,7 +1,7 @@
 """pytest-factoryboy public API."""
 from .fixture import register, LazyFixture
 
-__version__ = '2.0.2'
+__version__ = '2.0.3'
 
 
 __all__ = [
diff --git a/pytest_factoryboy/fixture.py b/pytest_factoryboy/fixture.py
index 1873f80..7b4bdb5 100644
--- a/pytest_factoryboy/fixture.py
+++ b/pytest_factoryboy/fixture.py
@@ -1,7 +1,6 @@
 """Factory boy fixture integration."""
 
 import sys
-import inspect
 
 import factory
 import factory.builder
@@ -10,6 +9,12 @@ import factory.enums
 import inflection
 import pytest
 
+from inspect import getmodule
+
+if sys.version_info > (3, 0):
+    from inspect import signature
+else:
+    from funcsigs import signature
 
 SEPARATOR = "__"
 
@@ -316,7 +321,7 @@ def subfactory_fixture(request, factory_class):
 def get_caller_module(depth=2):
     """Get the module of the caller."""
     frame = sys._getframe(depth)
-    module = inspect.getmodule(frame)
+    module = getmodule(frame)
     # Happens when there's no __init__.py in the folder
     if module is None:
         return get_caller_module(depth=depth)  # pragma: no cover
@@ -333,7 +338,11 @@ class LazyFixture(object):
         """
         self.fixture = fixture
         if callable(self.fixture):
-            self.args = list(inspect.getargspec(self.fixture).args)
+            params = signature(self.fixture).parameters.values()
+            self.args = [
+                param.name for param in params
+                if param.kind == param.POSITIONAL_OR_KEYWORD
+            ]
         else:
             self.args = [self.fixture]
 
diff --git a/pytest_factoryboy/plugin.py b/pytest_factoryboy/plugin.py
index d70f2e3..fb143cc 100644
--- a/pytest_factoryboy/plugin.py
+++ b/pytest_factoryboy/plugin.py
@@ -113,9 +113,7 @@ def pytest_runtest_call(item):
 def pytest_addhooks(pluginmanager):
     """Register plugin hooks."""
     from pytest_factoryboy import hooks
-    # addhooks is for older py.test and deprecated; replaced by add_hookspecs
-    add_hookspecs = getattr(pluginmanager, 'add_hookspecs', pluginmanager.addhooks)
-    add_hookspecs(hooks)
+    pluginmanager.add_hookspecs(hooks)
 
 
 def pytest_generate_tests(metafunc):
@@ -124,4 +122,4 @@ def pytest_generate_tests(metafunc):
         fixturedef = arg2fixturedef[-1]
         related.extend(getattr(fixturedef.func, "_factoryboy_related", []))
 
-    metafunc.funcargnames.extend(related)
+    metafunc.fixturenames.extend(related)
diff --git a/setup.py b/setup.py
index 5ecfce1..fff9f6b 100755
--- a/setup.py
+++ b/setup.py
@@ -38,11 +38,12 @@ setup(
         "Topic :: Utilities",
         "Programming Language :: Python :: 2",
         "Programming Language :: Python :: 3"
-    ] + [("Programming Language :: Python :: %s" % x) for x in "2.7 3.0 3.1 3.2 3.3 3.4 3.5".split()],
+    ] + [("Programming Language :: Python :: %s" % x) for x in "2.7 3.4 3.5 3.6 3.7".split()],
     install_requires=[
         "inflection",
         "factory_boy>=2.10.0",
         "pytest>=3.3.2",
+        'funcsigs;python_version<"3.0"',
     ],
     # the following makes a plugin available to py.test
     entry_points={
diff --git a/tox.ini b/tox.ini
index 5906a41..3f13bb6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,13 +1,28 @@
 [tox]
 distshare = {homedir}/.tox/distshare
-envlist = py{27,34,35}-pytest{2,3}
-
+envlist = py27-pytest{36,37,38,39,310,4,41,42,43,44,45,46},
+          py37-pytest{36,37,38,39,310,4,41,42,43,44,45,46,5,latest},
+          py{35,36}-pytestlatest
 
 [testenv]
-commands = py.test --junitxml={envlogdir}/junit-{envname}.xml {posargs:tests}
-deps = -r{toxinidir}/requirements-testing.txt
-  pytest2: pytest<3.0
-  pytest3: pytest>3.0
+commands = pytest --junitxml={envlogdir}/junit-{envname}.xml {posargs:tests}
+deps =
+    pytestlatest: pytest
+    pytest5: pytest~=5.0.0
+    pytest46: pytest~=4.6.0
+    pytest45: pytest~=4.5.0
+    pytest44: pytest~=4.4.0
+    pytest43: pytest~=4.3.0
+    pytest42: pytest~=4.2.0
+    pytest41: pytest~=4.1.0
+    pytest4: pytest~=4.0.0
+    pytest310: pytest~=3.10.0
+    pytest39: pytest~=3.9.0
+    pytest38: pytest~=3.8.0
+    pytest37: pytest~=3.7.0
+    pytest36: pytest~=3.6.0
+
+    -r{toxinidir}/requirements-testing.txt
 
 [pytest]
 addopts = -vv -l --pep8