all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacspy dynamic module - support request
@ 2024-08-25  1:25 813gan
  2024-08-27 13:06 ` Richard Stallman
  2024-08-29 11:43 ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: 813gan @ 2024-08-25  1:25 UTC (permalink / raw)
  To: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

Hello Everyone.

I recently forked https://github.com/813gan/emacspy.
It's dynamic module that allows interacting with python using libpython (no subprocess).
My intention is to allow Emacs modes to use python modules including bindings of external libraries.

I'm facing problems with --module-assertions.
With mentioned flag enabled emacs is printing
"Emacs module assertion: Emacs value not found in 57 values of 1 environments"
and dumps core.

Crash is reproducible with Makefile target test_module_assertions (https://github.com/813gan/emacspy/blob/f61275c6d3adec7947d292b8a9df25551e40c869/Makefile#L68)

I have absolutely no idea what is going on there. Only thing i discovered is that commenting line
https://github.com/813gan/emacspy/blob/f61275c6d3adec7947d292b8a9df25551e40c869/emacspy.pyx#L140
prevents crash. It's obviously not a solution.

Otherwise module appears to work;
Despite that i don't want to ship it as i assume emacs have good reason to crash.

I would appreciate any help. If you need more information, please contact me.

Happy Hacking!

[-- Attachment #2: Type: text/html, Size: 2132 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacspy dynamic module - support request
  2024-08-25  1:25 emacspy dynamic module - support request 813gan
@ 2024-08-27 13:06 ` Richard Stallman
  2024-08-28  1:29   ` 813gan
  2024-08-29 11:43 ` Eli Zaretskii
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2024-08-27 13:06 UTC (permalink / raw)
  To: 813gan; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > My intention is to allow Emacs modes to use python modules including
  > bindings of external libraries.

This sort of thing risks encouraging distributing software that
dynamically links Emacs with nonfree libraries.  It is the same risk
that exists with dynamic modules written in C.

For dynamic modules written in C, we've taken some measures to
discourage thta.  Does emacspy take the same measures?  If not,
could you modify it to take them?

Another point.  emacspy is hosted on GitHub, which is a site that
requires nonfree software for most kinds of use.  In our evaluation,
https://www.gnu.org/software/repo-criteria-evaluation.html, it gets
grade F.

Could you possibly host your variant on a different repo site?

That same page reviews some other repo sites.


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacspy dynamic module - support request
  2024-08-27 13:06 ` Richard Stallman
@ 2024-08-28  1:29   ` 813gan
  2024-08-30  2:31     ` Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: 813gan @ 2024-08-28  1:29 UTC (permalink / raw)
  To: emacs-devel

> > My intention is to allow Emacs modes to use python modules including
> > bindings of external libraries.
> 
> This sort of thing risks encouraging distributing software that
> dynamically links Emacs with nonfree libraries. It is the same risk
> that exists with dynamic modules written in C.
> 
> For dynamic modules written in C, we've taken some measures to
> discourage thta. Does emacspy take the same measures? If not,
> could you modify it to take them?

Emacspy currently does not validate licenses of Python modules.
I have plan to add hi-level Elisp API on top of existing C/cython functions.
Making such license validation would be easy to do inside this hi-level API.
I assume malicious users trying to bypass validation are not concern.

> Could you possibly host your variant on a different repo site?

Sure. I pushed https://notabug.org/813gan/emacspy



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacspy dynamic module - support request
  2024-08-25  1:25 emacspy dynamic module - support request 813gan
  2024-08-27 13:06 ` Richard Stallman
@ 2024-08-29 11:43 ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2024-08-29 11:43 UTC (permalink / raw)
  To: 813gan, Philipp Stephani; +Cc: emacs-devel

> Date: Sun, 25 Aug 2024 01:25:20 +0000
> From: 813gan <813gan@protonmail.com>
> 
> I recently forked https://github.com/813gan/emacspy.
> It's dynamic module that allows interacting with python using libpython (no subprocess).
> My intention is to allow Emacs modes to use python modules including bindings of external libraries.
> 
> I'm facing problems with --module-assertions.
> With mentioned flag enabled emacs is printing
> "Emacs module assertion: Emacs value not found in 57 values of 1 environments"
> and dumps core.
> 
> Crash is reproducible with Makefile target test_module_assertions
> (https://github.com/813gan/emacspy/blob/f61275c6d3adec7947d292b8a9df25551e40c869/Makefile#L68)
> 
> I have absolutely no idea what is going on there. Only thing i discovered is that commenting line 
> https://github.com/813gan/emacspy/blob/f61275c6d3adec7947d292b8a9df25551e40c869/emacspy.pyx#L140 
> prevents crash. It's obviously not a solution.
> 
> Otherwise module appears to work;
> Despite that i don't want to ship it as i assume emacs have good reason to crash.
> 
> I would appreciate any help. If you need more information, please contact me.

Philipp, are you able to help 813gan out?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacspy dynamic module - support request
  2024-08-28  1:29   ` 813gan
@ 2024-08-30  2:31     ` Richard Stallman
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2024-08-30  2:31 UTC (permalink / raw)
  To: 813gan; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Emacspy currently does not validate licenses of Python modules.
  > I have plan to add hi-level Elisp API on top of existing C/cython functions.
  > Making such license validation would be easy to do inside this hi-level API.
  > I assume malicious users trying to bypass validation are not concern.

that sounds like a good method, as long as you release the dynamic module
and the Lisp code tpgether as one package.

  > > Could you possibly host your variant on a different repo site?

  > Sure. I pushed https://notabug.org/813gan/emacspy

We don't have an evaluation of that, but ISTR it i smuch better
than GitHub and GitLab.  Thanks.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-30  2:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-25  1:25 emacspy dynamic module - support request 813gan
2024-08-27 13:06 ` Richard Stallman
2024-08-28  1:29   ` 813gan
2024-08-30  2:31     ` Richard Stallman
2024-08-29 11:43 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.