GNU bug report logs - #75526
python.el uses treesit-declare-unavailable-functions despite requiring emacs >v24.4

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Sun, 12 Jan 2025 21:47:02 UTC

Severity: normal

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75526 in the body.
You can then email your comments to 75526 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 12 Jan 2025 21:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to JD Smith <jdtsmith <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 12 Jan 2025 21:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: JD Smith <jdtsmith <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: python.el uses treesit-declare-unavailable-functions despite
 requiring emacs >v24.4
Date: Sun, 12 Jan 2025 16:45:58 -0500
The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:

;; Version: 0.28
;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
;; Maintainer: emacs-devel <at> gnu.org





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 12 Jan 2025 22:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: JD Smith <jdtsmith <at> gmail.com>, 75526 <at> debbugs.gnu.org
Cc: Daniel Mendler <mail <at> daniel-mendler.de>,
 Philip Kaludercic <philipk <at> posteo.net>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sun, 12 Jan 2025 22:29:40 +0000
JD Smith <jdtsmith <at> gmail.com> writes:

> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>
> ;; Version: 0.28
> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
> ;; Maintainer: emacs-devel <at> gnu.org

Maybe this could be fixed in compat?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 12 Jan 2025 23:59:02 GMT) Full text and rfc822 format available.

Message #11 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 75526 <at> debbugs.gnu.org,
 JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Mon, 13 Jan 2025 00:58:13 +0100
Stefan Kangas <stefankangas <at> gmail.com> writes:

> JD Smith <jdtsmith <at> gmail.com> writes:
>
>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>
>> ;; Version: 0.28
>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>> ;; Maintainer: emacs-devel <at> gnu.org
>
> Maybe this could be fixed in compat?

Yes, we can add the macro `treesit-declare-unavailable-functions` to
Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
of `(require 'treesit)`.

Daniel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Mon, 13 Jan 2025 06:20:02 GMT) Full text and rfc822 format available.

Message #14 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: Philip Kaludercic <philipk <at> posteo.net>, JD Smith <jdtsmith <at> gmail.com>,
 Stefan Kangas <stefankangas <at> gmail.com>, 75526 <at> debbugs.gnu.org
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sun, 12 Jan 2025 22:19:08 -0800

> On Jan 12, 2025, at 3:58 PM, Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
> 
> Stefan Kangas <stefankangas <at> gmail.com> writes:
> 
>> JD Smith <jdtsmith <at> gmail.com> writes:
>> 
>>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>> 
>>> ;; Version: 0.28
>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>> ;; Maintainer: emacs-devel <at> gnu.org
>> 
>> Maybe this could be fixed in compat?
> 
> Yes, we can add the macro `treesit-declare-unavailable-functions` to
> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
> of `(require 'treesit)`.

Oops, sorry about that. I didn’t know python.el is on ELPA. Let me know if there’s anything needed from me.

Yuan






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sat, 25 Jan 2025 00:00:03 GMT) Full text and rfc822 format available.

Message #17 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 75526 <at> debbugs.gnu.org,
 JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Fri, 24 Jan 2025 17:59:34 -0600
Daniel Mendler <mail <at> daniel-mendler.de> writes:

> Stefan Kangas <stefankangas <at> gmail.com> writes:
>
>> JD Smith <jdtsmith <at> gmail.com> writes:
>>
>>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>>
>>> ;; Version: 0.28
>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>> ;; Maintainer: emacs-devel <at> gnu.org
>>
>> Maybe this could be fixed in compat?
>
> Yes, we can add the macro `treesit-declare-unavailable-functions` to
> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
> of `(require 'treesit)`.

Thanks.  Please let us know when this is implemented and which version
of compat we should require.  Then we can also make the above change at
the same time.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sat, 25 Jan 2025 07:03:02 GMT) Full text and rfc822 format available.

Message #20 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 75526 <at> debbugs.gnu.org,
 JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sat, 25 Jan 2025 08:02:35 +0100
Stefan Kangas <stefankangas <at> gmail.com> writes:

