Commit Graph

2710 Commits

Author SHA1 Message Date
Kodi Arfer
096aac244f
Merge pull request #1543 from vodik/keywords-as-objects
Make HyKeyword a first class objects
2018-04-07 22:37:48 -07:00
Simon Gomizelj
69202df23d Update documentation and add a NEW entry 2018-04-07 22:29:20 -07:00
Simon Gomizelj
291847af15 Make HyKeyword constructor consistent
The colon is now only part of its string representation and no longer
accepted as part of the constructor:

  :foobar == HyKeyword("foobar")
2018-04-07 22:29:20 -07:00
Simon Gomizelj
1b7dfd2839 Make HyKeyword a first class objects
HyKeywords are no longer an instances of string with a particular
prefix, but a completely separate object.

This means keywords no longer trip isinstance str checks, adding a
little bit of type safety to the compiler.

It also means that HyKeywords evaluate to themselves.

Closes #1352
2018-04-07 22:29:20 -07:00
Kodi Arfer
2ad3401b36
Merge pull request #1572 from waigx/fix/hystring
Raise LexException when codec can't decode some bytes
2018-04-07 11:54:52 -07:00
Yigong Wang
564c030950 Raise LexException when codec can't decode some bytes 2018-04-07 11:47:06 -07:00
Simon Gomizelj
4d98cde663
Merge pull request #1560 from waigx/feat/results-shortcuts
Add recent REPL results globals *i and most recent error *e
2018-04-04 19:27:35 -04:00
Kodi Arfer
69b96872a3
Merge pull request #1570 from waigx/chore/authors
Add Yigong Wang to AUTHORS
2018-04-04 16:16:11 -07:00
Yigong Wang
966bbc3121 Add Yigong Wang to AUTHORS 2018-04-04 19:00:07 -04:00
Simon Gomizelj
512b032652
Merge pull request #1567 from Kodiologist/mangle-x-py3
Use `X` as the mangle delimiter on Python 3
2018-04-04 17:51:55 -04:00
gilch
be06741e03
Fix indent 2018-04-04 12:04:34 -06:00
Kodi Arfer
474de9e4c3 Fix a typo in the mangling documentation 2018-04-04 10:51:03 -07:00
Kodi Arfer
f17a21be63 Use X as the mangle delimiter on Python 3 2018-04-04 10:50:33 -07:00
Yigong Wang
be8537c0cf Add recent REPL results globals *i and most recent error *e
This comment add *1, *2, *3 as globals for recent REPL results.
*e global is also added for the most recent error object.
2018-04-02 00:21:13 -04:00
Kodi Arfer
7822e7d8a8
Merge pull request #1561 from waigx/chore/gitignore
Update .gitignore to exclude pytest cache folder
2018-04-01 11:43:15 -07:00
Yigong Wang
bbf2f9c942 Update .gitignore to exclude pytest cache folder
.pytest folder will be generated after running unit tests locally.
This commit excludes the folder and updates vim temporary files
exclusion rules.
2018-03-31 23:54:44 -04:00
Kodi Arfer
6c25fc23df
Merge pull request #1557 from waigx/feat/E-arg
Add -E support for Hy REPL
2018-03-31 15:17:31 -07:00
Yigong Wang
4073c78069 Add -E support for Hy REPL
This commit adds -E support for Hy. Similar to Python, hy will ignore
all PYTHON* environment variables, e.g. PYTHONPATH and PYTHONHOME,
that might be set.
2018-03-31 15:16:40 -07:00
Kodi Arfer
39587e6f23
Merge pull request #1536 from vodik/fix-defclass
Fix `defclass`
2018-03-31 12:58:32 -07:00
Simon Gomizelj
258a1f5748 Fix PY37 docstring generation 2018-03-31 03:07:26 -04:00
Simon Gomizelj
b27cdfed69 Fix defclass construction
Python Class AST expects a body which is a list of ast.Expr. Force
every entry to be stored as a statement. This means we'll preserve
print statements.

Python also doesn't construct docstrings in classes by setting a
__doc__ attribute, it does it by inspecting the first ast.Expr node of
the class. But this means we can remove the special handler for it.
2018-03-31 02:43:53 -04:00
Simon Gomizelj
84e1c65bcd Improve checks inside defclass
We need to make sure we're looking at HyExpression when trying to
determine if we're rewriting an __init__ expression.

