Skip to content
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

Fix udf debugging and remove an annoying tox warning #103

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

joerivanruth
Copy link
Member

Fix issue #49. The problem was that as of Python3, pickle no longer returns strings but bytes objects. First I attempted to let the export_parameters function return a BLOB but that didn't work so in the mean time it returns a hex encoding of the bytes.

With this issue fixed I could test my fix for the deprecation warning that shows up in the tox output:

=============================== warnings summary ===============================
.tox/py310/lib/python3.10/site-packages/past/builtins/misc.py:45
  /home/jvr/src/pymonetdb/.tox/py310/lib/python3.10/site-packages/past/builtins/misc.py:45: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
    from imp import reload

In Python 3, pickles are bytes objects, not strings.
There seems to be a problem with py3embed and blobs,
so for the time being we use hex encoded strings.
Replace past.builtins.execfile with compile + exec
@gijzelaerr gijzelaerr merged commit a2f7166 into MonetDB:master Apr 5, 2022
@joerivanruth joerivanruth deleted the fix_udf_debugging branch February 1, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants