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 — bpo-40280: Move hard-coded feature checks to configure (GH-29789) by tiran · Pull Request #29789 · python/cpython

Conversation

@tiran

@tiran tiran commented Nov 26, 2021 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

https://bugs.python.org/issue40280

Sorry, something went wrong.

Uh oh!

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

All reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Nov 26, 2021
@bedevere-bot bedevere-bot added the awaiting core review label Nov 26, 2021
@tiran

tiran commented Nov 26, 2021

Copy link
Copy Markdown
Member Author

On my system, len(dir(posix)) is 318 names before and after the patch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tiran
tiran requested a review from erlend-aasland November 26, 2021 13:29
@tiran tiran added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 26, 2021
@bedevere-bot

bedevere-bot commented Nov 26, 2021

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @tiran for commit 6819bbbc3d8ead204ec1ebd4e87dc5aa775d04ff 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 26, 2021
erlend-aasland
erlend-aasland approved these changes Nov 26, 2021
View reviewed changes

@erlend-aasland erlend-aasland left a comment •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

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. If you want to keep the list sorted, feel free to apply the inlined patch (GitHub does not allow .txt attachments to posts).

patch
diff --git a/configure b/configure
index 4caeca33e5..9040a19a15 100755
--- a/configure
+++ b/configure
@@ -13376,32 +13376,26 @@ $as_echo "$MACHDEP_OBJS" >&6; }
 fi
 
 # checks for library functions
-for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
- clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
- explicit_memset faccessat fchmod fchmodat fchown fchownat \
- fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
- futimens futimes gai_strerror getentropy \
- getgrgid getgrgid_r getgrnam_r \
- getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
- getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
- if_nameindex \
- initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
- memrchr mbrtowc mkdirat mkfifo \
- madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
- posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
- pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
- readlink readlinkat readv realpath renameat \
- sem_open sem_timedwait sem_clockwait sem_getvalue sem_unlink sendfile setegid seteuid \
- setgid sethostname \
- setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
- sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
- sched_rr_get_interval \
- sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
- sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
- sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
- truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
- wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn \
- fork1 getegid geteuid getgid getppid getuid opendir pipe system wait ttyname
+for ac_func in
+  accept4 alarm bind_textdomain_codeset chown clock close_range confstr copy_file_range ctermid \
+  dup3 execv explicit_bzero explicit_memset faccessat fchmod fchmodat fchown fchownat fdopendir \
+  fdwalk fexecve fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
+  gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r getgrnam_r getgrouplist \
+  getgroups getitimer getloadavg getlogin getpeername getpgid getpid getppid getpriority _getpty \
+  getpwent getpwnam_r getpwuid_r getresgid getresuid getsid getspent getspnam getuid getwd \
+  if_nameindex initgroups kill killpg lchown linkat lockf lstat lutimes madvise mbrtowc memrchr \
+  mkdirat mkfifo mkfifoat mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
+  pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp pread preadv preadv2 \
+  pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 readlink readlinkat \
+  readv realpath renameat rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
+  sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open sem_timedwait sem_unlink \
+  sendfile setegid seteuid setgid sethostname setitimer setlocale setpgid setpgrp setpriority \
+  setregid setresgid setresuid setreuid setsid setuid setvbuf sigaction sigaltstack sigfillset \
+  siginterrupt sigpending sigrelse sigtimedwait sigwait sigwaitinfo snprintf splice strftime \
+  strlcpy strsignal symlinkat sync sysconf system tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \
+  tmpnam tmpnam_r truncate ttyname uname unlinkat utimensat utimes vfork wait wait3 wait4 waitid \
+  waitpid wcscoll wcsftime wcsxfrm wmemcmp writev
+
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/configure.ac b/configure.ac
index 3704f0615b..2300854eb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3937,32 +3937,26 @@ else
 fi
 
 # checks for library functions
-AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
- clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
- explicit_memset faccessat fchmod fchmodat fchown fchownat \
- fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
- futimens futimes gai_strerror getentropy \
- getgrgid getgrgid_r getgrnam_r \
- getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
- getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
- if_nameindex \
- initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
- memrchr mbrtowc mkdirat mkfifo \
- madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
- posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
- pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
- readlink readlinkat readv realpath renameat \
- sem_open sem_timedwait sem_clockwait sem_getvalue sem_unlink sendfile setegid seteuid \
- setgid sethostname \
- setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
- sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
- sched_rr_get_interval \
- sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
- sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
- sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
- truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
- wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn \
- fork1 getegid geteuid getgid getppid getuid opendir pipe system wait ttyname)
+AC_CHECK_FUNCS([
+  accept4 alarm bind_textdomain_codeset chown clock close_range confstr copy_file_range ctermid \
+  dup3 execv explicit_bzero explicit_memset faccessat fchmod fchmodat fchown fchownat fdopendir \
+  fdwalk fexecve fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
+  gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r getgrnam_r getgrouplist \
+  getgroups getitimer getloadavg getlogin getpeername getpgid getpid getppid getpriority _getpty \
+  getpwent getpwnam_r getpwuid_r getresgid getresuid getsid getspent getspnam getuid getwd \
+  if_nameindex initgroups kill killpg lchown linkat lockf lstat lutimes madvise mbrtowc memrchr \
+  mkdirat mkfifo mkfifoat mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
+  pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp pread preadv preadv2 \
+  pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 readlink readlinkat \
+  readv realpath renameat rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
+  sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open sem_timedwait sem_unlink \
+  sendfile setegid seteuid setgid sethostname setitimer setlocale setpgid setpgrp setpriority \
+  setregid setresgid setresuid setreuid setsid setuid setvbuf sigaction sigaltstack sigfillset \
+  siginterrupt sigpending sigrelse sigtimedwait sigwait sigwaitinfo snprintf splice strftime \
+  strlcpy strsignal symlinkat sync sysconf system tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \
+  tmpnam tmpnam_r truncate ttyname uname unlinkat utimensat utimes vfork wait wait3 wait4 waitid \
+  waitpid wcscoll wcsftime wcsxfrm wmemcmp writev
+])
 
 # Force lchmod off for Linux. Linux disallows changing the mode of symbolic
 # links. Some libc implementations have a stub lchmod implementation that always

Sorry, something went wrong.

Uh oh!

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

tiran reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@tiran
tiran force-pushed the bpo-40280-posix-configure branch from 6819bbb to ece2630 Compare November 26, 2021 14:31
tiran and others added 2 commits November 26, 2021 15:32
@tiran
bpo-40280: Move hard-coded feature checks to configure
7babebc
@tiran Erlend Egeberg Aasland
Sort functions
6072aa8
Co-authored-by: Erlend Egeberg Aasland <[email protected]>
@tiran
tiran force-pushed the bpo-40280-posix-configure branch from ece2630 to 6072aa8 Compare November 26, 2021 14:39
@tiran tiran changed the title bpo-40280: Move hard-coded feature checks to configure bpo-40280: Move hard-coded feature checks to configure (GH-29789) Nov 26, 2021
@tiran
tiran merged commit 4ebde73 into python:main Nov 26, 2021
@tiran
tiran deleted the bpo-40280-posix-configure branch November 26, 2021 18:36
@bedevere-bot bedevere-bot removed the awaiting core review label Nov 26, 2021
@SimonBiggs SimonBiggs mannequin mentioned this pull request Jun 7, 2022
Consider supporting emscripten/webassembly as a build target #84461
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erlend-aasland erlend-aasland erlend-aasland approved these changes

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.

4 participants

@tiran @bedevere-bot @erlend-aasland @the-knights-who-say-ni
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.