> Daniel Mendler <mail <at> daniel-mendler.de> writes:
>
>> Stefan Kangas <stefankangas <at> gmail.com> writes:
>>
>>> JD Smith <jdtsmith <at> gmail.com> writes:
>>>
>>>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>>>
>>>> ;; Version: 0.28
>>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>>> ;; Maintainer: emacs-devel <at> gnu.org
>>>
>>> Maybe this could be fixed in compat?
>>
>> Yes, we can add the macro `treesit-declare-unavailable-functions` to
>> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
>> of `(require 'treesit)`.
>
> Thanks.  Please let us know when this is implemented and which version
> of compat we should require.  Then we can also make the above change at
> the same time.

Yes, but it will take a while until compat-31 is released. We usually
release at the time of the branch creation of the corresponding Emacs
version (emacs-31). Until then, it is probably better to revert the
change in python.el.

Daniel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Tue, 28 Jan 2025 01:55:01 GMT) Full text and rfc822 format available.

Message #23 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: Philip Kaludercic <philipk <at> posteo.net>, JD Smith <jdtsmith <at> gmail.com>,
 Stefan Kangas <stefankangas <at> gmail.com>, 75526 <at> debbugs.gnu.org
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Mon, 27 Jan 2025 17:53:46 -0800

> On Jan 12, 2025, at 10:19 PM, Yuan Fu <casouri <at> gmail.com> wrote:
> 
> 
> 
>> On Jan 12, 2025, at 3:58 PM, Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
>> 
>> Stefan Kangas <stefankangas <at> gmail.com> writes:
>> 
>>> JD Smith <jdtsmith <at> gmail.com> writes:
>>> 
>>>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>>> 
>>>> ;; Version: 0.28
>>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>>> ;; Maintainer: emacs-devel <at> gnu.org
>>> 
>>> Maybe this could be fixed in compat?
>> 
>> Yes, we can add the macro `treesit-declare-unavailable-functions` to
>> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
>> of `(require 'treesit)`.
> 
> Oops, sorry about that. I didn’t know python.el is on ELPA. Let me know if there’s anything needed from me.
> 
> Yuan

Any progress on this? I can add it to compat.el if no one is available right now. Compat.el is on savannah, right?

Yuan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Tue, 28 Jan 2025 03:58:01 GMT) Full text and rfc822 format available.

Message #26 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: Philip Kaludercic <philipk <at> posteo.net>, JD Smith <jdtsmith <at> gmail.com>,
 Stefan Kangas <stefankangas <at> gmail.com>, 75526 <at> debbugs.gnu.org
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Mon, 27 Jan 2025 19:56:52 -0800

> On Jan 24, 2025, at 11:02 PM, Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
> 
> Stefan Kangas <stefankangas <at> gmail.com> writes:
> 
>> Daniel Mendler <mail <at> daniel-mendler.de> writes:
>> 
>>> Stefan Kangas <stefankangas <at> gmail.com> writes:
>>> 
>>>> JD Smith <jdtsmith <at> gmail.com> writes:
>>>> 
>>>>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>>>> 
>>>>> ;; Version: 0.28
>>>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>>>> ;; Maintainer: emacs-devel <at> gnu.org
>>>> 
>>>> Maybe this could be fixed in compat?
>>> 
>>> Yes, we can add the macro `treesit-declare-unavailable-functions` to
>>> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
>>> of `(require 'treesit)`.
>> 
>> Thanks.  Please let us know when this is implemented and which version
>> of compat we should require.  Then we can also make the above change at
>> the same time.
> 
> Yes, but it will take a while until compat-31 is released. We usually
> release at the time of the branch creation of the corresponding Emacs
> version (emacs-31). Until then, it is probably better to revert the
> change in python.el.
> 
> Daniel

Thanks, I reverted it on master.

Yuan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Tue, 28 Jan 2025 06:56:02 GMT) Full text and rfc822 format available.

