podgorskiy / bimpy

imgui for python
https://podgorskiy.github.io/bimpy/
MIT License
202 stars 33 forks source link

DeprecationWarning with Python 3.8 #22

Closed deepakg closed 3 years ago

deepakg commented 4 years ago

Firstly, thanks for creating Bimpy. I am enjoying working with it, especially because how simple you've made it to work with images. I am trying bimpy with Python 3.8 and get the following warning:

bimpy_minimal.py:10: DeprecationWarning: an integer is required (got type _bimpy.Condition).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  bimpy.set_next_window_pos(bimpy.Vec2(20, 20), bimpy.Condition.Once)
bimpy_minimal.py:11: DeprecationWarning: an integer is required (got type _bimpy.WindowFlags).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  bimpy.begin("Hello World")

Here is what bimpy_minimal.py looks like:

import bimpy

ctx = bimpy.Context()
ctx.init(1200,768, "Hello bimpy!")

while(not ctx.should_close()):
    with ctx:
        # bimpy.themes.set_light_theme()
        bimpy.set_next_window_pos(bimpy.Vec2(20, 20), bimpy.Condition.Once)
        bimpy.begin("Hello World")
        bimpy.end()
CaiusTSM commented 3 years ago

Bump.

222464 commented 3 years ago

Building from source fixes this - the version on pypi is outdated. @podgorskiy can you update it?

podgorskiy commented 3 years ago

Fixed in https://github.com/pybind/pybind11/commit/31680e6f9c1bbe582bc36d457f8e010121ff16bb Will update pypi version soon

podgorskiy commented 3 years ago

I uploaded the wheels, should be fixed now