Skip to content

Commit f22fb42

Browse files
authored
Merge pull request #1503 from davidhewitt/main-tweaks
main: tweaks from rename
2 parents acf7271 + 971b48f commit f22fb42

File tree

10 files changed

+21
-21
lines changed

10 files changed

+21
-21
lines changed

.github/issue_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ When reporting a bug, please provide the following information. If this is not a
99
- How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?:
1010
- Your Rust version (`rustc --version`):
1111
- Your PyO3 version:
12-
- Have you tried using latest PyO3 master (replace `version = "0.x.y"` with `git = "https://github.com/PyO3/pyo3")?`:
12+
- Have you tried using latest PyO3 main (replace `version = "0.x.y"` with `git = "https://github.com/PyO3/pyo3")?`:
1313

1414
### 💥 Reproducing
1515

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88

99
env:

.github/workflows/guide.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: gh-pages
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
release:
88
types: [published]
99

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22
All notable changes to this project will be documented in this file. For help with updating to new
3-
PyO3 versions, please see the [migration guide](https://pyo3.rs/master/migration.html).
3+
PyO3 versions, please see the [migration guide](https://pyo3.rs/main/migration.html).
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# PyO3
22

33
[![Actions Status](https://github.com/PyO3/pyo3/workflows/Test/badge.svg)](https://github.com/PyO3/pyo3/actions)
4-
[![codecov](https://codecov.io/gh/PyO3/pyo3/branch/master/graph/badge.svg)](https://codecov.io/gh/PyO3/pyo3)
4+
[![codecov](https://codecov.io/gh/PyO3/pyo3/branch/main/graph/badge.svg)](https://codecov.io/gh/PyO3/pyo3)
55
[![crates.io](http://meritbadge.herokuapp.com/pyo3)](https://crates.io/crates/pyo3)
66
[![minimum rustc 1.41](https://img.shields.io/badge/rustc-1.41+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
77
[![Join the dev chat](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/PyO3/Lobby)
88

99
[Rust](http://www.rust-lang.org/) bindings for [Python](https://www.python.org/). This includes running and interacting with Python code from a Rust binary, as well as writing native Python modules.
1010

11-
* User Guide: [stable](https://pyo3.rs) | [master](https://pyo3.rs/master)
11+
* User Guide: [stable](https://pyo3.rs) | [main](https://pyo3.rs/main)
1212

13-
* API Documentation: [stable](https://docs.rs/pyo3/) | [master](https://pyo3.rs/master/doc)
13+
* API Documentation: [stable](https://docs.rs/pyo3/) | [main](https://pyo3.rs/main/doc)
1414

15-
* Contributing Notes: [github](https://github.com/PyO3/pyo3/blob/master/Contributing.md)
15+
* Contributing Notes: [github](https://github.com/PyO3/pyo3/blob/main/Contributing.md)
1616

17-
A comparison with rust-cpython can be found [in the guide](https://pyo3.rs/master/rust_cpython.html).
17+
A comparison with rust-cpython can be found [in the guide](https://pyo3.rs/main/rust_cpython.html).
1818

1919
## Usage
2020

2121
PyO3 supports Python 3.6 and up. The minimum required Rust version is 1.41.
2222

2323
Building with PyPy is also possible (via cpyext) for Python 3.6, targeted PyPy version is 7.3+.
24-
Please refer to the [pypy section in the guide](https://pyo3.rs/master/building_and_distribution/pypy.html).
24+
Please refer to the [pypy section in the guide](https://pyo3.rs/main/building_and_distribution/pypy.html).
2525

2626
You can either write a native Python module in Rust, or use Python from a Rust binary.
2727

@@ -96,7 +96,7 @@ rustflags = [
9696

9797
While developing, you can symlink (or copy) and rename the shared library from the target folder: On MacOS, rename `libstring_sum.dylib` to `string_sum.so`, on Windows `libstring_sum.dll` to `string_sum.pyd`, and on Linux `libstring_sum.so` to `string_sum.so`. Then open a Python shell in the same folder and you'll be able to `import string_sum`.
9898

99-
To build, test and publish your crate as a Python module, you can use [maturin](https://github.com/PyO3/maturin) or [setuptools-rust](https://github.com/PyO3/setuptools-rust). You can find an example for setuptools-rust in [examples/word-count](https://github.com/PyO3/pyo3/tree/master/examples/word-count), while maturin should work on your crate without any configuration.
99+
To build, test and publish your crate as a Python module, you can use [maturin](https://github.com/PyO3/maturin) or [setuptools-rust](https://github.com/PyO3/setuptools-rust). You can find an example for setuptools-rust in [examples/word-count](https://github.com/PyO3/pyo3/tree/main/examples/word-count), while maturin should work on your crate without any configuration.
100100

101101
## Using Python from Rust
102102

@@ -136,7 +136,7 @@ fn main_(py: Python) -> PyResult<()> {
136136
}
137137
```
138138

139-
Our guide has [a section](https://pyo3.rs/master/python_from_rust.html) with lots of examples
139+
Our guide has [a section](https://pyo3.rs/main/python_from_rust.html) with lots of examples
140140
about this topic.
141141

142142
## Tools and libraries
@@ -152,7 +152,7 @@ about this topic.
152152
## Examples
153153

154154
* [hyperjson](https://github.com/mre/hyperjson) _A hyper-fast Python module for reading/writing JSON data using Rust's serde-json_
155-
* [html-py-ever](https://github.com/PyO3/setuptools-rust/tree/master/examples/html-py-ever) _Using [html5ever](https://github.com/servo/html5ever) through [kuchiki](https://github.com/kuchiki-rs/kuchiki) to speed up html parsing and css-selecting._
155+
* [html-py-ever](https://github.com/PyO3/setuptools-rust/tree/main/examples/html-py-ever) _Using [html5ever](https://github.com/servo/html5ever) through [kuchiki](https://github.com/kuchiki-rs/kuchiki) to speed up html parsing and css-selecting._
156156
* [point-process](https://github.com/ManifoldFR/point-process-rust/tree/master/pylib) _High level API for pointprocesses as a Python library_
157157
* [autopy](https://github.com/autopilot-rs/autopy) _A simple, cross-platform GUI automation library for Python and Rust._
158158
* Contains an example of building wheels on TravisCI and appveyor using [cibuildwheel](https://github.com/joerick/cibuildwheel)
@@ -167,7 +167,7 @@ about this topic.
167167
* [pyre](https://github.com/Project-Dream-Weaver/Pyre) _Fast Python HTTP server written in Rust_
168168
* [jsonschema-rs](https://github.com/Stranger6667/jsonschema-rs/tree/master/bindings/python) _Fast JSON Schema validation library_
169169
* [css-inline](https://github.com/Stranger6667/css-inline/tree/master/bindings/python) _CSS inlining for Python implemented in Rust_
170-
* [cryptography](https://github.com/pyca/cryptography/tree/master/src/rust) _Python cryptography library with some functionality in Rust_
170+
* [cryptography](https://github.com/pyca/cryptography/tree/main/src/rust) _Python cryptography library with some functionality in Rust_
171171
* [polaroid](https://github.com/daggy1234/polaroid) _Hyper Fast and safe image manipulation library for Python written in Rust_
172172

173173
## License

guide/src/parallelism.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
CPython has the infamous [Global Interpreter Lock](https://docs.python.org/3/glossary.html#term-global-interpreter-lock), which prevents several threads from executing Python bytecode in parallel. This makes threading in Python a bad fit for [CPU-bound](https://stackoverflow.com/questions/868568/) tasks and often forces developers to accept the overhead of multiprocessing.
44

5-
In PyO3 parallelism can be easily achieved in Rust-only code. Let's take a look at our [word-count](https://github.com/PyO3/pyo3/blob/master/examples/word-count/src/lib.rs) example, where we have a `search` function that utilizes the [rayon](https://github.com/nikomatsakis/rayon) crate to count words in parallel.
5+
In PyO3 parallelism can be easily achieved in Rust-only code. Let's take a look at our [word-count](https://github.com/PyO3/pyo3/blob/main/examples/word-count/src/lib.rs) example, where we have a `search` function that utilizes the [rayon](https://github.com/rayon-rs/rayon) crate to count words in parallel.
66
```rust, ignore
77
#[pyfunction]
88
fn search(contents: &str, needle: &str) -> usize {
@@ -56,7 +56,7 @@ We are using `pytest-benchmark` to benchmark four word count functions:
5656
3. Rust sequential version
5757
4. Rust sequential version executed twice with two Python threads
5858

59-
The benchmark script can be found [here](https://github.com/PyO3/pyo3/blob/master/examples/word-count/tests/test_word_count.py), and we can run `tox` in the `word-count` folder to benchmark these functions.
59+
The benchmark script can be found [here](https://github.com/PyO3/pyo3/blob/main/examples/word-count/tests/test_word_count.py), and we can run `tox` in the `word-count` folder to benchmark these functions.
6060

6161
While the results of the benchmark of course depend on your machine, the relative results should be similar to this (mid 2020):
6262
```ignore

src/instance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ pub unsafe trait PyNativeType: Sized {
4141
/// - [`Py::borrow`](#method.borrow), [`Py::try_borrow`](#method.try_borrow),
4242
/// [`Py::borrow_mut`](#method.borrow_mut), or [`Py::try_borrow_mut`](#method.try_borrow_mut),
4343
/// to directly access a `#[pyclass]` value (which has RefCell-like behavior, see
44-
/// [the `PyCell` guide entry](https://pyo3.rs/master/class.html#pycell-and-interior-mutability)
44+
/// [the `PyCell` guide entry](https://pyo3.rs/main/class.html#pycell-and-interior-mutability)
4545
/// ).
4646
/// - Use methods directly on `Py`, such as [`Py::call`](#method.call) and
4747
/// [`Py::call_method`](#method.call_method).
4848
///
49-
/// See [the guide](https://pyo3.rs/master/types.html) for an explanation
49+
/// See [the guide](https://pyo3.rs/main/types.html) for an explanation
5050
/// of the different Python object types.
5151
#[repr(transparent)]
5252
pub struct Py<T>(NonNull<ffi::PyObject>, PhantomData<T>);

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! a function can assume that the GIL is held. In Rust, we use different types
1919
//! to represent a reference to a Python object, depending on whether we know
2020
//! the GIL is held, and depending on whether we know the underlying type. See
21-
//! [the guide](https://pyo3.rs/master/types.html) for an explanation of
21+
//! [the guide](https://pyo3.rs/main/types.html) for an explanation of
2222
//! the different Python object types.
2323
//!
2424
//! A `Python` instance is either obtained explicitly by acquiring the GIL,

src/once_cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::cell::UnsafeCell;
66
/// Unlike `once_cell::sync` which blocks threads to achieve thread safety, this implementation
77
/// uses the Python GIL to mediate concurrent access. This helps in cases where `once_sync` or
88
/// `lazy_static`'s synchronization strategy can lead to deadlocks when interacting with the Python
9-
/// GIL. For an example, see [the FAQ section](https://pyo3.rs/master/faq.html) of the guide.
9+
/// GIL. For an example, see [the FAQ section](https://pyo3.rs/main/faq.html) of the guide.
1010
///
1111
/// # Example
1212
///

src/types/any.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::os::raw::c_int;
2020
/// `PyAny` is used as a reference with a lifetime that represents that the GIL
2121
/// is held, therefore its API does not require a `Python<'py>` token.
2222
///
23-
/// See [the guide](https://pyo3.rs/master/types.html) for an explanation
23+
/// See [the guide](https://pyo3.rs/main/types.html) for an explanation
2424
/// of the different Python object types.
2525
///
2626
/// # Example

0 commit comments

Comments
 (0)