Python Package Changelog

Kolo consists of a python package and a VSCode extension. This is the changelog for the kolo python package. To view the changelog of the VSCode Extension go here

We recommend using the latest version of the kolo python package and VSCode extension. That way you’ll run the most stable and feature-rich versions

PyPI version

v2.23.1

2024-05-01

v2.23.0

2024-04-19

  • Always use the current Django schema when processing queries in test generation. Add the --use-saved-schemas flag to support the old behaviour of using schemas saved via the kolo store-django-model-schema command.

  • Record trace data for Model.objects.raw() Django queries.

  • Record trace data for Django templates used in {% include %} and {% extends %} tags.

  • Add missing newline to imports in generated tests.

  • Ensure all Decimal values in generated tests are normalized.

  • Add --as-python flag to kolo trace dump to support dumping the trace as python code instead of msgpack or json.

  • Add kolo trace list-queries command to show all queries included in a trace.

  • Add optional Pygments dependency for syntax highlighting in the cli. Run pip install kolo[cli] to install.

  • Add basic support for bulk_update queries in test generation.

  • Record the raw parameters involved in an SQL query executed via Django.

  • Add new lightweight_repr config option. Some traced objects have __repr__ implementations that are expensive to run. If this is enabled, Kolo instead serializes these objects as "{class_name} object {id}".

  • Drop support for loading or dumping legacy json traces with the Kolo cli.

  • Add kolo trace json-to-msgpack helper command to convert all legacy json traces to msgpack format.

v2.22.0

2024-04-04

  • Support generating a test from multiple traces at once.

  • Import Decimal in generated tests using DecimalField.

  • Import uuid in generated tests using UUIDField.

  • Avoid importing datetime unnecessarily in generated tests.

  • Require sqlglot>=23.6.4 to fix broken postgres interval parsing in test generation.

  • Fix kolo trace download to match new api endpoint in Kolo Dashboard.

v2.21.1

2024-03-26

  • Add more debugging information to error logs.

  • Fix kolo trace download to match new gzip headers for Kolo Dashboard.

  • Rename SerializationError to KoloSerializationError.

v2.21.0

2024-03-20

  • Support automatically uploading traces to Kolo Dashboard instead of saving them locally.

v2.20.2

2024-03-19

  • Add compatibility with version 23 of sqlglot for test generation.

  • Drop support for older versions of sqlglot.

  • Support saving a Django schema to the Kolo database when that schema includes datetime types.

  • Be less strict when checking content-type for json responses in test generation.

v2.20.1

2024-03-05

  • Exit kolo run early when a different debugger is already active.

  • Add an assert to generated tests for Django JSON responses.

  • Gracefully handle a missing response body for an outbound request in test generation.

  • Support saving a Django schema to the Kolo database when that schema includes lazy translatable strings.

  • Consistently use lower-case variable names in test generation.

v2.20.0

2024-02-22

  • Support defining local processor plugins in your own project.

  • Fix packaging of generated assets for the editor-agnostic web endpoint introduced in 2.17.0.

v2.19.0

2024-02-19

  • Stop hiding suspend/resume frames when tracing httpx async code.

  • Mark KoloMiddleware as a coroutine for better compatibility with Django’s async support.

  • Fix Rust panic when using kolo run pytest -k.

  • Add support for third party plugins for Kolo to add custom data to traces.

v2.18.0

2024-01-31

  • Remove support for json traces (use_msgpack=false) that was deprecated in 2.16.0.

  • Serialize tuple as a msgpack extension type to maintain hashability after deserializing.

  • Serialize set and frozenset as msgpack extension types.

  • Add support for custom field parsers for test generation.

  • Parse isoformat date strings in test generation.

  • Support parsing negative timedelta strings in test generation.

  • Convert non-string SQL Literal values to python values in test generation.

  • Improve generated asserts for delete queries in test generation.

  • Improve merging of generated asserts to simplify generated tests.

  • Remove the list-traces, dump-trace, load-trace and delete-old-traces commands deprecated in 2.8.0.

  • Stop officially supporting Django 4.1.

