Marcus von Appen  committed 7a35cc4

- changed the warnings type of optional or non-existent functions to ImportWarning to reduce the noise.

  • Participants
  • Parent commits ef55e76
  • Branches default

Comments (0)

Files changed (2)

File doc/integration.rst

    can also change the ``os.getenv("PYSDL2_DLL_PATH")`` query within the
    *sdl2/* (or *sdl2/*, *sdl2/*, *sdl2/*)
    file to point to the directory, in which you keep the DLL.
+Using different SDL2 versions
+PySDL2 tries to provide interfaces to the most recent versions of the
+SDL2 libraries. Sometimes this means that PySDL2 tries to test for
+functions that might not be available for your very own project or that
+are not available on the target system due to an version of the specific
+library. To check, if the SDL2 libraries do not provide certain
+functions, you can enable the specific warnings for them.
+>>> python -W"module"::ImportWarning:sdl2.dll
         """Binds the passed argument and return value types to the specified
         func = getattr(self._dll, funcname, None)
+        warnings.warn\
+            ("function '%s' not found in %r, using replacement" %
+             (funcname, self._dll), ImportWarning)
         if not func:
             if optfunc: