-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
range expects an int in argument, but gets a float in enable/kiva/agg/freetype2/src/tools/docmaker/tohtml.py #396
Labels
ETS Backlog
Good issue for ETS team members to look at
Comments
pbrod
added a commit
to pbrod/enable
that referenced
this issue
Mar 26, 2020
…ontext.draw_image method Fixes enthought#396 Made sure rows and columns are integers by replacing "/" with "//" in kiva/agg/freetype2/src/tools/docmaker/tohtml.py Fixes enthought#400 Made the test examples run on windows and using wx: * Replaced deprecated "wx.EVT_XXX(panel, handler)" with "panel.Bind(wx.EVT_XXX, handler)" in rgba_color_editor.py * Replaced faulty "slider.SetTickFreq( 10, 1 )" with "slider.SetTickFreq(10)" in rgba_color_editor.py * Fixed the failing ToolkitEditorFactory.all_facenames method in kiva_font_editor.py * Replaced deprecated wx.PyPanel with wx.Panel * Insulated the xxxtrait.configure_traits() call inside a "if __name__ == '__main__'" block * Added the "demo = XXXtrait()" to each demo-script so it can be discovered and run by the traitsui.extra.demo.demo. * Changed "from enable.wx_backend import Window" to "from enable.api import Window" and moved all imports to the top of the file. * Replaced call to wx.SystemSettings_GetMetric with wx.SystemSettings.GetMetric * Replaced call to deprecated wx.EVT_XXXX( control, self._on_XXXX) with control.Bind(wx.EVT_ERASE_BACKGROUND, self._on_XXXXX) * Fixed a bug in BaseWindow._create_control: If parent is None it is set to wx.Frame(None) in order to avoid crash in the unittests. * Replaced wx.WXK_PRIOR and wx.WXK_NEXT (which does not exist on wxpython4) with wx.WXK_PAGEUP and wx.WXK_PAGEDOWN Fixes enthought#399 replaced: * wx.GraphicsRenderer_GetDefaultRenderer with wx.GraphicsRenderer.GetDefaultRenderer * wx.GraphicsContext_Create with wx.GraphicsContext.Create Fixed failing examples: * examples/kiva/agg/benchmark.py (Float -> float, added missing import of zeros) * examples/kiva/agg/polygon_hit_test.py (point_in_polygon -> points_in_polygon) * examples/kiva/gradient.py (added missing import of tempfile) Moved code in 'if __name___ == "__main__"' block in benchmark.py to the run_all_benchmarks function. Removed unused stuff: * Removed unused import of "FILL_STROKE" in examples/kiva/agg/compiled_path.py * Removed unused import of "affine", "constants" in examples/kiva/agg/dummy.py * Removed unused ttfdict_to_fnames function in font_manager.py * Removed unused import of "sqrt" and "affine" in enable/savage/svr/backends/kiva/renderer.py Replaced call to deprecated time.clock with time.perf_counter on Python 3 in: * examples/kiva/agg/benchmark.py * examples/kiva/agg/dash.py * examples/kiva/agg/lion.py * examples/kiva/agg/pylygon_hit_test.py * examples/kiva/agg/simple_clip.py * examples/kiva/agg/text_ex.py * examples/kiva/simple.py * examples/kiva/test_image3.py Fixes enthought#395 * Replaced dangerous default value "transforms=[]" with "transforms=None" in __init__ methods. Python style fixes.
pbrod
added a commit
to pbrod/enable
that referenced
this issue
Mar 26, 2020
…d tests to expected failure. Also removed unused import of "allclose" and "nose". Made wx.VERSION comparison more robust in enable/savage/svg/backends/wx/renderer.py and enable/wx/base_window.py. Fixes enthought#393 Added self as first argument to AbstractGraphicsContext.draw_image method Fixes enthought#396 Made sure rows and columns are integers by replacing "/" with "//" in kiva/agg/freetype2/src/tools/docmaker/tohtml.py Fixes enthought#400 Made the test examples run on windows and using wx: * Replaced deprecated "wx.EVT_XXX(panel, handler)" with "panel.Bind(wx.EVT_XXX, handler)" in rgba_color_editor.py * Replaced faulty "slider.SetTickFreq( 10, 1 )" with "slider.SetTickFreq(10)" in rgba_color_editor.py * Fixed the failing ToolkitEditorFactory.all_facenames method in kiva_font_editor.py * Replaced deprecated wx.PyPanel with wx.Panel * Insulated the xxxtrait.configure_traits() call inside a "if __name__ == '__main__'" block * Added the "demo = XXXtrait()" to each demo-script so it can be discovered and run by the traitsui.extra.demo.demo. * Changed "from enable.wx_backend import Window" to "from enable.api import Window" and moved all imports to the top of the file. * Replaced call to wx.SystemSettings_GetMetric with wx.SystemSettings.GetMetric * Replaced call to deprecated wx.EVT_XXXX( control, self._on_XXXX) with control.Bind(wx.EVT_ERASE_BACKGROUND, self._on_XXXXX) * Fixed a bug in BaseWindow._create_control: If parent is None it is set to wx.Frame(None) in order to avoid crash in the unittests. * Replaced wx.WXK_PRIOR and wx.WXK_NEXT (which does not exist on wxpython4) with wx.WXK_PAGEUP and wx.WXK_PAGEDOWN Fixes enthought#399 replaced: * wx.GraphicsRenderer_GetDefaultRenderer with wx.GraphicsRenderer.GetDefaultRenderer * wx.GraphicsContext_Create with wx.GraphicsContext.Create Fixed failing examples: * examples/kiva/agg/benchmark.py (Float -> float, added missing import of zeros) * examples/kiva/agg/polygon_hit_test.py (point_in_polygon -> points_in_polygon) * examples/kiva/gradient.py (added missing import of tempfile) Moved code in 'if __name___ == "__main__"' block in benchmark.py to the run_all_benchmarks function. Removed unused stuff: * Removed unused import of "FILL_STROKE" in examples/kiva/agg/compiled_path.py * Removed unused import of "affine", "constants" in examples/kiva/agg/dummy.py * Removed unused ttfdict_to_fnames function in font_manager.py * Removed unused import of "sqrt" and "affine" in enable/savage/svr/backends/kiva/renderer.py Replaced call to deprecated time.clock with time.perf_counter on Python 3 in: * examples/kiva/agg/benchmark.py * examples/kiva/agg/dash.py * examples/kiva/agg/lion.py * examples/kiva/agg/pylygon_hit_test.py * examples/kiva/agg/simple_clip.py * examples/kiva/agg/text_ex.py * examples/kiva/simple.py * examples/kiva/test_image3.py Fixes enthought#395 * Replaced dangerous default value "transforms=[]" with "transforms=None" in __init__ methods. Python style fixes.
pbrod
added a commit
to pbrod/enable
that referenced
this issue
Mar 26, 2020
…d tests to expected failure. Also removed unused import of "allclose" and "nose". Made wx.VERSION comparison more robust in enable/savage/svg/backends/wx/renderer.py and enable/wx/base_window.py. Fixes enthought#393 Added self as first argument to AbstractGraphicsContext.draw_image method Fixes enthought#396 Made sure rows and columns are integers by replacing "/" with "//" in kiva/agg/freetype2/src/tools/docmaker/tohtml.py Fixes enthought#400 Made the test examples run on windows and using wx: * Replaced deprecated "wx.EVT_XXX(panel, handler)" with "panel.Bind(wx.EVT_XXX, handler)" in rgba_color_editor.py * Replaced faulty "slider.SetTickFreq( 10, 1 )" with "slider.SetTickFreq(10)" in rgba_color_editor.py * Fixed the failing ToolkitEditorFactory.all_facenames method in kiva_font_editor.py * Replaced deprecated wx.PyPanel with wx.Panel * Insulated the xxxtrait.configure_traits() call inside a "if __name__ == '__main__'" block * Added the "demo = XXXtrait()" to each demo-script so it can be discovered and run by the traitsui.extra.demo.demo. * Changed "from enable.wx_backend import Window" to "from enable.api import Window" and moved all imports to the top of the file. * Replaced call to wx.SystemSettings_GetMetric with wx.SystemSettings.GetMetric * Replaced call to deprecated wx.EVT_XXXX( control, self._on_XXXX) with control.Bind(wx.EVT_ERASE_BACKGROUND, self._on_XXXXX) * Fixed a bug in BaseWindow._create_control: If parent is None it is set to wx.Frame(None) in order to avoid crash in the unittests. * Replaced wx.WXK_PRIOR and wx.WXK_NEXT (which does not exist on wxpython4) with wx.WXK_PAGEUP and wx.WXK_PAGEDOWN Fixes enthought#399 replaced: * wx.GraphicsRenderer_GetDefaultRenderer with wx.GraphicsRenderer.GetDefaultRenderer * wx.GraphicsContext_Create with wx.GraphicsContext.Create Fixed failing examples: * examples/kiva/agg/benchmark.py (Float -> float, added missing import of zeros) * examples/kiva/agg/polygon_hit_test.py (point_in_polygon -> points_in_polygon) * examples/kiva/gradient.py (added missing import of tempfile) Moved code in 'if __name___ == "__main__"' block in benchmark.py to the run_all_benchmarks function. Removed unused stuff: * Removed unused import of "FILL_STROKE" in examples/kiva/agg/compiled_path.py * Removed unused import of "affine", "constants" in examples/kiva/agg/dummy.py * Removed unused ttfdict_to_fnames function in font_manager.py * Removed unused import of "sqrt" and "affine" in enable/savage/svr/backends/kiva/renderer.py Replaced call to deprecated time.clock with time.perf_counter on Python 3 in: * examples/kiva/agg/benchmark.py * examples/kiva/agg/dash.py * examples/kiva/agg/lion.py * examples/kiva/agg/pylygon_hit_test.py * examples/kiva/agg/simple_clip.py * examples/kiva/agg/text_ex.py * examples/kiva/simple.py * examples/kiva/test_image3.py Fixes enthought#395 * Replaced dangerous default value "transforms=[]" with "transforms=None" in __init__ methods. Python style fixes.
@jwiggins you mentioned in PR #457 that the relevant file here is vendored code. you also mentioned in this comment: #401 (comment) some fixes were explicitly avoided which seems to include a fix to this issue. Should we simply close this issue then? |
Closing. This is vendored code. |
For reference, the particular |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
range expects an int in argument on line 521, but gets float from non-floor division (change to // for floor division in Python 3 otherwise it will crash on passing a float):
enable/kiva/agg/freetype2/src/tools/docmaker/tohtml.py
Lines 512 to 522 in 6cf525c
The text was updated successfully, but these errors were encountered: