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-114887 Reject only sockets of type SOCK_STREAM in create_datagram_endpoint(), improve exception message. by tjhowse · Pull Request #114893 · python/cpython

Conversation

@tjhowse

@tjhowse tjhowse commented Feb 2, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Details in #114887.

  • Issue: create_datagram_endpoint() no longer compatible with CAN bus raw sockets  #114887

Sorry, something went wrong.

Uh oh!

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

All reactions
tjhowse added 2 commits February 2, 2024 16:00
@tjhowse
Accept SOCK_DGRAM and SOCK_RAW socket types in create_datagram_endpoint
85f934f
@tjhowse
Flip the comparison to reject SOCK_STREAMs
e8504d3
@tjhowse
tjhowse requested review from 1st1, asvetlov, gvanrossum, kumaraditya303 and willingc as code owners February 2, 2024 06:43
@ghost

ghost commented Feb 2, 2024 •
edited by ghost
Loading

Uh oh!

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

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot added the awaiting review label Feb 2, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Feb 2, 2024
create_datagram_endpoint() no longer compatible with CAN bus raw sockets #114887
Closed
@bedevere-app

bedevere-app Bot commented Feb 2, 2024

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tjhowse
Merge branch 'main' into fix-issue-differently-114887
c726aa8
@bedevere-app

bedevere-app Bot commented Feb 2, 2024

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tjhowse
Update test to reflect new exception wording.
efadced
@bedevere-app

bedevere-app Bot commented Feb 2, 2024

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

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

gvanrossum
gvanrossum reviewed Feb 2, 2024
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM. Can you add a brief blurb? Then I'll merge it.

Sorry, something went wrong.

Uh oh!

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

All reactions
@blurb-it
📜🤖 Added by blurb_it.
cb1d428
corona10
corona10 reviewed Feb 3, 2024
View reviewed changes
Comment thread Misc/NEWS.d/next/Core and Builtins/2024-02-03-04-07-18.gh-issue-114887.uLSFmN.rst Resolved

Uh oh!

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

serhiy-storchaka
serhiy-storchaka reviewed Feb 3, 2024
View reviewed changes
Comment thread Misc/NEWS.d/next/Core and Builtins/2024-02-03-04-07-18.gh-issue-114887.uLSFmN.rst Resolved

Uh oh!

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

@gvanrossum @corona10
Fix markup in blurb
69ea35d
Co-authored-by: Donghee Na <[email protected]>
@gvanrossum
gvanrossum enabled auto-merge (squash) February 3, 2024 16:48
@gvanrossum

gvanrossum commented Feb 3, 2024 •
edited by AlexWaygood
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Is it worth backporting to 3.12 and 3.11?

All reactions

Sorry, something went wrong.

Uh oh!

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

@gvanrossum
gvanrossum merged commit 94ec2b9 into python:main Feb 3, 2024
@bedevere-app bedevere-app Bot removed the awaiting review label Feb 3, 2024
@bedevere-bot

bedevere-bot commented Feb 3, 2024

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM64 MacOS M1 Refleaks NoGIL 3.x has failed when building commit 94ec2b9.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1368/builds/112) and take a look at the build logs.
  4. Check if the failure is related to this commit (94ec2b9) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1368/builds/112

Failed tests:

  • test.test_concurrent_futures.test_init

Test leaking resources:

  • test_init: memory blocks

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
All reactions

Sorry, something went wrong.

Uh oh!

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

tjhowse added a commit to tjhowse/cpython that referenced this pull request Feb 3, 2024
@tjhowse @corona10
pythongh-114887 Reject only sockets of type SOCK_STREAM in create_dat…
c293d03
…agram_endpoint() (python#114893)

Also improve exception message.

Co-authored-by: Donghee Na <[email protected]>
@tjhowse

tjhowse commented Feb 3, 2024

Copy link
Copy Markdown
Contributor Author

Is it worth backporting to 3.12 and 3.11?

I think so, as we're currently running 3.11.x in our application. PRs raised: #114977 and #114978

All reactions

Sorry, something went wrong.

Uh oh!

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

tjhowse added a commit to tjhowse/cpython that referenced this pull request Feb 3, 2024
@tjhowse @corona10
[3.12] pythongh-114887 Reject only sockets of type SOCK_STREAM in cre…
fcfb254
…ate_datagram_endpoint() (pythonGH-114893)

Also improve exception message.

(cherry picked from commit 94ec2b9)

Co-authored-by: Travis Howse <[email protected]>
Co-authored-by: Donghee Na <[email protected]>
tjhowse added a commit to tjhowse/cpython that referenced this pull request Feb 3, 2024
@tjhowse @corona10
[3.11] pythongh-114887 Reject only sockets of type SOCK_STREAM in cre…
e7d7a5e
…ate_datagram_endpoint() (pythonGH-114893)

Also improve exception message.

(cherry picked from commit 94ec2b9)

Co-authored-by: Travis Howse <[email protected]>
Co-authored-by: Donghee Na <[email protected]>
@tjhowse tjhowse mentioned this pull request Feb 3, 2024
[3.11] gh-114887 Reject only sockets of type SOCK_STREAM in create_da… #114979
Merged
@bedevere-app

bedevere-app Bot commented Feb 3, 2024

Copy link
Copy Markdown

GH-114979 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tjhowse tjhowse mentioned this pull request Feb 3, 2024
[3.12] gh-114887 Reject only sockets of type SOCK_STREAM in create_da… #114980
Merged
@bedevere-app

bedevere-app Bot commented Feb 3, 2024

Copy link
Copy Markdown

GH-114980 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tjhowse

tjhowse commented Feb 3, 2024

Copy link
Copy Markdown
Contributor Author

Is it worth backporting to 3.12 and 3.11?

I think so, as we're currently running 3.11.x in our application. PRs raised: #114977 and #114978

Hm, I seem to have botched the format of the branch names. New PRs raised: #114979 #114980

All reactions

Sorry, something went wrong.

Uh oh!

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

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@tjhowse @corona10 @aisk
pythongh-114887 Reject only sockets of type SOCK_STREAM in create_dat…
3d713f6
…agram_endpoint() (python#114893)

Also improve exception message.

Co-authored-by: Donghee Na <[email protected]>
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
@tjhowse @corona10 @fsc-eriker
pythongh-114887 Reject only sockets of type SOCK_STREAM in create_dat…
96e141c
…agram_endpoint() (python#114893)

Also improve exception message.

Co-authored-by: Donghee Na <[email protected]>
@Taeknology Taeknology mentioned this pull request Nov 8, 2026
gh-115159: Add SOCK_RAW regression tests #154939
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gvanrossum gvanrossum gvanrossum left review comments
@serhiy-storchaka serhiy-storchaka serhiy-storchaka left review comments
@corona10 corona10 corona10 left review comments
@1st1 1st1 Awaiting requested review from 1st1 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner
@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 is a code owner
@willingc willingc Awaiting requested review from willingc willingc is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

5 participants

@tjhowse @gvanrossum @bedevere-bot @serhiy-storchaka @corona10
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 01402503 — 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.