Skip to content

seth/pretty-in-py: Python.run API - #60300

Draft
snickell wants to merge 10 commits into
stagingfrom
seth/pretty-in-py
Draft

seth/pretty-in-py: Python.run API#60300
snickell wants to merge 10 commits into
stagingfrom
seth/pretty-in-py

Conversation

@snickell

@snickell snickell commented Aug 9, 2024

Copy link
Copy Markdown
Contributor

Followup to the big PyCall PR, this creates a longer term Python API atop the PyCall library.

This is in turn extended by this PR which backs the hollow Python.run API with the real deal, PyCallThread: #60334

Comment thread lib/python/venv.rb
@@ -0,0 +1,71 @@
require 'pty'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is just a rename of /lib/cdo/python_venv.rb, but the indentation change to make it Python::Venv instead of PythonVenv caused git to think its a new file.

@@ -0,0 +1,84 @@
require 'test_helper'
require 'python/python'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is mostly a rename of pycall_test.rb with the addition of putting python calls inside a Python.run() block, which made git think it was a new file not a rename.

end
assert_equal 'Ruby can call Python!', result
end

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The three following tests concerning Python::ThreadSafetyError are new:

This was referenced Aug 11, 2024
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