Fixes #1533
2018-03-31 02:43:53 -04:00
Simon Gomizelj
cf11e81c93 Remove unused imports 2018-03-31 02:43:53 -04:00
gilch
074a4bb75f
Merge pull request #1556 from waigx/chore/hy-help-msg
Prettify hy command helping message
2018-03-30 11:21:00 -06:00
Kodi Arfer
cce8b87483
Merge pull request #1552 from waigx/fix/ucs2
Fix `mangle` for Pythons compiled with UCS-2
2018-03-30 07:24:26 -07:00
Yigong Wang
5ae6875e88 Fix mangle for Pythons compiled with UCS-2 2018-03-30 07:23:32 -07:00
Yigong Wang
57064d38dd Prettify hy command helping message 2018-03-29 23:04:22 -04:00
Tuukka Turto
af89fd68b0 Report objects when raising type error (#1554)
Give better error report when replacing non-hy objects
2018-03-28 21:45:49 -05:00
Kodi Arfer
d4936c29ae
Merge pull request #1553 from waigx/docs/quickstart
Make description in the quickstart more clean
2018-03-28 07:26:40 -07:00
Yigong Wang
e0d37d63f7 Code review feedback 2018-03-26 22:47:12 -04:00
Ryan Gonzalez
308196d5bb
Merge pull request #1551 from waigx/docs/quickstart
Add `hy --spy` in quickstart
2018-03-26 21:41:06 -05:00
Yigong Wang
950c1973e4 Add hy --spy in quickstart 2018-03-26 21:07:52 -04:00
Kodi Arfer
00ac8dd915
Merge pull request #1528 from Kodiologist/py37
Python 3.7 support
2018-03-25 18:55:06 -07:00
Kodi Arfer
21f13b977d Update NEWS and classifiers for Python 3.7 support 2018-03-24 12:39:54 -07:00
Kodi Arfer
f8d919a491 On Travis, don't allow Python 3.7 to fail 2018-03-24 12:34:43 -07:00
Kodi Arfer
268eba93fe Update a disassembly test for Python 3.7 2018-03-24 12:34:43 -07:00
Kodi Arfer
f27eda16e1 Depend on an unstable version of astor
We need it for Python 3.7.
2018-03-24 12:34:43 -07:00
Simon Gomizelj
97cb19a8a2 Fix bytecode loading on Python 3.7 2018-03-24 12:34:43 -07:00
Kodi Arfer
03eab21fbf Avoid a Python 3.7 deprecation warning 2018-03-24 12:34:43 -07:00
Kodi Arfer
cf60dc7a13 Fix a hy-repr test for Python 3.7 2018-03-24 12:34:43 -07:00
Kodi Arfer
e3058b5cf5 Handle module docstrings on Python 3.7 2018-03-24 12:34:43 -07:00
Kodi Arfer
cfb042304c Test module docstrings 2018-03-24 12:34:43 -07:00
Kodi Arfer
dc30584a8a Handle function docstrings on Python 3.7 2018-03-24 12:34:43 -07:00
Kodi Arfer
f57463c0f8
Merge pull request #1538 from Kodiologist/tail-thread-fix
In ->>, don't modify the arguments
2018-03-23 14:17:14 -07:00
gilch
e7b21cc0df fix indent 2018-03-23 14:16:06 -07:00
Kodi Arfer
ad59fd7ff6 In -> and ->>, don't modify the arguments 2018-03-23 13:57:19 -07:00
Kodi Arfer
a48f009f1e
Merge pull request #1505 from vodik/metaclasses
Add metaclass support, support PEP 3115 and PEP 487
2018-03-22 13:37:30 -07:00
Simon Gomizelj
c663d38e33 Add metaclass support, support PEP 3115 and PEP 487 2018-03-22 13:28:22 -07:00
Simon Gomizelj
75af667fa1 Fix test_hy2py not respecting 'only_py36' 2018-03-22 13:27:56 -07:00
Kodi Arfer
ea2f5f859b Clean up NEWS 2018-03-22 13:27:42 -07:00