class_docstr: Object returned by the ``monkeypatch`` fixture keeping a record of setattr/item/env/syspath changes.
      
class_docstr_tok: ["Object","returned","by","the","``","monkeypatch","``","fixture","keeping","a","record","of","setattr\/item\/env\/syspath","changes","."]
docstr: On Python 2, warn if the given environment variable name is not a native str (#4056)
docstr_tok: ["On","Python","2",",","warn","if","the","given","environment","variable","name","is","not","a","native","str","(","#","4056",")"]
code: def _warn_if_env_name_is_not_str(self, name):
      """On Python 2, warn if the given environment variable name is not a native str (#4056)"""
      if six.PY2 and not isinstance(name, str):
          warnings.warn(
              pytest.PytestWarning(
                  "Environment variable name {!r} should be str".format(
                      name
                  )
              )
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import re
  import sys
  import warnings
  from contextlib import contextmanager
  import six
  import pytest
  from _pytest.fixtures import fixture
  from _pytest.pathlib import Path
label_desc: Use image node_id 7 for calling the MonkeyPatch obj's underlying member method code with example usage: obj._warn_if_env_name_is_not_str(name) without return types