File tree 6 files changed +12
-15
lines changed
6 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -16,23 +16,25 @@ jobs:
16
16
python : " 3.7"
17
17
- name : Python 3.8
18
18
python : " 3.8"
19
+ # Run clippy and rustfmt
20
+ env : RUN_LINT=1
19
21
- name : Python 3.9-dev
20
22
python : " 3.9-dev"
21
- - name : Minimum nightly
23
+ - name : Nightly
22
24
python : " 3.7"
23
- # Keep this synced up with build.rs and ensure that the nightly version does have clippy available
24
- # https://static.rust-lang.org/dist/YYYY-MM-DD/clippy-nightly-x86_64-unknown-linux-gnu.tar.gz exists
25
- env : TRAVIS_RUST_VERSION=nightly-2020-01-21
25
+ env : TRAVIS_RUST_VERSION=nightly FEATURES="nightly"
26
26
- name : PyPy3.5 7.0 # Tested via anaconda PyPy (since travis's PyPy version is too old)
27
27
python : " 3.7"
28
28
env : FEATURES="pypy" PATH="$PATH:/opt/anaconda/envs/pypy3/bin"
29
29
allow_failures :
30
+ - name : Nightly
30
31
- python : 3.9-dev
31
32
32
33
env :
33
34
global :
34
35
- TRAVIS_RUST_VERSION=stable
35
36
- RUST_BACKTRACE=1
37
+ - RUN_LINT=0
36
38
37
39
before_install :
38
40
- source ./ci/travis/setup.sh
Original file line number Diff line number Diff line change 7
7
# Use profile=minimal here to skip installing clippy
8
8
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION --profile=minimal -y
9
9
export PATH=$PATH :$HOME /.cargo/bin
10
- if [ " $TRAVIS_JOB_NAME " = " Minimum nightly " ]; then
10
+ if [[ $RUN_LINT == 1 ] ]; then
11
11
rustup component add clippy
12
12
rustup component add rustfmt
13
13
fi
Original file line number Diff line number Diff line change 10
10
PYTHON_SYS_EXECUTABLE=" /opt/anaconda/envs/pypy3/bin/pypy3" cargo build;
11
11
fi
12
12
13
- if [ " $TRAVIS_JOB_NAME " = " Minimum nightly " ]; then
13
+ if [[ $RUN_LINT == 1 ] ]; then
14
14
pip install --pre black==19.3b0
15
15
make lint
16
16
fi
Original file line number Diff line number Diff line change 1
- #![ cfg_attr( nightly, feature( specialization) ) ]
1
+ #![ cfg_attr( feature = " nightly" , feature( specialization) ) ]
2
2
#![ allow( clippy:: missing_safety_doc) ] // FIXME (#698)
3
3
4
4
//! Rust bindings to the Python interpreter.
Original file line number Diff line number Diff line change @@ -7,11 +7,7 @@ fn test_compile_errors() {
7
7
t. compile_fail ( "tests/ui/missing_clone.rs" ) ;
8
8
t. compile_fail ( "tests/ui/reject_generics.rs" ) ;
9
9
t. compile_fail ( "tests/ui/wrong_aspyref_lifetimes.rs" ) ;
10
- // Since the current minimum nightly(2020-01-20) has a different error message,
11
- // we skip this test.
12
- // TODO(kngwyu): Remove this `if` when we update minimum nightly.
13
- if option_env ! ( "TRAVIS_JOB_NAME" ) != Some ( "Minimum nightly" ) {
14
- t. compile_fail ( "tests/ui/invalid_pymethod_names.rs" ) ;
15
- t. compile_fail ( "tests/ui/static_ref.rs" ) ;
16
- }
10
+ t. compile_fail ( "tests/ui/static_ref.rs" ) ;
11
+ #[ cfg( not( feature = "nightly" ) ) ]
12
+ t. compile_fail ( "tests/ui/invalid_pymethod_names.rs" ) ;
17
13
}
Original file line number Diff line number Diff line change 1
- use pyo3:: ffi:: * ;
2
1
use pyo3:: prelude:: * ;
3
2
use pyo3:: types:: IntoPyDict ;
4
3
You can’t perform that action at this time.
0 commit comments