Skip to content

Conversation

@vishwakftw
Copy link
Contributor

@vishwakftw vishwakftw commented Nov 6, 2019

PEP 590 modifies the tp_print offset to tp_vectorcall_offset - which requires a Py_ssize_t object.
Passing a nullptr caused compatibility issues for Python 3.8.

Changelog:

  • Modify all occurrences of nullptr /* tp_print */ to 0 /* tp_vectorcall_offset */
  • Minor formatting changes

Test Plan:

  • Local fresh build with Python 3.8 completed successfully.

Fixes #28060.
Fixes #29162.

Supersedes #28364

PEP 590 modifies the `tp_print` offset to `tp_vectorcall_offset` - which requires a Py_ssize_t object.
Passing a nullptr caused compatibility issues for Python 3.8.

Changelog:
- Modify all occurrences of `nullptr  /* tp_print */` to 0  /* tp_vectorcall_offset */

Test Plan:
- Local fresh build with Python 3.8 completed successfully.
@vishwakftw vishwakftw requested a review from apaszke as a code owner November 6, 2019 19:40
@vishwakftw vishwakftw requested a review from soumith November 6, 2019 19:44
@soumith
Copy link
Contributor

soumith commented Nov 7, 2019

cc: @suo we need to make clang-tidy shut-up because it's wrong in this case. how do we do so?

@vishwakftw
Copy link
Contributor Author

I believe the errors can be silenced by:

NOLINT (modernize-use-nullptr)

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

I'm not going to block this diff on suppressions

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in 86c6444.

@vishwakftw vishwakftw deleted the pytorch-for-py38 branch December 20, 2019 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] python3.8 ---- cannnot convert nullptr to Py_ssize_t Pytorch1.3 can't be compiled successfully with Python3.8.0

5 participants