Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace nix with poetry #10

Merged
merged 9 commits into from
Dec 22, 2022
Merged

Replace nix with poetry #10

merged 9 commits into from
Dec 22, 2022

Conversation

slovdahl
Copy link

Thanks to the original author @qqshfox in smarkets#291. Will keep it in our fork until it has hopefully been merged upstream.

@perlun
Copy link

perlun commented Dec 21, 2022

Hmm... slightly painful CI failures on this one. 🤔 Could there be some missing dependency somewhere?

        gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/home/runner/.cache/pypoetry/virtualenvs/marge-YHqeRpzV-py3.10/include -I/opt/hostedtoolcache/Python/3.10.9/x64/include/python3.10 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-cpython-310/ast27/Custom/typed_ast.o
        In file included from ast27/Custom/../Include/Python-ast.h:3,
                         from ast27/Custom/typed_ast.c:2:
        ast27/Custom/../Include/../Include/asdl.h:32:41: error: unknown type name ‘PyArena’
           32 | asdl_seq *asdl_seq_new(Py_ssize_t size, PyArena *arena);
              |                                         ^~~~~~~
        ast27/Custom/../Include/../Include/asdl.h:33:49: error: unknown type name ‘PyArena’
           33 | asdl_int_seq *asdl_int_seq_new(Py_ssize_t size, PyArena *arena);
              |                                                 ^~~~~~~

@perlun
Copy link

perlun commented Dec 21, 2022

This one seems to have some info: python/typed_ast#159

@slovdahl
Copy link
Author

Hmm.. The requirement is defined like this:

typed-ast==1.4.2; implementation_name == "cpython" and python_version < "3.8" and python_version >= "3.6" \

So how do we even update it for Python 3.10? 🤔

@perlun
Copy link

perlun commented Dec 21, 2022

TL;DR: python/typed_ast (whatever the package name happens to be) should be upgraded to at least 1.4.3, to support Python 3.10.

@perlun
Copy link

perlun commented Dec 21, 2022

So how do we even update it for Python 3.10? thinking

Hmm, that makes it more complex then yes... 🤔 Will dig a bit more.

@slovdahl
Copy link
Author

My guess is that it's a transitive dependency of some sort.. I think one problem is that pytest was downgraded. I'm changing that back to 7.0.1 now with Poetry.

@perlun
Copy link

perlun commented Dec 21, 2022

Hmm.. The requirement is defined like this:

Where is this? 🤔 I can't seem to find any references to this in this repo, apart from in requirements.nix:

$ rg typed-ast
requirements.nix
118:      self."typed-ast"
685:    "typed-ast" = python.mkDerivation {
686:      name = "typed-ast-1.3.5";
687:      src = pkgs.fetchurl { url = "https://files.pythonhosted.org/packages/d3/b1/959c3ed4a9cc100feba7ad1a7d6336d8888937ee89f4a577f7698e09decd/typed-ast-1.3.5.tar.gz"; sha256 = "5315f4509c1476718a4825f45a203b82d7fdf2a6f5f0c8f166435975b1c9f7d4"; };

@slovdahl
Copy link
Author

Better, that seems to have been the problem 👍

pyproject.toml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@slovdahl
Copy link
Author

Tested that building a Docker image using make dockerize works too.

.github/workflows/test.yml Outdated Show resolved Hide resolved
@slovdahl slovdahl merged commit 3ba2516 into master Dec 22, 2022
@slovdahl slovdahl deleted the remove-nix branch December 22, 2022 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants