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

Add source code serializers that skip dill entirely #1815

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chris-janidlo
Copy link
Contributor

@chris-janidlo chris-janidlo commented Feb 27, 2025

Description

This is something I brought up a couple weeks ago, and finally got around to implementation and feasibility testing. Comes from some inter-related thoughts:

  • Both of the existing "source code" strategies involve a dill bytecode step, suggesting we're introducing unnecessary room for Python version mismatch errors.
  • Admins have asked about source code auditing, which is possible but mildly tricky with the existing strategies.
  • Pickle is insecure, and some admins would appreciate the ability to prevent any pickle deserialization whatsoever.

These new serialization strategies simply extract the source and send that directly. (They also append that string with the name of the function for ease of deserialization.)

Food for thought: if this covers all situations that the existing code strategies do while avoiding more Python version mismatch errors, do we deprecate the old ones?

I'd like to see this out in the wild first before making that decision, of course.

Type of change

  • New feature (non-breaking change that adds functionality)

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.

1 participant