diff --git a/.travis.yml b/.travis.yml index 8b2547a9..0df17bac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ os: linux dist: jammy language: python python: +- "3.12" - "3.11" - "3.10" - "3.9.14" diff --git a/CHANGELOG.md b/CHANGELOG.md index dfd7e442..d4b0e8b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.18.3](https://github.com/getappmap/appmap-python/compare/v1.18.2...v1.18.3) (2024-02-05) + + +### Bug Fixes + +* support python 3.12 ([136b47b](https://github.com/getappmap/appmap-python/commit/136b47b14d390768fe8448f4649cdab838b70a92)) + ## [1.18.2](https://github.com/getappmap/appmap-python/compare/v1.18.1...v1.18.2) (2024-01-22) diff --git a/_appmap/importer.py b/_appmap/importer.py index 203da029..e1e1da36 100644 --- a/_appmap/importer.py +++ b/_appmap/importer.py @@ -89,7 +89,11 @@ def is_class(c): # bound to __class__. (For example, celery.local.Proxy uses this # mechanism to return the class of the proxied object.) # - return inspect._is_type(c) # pylint: disable=protected-access + try: + inspect._static_getmro(c) # pylint: disable=protected-access + except TypeError: + return False + return True def get_classes(module): @@ -173,7 +177,6 @@ def instrument_functions(filterable, selected_functions=None): logger.debug(" functions %s", functions) for fn_name, static_fn, fn in functions: - # Only instrument the function if it was specifically called out for the package # (e.g. because it should be labeled), or it's included by the filters filterableFn = FilterableFn(filterable, fn, static_fn) diff --git a/pyproject.toml b/pyproject.toml index cc22bf39..dc34ca5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "appmap" -version = "1.18.2" +version = "1.18.3" description = "Create AppMap files by recording a Python application." readme = "README.md" authors = [ @@ -53,12 +53,15 @@ packaging = ">=19.0" [tool.poetry.dev-dependencies] httpretty = "^1.0.5" -pytest = "^6.1.2" +pytest = "^7.3.2" pytest-randomly = "^3.5.0" pylint = "^2.6.0" -pytest-django = "~ 4.5.2" +pytest-django = [ + { version = "~4.7", python = ">=3.8" }, + { version = "<4.7", python = "3.7" } +] flake8 = "^3.8.4" -pyfakefs = "^4.3.2" +pyfakefs = "^5.3.5" pprintpp = ">=0.4.0" coverage = "^5.3" pytest-mock = "^3.5.1" diff --git a/requirements-dev.txt b/requirements-dev.txt index a4c6a1f2..a8da3057 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,5 @@ #requirements-dev.txt -pip -poetry tox django flask -pytest-django \ No newline at end of file +pytest-django<4.8 \ No newline at end of file diff --git a/requirements-test.txt b/requirements-test.txt index ccd9fa05..04392b28 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,2 +1,2 @@ django ~= 3.2 -pytest-django +pytest-django < 4.8 diff --git a/tox.ini b/tox.ini index c230bb9d..4c47a9cd 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ isolated_build = true # The *-web environments test the latest versions of Django and Flask with the full test suite. For # older version of the web frameworks, just run the tests that are specific to them. -envlist = py3{8,9,10,11}-web, py3{7,8,9,10,11}-flask1-django3 +envlist = py3{8,9,10,11,12}-web, py3{7,8,9,10,11,12}-flask1-django3 [testenv] allowlist_externals = @@ -10,7 +10,7 @@ allowlist_externals = poetry deps= - pytest-django >=4.5.2, <4.6 + pytest-django <4.8 web: Django >=4.0, <5.0 web: Flask >= 2 flask1: -rrequirements-flask1.txt