mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
fix: nicer stack level for warning (#4516)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
parent
6a5e6007cd
commit
68211d41c1
@ -175,7 +175,7 @@ class Pybind11Extension(_Extension): # type: ignore[misc]
|
||||
def cxx_std(self, level: int) -> None:
|
||||
if self._cxx_level:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user