Skip to content

Nested with, issue 104#398

Merged
lieryan merged 14 commits into
python-rope:masterfrom
climbus:nested_with_104
Sep 26, 2021
Merged

Nested with, issue 104#398
lieryan merged 14 commits into
python-rope:masterfrom
climbus:nested_with_104

Conversation

@climbus

@climbus climbus commented Sep 19, 2021

Copy link
Copy Markdown
Contributor

#104

It was tricky issue and need an ugly hack.

I've added support for list of tokens. I think it is more obvious solution compared to adding pseudo object and next if condition: https://github.com/python-rope/rope/blob/master/rope/refactor/patchedast.py#L126

The tricky one was in python2, where nested with and comma separated has identical ast.

If you have more elegant solution, feel free to send me.

@lieryan

lieryan commented Sep 19, 2021

Copy link
Copy Markdown
Member

Hi @climbus, thank you for working on this.

If it will significantly simplify this ticket, then I think we should just drop support for Python 2.7.

I've been considering for a while that 0.20.0 might just be the last version of Rope to explicitly support Python 2.7.

Python 2.7 is already EOL for quite some time and the 1% of people who still uses with Python 2.7 can just download an older version of Rope. AFAICT, 0.20.0 has covered pretty much all of Python 2.7 features, and 2.7 isn't going to grow new features any time soon 😅.

We'll need a Python 2.7 EOL planning to block 2.7 users from accidentally upgrading to incompatible version.

@lieryan

lieryan commented Sep 19, 2021

Copy link
Copy Markdown
Member

I've opened #400 to start the ball rolling for dropping support for Python 2.7.

@climbus

climbus commented Sep 19, 2021

Copy link
Copy Markdown
Contributor Author

If it will significantly simplify this ticket, then I think we should just drop support for Python 2.7.

By now it isn't a big problem. Few lines of code.

I'll add my thoughts in the issue you added.

@climbus

climbus commented Sep 26, 2021

Copy link
Copy Markdown
Contributor Author

@lieryan could you merge this to master? I have to resolve new conflicts.

@lieryan lieryan added this to the 0.21.x milestone Sep 26, 2021
@lieryan lieryan merged commit 3e81fe6 into python-rope:master Sep 26, 2021
@lieryan

lieryan commented Sep 26, 2021

Copy link
Copy Markdown
Member

Hi @climbus thanks for working on this issue. I've merged this PR with a couple additional changes.

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