mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
fix: nicer stack level for warning (#4516)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
parent
9a1eeed03a
commit
f5cff4f25e
@ -175,7 +175,7 @@ class Pybind11Extension(_Extension): # type: ignore[misc]
|
|||||||
def cxx_std(self, level: int) -> None:
|
def cxx_std(self, level: int) -> None:
|
||||||
if self._cxx_level:
|
if self._cxx_level:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"You cannot safely change the cxx_level after setting it!", stacklevel=1
|
"You cannot safely change the cxx_level after setting it!", stacklevel=2
|
||||||
)
|
)
|
||||||
|
|
||||||
# MSVC 2015 Update 3 and later only have 14 (and later 17) modes, so
|
# MSVC 2015 Update 3 and later only have 14 (and later 17) modes, so
|
||||||
|
Loading…
Reference in New Issue
Block a user