Message #29 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, JD Smith <jdtsmith <at> gmail.com>,
 Stefan Kangas <stefankangas <at> gmail.com>, 75526 <at> debbugs.gnu.org
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Tue, 28 Jan 2025 07:55:47 +0100
Yuan Fu <casouri <at> gmail.com> writes:

>> On Jan 12, 2025, at 10:19 PM, Yuan Fu <casouri <at> gmail.com> wrote:
>> 
>> 
>> 
>>> On Jan 12, 2025, at 3:58 PM, Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
>>> 
>>> Stefan Kangas <stefankangas <at> gmail.com> writes:
>>> 
>>>> JD Smith <jdtsmith <at> gmail.com> writes:
>>>> 
>>>>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>>>> 
>>>>> ;; Version: 0.28
>>>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>>>> ;; Maintainer: emacs-devel <at> gnu.org
>>>> 
>>>> Maybe this could be fixed in compat?
>>> 
>>> Yes, we can add the macro `treesit-declare-unavailable-functions` to
>>> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
>>> of `(require 'treesit)`.
>> 
>> Oops, sorry about that. I didn’t know python.el is on ELPA. Let me know if there’s anything needed from me.
>> 
>> Yuan
>
> Any progress on this? I can add it to compat.el if no one is available right now. Compat.el is on savannah, right?

No, this is too early. Compat-31 is still far away.

> Yuan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Wed, 29 Jan 2025 03:01:02 GMT) Full text and rfc822 format available.

Message #32 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: Philip Kaludercic <philipk <at> posteo.net>, JD Smith <jdtsmith <at> gmail.com>,
 Stefan Kangas <stefankangas <at> gmail.com>, 75526 <at> debbugs.gnu.org
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Tue, 28 Jan 2025 19:00:17 -0800

> On Jan 27, 2025, at 10:55 PM, Daniel Mendler <mail <at> daniel-mendler.de> wrote:
> 
> Yuan Fu <casouri <at> gmail.com> writes:
> 
>>> On Jan 12, 2025, at 10:19 PM, Yuan Fu <casouri <at> gmail.com> wrote:
>>> 
>>> 
>>> 
>>>> On Jan 12, 2025, at 3:58 PM, Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
>>>> 
>>>> Stefan Kangas <stefankangas <at> gmail.com> writes:
>>>> 
>>>>> JD Smith <jdtsmith <at> gmail.com> writes:
>>>>> 
>>>>>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>>>>> 
>>>>>> ;; Version: 0.28
>>>>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>>>>> ;; Maintainer: emacs-devel <at> gnu.org
>>>>> 
>>>>> Maybe this could be fixed in compat?
>>>> 
>>>> Yes, we can add the macro `treesit-declare-unavailable-functions` to
>>>> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
>>>> of `(require 'treesit)`.
>>> 
>>> Oops, sorry about that. I didn’t know python.el is on ELPA. Let me know if there’s anything needed from me.
>>> 
>>> Yuan
>> 
>> Any progress on this? I can add it to compat.el if no one is available right now. Compat.el is on savannah, right?
> 
> No, this is too early. Compat-31 is still far away.

Thanks. I reverted the change in python.el

Yuan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Fri, 28 Feb 2025 01:40:02 GMT) Full text and rfc822 format available.

