Skip to content

Promote memoryview to bytes#7717

Merged
ilevkivskyi merged 2 commits intopython:masterfrom
srittau:memoryview-as-bytes
Oct 15, 2019
Merged

Promote memoryview to bytes#7717
ilevkivskyi merged 2 commits intopython:masterfrom
srittau:memoryview-as-bytes

Conversation

@srittau
Copy link
Contributor

@srittau srittau commented Oct 15, 2019

Fixes #7714

Currently this fails a lot of seemingly unrelated tests. I will investigate later.

srittau added a commit to srittau/typeshed that referenced this pull request Oct 15, 2019
@srittau
Copy link
Contributor Author

srittau commented Oct 15, 2019

When running the tests locally with ./runtest.py, I get a total of 41 of the following errors during pytest -k "PythonCmdline or PythonEvaluation or StubgenCmdLine or StubgenPythonSuite":

Expected:
Actual:
  __builtin__.pyi:812: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader (diff)

Are the Python 2 tests not run during CI?

python/typeshed#3365 will fix this, though.

@ilevkivskyi
Copy link
Member

Are the Python 2 tests not run during CI?

Good point! It looks like at least pythoneval tests are all skipped if a Python 2 interpreter is not found. This may be the case for newer distros that Travis now has. Would you like to make a separate PR to make python2 required for 1-2 builds?

@ilevkivskyi ilevkivskyi marked this pull request as ready for review October 15, 2019 12:07
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix! LGTM.

@ilevkivskyi
Copy link
Member

We can land this after the typeshed PR is landed an synced.

srittau added a commit to python/typeshed that referenced this pull request Oct 15, 2019
@ilevkivskyi ilevkivskyi merged commit e4623b9 into python:master Oct 15, 2019
@srittau srittau deleted the memoryview-as-bytes branch October 15, 2019 16:05
BoboTiG pushed a commit to nuxeo/nuxeo-drive that referenced this pull request Nov 25, 2019
Fixed these errors:

  manager.py:636:
  Incompatible return value type (got "Optional[str]", expected "str")

  commandline.py:574:
  On Python 3 '{}'.format(b'abc') produces "b'abc'"; use !r if this is a desired behavior

There is also a false positive ignored for now
(should be fixed in the next mypy release, see
python/mypy#7717).
BoboTiG pushed a commit to nuxeo/nuxeo-drive that referenced this pull request Nov 25, 2019
Fixed these errors:

  manager.py:636:
  Incompatible return value type (got "Optional[str]", expected "str")

  commandline.py:574:
  On Python 3 '{}'.format(b'abc') produces "b'abc'"; use !r if this is a desired behavior

There is also a false positive ignored for now
(should be fixed in the next mypy release, see
python/mypy#7717).
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.

Mypy not treating bytes as typing.ByteString

2 participants