Repository: pypa/cibuildwheel

Issue:
Changing the default branch to `main`
This is just a heads up, I'm planning to change the default branch on this repo to `main` this week, let's say Wednesday 26th. Github have a tool to change it over, and update PRs to target the new branch, but you might have to update it on local checkouts and forks. Shouldn't be a big issue though, this is what [Github say](https://github.com/github/renaming#renaming-existing-branches) about it:

> Renaming a branch will:
> 
> - Re-target any open pull requests
> - Update any draft releases based on the branch
> - Move any branch protection rules that explicitly reference the old name
> - Update the branch used to build GitHub Pages, if applicable
> - Show a notice to repository contributors, maintainers, and admins on the repository homepage with instructions to update local copies of the repository
> - Show a notice to contributors who git push to the old branch
> - Redirect web requests for the old branch name to the new branch name
> - Return a "Moved Permanently" response in API requests for the old branch name

---

Checklist for the switch:

- [x] Use the Github tool to change it over
- [x] Find/replace `master` to `main` in CI configs, docs, scripts, example code, etc
- [x] Change default branch on Readthedocs



Discussion:
Experience from renaming pip's default branch is encoded here: https://github.com/pypa/pip/issues/8948

Everything on GitHub "just works", but you'll need to manually update:

- Any custom scripts.
- non-GitHub CI configuration.
- (maybe) CI commands and automation.
- ReadTheDocs configuration.
Thanks @pradyunsg ! That's very helpful :)
One extra personal detail - remember to delete your `master` branches locally afterwards. I find it's important that 'git switch master` fail locally or otherwise I've started making PRs based on the old deleted master more than once. :/

Resolving patch:
diff --git a/bin/make_dependency_update_pr.py b/bin/make_dependency_update_pr.py
--- a/bin/make_dependency_update_pr.py
+++ b/bin/make_dependency_update_pr.py
@@ -40,7 +40,7 @@ def main():
     timestamp = time.strftime("%Y-%m-%dT%H-%M-%S", time.gmtime())
     branch_name = f"update-constraints-{timestamp}"
 
-    shell(f"git checkout -b {branch_name} origin/master", check=True)
+    shell(f"git checkout -b {branch_name} origin/main", check=True)
 
     try:
         shell("bin/update_dependencies.py", check=True)
@@ -63,7 +63,7 @@ def main():
                 "pr",
                 "create",
                 "--repo=pypa/cibuildwheel",
-                "--base=master",
+                "--base=main",
                 "--title=Update dependencies",
                 f"--body='{body}'",
             ],


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -3,7 +3,7 @@ name: Test
 on:
   push:
     branches:
-      - master
+      - main
   pull_request:
     paths-ignore:
       - 'docs/**'
diff --git a/test/test_ssl.py b/test/test_ssl.py
--- a/test/test_ssl.py
+++ b/test/test_ssl.py
@@ -11,8 +11,8 @@
 
         context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
         data = urlopen("https://www.nist.gov", context=context)
-        data = urlopen("https://raw.githubusercontent.com/pypa/cibuildwheel/master/CI.md", context=context)
-        data = urlopen("https://raw.githubusercontent.com/pypa/cibuildwheel/master/CI.md")
+        data = urlopen("https://raw.githubusercontent.com/pypa/cibuildwheel/main/CI.md", context=context)
+        data = urlopen("https://raw.githubusercontent.com/pypa/cibuildwheel/main/CI.md")
         """
     )
 )