v2.17.0

2023-11-15

  • Add an early version of an editor agnostic Kolo experience accessible via localhost:8000/_kolo/

  • Fix some invalid timestamps in Kolo’s internal trace format when tracing a test that mocks time with time_machine.

  • Improve parsing of INSERT queries in test generation.

  • Support generating a test from a trace including multiple request/response sections. Previously we only used the first request/response pair.

  • Avoid duplicate arguments to queryset.filter in generated assert code for delete queries.

  • Always include a request body when mocking outbound requests in generated tests. Previously we only supported json body data.

v2.16.3

2023-11-01

  • Avoid crashing on unhashable query data in test generation.

v2.16.2

2023-10-30

v2.16.1

2023-10-26

  • Fix validation of a msgpack trace downloaded from the Kolo dashboard.

v2.16.0

2023-10-26

  • Add support for using msgpack as an internal format for traces with the use_msgpack config option. This is on by default and requires version 2.15.0 of the VSCode Extension. Support for json traces (use_msgpack=false) is deprecated and will be removed in a future version.

  • Add support for Python 3.12.

  • Remove the wal_mode config option.

  • Log an error when a trace is too big to save to Kolo’s sqlite database.

  • Use timezone-aware datetimes in test generation.

  • Avoid generating code leading to a MultipleObjectsReturned exception in test generation.

v2.15.1

2023-09-15

  • Hide __builtins__ from module locals to save space and make raw traces more readable.

  • Increase the default busy timeout for Kolo’s sqlite database to 60s (from 5s).

  • Allow setting sqlite_busy_timeout in .kolo/config.toml.

  • Add a lower bound (3.6.0) for the required version of asgiref.

  • Fix handling of foreign key values in generated asserts for update queries.

  • Stop creating test model instances with None as a primary key in test generation.

v2.15.0

2023-09-13

v2.14.0

2023-09-04

  • Add support for generating tests using factory boy factories.

  • Change the behaviour of the trace_processors config value to append new processors instead of overriding the existing processors. This means you don’t need to copy the list of all Kolo’s default processors when adding your own custom processor.

  • Prefer time machine over freezegun in generated tests. Freezegun will still be used if it is installed and time machine is not installed.

  • Add support for fields with custom column names in Kolo test generation.

  • Change test generation import style to a more human style.

  • Add extra hooks to Kolo’s default test generation templates to enable further customisation of generated tests.

  • Improve the quality of test asserts generated from database queries.

  • Handle traces including bulk creates better in test generation.

  • Add preliminary support for sharing traces via Kolo Dashboard.

  • Track Django checks to allow better filtering in VSCode.

  • Track Django test database creation to allow better filtering in VSCode.

  • Stop filtering out module creation frames from traces. This allows better visibility of import flow.

  • Fix file path resolution edge-case on Windows for Python 3.8 and 3.9.

  • Fix a deprecation warning for Content-Type header parsing.

v2.13.2

2023-08-17

  • Turn off special handling of namedtuple in simplejson.dumps since this was adding unexpected entries to MagicMock.mock_calls in traced tests.

v2.13.1

2023-08-09

  • Convert NaN and infinite float values to null when encoding json.

v2.13.0

2023-07-26

  • Add --count and --reverse options to kolo trace list to allow customising the results.

  • Add support for configuring Kolo in pyproject.toml in addition to .kolo/config.toml. Fixes https://github.com/kolofordjango/kolo/issues/46.

  • Track Django setup logic entrypoint to allow better filtering in VSCode.

  • Improve stability of experimental threading support.

v2.12.4

2023-07-17

  • Really fix disabling of experimental threading support in the Rust extension.

v2.12.3

2023-07-14

  • Fix disabling of experimental threading support in the Rust extension.

v2.12.2

2023-07-12

  • Disable experimental threading support by default.

v2.12.1

2023-07-06

  • Fix the rust extension’s handling of fake frame filenames. Fixes https://github.com/kolofordjango/kolo/issues/62.

v2.12.0

2023-07-04

v2.11.0

2023-06-23

  • Add support for tracing httpx outbound requests.

  • Add kolo dbshell for advanced users to inspect or run queries against the Kolo database.

  • Support json (de-)serialization of large numbers in the Rust extension.

v2.10.0

2023-06-21

  • Update KoloMiddleware to handle async views as well as sync views. Fixes https://github.com/kolofordjango/kolo/issues/57.

  • Allow customising the behaviour of test generation.

  • Improve sql query parsing for test generation.

  • Tweak the error message when test generation dependencies are missing. Fixes https://github.com/kolofordjango/kolo/issues/58.

  • Bump the minimum version of sqlglot to 16.1.1 for better sqlite parsing in test generation.

  • Drop support for Python 3.7.

v2.9.4

2023-05-29

  • Omit json data from assert queries in test generation.

  • Fix variables in test generation.

v2.9.3

2023-05-29

  • Improve support for json response bodies for httpretty in test generation.

  • Remove debug sql comments from generated tests.

v2.9.2

2023-05-23

  • Try to autodetect the correct Django settings file from manage.py in test generation.

  • Disable logging during test generation to avoid log messages in the generated test.

  • Handle Django’s DurationField better in test generation.

  • Ensure string values in get_or_create defaults don’t get repr called twice in test generation.

  • Add context to the top of the generated test file.

v2.9.1

2023-05-19

  • Handle more edge-cases in test generation.

v2.9.0

2023-05-12

  • Add support for Django ORM asserts to the experimental test generation feature.

v2.8.1

2023-05-11

  • Turn a panic in the Rust extension into a Python exception for better debugging.

v2.8.0

2023-05-03

v2.7.0

2023-04-21

  • Store date and datetime values as timestamp strings in traces.

  • Add the kolo store-django-model-schema command for use with the experimental test generation feature.

v2.6.2

2023-04-18

  • Fix an AttributeError in RequestsFilter when handling a bad response (for example in a timeout/retry).

v2.6.1

2023-04-18

  • Raise a new KoloWriteError when Kolo fails to write to the .kolo directory for some reason.

v2.6.0

2023-03-17

  • Track which database each SQL query is for. Enables future work in the VSCode extension.

v2.5.0

2023-03-15

v2.4.4

2023-03-13

  • Fix a KeyError in Urllib3Filter where a "response" key could be missing (for example in a timeout/retry).

v2.4.3

2023-03-13

  • Fix a TypeError in the Rust extension when trying to convert None to a string.

  • Optimise how we process Django QuerySet objects in Python and Rust.

v2.4.2

2023-02-15

  • Further improve the performance of the Rust extension by optimising string contains in a hot loop.

v2.4.1

2023-01-30

  • Further improve the performance of the Rust extension by interning suitable strings.

v2.4.0

2023-01-25

  • Use the Rust extension by default on CPython. To disable this set use_rust = false at the top of your .kolo/config.toml.

  • Improve the performance of the Rust extension by about 10%.

v2.3.0

2022-12-01

  • Consolidate kolo.enable and kolo.enabled into one combined context manager and decorator.

  • Exclude library code from analysis properly on Windows for all supported python versions.

  • Exclude library code from analysis properly on PyPy 3.8 and 3.9.

  • Add an experimental Rust extension. To opt-in to this, set use_rust = true at the top of your .kolo/config.toml.

v2.2.1

2022-11-14

  • Fix a TypeError when serializing dictionary keys as json.

v2.2.0

2022-11-01

v2.1.0

2022-10-27

v2.0.6

2022-10-18

  • Fix a KeyError in Kolo’s SQL query processing for empty queries.

  • Stop json encoding errors breaking Kolo traces.

v2.0.5

2022-10-13

  • Fix a KeyError in Kolo’s SQL query processing.

  • Fix a TypeError in Kolo’s SQL query processing.

v2.0.4

2022-10-10

v2.0.3

2022-09-22

  • Stop autocreating an empty .kolo/config.toml file.

v2.0.2

2022-09-15

  • Replace toml with tomllib from Python 3.11. Fallback to tomli on Python 3.10 and earlier.

  • Move jinja2 to the experimental kolo[test_generation] extra.

  • Fix a dataloss bug when tracing a queryset.

v2.0.1

2022-09-09

  • Don’t lose trace data when an object has a broken __repr__.

v2.0.0

2022-09-09

  • Record when a background job ends when using eager mode for celery or huey.

  • Record data about Django template rendering.

  • Record the data loaded from the database by sql queries in Django.

  • Support tracing pytest tests with kolo run.

  • Support user-defined includes and ignores when processing exceptions.

  • Add --one-trace-per-test option to kolo run to better support analysing tests.

  • Add kolo load-trace and kolo dump-trace commands to support sharing interesting traces.

  • Add experimental support for test generation with kolo generate-test.

  • Add a timestamp to all trace items.

  • Ensure .kolo/config.toml exists so users don’t need to manually create it.

  • Fix the kolo.enable decorator so it actually works as a decorator with the config argument.

  • Stop storing config data in Kolo’s database.

  • Remove the kolo config command.

v1.8.0

2022-07-22

  • Fix threadsafety bug in KoloMiddleware causing traces to be lost when too many requests happen close together with manage.py runserver.

  • Optimise the main profiling loop by 30-40%.

  • Drop support for setting use_frame_boundaries to false.

v1.7.0

2022-06-30

  • Change the default value of use_frame_boundaries to true.

v1.6.1

2022-06-30

  • Fix a bug with 404 response handling when use_frame_boundaries = true.

v1.6.0

2022-06-29

  • Make a new mode of collecting traces available via use_frame_boundaries = true in .kolo/config.toml where each trace does not necessarily have to start with a served HTTP request and does not necessarily have to end with an HTTP response

  • Add the kolo.enable decorator

  • Add the kolo.enabled context manager

  • Upgrade dependencies

  • Fix a bug with args serialization the logging filter

v1.5.0

2022-06-15

  • Start using SQLite WAL-mode, which allows for both writing and reading to SQLite at the same time.

  • Kolo will now always store its db in the .kolo directory. The previously deprecated storage location using the operating system’s user data directory is no longer supported. The KOLO_STORE_IN_PROJECT and KOLO_PROJECT_NAME settings are no longer supported – KOLO_STORE_IN_PROJECT is now always true.

  • Numerous performance improvements to speed up Kolo

  • Add support for a logging filter, so that Kolo can capture log output for later display

v1.4.0

2022-04-18

  • Use repr as a fallback when serializing locals. Fixes https://github.com/kolofordjango/kolo/issues/15

  • Better support for outbound HTTP requests with binary request bodies

  • Make use of Django’s MiddlewareNotUsed when Kolo is disabled

  • Handle case where the actual charset in an HTTP response is different from the expected one. Fixes https://github.com/kolofordjango/kolo/issues/13

  • Drop support for Python 3.6 and Django 2.2, 3.0, 3.1 as all these versions have reached their end of life

  • Include qualname information in frame data

v1.3.8

2022-03-14

  • Kolo will no longer crash if git isn’t available while recording a trace

v1.3.7

2022-02-22

  • Fix bug where kolo would error when the request body included binary content. Thanks @abdulmuizzf for the report 🙌

v1.3.6

2022-02-08

  • A whole host of performance improvements that should make using Kolo feel a lot snappier!

v1.3.5

2022-02-07

  • Support for huey tasks (on the python side)

  • Re-create the kolo sqlite database if we detect it has been deleted while kolo is active

  • Include query template in recorded SQL data

  • Fix crash when kolo is processing a streaming HttpResponse

  • Further stability improvements

