Brandon T. Willard
87a5b117a1
Implement new importer using PEP-302 semantics
...
Python 3.x is patched in a way that integrates `.hy` source files into
Pythons default `importlib` machinery. In Python 2.7, a PEP-302 "importer"
and "loader" is implemented according to the standard `import` logic (via
`pkgutil` and later pure-Python `imp` package code).
In both cases, the entry-point for the loaders is through `sys.path_hooks` only.
As well, the import semantics have been updated all throughout to utilize
`importlib` and follow aspects of PEP-420. This, along with some light
patches, should allow for basic use of `runpy`, `py_compile` and `reload`.
In all cases, if a `.hy` file is shadowed by a `.py`, Hy will silently use
`.hy`.
2018-08-25 22:50:38 -05:00
Kodi Arfer
c92fb3c494
Merge pull request #1669 from Kodiologist/speed
...
Some simple speed-ups
2018-08-18 15:37:41 -07:00
Kodi Arfer
734cdcd2fd
Delay importing the lexer and parser
...
This speeds up runs of Hy that never need to parse or compile Hy code (e.g., running a Hy program that's already byte-compiled).
2018-08-18 18:05:40 -04:00
Kodi Arfer
99851f7f6b
Use fastentrypoints
...
This speeds up launching `hy`.
2018-08-18 18:05:40 -04:00
Kodi Arfer
d1c7ab08ed
Merge pull request #1662 from Kodiologist/win-strftime
...
Fix date and time hy-reprs on Windows
2018-08-08 06:32:34 -07:00
Kodi Arfer
7ba2105a2b
Fix date and time hy-reprs on Windows
2018-08-08 09:26:20 -04:00
gilch
109c0b0f5b
Merge pull request #1664 from brandonwillard/require-in-macroexpand-all
...
Expand `require`d macros in `macroexpand-all`
2018-08-02 23:57:32 -06:00
Ryan Gonzalez
bd163f248d
Merge pull request #1668 from hylang/gilch-help-redirect
...
Point out appropriate help forums
2018-07-31 22:15:52 -05:00
gilch
8909ce63cc
Point out appropriate help forums
2018-07-31 20:51:04 -06:00
Kodi Arfer
0a384e7744
Merge pull request #1661 from Kodiologist/expr-compile
...
Fix handling of unpacking in method calls and attribute lookups
2018-07-30 10:24:57 -07:00
Brandon T. Willard
a46cc39d6b
Include macroexpand-all
changes in AUTHORS and NEWS
2018-07-25 17:22:40 -05:00
Brandon T. Willard
65b2bd18ce
Add a test for require
in the body of a macro
2018-07-25 17:20:19 -05:00
Brandon T. Willard
33f2b4a91a
Compile require
s in the body of a macro
...
This change enables further macro expansion for cases in which a macro
`require`s other macros within its body.
2018-07-25 17:20:19 -05:00
Kodi Arfer
081a710b0f
Fix handling of unpacking in method calls and attribute lookups
2018-07-24 09:45:00 -07:00
Kodi Arfer
0f85331c81
Rename variables in @builds_model(HyExpression)
2018-07-24 09:41:57 -07:00
Kodi Arfer
271f2846dc
Minor cleanup in test_ast
2018-07-24 09:37:19 -07:00
Kodi Arfer
45e99d027d
Fix an intersphinx link
2018-07-24 09:31:36 -07:00
Kodi Arfer
5bfd4592f6
Merge pull request #1656 from Kodiologist/keyword-call
...
Make HyKeyword callable
2018-07-24 09:28:16 -07:00
Kodi Arfer
1d2c73165d
Make HyKeyword callable
...
Co-authored-by: Simon Gomizelj <simon@vodik.xyz>
2018-07-24 09:19:37 -07:00
Kodi Arfer
d9fa039252
Merge pull request #1657 from Kodiologist/no-empty-exprs
...
Make empty expressions illegal at the top level
2018-07-24 09:15:27 -07:00
Kodi Arfer
03aafad657
Make empty expressions illegal at the top level
2018-07-24 08:59:52 -07:00
Kodi Arfer
addf9c4a01
Merge pull request #1652 from Kodiologist/release
...
Hy 0.15.0
2018-07-21 11:33:22 -07:00
Kodi Arfer
4020f3dd56
Clean up NEWS
2018-07-21 11:20:13 -07:00
Kodi Arfer
9af738e56d
Add hy2py tests for empty data structures
2018-07-21 11:20:13 -07:00
Kodi Arfer
abbf29165a
Depend on astor 0.7
2018-07-21 11:20:10 -07:00
Ryan Gonzalez
bd0486ebf2
Merge pull request #1659 from Kodiologist/doc-updates
...
Small documentation additions
2018-07-11 21:23:05 -05:00
Kodi Arfer
e05af9d7e0
Document function docstrings
2018-07-11 11:59:46 -07:00
Kodi Arfer
9859b0085c
Document the required order of &-parameters
2018-07-11 11:36:32 -07:00
Kodi Arfer
9cc90362d0
Docs: string literal prefixes must be in lowercase
2018-07-11 11:24:19 -07:00
gilch
0de8557fb5
Merge pull request #1647 from gilch/let-rebind
...
Fix let rebind bug.
2018-07-08 21:52:32 -06:00
Kodi Arfer
71dfec9d2f
Add reminder to check master before reporting bugs ( #1654 )
2018-07-08 15:29:08 -05:00
Kodi Arfer
9253029344
Merge pull request #1643 from Kodiologist/compiler-cleanup
...
Miscellaneous compiler cleanup
2018-07-05 13:32:02 -07:00
Kodi Arfer
af8907b151
Minor cleanup in compile_unary_operator
2018-06-30 11:04:57 -07:00
Kodi Arfer
88f33453dc
Minor cleanup for raise
and try
2018-06-30 11:04:11 -07:00
Kodi Arfer
bd675a5db6
Unmangle in compile_expression before build_method
...
This ensures that e.g. the symbols "~" and "hyx_XtildeX" in the root position will both appear as "~" to the build method.
2018-06-30 11:04:11 -07:00
Kodi Arfer
fca2eb93b0
Remove dead code from HyASTCompiler.compile
2018-06-30 11:04:11 -07:00
Kodi Arfer
00150c088c
Remove an unused helper method in the compiler
2018-06-30 11:04:11 -07:00
Kodi Arfer
e2b98effda
Replace an unused variable with _
2018-06-30 11:04:11 -07:00
Kodi Arfer
217fc2a487
Clean up _render_quoted_form
2018-06-30 11:04:11 -07:00
Kodi Arfer
8a70d5c90f
Fold _branch into the compiler
2018-06-30 11:04:11 -07:00
Kodi Arfer
45ec57ab56
Simplify Result.force_expr
2018-06-30 11:04:11 -07:00
Kodi Arfer
21f7ef0713
Fold load_stdlib into the compiler
2018-06-30 11:04:11 -07:00
Kodi Arfer
d501b073d8
Fold compile_time_ns into the compiler
2018-06-30 11:04:11 -07:00
Kodi Arfer
3d3d1fe6ae
Remove unused compiler subroutines
2018-06-30 11:04:11 -07:00
Kodi Arfer
9c6714c176
Remove unused imports
2018-06-30 11:04:11 -07:00
gilch
8c79015b40
Fix let rebind bug.
2018-06-27 23:41:49 -06:00
gilch
4b0e318997
Remove outdated comment in walk.
2018-06-27 23:39:44 -06:00
gilch
9a8886a452
Proper special indent in let tests.
2018-06-27 23:38:06 -06:00
Kodi Arfer
4de18d3dff
Merge pull request #1638 from Kodiologist/no-import-dot
...
Make importing a dotted name a syntax error, per Python
2018-06-27 10:32:54 -07:00
Kodi Arfer
7abd8ffc2a
Make importing a dotted name a syntax error, per Python
2018-06-27 10:24:22 -07:00