Skip to content

AssertionError on python 2.7.9 in Werkzeug>=0.15.3 #1553

Closed

Description

@DOlearczyk

When trying to create new flask object, I get following error:

>>> from flask import Flask
>>> flask_app = Flask(__name__)
python: /mnt/builds/jenkins-builds/workspace/pulsar-8/RC/icedge-apl-4/build-intel-apollolake/tmp/work/core2-64-wrs-linux/python/2.7.9-r1/Python-2.7.9/Python/symtable.c:1319: symtable_visit_params: Assertion `arg->v.Name.ctx == Param || (arg->v.Name.ctx == Store && !toplevel)' failed.
Aborted (core dumped)

This assertion error only shows up with Werkzeug version 0.15.3 and 0.15.4. It doesn't appear with version 0.15.2.

OS: Pulsar Linux 8.0.0.14
Python: 2.7.9
Flask: 1.0.2

Activity

  1. davidism commented on May 20, 2019

    @davidism
    Member

    @asottile 😢

    It's ridiculous that direct bytecode manipulation appears to be a more stable API than the AST above it.

  2. davidism commented on May 20, 2019

    @davidism
    Member

    @DOlearczyk we'll try to fix this, but you're very far behind on patch updates to Python 2.7. There is no easy way we can test on different patch versions of Python, so you're always running the risk of weird bugs in this case.

  3. added this to the 0.15.5 milestone on May 20, 2019
  4. asottile commented on May 20, 2019

    @asottile
    Contributor

    I think I know how to fix this, but I'd like to reproduce it first, I tried with 2.7.9 but it doesn't trigger the assertion -- are you perchance using a debug build of python?

    I guess I could follow my own docs for doing that 🤔

  5. asottile commented on May 20, 2019

    @asottile
    Contributor

    (I spent a ton of time trying to compile 2.7.9 on bionic, but libssl is too new for such an old python version 😆 -- ended up resorting to docker, see #1554 for the fix)

  6. locked as resolved and limited conversation to collaborators on Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions