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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use exec directly #5224

Merged
merged 1 commit into from May 7, 2019
Merged

Use exec directly #5224

merged 1 commit into from May 7, 2019

Conversation

asottile
Copy link
Member

@asottile asottile commented May 7, 2019

Apparently this has always worked, and I just assumed that six was providing the shim for a good reason 馃し鈥嶁檪

$ ./bin/python1.0.1 
Python 1.0.1 (May  6 2019)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> x = {}
>>> exec('y = 5', x)
>>> x['y']
5

@RonnyPfannschmidt
Copy link
Member

the version in six only sorts out:

Python 2.7.16 (default, Mar  5 2019, 09:07:48) 
[GCC 9.0.1 20190227 (Red Hat 9.0.1-0.8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exec("test", globals=locals())
  File "<stdin>", line 1
    exec("test", globals=locals())
                        ^
SyntaxError: invalid syntax

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

(failures unrelated)

@nicoddemus nicoddemus merged commit 1d466d0 into pytest-dev:master May 7, 2019
@asottile asottile deleted the exec branch May 7, 2019 14:42
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.

None yet

3 participants