Message #35 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: JD Smith <jdtsmith <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>,
 Philip Kaludercic <philipk <at> posteo.net>, Stefan Kangas <stefankangas <at> gmail.com>,
 75526 <at> debbugs.gnu.org
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Thu, 27 Feb 2025 20:39:33 -0500
[Message part 1 (text/plain, inline)]
> On Jan 28, 2025, at 10:00 PM, Yuan Fu <casouri <at> gmail.com> wrote:
> 
> 
> 
>> On Jan 27, 2025, at 10:55 PM, Daniel Mendler <mail <at> daniel-mendler.de> wrote:
>> 
>> Yuan Fu <casouri <at> gmail.com> writes:
>> 
>>>> On Jan 12, 2025, at 10:19 PM, Yuan Fu <casouri <at> gmail.com> wrote:
>>>> 
>>>> 
>>>> 
>>>>> On Jan 12, 2025, at 3:58 PM, Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
>>>>> 
>>>>> Stefan Kangas <stefankangas <at> gmail.com> writes:
>>>>> 
>>>>>> JD Smith <jdtsmith <at> gmail.com> writes:
>>>>>> 
>>>>>>> The TS support in python.el breaks versions of emacs prior to v30, since it calls the recently introduced macro `treesit-declare-unavailable-functions`.  The header still notes:
>>>>>>> 
>>>>>>> ;; Version: 0.28
>>>>>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>>>>>> ;; Maintainer: emacs-devel <at> gnu.org
>>>>>> 
>>>>>> Maybe this could be fixed in compat?
>>>>> 
>>>>> Yes, we can add the macro `treesit-declare-unavailable-functions` to
>>>>> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
>>>>> of `(require 'treesit)`.
>>>> 
>>>> Oops, sorry about that. I didn’t know python.el is on ELPA. Let me know if there’s anything needed from me.
>>>> 
>>>> Yuan
>>> 
>>> Any progress on this? I can add it to compat.el if no one is available right now. Compat.el is on savannah, right?
>> 
>> No, this is too early. Compat-31 is still far away.
> 
> Thanks. I reverted the change in python.el
> 

Thanks.  Unfortunately there are now new changes to python.el which again break Emacs < 30.  The file still mentions: 

