Skip to content

Commit 5e8ea2e

Browse files
committed
emscripten-test
1 parent d259287 commit 5e8ea2e

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ jobs:
8585

8686
clippy:
8787
# Don't run clippy on `main` because it's already run in the merge queue.
88-
if: github.ref != 'refs/heads/main'
88+
# if: github.ref != 'refs/heads/main'
89+
if: false
8990
needs: [fmt]
9091
runs-on: ${{ matrix.platform.os }}
9192
strategy:
@@ -176,7 +177,8 @@ jobs:
176177
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}
177178

178179
build-pr:
179-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-build-full') && github.event_name == 'pull_request' }}
180+
# if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-build-full') && github.event_name == 'pull_request' }}
181+
if: false
180182
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} rust-${{ matrix.rust }}
181183
needs: [fmt, resolve]
182184
uses: ./.github/workflows/build.yml
@@ -496,7 +498,7 @@ jobs:
496498

497499
emscripten:
498500
name: emscripten
499-
if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
501+
# if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}
500502
needs: [fmt]
501503
runs-on: ubuntu-latest
502504
steps:

guide/src/class.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,27 +1394,34 @@ impl pyo3::PyClass for MyClass {
13941394
type Frozen = pyo3::pyclass::boolean_struct::False;
13951395
}
13961396

1397-
impl<'a, 'py> pyo3::impl_::extract_argument::PyFunctionArgument<'a, 'py, false> for &'a MyClass
1397+
impl<'a, 'holder, 'py> ::pyo3::impl_::extract_argument::PyFunctionArgument<'a, 'holder, 'py, false> for &'holder MyClass
13981398
{
1399-
type Holder = ::std::option::Option<pyo3::PyRef<'py, MyClass>>;
1399+
type Holder = ::std::option::Option<::pyo3::PyClassGuard<'a, MyClass>>;
1400+
14001401
#[cfg(feature = "experimental-inspect")]
14011402
const INPUT_TYPE: &'static str = "MyClass";
1402-
1403+
14031404
#[inline]
1404-
fn extract(obj: &'a pyo3::Bound<'py, PyAny>, holder: &'a mut Self::Holder) -> pyo3::PyResult<Self> {
1405-
pyo3::impl_::extract_argument::extract_pyclass_ref(obj, holder)
1405+
fn extract(
1406+
obj: &'a ::pyo3::Bound<'py, ::pyo3::PyAny>,
1407+
holder: &'holder mut Self::Holder,
1408+
) -> ::pyo3::PyResult<Self> {
1409+
::pyo3::impl_::extract_argument::extract_pyclass_ref(obj, holder)
14061410
}
14071411
}
1408-
1409-
impl<'a, 'py> pyo3::impl_::extract_argument::PyFunctionArgument<'a, 'py, false> for &'a mut MyClass
1412+
impl<'a, 'holder, 'py> ::pyo3::impl_::extract_argument::PyFunctionArgument<'a, 'holder, 'py, false> for &'holder mut MyClass
14101413
{
1411-
type Holder = ::std::option::Option<pyo3::PyRefMut<'py, MyClass>>;
1414+
type Holder = ::std::option::Option<::pyo3::PyClassGuardMut<'a, MyClass>>;
1415+
14121416
#[cfg(feature = "experimental-inspect")]
14131417
const INPUT_TYPE: &'static str = "MyClass";
1414-
1418+
14151419
#[inline]
1416-
fn extract(obj: &'a pyo3::Bound<'py, PyAny>, holder: &'a mut Self::Holder) -> pyo3::PyResult<Self> {
1417-
pyo3::impl_::extract_argument::extract_pyclass_ref_mut(obj, holder)
1420+
fn extract(
1421+
obj: &'a ::pyo3::Bound<'py, ::pyo3::PyAny>,
1422+
holder: &'holder mut Self::Holder,
1423+
) -> ::pyo3::PyResult<Self> {
1424+
::pyo3::impl_::extract_argument::extract_pyclass_ref_mut(obj, holder)
14181425
}
14191426
}
14201427

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def test_emscripten(session: nox.Session):
437437
session,
438438
"bash",
439439
"-c",
440-
f"source {info.builddir / 'emsdk/emsdk_env.sh'} && cargo test",
440+
f"source {info.builddir / 'emsdk/emsdk_env.sh'} && cargo test -F experimental-inspect",
441441
)
442442

443443

0 commit comments

Comments
 (0)