forked from Rust-related/RustPython
Merge pull request #3071 from fanninpm/master-what-master
Replace `master` with `main`
This commit is contained in:
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -1,6 +1,6 @@
|
||||
on:
|
||||
push:
|
||||
branches: [master, release]
|
||||
branches: [main, release]
|
||||
pull_request:
|
||||
|
||||
name: CI
|
||||
|
||||
@@ -6,7 +6,7 @@ A Python-3 (CPython >= 3.8.0) Interpreter written in Rust :snake: :scream:
|
||||
:metal:.
|
||||
|
||||
[](https://github.com/RustPython/RustPython/actions?query=workflow%3ACI)
|
||||
[](https://codecov.io/gh/RustPython/RustPython)
|
||||
[](https://codecov.io/gh/RustPython/RustPython)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://github.com/RustPython/RustPython/graphs/contributors)
|
||||
[](https://gitter.im/rustpython/Lobby)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Implement python as a virtual machine with bytecodes. This module
|
||||
//! implements bytecode structure.
|
||||
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/master/logo.png")]
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/main/logo.png")]
|
||||
#![doc(html_root_url = "https://docs.rs/rustpython-bytecode/")]
|
||||
|
||||
use bitflags::bitflags;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//! Take an AST and transform it into bytecode
|
||||
//!
|
||||
//! Inspirational code:
|
||||
//! https://github.com/python/cpython/blob/master/Python/compile.c
|
||||
//! https://github.com/python/cpython/blob/main/Python/compile.c
|
||||
//! https://github.com/micropython/micropython/blob/master/py/compile.c
|
||||
|
||||
use crate::ir::{self, CodeInfo};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! Compile a Python AST or source code into bytecode consumable by RustPython.
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/master/logo.png")]
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/main/logo.png")]
|
||||
#![doc(html_root_url = "https://docs.rs/rustpython-compiler/")]
|
||||
|
||||
#[macro_use]
|
||||
|
||||
@@ -4,7 +4,7 @@ This ensures that global and nonlocal keywords are picked up.
|
||||
Then the compiler can use the symbol table to generate proper
|
||||
load and store instructions for names.
|
||||
|
||||
Inspirational file: https://github.com/python/cpython/blob/master/Python/symtable.c
|
||||
Inspirational file: https://github.com/python/cpython/blob/main/Python/symtable.c
|
||||
*/
|
||||
|
||||
use crate::error::{CompileError, CompileErrorType};
|
||||
@@ -196,7 +196,7 @@ impl std::fmt::Debug for SymbolTable {
|
||||
}
|
||||
|
||||
/* Perform some sort of analysis on nonlocals, globals etc..
|
||||
See also: https://github.com/python/cpython/blob/master/Python/symtable.c#L410
|
||||
See also: https://github.com/python/cpython/blob/main/Python/symtable.c#L410
|
||||
*/
|
||||
fn analyze_symbol_table(symbol_table: &mut SymbolTable) -> SymbolTableResult {
|
||||
let mut analyzer = SymbolTableAnalyzer::default();
|
||||
@@ -760,7 +760,7 @@ impl SymbolTableBuilder {
|
||||
value,
|
||||
simple,
|
||||
} => {
|
||||
// https://github.com/python/cpython/blob/master/Python/symtable.c#L1233
|
||||
// https://github.com/python/cpython/blob/main/Python/symtable.c#L1233
|
||||
match &target.node {
|
||||
ast::ExprKind::Name { id, .. } if *simple => {
|
||||
self.register_name(id, SymbolUsage::AnnotationAssigned, location)?;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#![recursion_limit = "128"]
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/master/logo.png")]
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/main/logo.png")]
|
||||
#![doc(html_root_url = "https://docs.rs/rustpython-derive/")]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# unittest for modified imghdr.py
|
||||
# Should be replace it into https://github.com/python/cpython/blob/master/Lib/test/test_imghdr.py
|
||||
# Should be replace it into https://github.com/python/cpython/blob/main/Lib/test/test_imghdr.py
|
||||
import os
|
||||
import imghdr
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
//!
|
||||
//! ```
|
||||
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/master/logo.png")]
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/main/logo.png")]
|
||||
#![doc(html_root_url = "https://docs.rs/rustpython-parser/")]
|
||||
|
||||
#[macro_use]
|
||||
|
||||
@@ -81,7 +81,7 @@ impl PyFunction {
|
||||
// the proper variables keeping into account default values
|
||||
// and starargs and kwargs.
|
||||
// See also: PyEval_EvalCodeWithName in cpython:
|
||||
// https://github.com/python/cpython/blob/master/Python/ceval.c#L3681
|
||||
// https://github.com/python/cpython/blob/main/Python/ceval.c#L3681
|
||||
|
||||
let mut fastlocals = frame.fastlocals.lock();
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ fn print_source_line<W: Write>(
|
||||
filename: &str,
|
||||
lineno: usize,
|
||||
) -> Result<(), W::Error> {
|
||||
// TODO: use io.open() method instead, when available, according to https://github.com/python/cpython/blob/master/Python/traceback.c#L393
|
||||
// TODO: use io.open() method instead, when available, according to https://github.com/python/cpython/blob/main/Python/traceback.c#L393
|
||||
// TODO: support different encodings
|
||||
let file = match File::open(filename) {
|
||||
Ok(file) => file,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// we want to mirror python naming conventions when defining python structs, so that does mean
|
||||
// uppercase acronyms, e.g. TextIOWrapper instead of TextIoWrapper
|
||||
#![allow(clippy::upper_case_acronyms)]
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/master/logo.png")]
|
||||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/main/logo.png")]
|
||||
#![doc(html_root_url = "https://docs.rs/rustpython-vm/")]
|
||||
|
||||
#[cfg(feature = "flame-it")]
|
||||
|
||||
@@ -62,6 +62,6 @@ for the crate and webpack.
|
||||
## Updating the demo
|
||||
|
||||
If you wish to update the WebAssembly demo,
|
||||
[open a pull request](https://github.com/RustPython/RustPython/compare/release...master)
|
||||
to merge `master` into the `release` branch. This will trigger a Travis build
|
||||
[open a pull request](https://github.com/RustPython/RustPython/compare/release...main)
|
||||
to merge `main` into the `release` branch. This will trigger a Travis build
|
||||
that updates the demo page.
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.1.2"
|
||||
authors = ["RustPython Team"]
|
||||
license = "MIT"
|
||||
description = "A Python-3 (CPython >= 3.5.0) Interpreter written in Rust, compiled to WASM"
|
||||
repository = "https://github.com/RustPython/RustPython/tree/master/wasm/lib"
|
||||
repository = "https://github.com/RustPython/RustPython/tree/main/wasm/lib"
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
A Python-3 (CPython >= 3.8.0) Interpreter written in Rust.
|
||||
|
||||
[](https://travis-ci.org/RustPython/RustPython)
|
||||
[](https://travis-ci.org/RustPython/RustPython)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://github.com/RustPython/RustPython/graphs/contributors)
|
||||
[](https://gitter.im/rustpython/Lobby)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="d-flex">
|
||||
<div class="header md-flex-grow text-center">RustPython 🐍 😱 🤘</div>
|
||||
<div>
|
||||
<a target="_blank" class="d-md-none mr-px-5 text-black" href="https://github.com/RustPython/RustPython/tree/master/wasm/notebook">how this works</a>
|
||||
<a target="_blank" class="d-md-none mr-px-5 text-black" href="https://github.com/RustPython/RustPython/tree/main/wasm/notebook">how this works</a>
|
||||
<a target="_blank" class="text-black" href="https://github.com/RustPython/"> github</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user