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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.5 #420

Merged
merged 4 commits into from
Jul 15, 2015
Merged

Support Python 3.5 #420

merged 4 commits into from
Jul 15, 2015

Conversation

myint
Copy link
Member

@myint myint commented Jul 14, 2015

This involves fixing a test and avoiding a function deprecated since Python 3.0.

https://docs.python.org/dev/library/inspect.html#inspect.getargspec

This involves fixing a test and avoiding a function deprecated since
Python 3.0.

https://docs.python.org/dev/library/inspect.html#inspect.getargspec
@myint
Copy link
Member Author

myint commented Jul 14, 2015

By the way, I think it would be a good idea to enable Travis on pull requests for this repository. Currently pull requests are not tested for some reason. I think it is a Travis CI setting.

@sigmavirus24
Copy link
Member

I toggled Travis through its control pane (off then on) to re-enable this. Good catch @myint

@sigmavirus24
Copy link
Member

Can you also add the - nightly to this pull request?

@sigmavirus24
Copy link
Member

inspect.signature does not exist on Python 3.2. It looks as though the deprecation notice for Python 3.0 says to use inspect.getfullargspec instead of inspect.signature. Even so, we can use signature (it seems) on 3.3 and beyond.

@@ -1328,7 +1328,12 @@ def _add_check(check, kind, codes, args):
codes = ERRORCODE_REGEX.findall(check.__doc__ or '')
_add_check(check, args[0], codes, args)
elif inspect.isclass(check):
if inspect.getargspec(check.__init__)[0][:2] == ['self', 'tree']:
if sys.version_info[0] >= 3:
Copy link
Member

Choose a reason for hiding this comment

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

if sys.version_info >= (3, 3):

That will suffice for what we need. inspect.signature was introduced in 3.3 and not before.

@myint
Copy link
Member Author

myint commented Jul 15, 2015

Should be fixed now.

@sigmavirus24
Copy link
Member

This looks good to me. 👍

IanLee1521 added a commit that referenced this pull request Jul 15, 2015
@IanLee1521 IanLee1521 merged commit 151758c into PyCQA:master Jul 15, 2015
@IanLee1521
Copy link
Member

Merged! Thanks!

@SylvainDe
Copy link

Thanks for fixing this issue! 👍
Out of curiosity, does anyone know if this is going to be part of the next pep8 release ? If so, is there any expected release date ?

myint added a commit to PyCQA/pyflakes that referenced this pull request Aug 14, 2015
The one on PyPI does not support Python 3.5. The fix was made a month
ago, but has not been released yet.

PyCQA/pycodestyle#420
@myint
Copy link
Member Author

myint commented Aug 14, 2015

I would be interested in a PyPI release as well.

pointlessone added a commit to pointlessone/pep8 that referenced this pull request Dec 29, 2016
2.2.0 (2016-11-14)
------------------

Bugs:

* Fixed E305 regression caused by PyCQA#400;
  PyCQA#593

2.1.0 (2016-11-04)
------------------

Changes:

* Report E302 for blank lines before an "async def";
  PyCQA#556
* Update our list of tested and supported Python versions which are 2.6,
  2.7, 3.2, 3.3, 3.4 and 3.5 as well as the nightly Python build and
  PyPy.
* Report E742 and E743 for functions and classes badly named 'l', 'O',
  or 'I'.
* Report E741 on 'global' and 'nonlocal' statements, as well as
  prohibited single-letter variables.
* Deprecated use of `[pep8]` section name in favor of `[pycodestyle]`;
  PyCQA#591

Bugs:

* Fix opt_type AssertionError when using Flake8 2.6.2 and pycodestyle;
  PyCQA#561
* Require two blank lines after toplevel def, class;
  PyCQA#536
* Remove accidentally quadratic computation based on the number of
  colons. This will make pycodestyle faster in some cases;
  PyCQA#314

2.0.0 (2016-05-31)
------------------

Changes:

* Added tox test support for Python 3.5 and pypy3
* Added check E275 for whitespace on `from ... import ...` lines;
  PyCQA#489 / PyCQA#491
* Added W503 to the list of codes ignored by default ignore list;
  PyCQA#498
* Removed use of project level `.pep8` configuration file;
  PyCQA#364

Bugs:

* Fixed bug with treating `~` operator as binary; PyCQA#383
  / PyCQA#384
* Identify binary operators as unary; PyCQA#484 /
  PyCQA#485

1.7.0 (2016-01-12)
------------------

Changes:

* Reverted the fix in PyCQA#368, "options passed on command
  line are only ones accepted" feature. This has many unintended
  consequences in pep8 and flake8 and needs to be reworked when I have
  more time.
* Added support for Python 3.5. (Issue PyCQA#420 &
  PyCQA#459)
* Added support for multi-line config_file option parsing. (Issue
  PyCQA#429)
* Improved parameter parsing. (Issues PyCQA#420 &
  PyCQA#456)

Bugs:

* Fixed BytesWarning on Python 3. (Issue PyCQA#459)
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.

4 participants