> Package-Requires: ((emacs "24.4") 


It now uses the Emacs 30 only `derived-mode-add-parents'.  If python.el is going to be developed primarily on master, it should probably be removed from MELPA or at least use compat.  I'll take this up with them.

JD
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Fri, 28 Feb 2025 08:35:02 GMT) Full text and rfc822 format available.

Message #38 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: JD Smith <jdtsmith <at> gmail.com>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, Yuan Fu <casouri <at> gmail.com>,
 Stefan Kangas <stefankangas <at> gmail.com>, 75526 <at> debbugs.gnu.org
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Fri, 28 Feb 2025 08:34:04 +0000
JD Smith <jdtsmith <at> gmail.com> writes:

>> On Jan 28, 2025, at 10:00 PM, Yuan Fu <casouri <at> gmail.com> wrote:
>> 
>> 
>> 
>>> On Jan 27, 2025, at 10:55 PM, Daniel Mendler <mail <at> daniel-mendler.de> wrote:
>>> 
>>> Yuan Fu <casouri <at> gmail.com> writes:
>>> 
>>>>> On Jan 12, 2025, at 10:19 PM, Yuan Fu <casouri <at> gmail.com> wrote:
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Jan 12, 2025, at 3:58 PM, Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
>>>>>> 
>>>>>> Stefan Kangas <stefankangas <at> gmail.com> writes:
>>>>>> 
>>>>>>> JD Smith <jdtsmith <at> gmail.com> writes:
>>>>>>> 
>>>>>>>> The TS support in python.el breaks versions of emacs prior to
>>>>>>>> v30, since it calls the recently introduced macro
>>>>>>>> `treesit-declare-unavailable-functions`.  The header still
>>>>>>>> notes:
>>>>>>>> 
>>>>>>>> ;; Version: 0.28
>>>>>>>> ;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0") (seq "2.23"))
>>>>>>>> ;; Maintainer: emacs-devel <at> gnu.org
>>>>>>> 
>>>>>>> Maybe this could be fixed in compat?
>>>>>> 
>>>>>> Yes, we can add the macro `treesit-declare-unavailable-functions` to
>>>>>> Compat. But python.el needs to `(require 'treesit nil 'noerror)` instead
>>>>>> of `(require 'treesit)`.
>>>>> 
>>>>> Oops, sorry about that. I didn’t know python.el is on ELPA. Let me know if there’s anything needed from me.
>>>>> 
>>>>> Yuan
>>>> 
>>>> Any progress on this? I can add it to compat.el if no one is available right now. Compat.el is on savannah, right?
>>> 
>>> No, this is too early. Compat-31 is still far away.
>> 
>> Thanks. I reverted the change in python.el
>> 
>
> Thanks.  Unfortunately there are now new changes to python.el which again break Emacs < 30.  The file still mentions: 
>
>> Package-Requires: ((emacs "24.4") 
>
>
> It now uses the Emacs 30 only `derived-mode-add-parents'.  If
> python.el is going to be developed primarily on master, it should
> probably be removed from MELPA or at least use compat.  I'll take this
> up with them.

python.el is on MELPA? (and it /does/ use Compat!)  But note that Compat
doesn't implement everything, IIRC this includes
derived-mode-add-parents.

> JD




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Fri, 28 Feb 2025 12:36:01 GMT) Full text and rfc822 format available.

Message #41 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: JD Smith <jdtsmith <at> gmail.com>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, Yuan Fu <casouri <at> gmail.com>,
 Stefan Kangas <stefankangas <at> gmail.com>, 75526 <at> debbugs.gnu.org
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Fri, 28 Feb 2025 07:34:53 -0500
[Message part 1 (text/plain, inline)]
> 
> python.el is on MELPA? (and it /does/ use Compat!)  But note that Compat
> doesn't implement everything, IIRC this includes
> derived-mode-add-parents.


Sorry, I was confusing the python-mode on MELPA.  The issue is actually with the version on gnu-devel: 

https://elpa.gnu.org/devel/python.html


[Message part 2 (text/html, inline)]
[favicon.png (image/png, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 02 Mar 2025 01:00:03 GMT) Full text and rfc822 format available.

Message #44 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: JD Smith <jdtsmith <at> gmail.com>
Cc: mail <at> daniel-mendler.de, philipk <at> posteo.net, casouri <at> gmail.com,
 monnier <at> iro.umontreal.ca, 75526 <at> debbugs.gnu.org
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sat, 1 Mar 2025 16:58:51 -0800
JD Smith <jdtsmith <at> gmail.com> writes:

> Thanks.  Unfortunately there are now new changes to python.el which again break Emacs < 30.  The file still mentions:
>
>> Package-Requires: ((emacs "24.4")
>
>
> It now uses the Emacs 30 only `derived-mode-add-parents'.  If python.el is going to be developed primarily on master, it should probably be removed from MELPA or at least use compat.  I'll take this up with them.

Hmm, there seem to be several compatibility issues here.  I'm
detailings my findings below.

1. Excluding treesit symbols (see below), these are the symbols that
   python.el itself needs, per version:

    28.1 project-root
    28.1 split-string-shell-command
    27.1 rx-let
    26.1 prog-first-column
    25.1 font-lock-ensure
    25.1 make-process

   Philip, Daniel, WDYT of the feasability of adding support for these
   symbols to compat?  Would it be worth the effort?  See also point 2
   and 3 below.

2. Stefan Monnier added the call to `derived-mode-add-parents', which
   needs Emacs 30.1.

   Stefan, can we avoid making that call?  Perhaps it should be added to
   compat?

3. We also need the below symbols:

    26.1 flymake-make-diagnostic
    26.1 flymake-diag-region
    27.1 project-files
    25.1 project-current

   This could perhaps be fixed by depending on project and flymake.
   Unfortunately, project 1.0 and flymake 0.1 (the earliest versions
   available on GNU ELPA) themselves need Emacs 26.1 and Emacs 26.3.  So
   maybe we should just bump the required version of python.el to Emacs
   26.3?

   Alternatively, perhaps the above could also be added to compat?  I'll
   let Philip and Daniel comment on this too.

4. More complicated to resolve perhaps are these symbols from Emacs 29.1:

    29.1 treesit [require]
    29.1 treesit-buffer-root-node
    29.1 treesit-defun-name
    29.1 treesit-filter-child
    29.1 treesit-font-lock-rules
    29.1 treesit-fontify-with-override
    29.1 treesit-induce-sparse-tree
    29.1 treesit-major-mode-setup
    29.1 treesit-node-at
    29.1 treesit-node-child-by-field-name
    29.1 treesit-node-children
    29.1 treesit-node-end
    29.1 treesit-node-field-name
    29.1 treesit-node-parent
    29.1 treesit-node-prev-sibling
    29.1 treesit-node-start
    29.1 treesit-node-text
    29.1 treesit-node-type
    29.1 treesit-parser-create
    29.1 treesit-ready-p

   Yuan, Philip, Daniel, any ideas for how to handle this compatibility
   issue?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 02 Mar 2025 04:23:02 GMT) Full text and rfc822 format available.

Message #47 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: mail <at> daniel-mendler.de, philipk <at> posteo.net, casouri <at> gmail.com,
 75526 <at> debbugs.gnu.org, JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sat, 01 Mar 2025 23:21:58 -0500
>> Thanks.  Unfortunately there are now new changes to python.el which again
>> break Emacs < 30.  The file still mentions:
>>
>>> Package-Requires: ((emacs "24.4")

We should probably bump this up, indeed.

> 2. Stefan Monnier added the call to `derived-mode-add-parents', which
>    needs Emacs 30.1.
>
>    Stefan, can we avoid making that call?  Perhaps it should be added to
>    compat?

We can just wrap the call inside an `fboundp` test.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 02 Mar 2025 04:42:02 GMT) Full text and rfc822 format available.

Message #50 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: mail <at> daniel-mendler.de, philipk <at> posteo.net, casouri <at> gmail.com,
 75526 <at> debbugs.gnu.org, JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sat, 1 Mar 2025 20:41:04 -0800
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> Thanks.  Unfortunately there are now new changes to python.el which again
>>> break Emacs < 30.  The file still mentions:
>>>
>>>> Package-Requires: ((emacs "24.4")
>
> We should probably bump this up, indeed.

I bumped the requirement to Emacs 26.3, which fixes some of the issues
reported here.  Let's see if we need to bump it even higher.

>> 2. Stefan Monnier added the call to `derived-mode-add-parents', which
>>    needs Emacs 30.1.
>>
>>    Stefan, can we avoid making that call?  Perhaps it should be added to
>>    compat?
>
> We can just wrap the call inside an `fboundp` test.

Thanks, I did that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 02 Mar 2025 04:49:02 GMT) Full text and rfc822 format available.

Message #53 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: mail <at> daniel-mendler.de, philipk <at> posteo.net, casouri <at> gmail.com,
 75526 <at> debbugs.gnu.org, JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sat, 01 Mar 2025 23:48:24 -0500
>>>>> Package-Requires: ((emacs "24.4")
>> We should probably bump this up, indeed.
> I bumped the requirement to Emacs 26.3, which fixes some of the issues
> reported here.  Let's see if we need to bump it even higher.

I wouldn't worry about it until someone complains.  🙂


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 02 Mar 2025 05:02:02 GMT) Full text and rfc822 format available.

Message #56 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: mail <at> daniel-mendler.de, philipk <at> posteo.net, casouri <at> gmail.com,
 75526 <at> debbugs.gnu.org, JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sat, 1 Mar 2025 21:01:29 -0800
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>>>>> Package-Requires: ((emacs "24.4")
>>> We should probably bump this up, indeed.
>> I bumped the requirement to Emacs 26.3, which fixes some of the issues
>> reported here.  Let's see if we need to bump it even higher.
>
> I wouldn't worry about it until someone complains.  🙂

Fair enough, but I thought this bug was exactly such a complaint?  :-)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 02 Mar 2025 16:28:01 GMT) Full text and rfc822 format available.

Message #59 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: mail <at> daniel-mendler.de, casouri <at> gmail.com, 75526 <at> debbugs.gnu.org,
 JD Smith <jdtsmith <at> gmail.com>, monnier <at> iro.umontreal.ca
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sun, 02 Mar 2025 16:27:30 +0000
Stefan Kangas <stefankangas <at> gmail.com> writes:

> JD Smith <jdtsmith <at> gmail.com> writes:
>
>> Thanks.  Unfortunately there are now new changes to python.el which again break Emacs < 30.  The file still mentions:
>>
>>> Package-Requires: ((emacs "24.4")
>>
>>
>> It now uses the Emacs 30 only `derived-mode-add-parents'.  If
>> python.el is going to be developed primarily on master, it should
>> probably be removed from MELPA or at least use compat.  I'll take
>> this up with them.
>
> Hmm, there seem to be several compatibility issues here.  I'm
> detailings my findings below.
>
> 1. Excluding treesit symbols (see below), these are the symbols that
>    python.el itself needs, per version:
>
>     28.1 project-root
>     28.1 split-string-shell-command
>     27.1 rx-let
>     26.1 prog-first-column
>     25.1 font-lock-ensure
>     25.1 make-process
>
>    Philip, Daniel, WDYT of the feasability of adding support for these
>    symbols to compat?  Would it be worth the effort?  See also point 2
>    and 3 below.

I think that split-string-shell-command, prog-first-column,
font-lock-ensure and possibly make-process could be back-ported, but
rx-let would require modifying a lot of rx which would be out of scope
of Compat.

> 2. Stefan Monnier added the call to `derived-mode-add-parents', which
>    needs Emacs 30.1.
>
>    Stefan, can we avoid making that call?  Perhaps it should be added to
>    compat?
>
> 3. We also need the below symbols:
>
>     26.1 flymake-make-diagnostic
>     26.1 flymake-diag-region
>     27.1 project-files
>     25.1 project-current
>
>    This could perhaps be fixed by depending on project and flymake.
>    Unfortunately, project 1.0 and flymake 0.1 (the earliest versions
>    available on GNU ELPA) themselves need Emacs 26.1 and Emacs 26.3.  So
>    maybe we should just bump the required version of python.el to Emacs
>    26.3?
>
>    Alternatively, perhaps the above could also be added to compat?  I'll
>    let Philip and Daniel comment on this too.

I would rather that Compat doesn't depend on a newer version of flymake
and project.

> 4. More complicated to resolve perhaps are these symbols from Emacs 29.1:
>
>     29.1 treesit [require]
>     29.1 treesit-buffer-root-node
>     29.1 treesit-defun-name
>     29.1 treesit-filter-child
>     29.1 treesit-font-lock-rules
>     29.1 treesit-fontify-with-override
>     29.1 treesit-induce-sparse-tree
>     29.1 treesit-major-mode-setup
>     29.1 treesit-node-at
>     29.1 treesit-node-child-by-field-name
>     29.1 treesit-node-children
>     29.1 treesit-node-end
>     29.1 treesit-node-field-name
>     29.1 treesit-node-parent
>     29.1 treesit-node-prev-sibling
>     29.1 treesit-node-start
>     29.1 treesit-node-text
>     29.1 treesit-node-type
>     29.1 treesit-parser-create
>     29.1 treesit-ready-p
>
>    Yuan, Philip, Daniel, any ideas for how to handle this compatibility
>    issue?

I still haven't familiarised myself with the treesit API, and I don't
know if there is a reasonable way to translate these into fontlock...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Sun, 02 Mar 2025 16:52:02 GMT) Full text and rfc822 format available.

Message #62 received at 75526 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 75526 <at> debbugs.gnu.org, casouri <at> gmail.com,
 Stefan Kangas <stefankangas <at> gmail.com>, JD Smith <jdtsmith <at> gmail.com>,
 mail <at> daniel-mendler.de
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sun, 02 Mar 2025 11:51:15 -0500
>> 4. More complicated to resolve perhaps are these symbols from Emacs 29.1:
>>
>>     29.1 treesit [require]
>>     29.1 treesit-buffer-root-node
>>     29.1 treesit-defun-name
>>     29.1 treesit-filter-child
>>     29.1 treesit-font-lock-rules
>>     29.1 treesit-fontify-with-override
>>     29.1 treesit-induce-sparse-tree
>>     29.1 treesit-major-mode-setup
>>     29.1 treesit-node-at
>>     29.1 treesit-node-child-by-field-name
>>     29.1 treesit-node-children
>>     29.1 treesit-node-end
>>     29.1 treesit-node-field-name
>>     29.1 treesit-node-parent
>>     29.1 treesit-node-prev-sibling
>>     29.1 treesit-node-start
>>     29.1 treesit-node-text
>>     29.1 treesit-node-type
>>     29.1 treesit-parser-create
>>     29.1 treesit-ready-p
>>
>>    Yuan, Philip, Daniel, any ideas for how to handle this compatibility
>>    issue?
>
> I still haven't familiarised myself with the treesit API, and I don't
> know if there is a reasonable way to translate these into fontlock...

We definitely don't want to translate those into fontlock.
AFAIK, there are just two ways to solve this:

- Bump package-requires to Emacs-29.
- Use (require 'treesit nil t) and than sprinkle enough `fboundp` tests
  around treesitter code to allow loading `python.el` into Emacs<29.
  It's perfectly OK if `python-ts-mode` doesn't work in Emacs<29.

Bumping package-requires to 29 might not be a bad idea since noone
complained (until now) in the 2½ years since we added (require 'treesit)
to the code.


        Stefan





Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Sun, 02 Mar 2025 17:56:02 GMT) Full text and rfc822 format available.

Notification sent to JD Smith <jdtsmith <at> gmail.com>:
bug acknowledged by developer. (Sun, 02 Mar 2025 17:56:02 GMT) Full text and rfc822 format available.

Message #67 received at 75526-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Philip Kaludercic <philipk <at> posteo.net>
Cc: mail <at> daniel-mendler.de, casouri <at> gmail.com, 75526-done <at> debbugs.gnu.org,
 JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Sun, 2 Mar 2025 09:55:23 -0800
Version: 31.1

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> We definitely don't want to translate those into fontlock.
> AFAIK, there are just two ways to solve this:
>
> - Bump package-requires to Emacs-29.
> - Use (require 'treesit nil t) and than sprinkle enough `fboundp` tests
>   around treesitter code to allow loading `python.el` into Emacs<29.
>   It's perfectly OK if `python-ts-mode` doesn't work in Emacs<29.
>
> Bumping package-requires to 29 might not be a bad idea since noone
> complained (until now) in the 2½ years since we added (require 'treesit)
> to the code.

True, so let's just save us a ton of headache:

I have bumped the requirement to Emacs 29.1, which fixes all the
outstanding issues reported here.  With that, I'm closing this bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75526; Package emacs. (Tue, 04 Mar 2025 23:23:02 GMT) Full text and rfc822 format available.

Message #70 received at 75526-done <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: mail <at> daniel-mendler.de, Philip Kaludercic <philipk <at> posteo.net>,
 75526-done <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#75526: python.el uses treesit-declare-unavailable-functions
 despite requiring emacs >v24.4
Date: Tue, 4 Mar 2025 15:22:38 -0800

> On Mar 2, 2025, at 9:55 AM, Stefan Kangas <stefankangas <at> gmail.com> wrote:
> 
> Version: 31.1
> 
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> 
>> We definitely don't want to translate those into fontlock.
>> AFAIK, there are just two ways to solve this:
>> 
>> - Bump package-requires to Emacs-29.
>> - Use (require 'treesit nil t) and than sprinkle enough `fboundp` tests
>>  around treesitter code to allow loading `python.el` into Emacs<29.
>>  It's perfectly OK if `python-ts-mode` doesn't work in Emacs<29.
>> 
>> Bumping package-requires to 29 might not be a bad idea since noone
>> complained (until now) in the 2½ years since we added (require 'treesit)
>> to the code.
> 
> True, so let's just save us a ton of headache:
> 
> I have bumped the requirement to Emacs 29.1, which fixes all the
> outstanding issues reported here.  With that, I'm closing this bug.

Thanks! Saves a lot of headache indeed :)

Yuan



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 02 Apr 2025 11:24:20 GMT) Full text and rfc822 format available.

This bug report was last modified 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.