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

Updating to snapshot 160 breaks Python support #979

Closed
romainl opened this issue Oct 29, 2019 · 5 comments
Closed

Updating to snapshot 160 breaks Python support #979

romainl opened this issue Oct 29, 2019 · 5 comments
Milestone

Comments

@romainl
Copy link

romainl commented Oct 29, 2019

Describe the bug
The Python interface no longer works after updating MacVim from snapshot 159 to snapshot 160.

To Reproduce
Detailed steps to reproduce the behavior:

  1. Put the lines below in /tmp/pythontest.vim to tell Vim where to find Python 3.7:

     " this is from MacPorts, use a path that works for you
     let &pythonthreehome = '/opt/local/Library/Frameworks/Python.framework/Versions/3.7'
     let &pythonthreedll = '/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib'
    
  2. Start the TUI with:

     $ mvim -vNu /tmp/pythontest.vim
    

    or the GUI with:

     $ mvim -gNu /tmp/pythontest.vim
    
  3. Do :echo has('python3').

  4. Get a 0.

  5. Do :py3 print(1).

  6. Get the following errors:

     E370: Could not load library /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib
     E263: Sorry, this command is disabled, the Python library could not be loaded.
    

Expected behavior
Both commands should echo 1, without throwing errors.

Environment:

  • Vim version: 8.1.2224 (160)
  • OS: macOS 10.14.6
  • Terminal: Terminal.app and the GUI

First reported:
https://www.reddit.com/r/vim/comments/dotqki/macvim_black_and_python_version_problem/

@eirnym
Copy link
Contributor

eirnym commented Oct 30, 2019

@romainl Thank you for an issue,

It's a known problem, #978

@RStankov
Copy link

Have the same issues. Any workarounds?

@romainl
Copy link
Author

romainl commented Oct 30, 2019

@RStankov I worked around the issue by rolling back to snapshot 159. I'll wait and see for snapshot 161.

@ychin ychin added this to the snapshot-161 milestone Oct 30, 2019
@ychin
Copy link
Member

ychin commented Oct 30, 2019

This will be fixed in snapshot 161 which will come out in a day or so. The cause of this was that snapshot-160 turned on hardened runtime for app notarization requirements but it messed with Python and other scripting languages.

For now, Apple allows using much more lenient restrictions so I'm going to work around the issue and get the app notarized, but they are going to tighten up what they allow to be notarized soon (Janurary 2020) so I'll need to find a real solution for this problem.

ychin added a commit that referenced this issue Oct 30, 2019
Vim patch 8.1.2234

Fixes:

- Fix scripting languages not working (e.g. Python) in binary releases
  by using the correct entitlements. #979

Targets macOS 10.9+

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.7
- Ruby 2.6
@ychin
Copy link
Member

ychin commented Oct 30, 2019

Fixed in 161: https://github.com/macvim-dev/macvim/releases/latest

@ychin ychin closed this as completed Oct 30, 2019
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

No branches or pull requests

4 participants