gristlabs / asttokens

Annotate Python AST trees with source text and token information
Apache License 2.0
172 stars 34 forks source link

Pinned minimum version of the six package #106

Closed ivellios closed 1 year ago

ivellios commented 1 year ago

I have stumbled upon this issue, when migrating to python 3.11 in my project. I had six==1.11.0 pinned in our requirements and since asttokens setup config does not specify minimum six version, that seemed to be OK. It is a good practice to always pin at least minimum needed version, when using some functions introduced in newer ones.

I have pinned the version >= 1.12.0 because this is the first one to introduce ensure_text function, that is being used in executing package. In my case the issue came from ipython (newest version) that is using asttokens deeper in its dependencies.

alexmojaki commented 1 year ago

I have pinned the version >= 1.12.0 because this is the first one to introduce ensure_text function, that is being used in executing package

executing doesn't use six at all though...

dsagal commented 1 year ago

I think the point is that asttokens itself uses six.ensure_text, so it makes sense to pin the version of six to one that includes that function.