[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] Stop highlighting Python2 keywords.
From: |
Stefan Kangas |
Subject: |
Re: [PATCH v3] Stop highlighting Python2 keywords. |
Date: |
Thu, 30 Jan 2025 16:45:39 -0800 |
Konstantin Kharlamov <Hi-Angel@yandex.ru> writes:
>> I'm not against dropping all the Python 2 builtins either.
[...]
>> I don't have a strong preference for either, but I agree that it is
>> easier to explain if all of the Python 2 builtins are dropped.
>
> Okay, if you folks want, let's remove them all 😊 I don't have a
> preference.
I have an idea that might be gentler for folks still in need of Python 2
support: We add a new defcustom `python-2-support`, and then disable all
the Python 2 stuff unless that variable is customized to t.
At this point, I think we could set it to nil by default, but I don't
have a very strong preference. We could also do that after Emacs 31, if
other people think that is better. The main reason why I'd lean towards
setting it to nil already in Emacs 30 is to avoid confusion for the 94%
of users that are now using Python 3.
Then at some point in the future, when Python 2 support is irrelevant or
close to it, we just make that variable obsolete.
How does that sound?
> I'd like to point out the code still has a `StandardError` Python 2
> exception, should we drop it as well then?
I think "StandardError" could be covered by the same user option.
> I was about to do that, but then I realized this one appears also in
> the python-ts-mode declared in the same file.
AFAICT, the tree-sitter grammar supports both Python 2 and 3:
https://github.com/tree-sitter/tree-sitter-python
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, (continued)
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, kobarity, 2025/01/25
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, Konstantin Kharlamov, 2025/01/25
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, kobarity, 2025/01/27
- [PATCH] Remove Python2 "file" from the list of keywords, Konstantin Kharlamov, 2025/01/29
- Re: [PATCH] Remove Python2 "file" from the list of keywords, kobarity, 2025/01/29
- Re: [PATCH v2] Remove Python2 "file" from the list of keywords, Konstantin Kharlamov, 2025/01/29
- Re: [PATCH v2] Remove Python2 "file" from the list of keywords, Stefan Kangas, 2025/01/29
- Re: [PATCH v2] Remove Python2 "file" from the list of keywords, Konstantin Kharlamov, 2025/01/30
- Re: [PATCH v2] Remove Python2 "file" from the list of keywords, kobarity, 2025/01/30
- Re: [PATCH v3] Stop highlighting Python2 keywords., Konstantin Kharlamov, 2025/01/30
- Re: [PATCH v3] Stop highlighting Python2 keywords.,
Stefan Kangas <=
- Re: [PATCH v3] Stop highlighting Python2 keywords., kobarity, 2025/01/31