vlasovskikh / funcparserlib

Recursive descent parsing library for Python based on functional combinators
https://funcparserlib.pirx.ru
MIT License
338 stars 38 forks source link

Make a new release #65

Closed Kodiologist closed 2 years ago

Kodiologist commented 3 years ago

Over in hylang/hy#2026, we're hitting a bug that was fixed 6 years ago, because the last release of funcparserlib on PyPI is nearly 8 years old.

vlasovskikh commented 3 years ago

Thanks for pinging me about a new release! I've been preparing to do exactly that in the coming days or weeks. The new release will include the fix 10f4017287b88fc85a67a6e13760f915a137a8e4 for oneplus you've mentioned. I have also updated and tested the library to support newer versions of Python: 3.5-3.9, as well as 2.7.

@Kodiologist I have a question for you as a member of https://github.com/hylang. I plan to name the new release funcparserlib 1.0.0 and switch to semantic versioning. 1.0.0 is long overdue: the last release 0.3.6 is the current stable API for funcparserlib and I want the version to reflect that. Are you OK with these changes? Would you like to test 1.0.0a0 if I release it?

Recently I collected some open-source usages of funcparserlib. https://github.com/hylang/hy is one of the main users I've found. You now use version >= 0.3.6 in your requirements. My switching to 1.0.0 would mean auto-update for your users. It would be cool to test 1.0.0a0 before the release.

Kodiologist commented 3 years ago

Cool. Sure, we can try Hy with the release candidate before you mint it as 1.0.0.

vlasovskikh commented 3 years ago

FYI I've filed a backdated issue #66 about the problem with oneplus to track changes for 1.0.0.

BonfaceKilz commented 3 years ago

@vlasovskikh What's the status of this? I noticed that in Guix[0] upstream, this packages fails to build. It would be nice to have a release here on GH, and in Pypi :smile:

[0] https://guix.gnu.org/

vlasovskikh commented 3 years ago

Better error messages with expected tokens are coming in 1.0.0, see #52.

TE-WangShi commented 3 years ago

Please make a new release +1

Recently ReadTheDoc start to complain in doc build (I think this would affect many users):

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/xxx/envs/vxxx/lib/python3.7/site-packages/actdiag/parser.py", line 42, in <module>
    from funcparserlib.parser import (some, a, maybe, many, finished, skip)
  File "/home/docs/checkouts/readthedocs.org/user_builds/xxx/envs/vxxx/lib/python3.7/site-packages/funcparserlib/parser.py", line 123
    except NoParseError, e:
                       ^

Because of https://www.python.org/dev/peps/pep-3110/#compatibility-issues

alltilla commented 2 years ago

Hi Andrey,

Unfortunately funcparserlib cannot be installed with the latest setuptools. https://setuptools.readthedocs.io/en/latest/history.html#v58-0-2

$ docker run -it ubuntu:focal
root@981f674369f7:/# apt update && apt install -y python3 python3-pip && python3 -m pip install -U setuptools && python3 -m pip install funcparserlib

...

