Wrong simpleeval is installed while running tests on Gitlab CI

From Issue 10763: NameError: name ‘unicode’ is not defined - Tryton issue tracker since it’s not a Tryton bug.


Is someone else experiencing the same problem?

Can you help me locate the problem?
So far, it seems either GitLab’s or Docker in Docker’s fault (?) since running in my own machine the tox -e py37-postgresql command, on a fresh virtualenv with only pip install tox used, gives no error.

Thank you for in advance for any pointers.

Hello, sorry for being stubborn, but it’s annoying to see every test fail in any kind of module…
Does anyone know what could originate this issue?

I wonder if the change in the pip dependency resolver is not why this fails now while it didn’t before.
If you try without your custom packages does it work? If so then maybe that one of your package constraint the version of simpleeval.

Hi, thank you for the response.

I have a custom module that uses as dependencies woocommerce (ext. module), ir, product, sale. This module fails if the simpleeval dependency is not restricted.

For the testing sake, I’ve created a module using Tryton’s cookiecutter and ran some pipelines.

  1. Freshly created module, only adding gitlab-ci [GREEN]
  2. Added product and sale dependencies. [ISSUE]
  3. Removed product dependency. [ISSUE]
  4. Replaced sale dependency for product [GREEN]
  5. Removed sale dependency for woocommerce (Ext.) [GREEN]

So, installing sale as dependency on this module causes the unicode issue.

Now, following the traceback provided in the issue it shows that simpleeval came from account which is a dependency in sale, so the pipeline failing with the sale dependency makes sense.

Since account module requires of ‘simpleeval’, with no restrictions, tox should install the latest available, right?

This is my gitlab-ci

    - test

    stage: test
    image: python:3.7
        CFLAGS: '-O0'
        DB_CACHE: '~/cache'
        - pip install tox
        - tox -e py37-sqlite

    stage: test
    image: python:3.7
        - postgres
        - name: postgres
              [c', 'fsync=off', '-c', 'synchronous_commit=off', '-c', 'full_page_writes=off',]
        CFLAGS: '-O0'
        DB_CACHE: '~/cache'
        POSTGRESQL_URI: 'postgresql://postgres:@postgres:5432/'
        - pip install tox
        - tox -e py37-postgresql

From what I experienced, newer versions of virtualenv (>=20.8.0) cause the instalation of the wrong simpleeval version.

Then the bug should be reported to virtualenv project.
I know that pip has changed recently the dependency solver, this may be the explanation.

Still, doesn’t explain how the mentioned drone test passed with the 20.8.0 version of virtualenv, installing the latest simpleeval but my gitlab tests or local setups, install the simpleeval 0.8.1