v1.3.4

2022-01-12

  • Fix a regression in 1.3.3 where Kolo was throwing an error when it was disabled

v1.3.3

2022-01-12

  • Fix a dependency incompatibility issue by moving our build process from poetry to pip + setup.cfg

  • Capture urls information for the request Django is processing

v1.3.2

2021-12-12

  • Support for Django 4.0

v1.3.1

2021-11-25

  • Support for standard library urllib

  • Better support for when urllib3 is used standalone (without requests)

  • Decompress gzipped HttpRespones for display in Kolo (Fixes https://github.com/kolofordjango/kolo/issues/10)

v1.3.0

2021-11-10

  • Default to storing the Kolo database in .kolo/db.sqlite3. The .kolo directory is adjacent to your manage.py file by default and can otherwise be customized using the KOLO_PATH environment variable

    • This change is backwards compatible. Kolo will continue to read and write data to the previous database location if it detects an existing database present

  • Store milliseconds for created_at timestamps in the Kolo database

v1.2.1

2021-10-26

  • Fix issue where Kolo would exhaust iterators as part of processing a frame: https://github.com/kolofordjango/kolo/issues/9

v1.2.0

2021-10-25

  • Capture the call site for each captured frame

  • Store Kolo database in .kolo (alongside the user’s working directory) via the KOLO_STORE_IN_PROJECT=1 environment variable. (To be the default soon)

  • Capture information about where in the user code SQL queries originate

v1.1.3

2021-09-30

  • Collect scheme from the incoming HTTP request which assists the VSCode extension in reliably replaying requests

v1.1.2

2021-09-21

  • Fix bug where Kolo would cause additional SQL queries when the evaluation of a third party __repr__ would call __repr__ on a django queryset. Specifically this was the case with Django Rest Framework (as with the previous change log item, credit to @vhtkrk for reporting this https://github.com/kolofordjango/kolo/issues/4)

v1.1.1

2021-09-20

  • Fix bug where Kolo would prematurely evaluate not-yet-evaluated Querysets (credit to @vhtkrk for reporting this bug!)

v1.1.0

2021-09-16

  • Additional configuration options via .kolo/config.toml

    • You can now configure Kolo to exclude certain URL paths (like /static/) and also explicitly include and exclude frames based on filepath

  • Better support for capturing those exceptions that lead to a 500 error

  • Several bug fixes and stability improvements!

v1.0.4

2021-08-19

  • Exclude attrs generated frames. The refactor of the 1.0.0 release resulted in these being included, but now they’re excluded again!

v1.0.3

2021-08-11

  • Add changelog link pointing at this file on PyPI page: https://pypi.org/project/kolo/

v1.0.2

2021-08-11

  • Fix classifiers from 1.0.1. Now they actually show up: https://pypi.org/project/kolo/

v1.0.1

2021-08-11

  • Add relevant PyPI classifiers: https://pypi.org/classifiers/

v1.0.0

2021-08-10

  • Support for Python 3.6

  • Refactored how we exclude library code. If you start seeing library code show up in Kolo, please open a new issue on this repo

  • Kolo now has better support for showing code that was executed as part of a custom middleware that you have in your Django project

  • Kolo will now disable itself if it detects another profiler present (a log message will be shown in this case)

  • A whole host of performance and stability improvements

  • Introduced more logging to show when Kolo is disabling itself

  • Bringing the major version number to 1, to ensure the kolo python package and VSCode extension always share the same major version number

v0.0.5

2021-06-10

  • Support for Python 3.7

v0.0.4

2021-06-04

  • Improve README shown on PyPI

v0.0.3

2021-06-04

  • Use INSERT OR IGNORE to prevent bug where the same invocation would be inserted twice into sqlite leading to a confusing user-visible error message

v0.0.2

2021-05-26

  • Capture timestamps as floats instead of ints, because we’re basically always operating at the sub-second level

v0.0.1

2021-05-23