Collecting setuptools
  Downloading setuptools-58.0.2-py3-none-any.whl (816 kB)
     |████████████████████████████████| 816 kB 3.0 MB/s 
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 45.2.0
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'setuptools'. No files were found to uninstall.
Successfully installed setuptools-58.0.2
Collecting funcparserlib
  Downloading funcparserlib-0.3.6.tar.gz (30 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rxpt_mvo/funcparserlib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rxpt_mvo/funcparserlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-rxpt_mvo/funcparserlib/pip-egg-info
         cwd: /tmp/pip-install-rxpt_mvo/funcparserlib/
    Complete output (1 lines):
    error in funcparserlib setup command: use_2to3 is invalid.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

The v1.0.0 release would be appreciated. Thank you!

Cheers, Attila

tianon commented 2 years ago

I ran into #69 (hilariously transitively due to installing hy! :smile:) and that led me to this issue. In an attempt to be helpful (in what small capacity I possibly can be), I used pip install 'git+https://github.com/vlasovskikh/funcparserlib.git@d4ba3955ffc10544dbae6aaed68bcab21d0c294b' (d4ba3955ffc10544dbae6aaed68bcab21d0c294b being the latest commit here) followed by pip install -q 'hy==1.0a3', and then ran hy ---version and got the following (pretty hairy looking) backtrace.

Full Backtrace: ```console $ hy --version Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 339, in macroexpand obj = m(compiler, *tree[1:]) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 60, in hyx_Xpercent_signX parse_tree = pattern.parse(args) File "/usr/local/lib/python3.9/site-packages/funcparserlib/parser.py", line 211, in parse (tree, _) = self.run(tokens, State(0, 0, None)) File "/usr/local/lib/python3.9/site-packages/funcparserlib/parser.py", line 369, in _shift (v, s2) = self.run(tokens, s) File "/usr/local/lib/python3.9/site-packages/funcparserlib/parser.py", line 292, in _add (v1, s2) = self.run(tokens, s) File "/usr/local/lib/python3.9/site-packages/hy/model_patterns.py", line 90, in f return result, State(s.pos, end) TypeError: __init__() missing 1 required positional argument: 'parser' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/hy/core/result_macros.py", line 56, in compile_eval_and_compile hy_eval(new_expr + body, File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 726, in hy_eval _ast, expr = hy_compile(hytree, module, get_expr=True, File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 807, in hy_compile result = compiler.compile(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 349, in compile raise e File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 340, in compile ret = self.compile_atom(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 334, in compile_atom return Result() + _model_compilers[type(atom)](self, atom) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 472, in compile_expression expr = macroexpand(expr, self.module, self) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 339, in macroexpand obj = m(compiler, *tree[1:]) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 66, in do return fn(hy_compiler, expr, root, *parse_tree) File "/usr/local/lib/python3.9/site-packages/hy/core/result_macros.py", line 49, in compile_do return self._compile_branch(body) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 425, in _compile_branch ret += self.compile(exprs[-1]) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 349, in compile raise e File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 340, in compile ret = self.compile_atom(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 334, in compile_atom return Result() + _model_compilers[type(atom)](self, atom) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 536, in compile_expression args, ret, keywords = self._compile_collect(args, with_kwargs=True) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 407, in _compile_collect ret += self.compile(expr) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 349, in compile raise e File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 340, in compile ret = self.compile_atom(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 334, in compile_atom return Result() + _model_compilers[type(atom)](self, atom) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 472, in compile_expression expr = macroexpand(expr, self.module, self) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 339, in macroexpand obj = m(compiler, *tree[1:]) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 66, in fn return fn(hy_compiler, expr, root, *parse_tree) File "/usr/local/lib/python3.9/site-packages/hy/core/result_macros.py", line 1136, in compile_function_lambda body = compiler._compile_branch(body) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 421, in _compile_branch for x in map(self.compile, exprs[:-1]): File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 349, in compile raise e File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 340, in compile ret = self.compile_atom(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 334, in compile_atom return Result() + _model_compilers[type(atom)](self, atom) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 472, in compile_expression expr = macroexpand(expr, self.module, self) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 339, in macroexpand obj = m(compiler, *tree[1:]) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 66, in hyx_if return fn(hy_compiler, expr, root, *parse_tree) File "/usr/local/lib/python3.9/site-packages/hy/core/result_macros.py", line 503, in compile_if cond = compiler.compile(cond) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 349, in compile raise e File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 340, in compile ret = self.compile_atom(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 334, in compile_atom return Result() + _model_compilers[type(atom)](self, atom) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 472, in compile_expression expr = macroexpand(expr, self.module, self) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 346, in macroexpand tree = replace_hy_obj(obj, tree) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 273, in __exit__ raise HyMacroExpansionError(msg, self.macro_tree, filename, source) hy.errors.HyMacroExpansionError: File "/usr/local/lib/python3.9/site-packages/hy/core/macros.hy", line 128 (if (% (len other-kvs) 2) ^-------------------^ expanding macro % TypeError: __init__() missing 1 required positional argument: 'parser' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/hy", line 5, in from hy.cmdline import hy_main File "/usr/local/lib/python3.9/site-packages/hy/__init__.py", line 14, in hy.importer._inject_builtins() File "/usr/local/lib/python3.9/site-packages/hy/importer.py", line 175, in _inject_builtins hy.macros.load_macros(builtins) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 234, in load_macros builtin_mod = importlib.import_module(builtin_mod_name) File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 846, in exec_module File "", line 983, in get_code File "/usr/local/lib/python3.9/site-packages/hy/importer.py", line 127, in _hy_source_to_code data = hy_compile(hy_tree, module) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 807, in hy_compile result = compiler.compile(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 349, in compile raise e File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 340, in compile ret = self.compile_atom(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 334, in compile_atom return Result() + _model_compilers[type(atom)](self, atom) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 472, in compile_expression expr = macroexpand(expr, self.module, self) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 339, in macroexpand obj = m(compiler, *tree[1:]) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 66, in do return fn(hy_compiler, expr, root, *parse_tree) File "/usr/local/lib/python3.9/site-packages/hy/core/result_macros.py", line 49, in compile_do return self._compile_branch(body) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 421, in _compile_branch for x in map(self.compile, exprs[:-1]): File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 349, in compile raise e File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 340, in compile ret = self.compile_atom(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 334, in compile_atom return Result() + _model_compilers[type(atom)](self, atom) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 472, in compile_expression expr = macroexpand(expr, self.module, self) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 339, in macroexpand obj = m(compiler, *tree[1:]) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 66, in defmacro return fn(hy_compiler, expr, root, *parse_tree) File "/usr/local/lib/python3.9/site-packages/hy/core/result_macros.py", line 1191, in compile_macro_def ret = Result() + compiler.compile(Expression([ File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 349, in compile raise e File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 340, in compile ret = self.compile_atom(tree) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 334, in compile_atom return Result() + _model_compilers[type(atom)](self, atom) File "/usr/local/lib/python3.9/site-packages/hy/compiler.py", line 472, in compile_expression expr = macroexpand(expr, self.module, self) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 339, in macroexpand obj = m(compiler, *tree[1:]) File "/usr/local/lib/python3.9/site-packages/hy/macros.py", line 66, in eval_and_compile return fn(hy_compiler, expr, root, *parse_tree) File "/usr/local/lib/python3.9/site-packages/hy/core/result_macros.py", line 73, in compile_eval_and_compile raise HyEvalError(str(e), compiler.filename, body, compiler.source) hy.errors.HyEvalError: File "[hy.models.Expression([ hy.models.Expression([ hy.models.Symbol('hy.macros.macro'), 'assoc']), hy.models.Expression([ hy.models.Symbol('fn'), hy.models.List([ hy.models.Symbol('&compiler'), hy.models.Symbol('coll'), hy.models.Symbol('k1'), hy.models.Symbol('v1'), hy.models.Expression([ hy.models.Symbol('unpack-iterable'), hy.models.Symbol('other-kvs')])]), hy.models.String('Associate key/index value pair(s) to a collection `coll` like a dict or list.\n\n ``assoc`` is used to associate a key with a value in a dictionary or to set an\n index of a list to a value. It takes at least three parameters: the *data\n structure* to be modified, a *key* or *index*, and a *value*. If more than\n three parameters are used, it will associate in pairs.\n\n Examples:\n ::\n\n => (do\n ... (setv collection {})\n ... (assoc collection "Dog" "Bark")\n ... (print collection))\n {"Dog" "Bark"}\n\n ::\n\n => (do\n ... (setv collection {})\n ... (assoc collection "Dog" "Bark" "Cat" "Meow")\n ... (print collection))\n {"Cat" "Meow" "Dog" "Bark"}\n\n ::\n\n => (do\n ... (setv collection [1 2 3 4])\n ... (assoc collection 2 None)\n ... (print collection))\n [1 2 None 4]\n\n .. note:: ``assoc`` modifies the datastructure in place and returns ``None``.\n '), hy.models.Expression([ hy.models.Symbol('if'), hy.models.Expression([ hy.models.Symbol('%'), hy.models.Expression([ hy.models.Symbol('len'), hy.models.Symbol('other-kvs')]), hy.models.Integer(2)]), hy.models.Expression([ hy.models.Symbol('raise'), hy.models.Expression([ hy.models.Symbol('ValueError'), hy.models.String('`assoc` takes an odd number of arguments')])])]), hy.models.Expression([ hy.models.Symbol('setv'), hy.models.Symbol('c'), hy.models.Expression([ hy.models.Symbol('if'), hy.models.Symbol('other-kvs'), hy.models.Expression([ hy.models.Symbol('hy.gensym'), hy.models.String('c')]), hy.models.Symbol('coll')])]), hy.models.Expression([ hy.models.Symbol('quasiquote'), hy.models.Expression([ hy.models.Symbol('setv'), hy.models.Expression([ hy.models.Symbol('unquote-splice'), hy.models.Expression([ hy.models.Symbol('+'), hy.models.Expression([ hy.models.Symbol('if'), hy.models.Symbol('other-kvs'), hy.models.List([ hy.models.Symbol('c'), hy.models.Symbol('coll')]), hy.models.List()]), hy.models.Expression([ hy.models.Symbol('lfor'), hy.models.List([ hy.models.Symbol('i'), hy.models.Symbol('x')]), hy.models.Expression([ hy.models.Symbol('enumerate'), hy.models.Expression([ hy.models.Symbol('+'), hy.models.Expression([ hy.models.Symbol(','), hy.models.Symbol('k1'), hy.models.Symbol('v1')]), hy.models.Symbol('other-kvs')])]), hy.models.Expression([ hy.models.Symbol('if'), hy.models.Expression([ hy.models.Symbol('%'), hy.models.Symbol('i'), hy.models.Integer(2)]), hy.models.Symbol('x'), hy.models.Expression([ hy.models.Symbol('quasiquote'), hy.models.Expression([ hy.models.Symbol('get'), hy.models.Expression([ hy.models.Symbol('unquote'), hy.models.Symbol('c')]), hy.models.Expression([ hy.models.Symbol('unquote'), hy.models.Symbol('x')])])])])])])])])])])])]", line 1 ;;; Hy core macros ^----------------^ File "/usr/local/lib/python3.9/site-packages/hy/core/macros.hy", line 128 (if (% (len other-kvs) 2) ^-------------------^ expanding macro % TypeError: __init__() missing 1 required positional argument: 'parser' ```
Kodiologist commented 2 years ago

I haven't tried to switch Hy to any funcparserlib version past the old release because Vlasovskikh hasn't declared a release candidate yet.

alltilla commented 2 years ago

Following up on @tianon's investigation, using 5191cd8d6d863c858abe88ca9458410bd214e586 seems to work:

$ docker run -it python:3 bash
root@9fc33a3b02c0:/# pip install -U setuptools
Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (57.5.0)
Collecting setuptools
  Downloading setuptools-58.0.3-py3-none-any.whl (816 kB)
     |████████████████████████████████| 816 kB 3.1 MB/s 
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 57.5.0
    Uninstalling setuptools-57.5.0:
      Successfully uninstalled setuptools-57.5.0
Successfully installed setuptools-58.0.3
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@9fc33a3b02c0:/# pip install 'git+https://github.com/vlasovskikh/funcparserlib.git@5191cd8d6d863c858abe88ca9458410bd214e586'
Collecting git+https://github.com/vlasovskikh/funcparserlib.git@5191cd8d6d863c858abe88ca9458410bd214e586
  Cloning https://github.com/vlasovskikh/funcparserlib.git (to revision 5191cd8d6d863c858abe88ca9458410bd214e586) to /tmp/pip-req-build-km43rf19
  Running command git clone -q https://github.com/vlasovskikh/funcparserlib.git /tmp/pip-req-build-km43rf19
  Running command git rev-parse -q --verify 'sha^5191cd8d6d863c858abe88ca9458410bd214e586'
  Running command git fetch -q https://github.com/vlasovskikh/funcparserlib.git 5191cd8d6d863c858abe88ca9458410bd214e586
  Running command git checkout -q 5191cd8d6d863c858abe88ca9458410bd214e586
  Resolved https://github.com/vlasovskikh/funcparserlib.git to commit 5191cd8d6d863c858abe88ca9458410bd214e586
Building wheels for collected packages: funcparserlib
  Building wheel for funcparserlib (setup.py) ... done
  Created wheel for funcparserlib: filename=funcparserlib-0.3.6-py3-none-any.whl size=10176 sha256=b8d28acbfed078e3f4bc2f9d73972d8590fd006cd90cf442dfdc732b33a40215
  Stored in directory: /root/.cache/pip/wheels/95/a4/49/3698b5aced2d73c05806ea61694e3fd321fc78eaf5382bd756
Successfully built funcparserlib
Installing collected packages: funcparserlib
Successfully installed funcparserlib-0.3.6
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@9fc33a3b02c0:/# pip install -q 'hy==1.0a3'
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@9fc33a3b02c0:/# hy --version
hy 1.0a3

Perhaps a patch version or minor version bump based on an older commit would be enough to fix only the setuptools problem.

Cheers, Attila

vlasovskikh commented 2 years ago

I have published a pre-release version funcparserlib 1.0.0a0, feel free to try it:

pip install funcparserlib==1.0.0a0

Please report any issues with the new version. It is intended as backwards-compatible with 0.3.6, but there may be undocumented parts of the library that I have changed.

monkut commented 2 years ago

the 1.0.0a0 version resolved the "use_2to3 is invalid" issue for me.

error in funcparserlib setup command: use_2to3 is invalid.

asvetlov commented 2 years ago

Switched to 1.0.0a0, don't see any problem

djhoese commented 2 years ago

@vlasovskikh Do you need any more testing done before the new release? I'm having some CI failures with the previous version and it looks like 1.0 fixes it.

djhoese commented 2 years ago

@vlasovskikh Any updates on a new release?

bruno-at-bareos commented 2 years ago

Still to be done ....

vlasovskikh commented 2 years ago

Sorry for keeping you waiting. I hope I'll have time to release 1.0.0 during the winter holidays. Meanwhile please make sure that 1.0.0a0 works for you:

pip install funcparserlib==1.0.0a0
nmeum commented 2 years ago

1.0.0a0 works fine here, any chance the 1.0.0 could be released soonish? (:

asvetlov commented 2 years ago

@vlasovskikh please please do

asvetlov commented 2 years ago

Or give me access, I can make a release for you.

atisharma commented 2 years ago

It would be great to release this soon, as it's breaking pip install hy

Kodiologist commented 2 years ago

Hy maintainer here: that's surprising, assuming you're doing literally pip install hy rather than pip install hy --pre, because Hy 0.20.0 was developed with funcparserlib 0.3.6, which is still the most recent stable version on PyPI. I would expect that, if anything, releasing funcparserlib 1.0 will break the default installation procedure of Hy 0.20.0, because then funcparserlib>=0.3.6 in install_requires will retrieve the not-quite-backwards-compatible funcparserlib 1.0. At any rate, there's no time like the present to upgrade to Hy 1.0a4.

atisharma commented 2 years ago

python 3.9.10 in a new venv:

$ pip install hy

` [...] Collecting funcparserlib>=0.3.6 Downloading funcparserlib-0.3.6.tar.gz (30 kB) ERROR: Command errored out with exit status 1: command: /tmp/hy-test/.venv/Linux/x86_64/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kfyxq3om/funcparserlib_0c409595af2f4876b49184a286750ae0/setup.py'"'"'; file='"'"'/tmp/pip-install-kfyxq3om/funcparserlib_0c409595af2f4876b49184a286750ae0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6sreitbf cwd: /tmp/pip-install-kfyxq3om/funcparserlib_0c409595af2f4876b49184a286750ae0/ Complete output (1 lines): error in funcparserlib setup command: use_2to3 is invalid.

WARNING: Discarding https://files.pythonhosted.org/packages/cb/f7/b4a59c3ccf67c0082546eaeb454da1a6610e924d2e7a2a21f337ecae7b40/funcparserlib-0.3.6.tar.gz#sha256=b7992eac1a3eb97b3d91faa342bfda0729e990bd8a43774c1592c091e563c91d (from https://pypi.org/simple/funcparserlib/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. [...] `

Kodiologist commented 2 years ago

Interesting. Looks like it boils down to that pip install funcparserlib just doesn't work on Python 3.9 ("error in funcparserlib setup command: use_2to3 is invalid"), whereas pip install funcparserlib==1.0.0a0 does. That is indeed a good reason to release.

ethframe commented 2 years ago

Interesting. Looks like it boils down to that pip install funcparserlib just doesn't work on Python 3.9 ("error in funcparserlib setup command: use_2to3 is invalid"), whereas pip install funcparserlib==1.0.0a0 does. That is indeed a good reason to release.

It does not work with setuptools >= 58.0 - https://github.com/vlasovskikh/funcparserlib/issues/69

vlasovskikh commented 2 years ago

Another attempt at coming up with the release 1.0.0. Please check out build 1.0.0a1 compatible with Python 2.7 and Python 3.7-3.10:

pip install funcparserlib==1.0.0a1
djhoese commented 2 years ago

Running in GitHub Actions, ubuntu-latest, Python 3.10.4 installed from conda-forge and funcparserlib 1.0.0a1 from PyPI, my previously failing sphinx website building passes (as it did with 1.0.0a0). funcparserlib was installed with:

pip install -U --pre funcparserlib
Kodiologist commented 2 years ago

@vlasovskikh 1.0.0a1 seems to work well with Hy master.

alexeiz commented 2 years ago

Anything blocking the 1.0.0 release? Using the alpha package is not a proper solution.

vlasovskikh commented 2 years ago

Please try version 1.0.0a2, it's actually the release candidate. Next week I will release it as 1.0.0 if I get no bug reports.

I've fixed several bugs in error reporting and launched a new website with fresh docs and the new Getting Started guide. Check out the changelog for 1.0.0.

Kodiologist commented 2 years ago

Looks good on Hy master.

djhoese commented 2 years ago

Looks good here too.

vlasovskikh commented 2 years ago

Released funcparserib 1.0.0! 🚀😎 It is intended to be mostly backwards-compatible with 0.3.6. Check out the changelog for a couple of small new features in 1.0.0 compared to 0.3.6.

pip install funcparserlib

Thank you 🙏 @pkulev @jdufresne @fabaff @martica and others for your pull requests! Thank you @Kodiologist and others in this issue for pushing me towards the release!