diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f1ebcc4..e9d876d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.1.8](https://github.com/getappmap/appmap-python/compare/v2.1.7...v2.1.8) (2024-11-13) + + +### Bug Fixes + +* Prevent process recordings from clobbering one another ([0347af1](https://github.com/getappmap/appmap-python/commit/0347af18d69f5f3be6a8c0789400bacd3fff42b9)) + ## [2.1.7](https://github.com/getappmap/appmap-python/compare/v2.1.6...v2.1.7) (2024-08-15) diff --git a/_appmap/recording.py b/_appmap/recording.py index dadc958b..8513cbff 100644 --- a/_appmap/recording.py +++ b/_appmap/recording.py @@ -115,7 +115,9 @@ def save_at_exit(): nonlocal r r.stop() now = datetime.now(timezone.utc) - appmap_name = now.isoformat(timespec="seconds").replace("+00:00", "Z") + iso_time = now.isoformat(timespec="seconds").replace("+00:00", "Z") + process_id = os.getpid() + appmap_name = f"{iso_time}_{process_id}" recorder_type = "process" metadata = { "name": appmap_name, diff --git a/pyproject.toml b/pyproject.toml index be7df41a..e0b54baf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "appmap" -version = "2.1.7" +version = "2.1.8" description = "Create AppMap files by recording a Python application." readme = "README.md" authors = [ diff --git a/tox.ini b/tox.ini index 383107f5..a92da61a 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,12}-{web,django3,flask2,sqlalchemy1},lint +envlist = py3{10,11,12}-{django5}, py3{8,9,10,11,12}-{web,django3,django4,flask2,sqlalchemy1},lint [web-deps] deps= @@ -22,12 +22,16 @@ deps= py3{9,10,11,12}: numpy >=2 flask2: Flask >= 2.0, <3.0 django3: Django >=3.2, <4.0 + django4: Django >=4.0, <5.0 + django5: Django >=5.0, <6.0 sqlalchemy1: sqlalchemy >=1.4.11, <2.0 commands = poetry install -v web: poetry run appmap-python {posargs:pytest -n logical} django3: poetry run appmap-python pytest -n logical _appmap/test/test_django.py + django4: poetry run appmap-python pytest -n logical _appmap/test/test_django.py + django5: poetry run appmap-python pytest -n logical _appmap/test/test_django.py flask2: poetry run appmap-python pytest -n logical _appmap/test/test_flask.py sqlalchemy1: poetry run appmap-python pytest -n logical _appmap/test/test_sqlalchemy.py