Skip to content

safe eval #9

@mblondel

Description

@mblondel

In Parallel, joblib uses eval for its pre_dispatch, which can be unsafe in some circumstances. Possible solutions:

  • For Python >= 2.6, the use of the ast.literal_eval would help http://docs.python.org/library/ast.html#ast.literal_eval
  • For older Python versions, specifying explicite globals and locals in the eval would help a bit, especialy if we provided a builtins with a reduced set of builtins.
  • Use a callable (function of n_jobs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions