Skip to content

bpo-30512: add CAN Socket support for NetBSD#30066

Merged
serhiy-storchaka merged 8 commits into
python:mainfrom
0-wiz-0:netcan
Jan 21, 2022
Merged

bpo-30512: add CAN Socket support for NetBSD#30066
serhiy-storchaka merged 8 commits into
python:mainfrom
0-wiz-0:netcan

Conversation

@0-wiz-0

@0-wiz-0 0-wiz-0 commented Dec 11, 2021

Copy link
Copy Markdown
Contributor

This also fixes a small unrelated bug in the configure script - test(1) only supports "=" as a comparison operator, "==" is a bash extension. If this should be a separate pull request, please let me know.

https://bugs.python.org/issue30512

@taleinat

taleinat commented Jan 8, 2022

Copy link
Copy Markdown
Contributor

This also fixes a small unrelated bug in the configure script - test(1) only supports "=" as a comparison operator, "==" is a bash extension. If this should be a separate pull request, please let me know.

Indeed, it would be better for that to be a separate PR. Thanks!

@taleinat

taleinat commented Jan 8, 2022

Copy link
Copy Markdown
Contributor

@serhiy-storchaka, since according to the b.p.o. issue you've worked on this in the past, it would be good to get your review of this!

@0-wiz-0

0-wiz-0 commented Jan 8, 2022

Copy link
Copy Markdown
Contributor Author

@taleinat I've made a separate pull request for the configure script fix, but I don't know how to mark it as "skip news", please advise. Thanks!

@taleinat

taleinat commented Jan 9, 2022

Copy link
Copy Markdown
Contributor

@taleinat I've made a separate pull request for the configure script fix, but I don't know how to mark it as "skip news", please advise. Thanks!

Thanks for doing that! Don't worry about the skip-news labels; only triagers and core devs can add those, but a mention in a comment is great 👍

@serhiy-storchaka serhiy-storchaka left a comment

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.

Please update the documentation for the socket module. Update availability directives, add versionchanged directives.

Add also an entry in the What's New file.

Comment thread Modules/socketmodule.c Outdated
PyModule_AddIntMacro(m, CAN_ERR_MASK);

PyModule_AddIntMacro(m, CAN_RAW_FILTER);
/* PyModule_AddIntMacro(m, CAN_RAW_ERR_FILTER); */

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.

Is it not defined on NetBSD? Then after merging with the HAVE_LINUX_CAN_RAW_H case you can add #ifdef CAN_RAW_ERR_FILTER.

Comment thread Modules/socketmodule.c Outdated

PyModule_AddIntMacro(m, J1939_FILTER_MAX);
#endif
#ifdef HAVE_NETCAN_CAN_H

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.

Why not merge this with blocks for HAVE_LINUX_CAN_H and HAVE_LINUX_CAN_RAW_H?

@@ -0,0 +1 @@
Add CAN Socket support for NetBSD

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.

Suggested change
Add CAN Socket support for NetBSD
Add CAN Socket support for NetBSD.

@bedevere-bot

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be put in the comfy chair!

@0-wiz-0

0-wiz-0 commented Jan 13, 2022

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @serhiy-storchaka !
I've tried addressing all your comments. I'm not sure what you mean by

Add also an entry in the What's New file.

since I thought that's what the blurb is used for.

@0-wiz-0

0-wiz-0 commented Jan 13, 2022

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

@serhiy-storchaka: please review the changes made to this pull request.

Comment thread Modules/socketmodule.c Outdated
#ifdef HAVE_LINUX_CAN_RAW_H
#if defined(HAVE_LINUX_CAN_RAW_H) || defined(HAVE_NETCAN_CAN_H)
PyModule_AddIntMacro(m, CAN_RAW_FILTER);
#if defined(CAN_RAW_ERR_FILTER)

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.

Suggested change
#if defined(CAN_RAW_ERR_FILTER)
#ifdef CAN_RAW_ERR_FILTER

For consistency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed as suggested. (A couple lines above that, it's #if defined - the file is not very consistent :) ).

Comment thread Doc/library/socket.rst
@serhiy-storchaka

Copy link
Copy Markdown
Member

Blurb is used for creating full Changelog which includes all user-visible changed as they are made, including bugfixes.

There is a separate file Doc/whatsnew/3.11.rst. It is structured and only includes information about new features, deprecations and removals. In section "Improved Modules" add a subsection for "socket" and a description of the feature. E.g.:

socket
------
* Add CAN Socket support for NetBSD.
  (Contributed by Thomas Klausner in :issue:`30512`.)

@0-wiz-0

0-wiz-0 commented Jan 18, 2022

Copy link
Copy Markdown
Contributor Author

I've added a Whatsnew entry as suggested - thanks for the explanation & review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants