diff -Nru rust-pythonize-0.19.0/.cargo_vcs_info.json rust-pythonize-0.20.0/.cargo_vcs_info.json --- rust-pythonize-0.19.0/.cargo_vcs_info.json 1970-01-01 00:00:01.000000000 +0000 +++ rust-pythonize-0.20.0/.cargo_vcs_info.json 1970-01-01 00:00:01.000000000 +0000 @@ -1,6 +1,6 @@ { "git": { - "sha1": "64bb7ba98de62fc974ebe60f42c45e257fa44a62" + "sha1": "8eb657c4bf543a54104c1d5edab4df23547ad2de" }, "path_in_vcs": "" } \ No newline at end of file diff -Nru rust-pythonize-0.19.0/.github/dependabot.yml rust-pythonize-0.20.0/.github/dependabot.yml --- rust-pythonize-0.19.0/.github/dependabot.yml 2006-07-24 01:21:28.000000000 +0000 +++ rust-pythonize-0.20.0/.github/dependabot.yml 2006-07-24 01:21:28.000000000 +0000 @@ -9,3 +9,8 @@ directory: "/" # Location of package manifests schedule: interval: "weekly" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff -Nru rust-pythonize-0.19.0/.github/workflows/ci.yml rust-pythonize-0.20.0/.github/workflows/ci.yml --- rust-pythonize-0.19.0/.github/workflows/ci.yml 2006-07-24 01:21:28.000000000 +0000 +++ rust-pythonize-0.20.0/.github/workflows/ci.yml 2006-07-24 01:21:28.000000000 +0000 @@ -3,7 +3,7 @@ on: push: branches: - - master + - main pull_request: env: @@ -14,10 +14,8 @@ runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal components: rustfmt - name: Check rust formatting (rustfmt) run: cargo fmt --all -- --check @@ -26,26 +24,23 @@ runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal components: clippy - run: cargo clippy --all build: needs: [fmt] # don't wait for clippy as fails rarely and takes longer - name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} ${{ matrix.msrv }} + name: python${{ matrix.python-version }} ${{ matrix.platform.os }} runs-on: ${{ matrix.platform.os }} strategy: fail-fast: false # If one platform fails, allow the rest to keep testing. matrix: - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] platform: [ - { os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }, - { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }, - { os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" }, - { os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" }, + { os: "macOS-latest", rust-target: "x86_64-apple-darwin" }, + { os: "ubuntu-latest", rust-target: "x86_64-unknown-linux-gnu" }, + { os: "windows-latest", rust-target: "x86_64-pc-windows-msvc" }, ] steps: @@ -55,15 +50,12 @@ uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.platform.python-architecture }} + architecture: x64 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable target: ${{ matrix.platform.rust-target }} - profile: minimal - default: true - name: Build without default features run: cargo test --no-default-features --verbose --target ${{ matrix.platform.rust-target }} @@ -84,21 +76,14 @@ target key: coverage-cargo-${{ hashFiles('**/Cargo.toml') }} continue-on-error: true - - name: install cargo-llvm-cov - run: | - wget https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${CARGO_LLVM_COV_VERSION}/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz -qO- | tar -xzvf - - mv cargo-llvm-cov ~/.cargo/bin - env: - CARGO_LLVM_COV_VERSION: 0.1.9 - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - profile: minimal + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - uses: dtolnay/rust-toolchain@stable + with: components: llvm-tools-preview - run: | cargo llvm-cov clean - cargo llvm-cov --lcov --output-path coverage.lcov + cargo llvm-cov --codecov --output-path codecov.json - uses: codecov/codecov-action@v2 with: - file: coverage.lcov + file: codecov.json diff -Nru rust-pythonize-0.19.0/CHANGELOG.md rust-pythonize-0.20.0/CHANGELOG.md --- rust-pythonize-0.19.0/CHANGELOG.md 2006-07-24 01:21:28.000000000 +0000 +++ rust-pythonize-0.20.0/CHANGELOG.md 2006-07-24 01:21:28.000000000 +0000 @@ -1,3 +1,7 @@ +## 0.20.0 - 2023-10-15 + +- Update to PyO3 0.20 + ## 0.19.0 - 2023-06-11 - Update to PyO3 0.19 diff -Nru rust-pythonize-0.19.0/Cargo.toml rust-pythonize-0.20.0/Cargo.toml --- rust-pythonize-0.19.0/Cargo.toml 1970-01-01 00:00:01.000000000 +0000 +++ rust-pythonize-0.20.0/Cargo.toml 1970-01-01 00:00:01.000000000 +0000 @@ -12,7 +12,7 @@ [package] edition = "2018" name = "pythonize" -version = "0.19.0" +version = "0.20.0" authors = ["David Hewitt <1939362+davidhewitt@users.noreply.github.com>"] description = "Serde Serializer & Deserializer from Rust <--> Python, backed by PyO3." homepage = "https://github.com/davidhewitt/pythonize" @@ -22,7 +22,7 @@ repository = "https://github.com/davidhewitt/pythonize" [dependencies.pyo3] -version = "0.19.0" +version = "0.20.0" default-features = false [dependencies.serde] @@ -34,7 +34,7 @@ version = "1.0.2" [dev-dependencies.pyo3] -version = "0.19.0" +version = "0.20.0" features = [ "auto-initialize", "macros", diff -Nru rust-pythonize-0.19.0/Cargo.toml.orig rust-pythonize-0.20.0/Cargo.toml.orig --- rust-pythonize-0.19.0/Cargo.toml.orig 2006-07-24 01:21:28.000000000 +0000 +++ rust-pythonize-0.20.0/Cargo.toml.orig 2006-07-24 01:21:28.000000000 +0000 @@ -1,6 +1,6 @@ [package] name = "pythonize" -version = "0.19.0" +version = "0.20.0" authors = ["David Hewitt <1939362+davidhewitt@users.noreply.github.com>"] edition = "2018" license = "MIT" @@ -12,10 +12,10 @@ [dependencies] serde = { version = "1.0", default-features = false, features = ["std"] } -pyo3 = { version = "0.19.0", default-features = false } +pyo3 = { version = "0.20.0", default-features = false } [dev-dependencies] serde = { version = "1.0", default-features = false, features = ["derive"] } -pyo3 = { version = "0.19.0", default-features = false, features = ["auto-initialize", "macros"] } +pyo3 = { version = "0.20.0", default-features = false, features = ["auto-initialize", "macros"] } serde_json = "1.0" maplit = "1.0.2" diff -Nru rust-pythonize-0.19.0/debian/cargo-checksum.json rust-pythonize-0.20.0/debian/cargo-checksum.json --- rust-pythonize-0.19.0/debian/cargo-checksum.json 2023-09-10 16:19:30.000000000 +0000 +++ rust-pythonize-0.20.0/debian/cargo-checksum.json 2024-01-20 22:43:14.000000000 +0000 @@ -1 +1 @@ -{"package":"8e35b716d430ace57e2d1b4afb51c9e5b7c46d2bce72926e07f9be6a98ced03e","files":{}} +{"package":"ffd1c3ef39c725d63db5f9bc455461bafd80540cb7824c61afb823501921a850","files":{}} diff -Nru rust-pythonize-0.19.0/debian/changelog rust-pythonize-0.20.0/debian/changelog --- rust-pythonize-0.19.0/debian/changelog 2023-09-10 16:19:30.000000000 +0000 +++ rust-pythonize-0.20.0/debian/changelog 2024-01-20 22:43:14.000000000 +0000 @@ -1,3 +1,10 @@ +rust-pythonize (0.20.0-1) unstable; urgency=medium + + [ Antonio Russo ] + * Package pythonize 0.20.0 from crates.io using debcargo 2.6.1 + + -- Jelmer Vernooij Sat, 20 Jan 2024 22:43:14 +0000 + rust-pythonize (0.19.0-1) unstable; urgency=medium * Package pythonize 0.19.0 from crates.io using debcargo 2.6.0 diff -Nru rust-pythonize-0.19.0/debian/control rust-pythonize-0.20.0/debian/control --- rust-pythonize-0.19.0/debian/control 2023-09-10 16:19:30.000000000 +0000 +++ rust-pythonize-0.20.0/debian/control 2024-01-20 22:43:14.000000000 +0000 @@ -6,12 +6,12 @@ cargo:native , rustc:native , libstd-rust-dev , - librust-pyo3-0.19-dev , + librust-pyo3-0.20-dev , librust-serde-1+std-dev Maintainer: Debian Rust Maintainers Uploaders: Antonio Russo -Standards-Version: 4.6.1 +Standards-Version: 4.6.2 Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/pythonize] Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/pythonize Homepage: https://github.com/davidhewitt/pythonize @@ -23,16 +23,15 @@ Multi-Arch: same Depends: ${misc:Depends}, - librust-pyo3-0.19-dev, + librust-pyo3-0.20-dev, librust-serde-1+std-dev Provides: librust-pythonize+default-dev (= ${binary:Version}), librust-pythonize-0-dev (= ${binary:Version}), librust-pythonize-0+default-dev (= ${binary:Version}), - librust-pythonize-0.19-dev (= ${binary:Version}), - librust-pythonize-0.19+default-dev (= ${binary:Version}), - librust-pythonize-0.19.0-dev (= ${binary:Version}), - librust-pythonize-0.19.0+default-dev (= ${binary:Version}) + librust-pythonize-0.20-dev (= ${binary:Version}), + librust-pythonize-0.20+default-dev (= ${binary:Version}), + librust-pythonize-0.20.0-dev (= ${binary:Version}), + librust-pythonize-0.20.0+default-dev (= ${binary:Version}) Description: Rust <-> Python interconnect using Serde and PyO3 - Rust source code - This package contains the source for the Rust pythonize crate, packaged by - debcargo for use with cargo and dh-cargo. + Source code for Debianized Rust crate "pythonize" diff -Nru rust-pythonize-0.19.0/debian/copyright.debcargo.hint rust-pythonize-0.20.0/debian/copyright.debcargo.hint --- rust-pythonize-0.19.0/debian/copyright.debcargo.hint 2023-09-10 16:19:30.000000000 +0000 +++ rust-pythonize-0.20.0/debian/copyright.debcargo.hint 2024-01-20 22:43:14.000000000 +0000 @@ -21,8 +21,8 @@ Files: debian/* Copyright: - 2023 Debian Rust Maintainers - 2023 Antonio Russo + 2023-2024 Debian Rust Maintainers + 2023-2024 Antonio Russo License: MIT License: MIT diff -Nru rust-pythonize-0.19.0/debian/tests/control rust-pythonize-0.20.0/debian/tests/control --- rust-pythonize-0.19.0/debian/tests/control 2023-09-10 16:19:30.000000000 +0000 +++ rust-pythonize-0.20.0/debian/tests/control 2024-01-20 22:43:14.000000000 +0000 @@ -1,14 +1,14 @@ -Test-Command: /usr/share/cargo/bin/cargo-auto-test pythonize 0.19.0 --all-targets --all-features +Test-Command: /usr/share/cargo/bin/cargo-auto-test pythonize 0.20.0 --all-targets --all-features Features: test-name=rust-pythonize:@ -Depends: dh-cargo (>= 18), librust-maplit-1+default-dev (>= 1.0.2-~~), librust-pyo3-0.19+auto-initialize-dev, librust-pyo3-0.19+macros-dev, librust-serde-1+derive-dev, librust-serde-json-1+default-dev, @ +Depends: dh-cargo (>= 18), librust-maplit-1+default-dev (>= 1.0.2-~~), librust-pyo3-0.20+auto-initialize-dev, librust-pyo3-0.20+macros-dev, librust-serde-1+derive-dev, librust-serde-json-1+default-dev, @ Restrictions: allow-stderr, skip-not-installable -Test-Command: /usr/share/cargo/bin/cargo-auto-test pythonize 0.19.0 --all-targets +Test-Command: /usr/share/cargo/bin/cargo-auto-test pythonize 0.20.0 --all-targets Features: test-name=librust-pythonize-dev:default -Depends: dh-cargo (>= 18), librust-maplit-1+default-dev (>= 1.0.2-~~), librust-pyo3-0.19+auto-initialize-dev, librust-pyo3-0.19+macros-dev, librust-serde-1+derive-dev, librust-serde-json-1+default-dev, @ +Depends: dh-cargo (>= 18), librust-maplit-1+default-dev (>= 1.0.2-~~), librust-pyo3-0.20+auto-initialize-dev, librust-pyo3-0.20+macros-dev, librust-serde-1+derive-dev, librust-serde-json-1+default-dev, @ Restrictions: allow-stderr, skip-not-installable -Test-Command: /usr/share/cargo/bin/cargo-auto-test pythonize 0.19.0 --all-targets --no-default-features +Test-Command: /usr/share/cargo/bin/cargo-auto-test pythonize 0.20.0 --all-targets --no-default-features Features: test-name=librust-pythonize-dev: -Depends: dh-cargo (>= 18), librust-maplit-1+default-dev (>= 1.0.2-~~), librust-pyo3-0.19+auto-initialize-dev, librust-pyo3-0.19+macros-dev, librust-serde-1+derive-dev, librust-serde-json-1+default-dev, @ +Depends: dh-cargo (>= 18), librust-maplit-1+default-dev (>= 1.0.2-~~), librust-pyo3-0.20+auto-initialize-dev, librust-pyo3-0.20+macros-dev, librust-serde-1+derive-dev, librust-serde-json-1+default-dev, @ Restrictions: allow-stderr, skip-not-installable diff -Nru rust-pythonize-0.19.0/src/de.rs rust-pythonize-0.20.0/src/de.rs --- rust-pythonize-0.19.0/src/de.rs 2006-07-24 01:21:28.000000000 +0000 +++ rust-pythonize-0.20.0/src/de.rs 2006-07-24 01:21:28.000000000 +0000 @@ -85,7 +85,7 @@ self.deserialize_tuple(obj.len()?, visitor) } else if obj.is_instance_of::() { self.deserialize_str(visitor) - } else if let Ok(_) = obj.downcast::() { + } else if obj.downcast::().is_ok() { self.deserialize_tuple(obj.len()?, visitor) } else if obj.downcast::().is_ok() { self.deserialize_map(visitor) @@ -258,7 +258,7 @@ .get_item(0)? .downcast() .map_err(|_| PythonizeError::dict_key_not_string())?; - let value = d.get_item(variant).unwrap(); + let value = d.get_item(variant)?.unwrap(); let mut de = Depythonizer::from_object(value); visitor.visit_enum(PyEnumAccess::new(&mut de, variant)) } else if item.is_instance_of::() { @@ -437,7 +437,7 @@ let locals = PyDict::new(py); py.run(&format!("obj = {}", code), None, Some(locals)) .unwrap(); - let obj = locals.get_item("obj").unwrap(); + let obj = locals.get_item("obj").unwrap().unwrap(); let actual: T = depythonize(obj).unwrap(); assert_eq!(&actual, expected); let actual_json: JsonValue = depythonize(obj).unwrap(); @@ -493,7 +493,7 @@ let locals = PyDict::new(py); py.run(&format!("obj = {}", code), None, Some(locals)) .unwrap(); - let obj = locals.get_item("obj").unwrap(); + let obj = locals.get_item("obj").unwrap().unwrap(); assert!(matches!( *depythonize::(obj).unwrap_err().inner, ErrorImpl::Message(msg) if msg == "missing field `bar`" @@ -523,7 +523,7 @@ let locals = PyDict::new(py); py.run(&format!("obj = {}", code), None, Some(locals)) .unwrap(); - let obj = locals.get_item("obj").unwrap(); + let obj = locals.get_item("obj").unwrap().unwrap(); assert!(matches!( *depythonize::(obj).unwrap_err().inner, ErrorImpl::IncorrectSequenceLength { expected, got } if expected == 2 && got == 3 diff -Nru rust-pythonize-0.19.0/src/ser.rs rust-pythonize-0.20.0/src/ser.rs --- rust-pythonize-0.19.0/src/ser.rs 2006-07-24 01:21:28.000000000 +0000 +++ rust-pythonize-0.20.0/src/ser.rs 2006-07-24 01:21:28.000000000 +0000 @@ -474,7 +474,7 @@ None, Some(locals), )?; - let result = locals.get_item("result").unwrap().extract::<&str>()?; + let result = locals.get_item("result")?.unwrap().extract::<&str>()?; assert_eq!(result, expected); assert_eq!(serde_json::to_string(&src).unwrap(), expected);