Skip to content

Changed dependencies #60

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

Merged
merged 5 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pypi_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.13.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
with:
python-version: "3.10"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.13.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
with:
python-version: ${{ matrix.python-version }}
poetry-version: '1.8.2'
Expand Down
1 change: 1 addition & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

* [unreleased](unreleased.md)
* [0.4.0](changes_0.4.0.md)
* [0.3.0](changes_0.3.0.md)
* [0.2.0](changes_0.2.0.md)
* [0.1.0](changes_0.1.0.md)
13 changes: 13 additions & 0 deletions doc/changes/changes_0.4.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# UDF Mock Python 0.4.0, released 2025-02-13

Code name: Dependency update on top of 0.3.0

## Summary

The release replaces dill with inspect for extracting the code from function,
which solves the compatibility issue with the localstack.


### Refactorings

* #61: Remove the dependency on dill.
4 changes: 2 additions & 2 deletions exasol_udf_mock_python/mock_meta_data.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import re
import dill
import textwrap
from typing import List
from exasol_udf_mock_python.column import Column
from inspect import getsource


class MockMetaData:
Expand Down Expand Up @@ -64,7 +64,7 @@ def __init__(
self._is_variadic_input = is_variadic_input

def _extract_script_code(self, script_code_wrapper_function):
function_code = textwrap.dedent(dill.source.getsource(script_code_wrapper_function))
function_code = textwrap.dedent(getsource(script_code_wrapper_function))
function_name = script_code_wrapper_function.__name__
starts_with_pattern = r"^def[ \t]+" + function_name + r"[ \t]*\([ \t]*\)[ \t]*:[ \t]*\n"
match = re.match(starts_with_pattern, function_code)
Expand Down
208 changes: 112 additions & 96 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "exasol-udf-mock-python"
version = "0.3.0"
version = "0.4.0"
description = "Mocking framework for Exasol Python UDFs"

license = "MIT"
Expand All @@ -20,7 +20,6 @@ keywords = ['exasol', 'udf', 'mock', 'testing']
python = "^3.10"
pandas = "^2.2.3"
numpy = ">=1.26.4,<2"
dill = ">=0.3.7"

[tool.poetry.dev-dependencies]
pytest = "^8.2.2"
Expand Down