Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-30470: Deprecate invalid ctypes call protection on Windows.#1810

Merged
Mariatta merged 2 commits into
python:masterpython/cpython:masterfrom
Mariatta:deprecate-ctypesMariatta/cpython:deprecate-ctypesCopy head branch name to clipboard
May 27, 2017
Merged

bpo-30470: Deprecate invalid ctypes call protection on Windows.#1810
Mariatta merged 2 commits into
python:masterpython/cpython:masterfrom
Mariatta:deprecate-ctypesMariatta/cpython:deprecate-ctypesCopy head branch name to clipboard

Conversation

@Mariatta

Copy link
Copy Markdown
Member

Calling Ctypes functions is deprecated in 3.6.2 and will be removed in 3.7

@Mariatta Mariatta added the docs Documentation in the Doc dir label May 25, 2017
@mention-bot

Copy link
Copy Markdown

@Mariatta, thanks for your PR! By analyzing the history of the files in this pull request, we identified @birkenfeld, @benjaminp and @theller to be potential reviewers.

@Mariatta

Copy link
Copy Markdown
Member Author

@zooba @Haypo or @ned-deily can one of you review please? I'm not sure if I'm doing this right. Thanks :)

Comment thread Doc/library/ctypes.rst Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This comment suggests that ctypes functions cannot be called, i.e. that the GetModuleHandleA() call in the next paragraph will soon be unsupported.

Perhaps move this deprecation warning down below the "ctypes tries to protect you from calling functions with the wrong number of arguments" paragraph (line 164/170) and reword as "This protection against incorrect arguments is deprecated and will be removed."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed. I'd get really specific here with something like "Calling ctypes functions with incorrect arguments, either number or type, is unsupported and may no longer raise a ValueError."

It might even make more sense to insert the note directly above the paragraph below that says "ctypes tries to protect you...". Or just remove that section and add a note saying "ctypes may raise a ValueError after calling the function if it detects that an invalid number of arguments were passed. This behavior is deprecated, should not be relied upon, and will be removed in Python 3.7"

@Mariatta

Copy link
Copy Markdown
Member Author

Thanks @Syeberman and @zooba. I made the change as you suggested. Please check.
I'll resolve the conflict once you're ok with this change.

Mariatta added 2 commits May 26, 2017 22:10
Calling Ctypes functions is deprecated in 3.6.2 and will be removed in 3.7
@Mariatta Mariatta force-pushed the deprecate-ctypes branch from 38036f5 to e53e4d0 Compare May 27, 2017 05:10
@Mariatta

Copy link
Copy Markdown
Member Author

Resolved the conflict

@Syeberman

Copy link
Copy Markdown

LGTM

@Mariatta Mariatta merged commit f931fd1 into python:master May 27, 2017
@Mariatta Mariatta deleted the deprecate-ctypes branch May 27, 2017 14:23
Mariatta added a commit to Mariatta/cpython that referenced this pull request May 27, 2017
…pythonGH-1810)

Calling Ctypes functions is deprecated in 3.6.2 and will be removed in 3.7.
(cherry picked from commit f931fd1)
Mariatta added a commit that referenced this pull request May 27, 2017
…GH-1810) (GH-1833)

Calling Ctypes functions is deprecated in 3.6.2 and will be removed in 3.7.
(cherry picked from commit f931fd1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.