unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38464: python-hy REPL is unusable
@ 2019-12-03  0:16 Jesse Gibbons
  2019-12-03  0:37 ` Jesse Gibbons
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jesse Gibbons @ 2019-12-03  0:16 UTC (permalink / raw)
  To: 38464

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

1. install python-hy
2. run hy3 (to make sure it's setup to use python 3.7.4)
3. press <return> with or without typing anything.
It prints the following error at the end of a long stack trace:

ImportError: invalid flags 1495674643 in 'hy.core.language'

This also happens when using hy2py3, and I have attached a sample stack
trace from hy2py3.

If python2-hy is installed (configured to use the python 2.7, which is
appraching end-of-life), the hy2 REPL and hy2py2 work just fine.

- Does hy fail similarly on other systems, or is this a guix problem?
- If this is a guix issue, what is the best way to fix it?



[-- Attachment #2: err.txt --]
[-- Type: text/plain, Size: 2948 bytes --]

Traceback (most recent call last):
  File "/gnu/store/0pi3l7gads02lcj0x5v2b56hl4gv6rv4-python-hy-0.13.0/bin/.hy2py3-real", line 11, in <module>
    load_entry_point('hy==0.13.0', 'console_scripts', 'hy2py3')()
  File "/gnu/store/0pi3l7gads02lcj0x5v2b56hl4gv6rv4-python-hy-0.13.0/lib/python3.7/site-packages/hy/cmdline.py", line 411, in hy2py_main
    else pretty_error(import_buffer_to_ast, stdin_text, module_name))
  File "/gnu/store/0pi3l7gads02lcj0x5v2b56hl4gv6rv4-python-hy-0.13.0/lib/python3.7/site-packages/hy/cmdline.py", line 184, in pretty_error
    return func(*args, **kw)
  File "/gnu/store/0pi3l7gads02lcj0x5v2b56hl4gv6rv4-python-hy-0.13.0/lib/python3.7/site-packages/hy/importer.py", line 48, in import_buffer_to_ast
    return hy_compile(import_buffer_to_hst(buf), module_name)
  File "/gnu/store/0pi3l7gads02lcj0x5v2b56hl4gv6rv4-python-hy-0.13.0/lib/python3.7/site-packages/hy/compiler.py", line 2625, in hy_compile
    compiler = HyASTCompiler(module_name)
  File "/gnu/store/0pi3l7gads02lcj0x5v2b56hl4gv6rv4-python-hy-0.13.0/lib/python3.7/site-packages/hy/compiler.py", line 361, in __init__
    load_stdlib()
  File "/gnu/store/0pi3l7gads02lcj0x5v2b56hl4gv6rv4-python-hy-0.13.0/lib/python3.7/site-packages/hy/compiler.py", line 51, in load_stdlib
    mod = importlib.import_module(module)
  File "/gnu/store/608bvypsh90c58apvd2cgg3m9l2pwjqn-python-3.7.4/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/gnu/store/0pi3l7gads02lcj0x5v2b56hl4gv6rv4-python-hy-0.13.0/lib/python3.7/site-packages/hy/importer.py", line 215, in load_module
    return import_file_to_module(fullname, self.path, self)
  File "/gnu/store/0pi3l7gads02lcj0x5v2b56hl4gv6rv4-python-hy-0.13.0/lib/python3.7/site-packages/hy/importer.py", line 87, in import_file_to_module
    load_module(module_name))
  File "<frozen importlib._bootstrap_external>", line 407, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 907, in load_module
  File "<frozen importlib._bootstrap_external>", line 732, in load_module
  File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1005, in get_code
  File "<frozen importlib._bootstrap_external>", line 467, in _classify_pyc
ImportError: invalid flags 1495674643 in 'hy.core.language'

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

* bug#38464: python-hy REPL is unusable
  2019-12-03  0:16 bug#38464: python-hy REPL is unusable Jesse Gibbons
@ 2019-12-03  0:37 ` Jesse Gibbons
  2019-12-10  2:42 ` Jesse Gibbons
  2020-06-17  4:24 ` Royce Strange
  2 siblings, 0 replies; 4+ messages in thread
