Skip to content

Python 3.8 instead of Python 3.7 #1012

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

Closed
eirnym opened this issue Mar 3, 2020 · 21 comments
Closed

Python 3.8 instead of Python 3.7 #1012

eirnym opened this issue Mar 3, 2020 · 21 comments
Milestone

Comments

@eirnym
Copy link
Contributor

eirnym commented Mar 3, 2020

It's time to move on to python 3.8. It was released half a year ago and vim core supports it. Most libraries which had supported python 3.7 also have support for python 3.8

@eirnym eirnym closed this as completed Mar 3, 2020
@eirnym eirnym reopened this Mar 3, 2020
@ychin
Copy link
Member

ychin commented Mar 5, 2020

Homebrew is still at 3.7.6: https://formulae.brew.sh/formula/python

There are some discussions here (https://discourse.brew.sh/t/why-python-3-8-has-not-been-updated-yet/6057/16) and there is a ticket (Homebrew/homebrew-core#47274) tracking this migration.

Given that Homebrew hasn't switched over I prefer to not upgrade until they do it. Part of the reason is that it complicates our CI build scripts and also I think we should assume most users install the default python package instead of the explicit [email protected].

@eirnym
Copy link
Contributor Author

eirnym commented Mar 5, 2020

I still don't agree with an idea "all ports should use one true python/java/(any other tool)". I'm asking about only Github version.

My personal opinion, that if Homebrew wants to stay behind using following ideology of "one true ..", they can patch vimrc and other defaults as they pleased.

@eirnym
Copy link
Contributor Author

eirnym commented Mar 6, 2020

I understand, that my proposition is not very nice, but Homebrew as any other package manager has much greater mobility to change params, code, and other things than users who use releases from Github like me.

Unfortunately, simply specifying python3.8 in a library path doesn't work well for me.

@eirnym
Copy link
Contributor Author

eirnym commented Mar 12, 2020

@ychin BTW, Your response sounds like "you use Homebrew/MacPorts to use MacVim with Python3.8 (and more likely 3.7) or build and maintain it manually".

@ychin
Copy link
Member

ychin commented Mar 16, 2020

So can you be more specific what supporting "Python 3.8" means?

Are you talking about how we automatically set pythonthreedll to be 3.7? Can't you just set that variable to the correct path yourself. The auto-detection is really a clutch because there's no way for Vim to be able to find all possible Python versions for you.

Or did you mean something else?

@eirnym
Copy link
Contributor Author

eirnym commented Mar 16, 2020

I can't just change pythonthreedll as ABI is not compatible between python versions (third number is compatible while second may be not). PEP-606 to provide backward binary compatibility was rejected.

So I need MacVim to be compiled with python3.8 and I'd like to update official vimrc from 3.7 to 3.8, that's it.

As I've said, Homebrew, Macports and any other port system may stay with compatibility ranges of MacVim by using little patch to vimrc and by provide an appropriate argument to configure script. Alternatively to make manual patches, configure/make script itself may patch vimrc,

@eirnym
Copy link
Contributor Author

eirnym commented Jul 10, 2020

They already changed the python to 3.8 across the Homebrew.

@eirnym
Copy link
Contributor Author

eirnym commented Jul 10, 2020

Nevertheless, I ask you for making official builds with 2-3 major python releases when it's possible. Other languages doesn't change so much as Python nowadays. This will give an opportunity to use an official build and use Python version they want.

For Homebrew only one build will not require an additional dependency installation, so price is small.

@luca-drf
Copy link

Homebrew migration to Python 3.8 is complete: Homebrew/homebrew-core#47274 (comment)
Latest MacVim snapshot 163 which is installed by hombrew-cask seems to be pointing to Python 3.7

@itsayellow
Copy link

:python3 in my homebrew cask installed macvim is no longer operational because it doesn't find python3.7

E370: Could not load library /usr/local/Frameworks/Python.framework/Versions/3.7/Python
E263: Sorry, this command is disabled, the Python library could not be loaded.

@itsayellow
Copy link

itsayellow commented Jul 14, 2020

When using homebrew's python, maybe in the future MacVim can default to the 'Current' subdirectory instead of a hard-coded version-numbered subdirectory, like:

set pythonthreedll=/usr/local/Frameworks/Python.framework/Versions/Current/Python

@eirnym
Copy link
Contributor Author

eirnym commented Jul 14, 2020

When using homebrew's python, maybe in the future MacVim can default to the 'Current' subdirectory instead of a hard-coded version-numbered subdirectory, like:

set pythonthreedll=/usr/local/Frameworks/Python.framework/Versions/Current/Python

No, it's impossible to do as I wrote above Python resigned from PEP-606 to support backward binary compatibility. So you'll have problems with Python 3.7 used in MacVim & Python 3.8/3.9 etc.

@eirnym
Copy link
Contributor Author

eirnym commented Jul 14, 2020

:python3 in my homebrew cask installed macvim is no longer operational because it doesn't find python3.7

E370: Could not load library /usr/local/Frameworks/Python.framework/Versions/3.7/Python
E263: Sorry, this command is disabled, the Python library could not be loaded.

this is one of problems I want to avoid

@martensson
Copy link

I am getting the same error now and unable to use Macvim after homebrew upgraded to 3.8.

@ychin
Copy link
Member

ychin commented Jul 17, 2020

I'll fix this in the weekend. But yes, the current way we are handling it is non-ideal.

@luca-drf
Copy link

I am getting the same error now and unable to use Macvim after homebrew upgraded to 3.8.

I've resolved with:

brew install [email protected]

then

ln -s /usr/local/Cellar/[email protected]/3.7.8_1/Frameworks/Python.framework/Versions/3.7 /usr/local/Frameworks/Python.framework/Versions/3.7

@astyagun
Copy link

Another possible workaround:

set pythonthreedll=/usr/local/Frameworks/Python.framework/Versions/Current/Python

@itsayellow
Copy link

Another possible workaround:

set pythonthreedll=/usr/local/Frameworks/Python.framework/Versions/Current/Python

I was using that for a while but started getting weird errors, it may have been some sort of binary incompatibility as mentioned by @eirnym above.

@eirnym
Copy link
Contributor Author

eirnym commented Jul 17, 2020

I am getting the same error now and unable to use Macvim after homebrew upgraded to 3.8.

I've resolved with:


brew install [email protected]

then


ln -s /usr/local/Cellar/[email protected]/3.7.8_1/Frameworks/Python.framework/Versions/3.7 /usr/local/Frameworks/Python.framework/Versions/3.7

It's also possible to set pythonthreedll to /usr/local/Cellar/[email protected]/3.7.8_1/Frameworks/Python.framework/Versions/3.7 in your .vimrc

@ychin
Copy link
Member

ychin commented Jul 27, 2020

I believe @ichizok fixed this in d552421 already, and #1063 will make this compatible with binary install and MacPort as well. I think the issue here is the we haven't made a release yet so if you are using Homebrew Cask / official MacVim binary release you wouldn't have obtained that update that is built against 3.8 yet. I will try to make an update soon to address this.

@ychin
Copy link
Member

ychin commented Aug 13, 2020

Closing as version 164 is out.

@ychin ychin closed this as completed Aug 13, 2020
ychin added a commit that referenced this issue Aug 13, 2020
Vim patch 8.2.1424

Features

- New "Appearance" option pane (accessible via Cmd-, or MacVim ->
  Preferences) to allow customizing how MacVim looks. Users can now
  select how MacVim works with Dark Mode, and configure titlebar to be
  hidden or transparent. #912 #1038 #1056
- MacVim localization support. It now uses translated Vim messages for
  the specified locale. See `:help multilang-messages` to see how to
  configure it. #991

General:

- Python is now built against 3.8, up from 3.7. #1012

Fixes:

- Fix mvim:// protocol handler behavior. Reverts behavior back to old
  behavior (before snapshot-162), but add new fallback handling to try
  to handle poorly formed URLs that don't double-encode special
  characters. See `:help macvim://`. #1055
- Can now change tabs using menu and keyboard shortcuts (Cmd-{ / Cmd-} /
  Cmd-T) when in terminal mode. #1045

Targets macOS 10.9+

Script interfaces have compatibility with these versions:
- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.8
- Ruby 2.7
ychin added a commit to ychin/macvim that referenced this issue Aug 15, 2020
Vim patch 8.2.1456

Features

- New "Appearance" option pane (accessible via Cmd-, or MacVim ->
  Preferences) to allow customizing how MacVim looks. Users can now
  select how MacVim works with Dark Mode, and configure titlebar to be
  hidden or transparent. macvim-dev#912 macvim-dev#1038 macvim-dev#1056
- MacVim localization support. It now uses translated Vim messages for
  the specified locale. See `:help multilang-messages` to see how to
  configure it. macvim-dev#991

General:

- Python is now built against 3.8, up from 3.7. macvim-dev#1012

Fixes:

- Fix mvim:// protocol handler behavior. Reverts behavior back to old
  behavior (before snapshot-162), but add new fallback handling to try
  to handle poorly formed URLs that don't double-encode special
  characters. See `:help macvim://`. macvim-dev#1055
- Can now change tabs using menu and keyboard shortcuts (Cmd-{ / Cmd-} /
  Cmd-T) when in terminal mode. macvim-dev#1045
- Fix crash during MacVim launch in Snapshot 164 (8.2.1424) due to
  dynamic library linkage. macvim-dev#1073

Targets macOS 10.9+

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.8
- Ruby 2.7
ychin added a commit that referenced this issue Aug 15, 2020
Vim patch 8.2.1456

Features

- New "Appearance" option pane (accessible via Cmd-, or MacVim ->
  Preferences) to allow customizing how MacVim looks. Users can now
  select how MacVim works with Dark Mode, and configure titlebar to be
  hidden or transparent. #912 #1038 #1056
- MacVim localization support. It now uses translated Vim messages for
  the specified locale. See `:help multilang-messages` to see how to
  configure it. #991

General:

- Python is now built against 3.8, up from 3.7. #1012

Fixes:

- Fix mvim:// protocol handler behavior. Reverts behavior back to old
  behavior (before snapshot-162), but add new fallback handling to try
  to handle poorly formed URLs that don't double-encode special
  characters. See `:help macvim://`. #1055
- Can now change tabs using menu and keyboard shortcuts (Cmd-{ / Cmd-} /
  Cmd-T) when in terminal mode. #1045
- Fix crash during MacVim launch in Snapshot 164 (8.2.1424) due to
  dynamic library linkage. #1073

Targets macOS 10.9+

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.8
- Ruby 2.7
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

6 participants