GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-88427: Deprecate `socket.SocketType` by rruuaanng · Pull Request #126272 · python/cpython

gh-88427: Deprecate socket.SocketType #126272

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.

Sign up for GitHub

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

Draft
rruuaanng wants to merge 48 commits into python:main
base: main
Loading
Loading
from rruuaanng:gh88427

Uh oh!

There was an error while loading. Please reload this page.

Draft

gh-88427: Deprecate socket.SocketType #126272

Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
341a29e
deprecated SocketType
rruuaanng Nov 1, 2024
a4ef847
_socket.socket change to _socket.SocketType
rruuaanng Nov 1, 2024
5a57cb1
Remove return
rruuaanng Nov 1, 2024
72f7c3d
Change docs
rruuaanng Nov 1, 2024
58b305d
Change NEWS
rruuaanng Nov 1, 2024
73b14ea
Change docs
rruuaanng Nov 1, 2024
2c2e8e3
Change NEWS
rruuaanng Nov 1, 2024
3ea9169
Move import
rruuaanng Nov 1, 2024
3b7d187
Add return
rruuaanng Nov 1, 2024
188a924
socket rename to SocketType
rruuaanng Nov 2, 2024
ce4bfa6
Remove defined
rruuaanng Nov 2, 2024
362dbab
Return _socket.socket
rruuaanng Nov 2, 2024
5042f2f
Add AttributeError
rruuaanng Nov 2, 2024
4676d96
Add pending3.16
rruuaanng Nov 2, 2024
3e85bc7
warn change to _deprecated
rruuaanng Nov 2, 2024
da2aabe
Change info
rruuaanng Nov 2, 2024
0afac16
Remove ~
rruuaanng Nov 3, 2024
f2736c2
Change NEWS
rruuaanng Nov 3, 2024
2fdba78
Change pending
rruuaanng Nov 3, 2024
7f841cf
Change NEWS
rruuaanng Nov 7, 2024
36598e1
Change docs
rruuaanng Nov 7, 2024
931ce2b
Change removal
rruuaanng Nov 7, 2024
28e78d0
Add some space
rruuaanng Nov 7, 2024
aa3ab5b
Add :
rruuaanng Nov 8, 2024
45a4f34
Remove ‘in type annotations’
rruuaanng Nov 8, 2024
261d87f
Add newline(boom)
rruuaanng Nov 8, 2024
de41cb5
Add module __getattr__
rruuaanng Nov 16, 2024
e4302d0
Remove redundant test method
rruuaanng Nov 16, 2024
705492b
Restore SocketType
rruuaanng Nov 16, 2024
4752f84
Change cmod | remove getattr in socket.py
rruuaanng Nov 16, 2024
44c5ed9
Restore getattr in socket.py
rruuaanng Nov 16, 2024
f05ae78
Remove getattr in socket.py
rruuaanng Nov 17, 2024
b30dcb9
Add free
rruuaanng Nov 17, 2024
eead93e
Merge branch 'gh88427' of https://github.com/rruuaanng/cpython into g…
rruuaanng Nov 17, 2024
02a45bd
Recover __getattr__ in socket.py
rruuaanng Nov 18, 2024
936f05f
Change warn desc
rruuaanng Nov 19, 2024
377b414
Recover email
rruuaanng Nov 19, 2024
538acd0
Change warn desc
rruuaanng Nov 19, 2024
d584e6d
Change warn desc
rruuaanng Nov 19, 2024
4d71bce
Remove SocketType original definition
rruuaanng Nov 19, 2024
347c8e3
_socket.socket change to _socket.SocketType
rruuaanng Nov 19, 2024
e625c64
strcmp change to PyUnicode_EqualToUTF8
rruuaanng Nov 20, 2024
a909333
Merge branch 'gh88427' of https://github.com/rruuaanng/cpython into g…
rruuaanng Nov 20, 2024
0d836c4
Use a better implementation
rruuaanng Dec 8, 2024
38efc89
Clear CI error
rruuaanng Dec 8, 2024
e07a953
Add cast
rruuaanng Dec 8, 2024
fae620a
use _socket.SocketType
rruuaanng Dec 9, 2024
f029878
Merge branch 'main' into gh88427
rruuaanng Dec 9, 2024
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
Clear CI error
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@rruuaanng
rruuaanng committed Dec 8, 2024
commit 38efc89e0aaca40910614d13f6b8cc5175ebd724

There are no files selected for viewing

9 changes: 4 additions & 5 deletions 9 Modules/socketmodule.c
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5575,15 +5575,14 @@ static PyType_Spec sock_spec = {
};

static PyObject*
socket_getattr(PyObject *mod, PyObject *name)
socket_getattr(PyObject *self, PyObject *name)
{
socket_state *state = get_module_state(mod);

if (PyUnicode_EqualToUTF8(name, "SocketType") && state != NULL) {
if (PyUnicode_EqualToUTF8(name, "SocketType")) {
socket_state *state = get_module_state(self);
PyErr_Warn(PyExc_DeprecationWarning, "_socket.SocketType is deprecated and "
"will be removed in Python 3.16. "
"Use socket.socket instead");
return state->sock_type;
return state != NULL ? state->sock_type : NULL;
}

PyErr_Format(PyExc_AttributeError, "module _socket has no attribute '%U'", name);
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.