From: Jesse Gibbons @ 2019-12-03  0:37 UTC (permalink / raw)
  To: 38464

On Mon, 2019-12-02 at 17:16 -0700, Jesse Gibbons wrote:
> 1. install python-hy
> 2. run hy3 (to make sure it's setup to use python 3.7.4)
> 3. press <return> with or without typing anything.
> It prints the following error at the end of a long stack trace:
> 
> ImportError: invalid flags 1495674643 in 'hy.core.language'
> 
> This also happens when using hy2py3, and I have attached a sample stack
> trace from hy2py3.
> 
> If python2-hy is installed (configured to use the python 2.7, which is
> appraching end-of-life), the hy2 REPL and hy2py2 work just fine.
> 
> - Does hy fail similarly on other systems, or is this a guix problem?
Looks like a guix problem.
> - If this is a guix issue, what is the best way to fix it?
We need to update this thing!
> 
> 
hy 0.17.0 was released in May this year. Is there a reason it is still
0.13.0 (released June 2017) in guix? Support for 3.7 was added in 0.15
according to the notes, so of course it's going to crash.
Note that the notes for 0.17.0 says it will be the last version to support
python2.

I will send a patch after guix builds with the changes.

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

* bug#38464: python-hy REPL is unusable
  2019-12-03  0:16 bug#38464: python-hy REPL is unusable Jesse Gibbons
  2019-12-03  0:37 ` Jesse Gibbons
@ 2019-12-10  2:42 ` Jesse Gibbons
  2020-06-17  4:24 ` Royce Strange
  2 siblings, 0 replies; 4+ messages in thread
From: Jesse Gibbons @ 2019-12-10  2:42 UTC (permalink / raw)
  To: 38464

On Mon, 2019-12-02 at 17:16 -0700, Jesse Gibbons wrote:
> 1. install python-hy
> 2. run hy3 (to make sure it's setup to use python 3.7.4)
> 3. press <return> with or without typing anything.
> It prints the following error at the end of a long stack trace:
> 
> ImportError: invalid flags 1495674643 in 'hy.core.language'
> 
> This also happens when using hy2py3, and I have attached a sample stack
> trace from hy2py3.
> 
> If python2-hy is installed (configured to use the python 2.7, which is
> appraching end-of-life), the hy2 REPL and hy2py2 work just fine.
> 
> - Does hy fail similarly on other systems, or is this a guix problem?
> - If this is a guix issue, what is the best way to fix it?
> 
> 
This should be fixed with the patch series in bug#38554.

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

* bug#38464: python-hy REPL is unusable
  2019-12-03  0:16 bug#38464: python-hy REPL is unusable Jesse Gibbons
  2019-12-03  0:37 ` Jesse Gibbons
  2019-12-10  2:42 ` Jesse Gibbons
@ 2020-06-17  4:24 ` Royce Strange
  2 siblings, 0 replies; 4+ messages in thread
From: Royce Strange @ 2020-06-17  4:24 UTC (permalink / raw)
  To: 38464-done

Hello.

The patch series that Jesse Gibbons submitted in bug#38554 were applied 
in commits:
6b520177734e1c144fd6394f801919d0b54fa23e
c5eb8cf844148fb99934c3fedc3b4a0da55f9d8e
c215051dcf30b11c755aea4e2527b4d3d91c34bb

Briefly validated that the reported issue of the repl
being unusable seems fixed:

-----
$ guix --version
guix (GNU Guix) e7a7a483bcda6ec60d9dff3b3aba88dababe035c

$ guix environment --pure --ad-hoc python-hy -- hy3
hy 0.18.0 using CPython(default) 3.8.2 on Linux
=> (+ 1 2)
3
=> 
=> 
-----

Going to go ahead and close.




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

end of thread, other threads:[~2020-06-17  4:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03  0:16 bug#38464: python-hy REPL is unusable Jesse Gibbons
2019-12-03  0:37 ` Jesse Gibbons
2019-12-10  2:42 ` Jesse Gibbons
2020-06-17  4:24 ` Royce Strange

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).