Hello community, here is the log from the commit of package python-pyglet for openSUSE:Factory checked in at 2018-06-29 22:26:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyglet (Old) and /work/SRC/openSUSE:Factory/.python-pyglet.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyglet" Fri Jun 29 22:26:39 2018 rev:5 rq:616887 version:1.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyglet/python-pyglet.changes 2018-02-19 13:00:58.786051430 +0100 +++ /work/SRC/openSUSE:Factory/.python-pyglet.new/python-pyglet.changes 2018-06-29 22:26:41.074470721 +0200 @@ -1,0 +2,11 @@ +Thu Jun 14 13:35:30 UTC 2018 - [email protected] + +- Update to version 1.3.2 + * #158 Fix mouse events in mouse exclusive mode on Windows. + * #105 Crashes in PulseAudio; + * #163 Workaround for running inside Spyder; + * #45 Expose viewport size for use on HiDPI screens; + * #15 Respect keyboard layout on macOS; +- Remove broken tests + +------------------------------------------------------------------- Old: ---- pyglet-1.3.1.tar.gz New: ---- pyglet-1.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyglet.spec ++++++ --- /var/tmp/diff_new_pack.PRxzIm/_old 2018-06-29 22:26:41.558470356 +0200 +++ /var/tmp/diff_new_pack.PRxzIm/_new 2018-06-29 22:26:41.558470356 +0200 @@ -17,11 +17,8 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define X_display ":98" -# TODO: Can't get display working with glx -%bcond_with test Name: python-pyglet -Version: 1.3.1 +Version: 1.3.2 Release: 0 Summary: Windowing and multimedia library License: BSD-3-Clause @@ -45,11 +42,6 @@ BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(x11) -%if %{with test} -BuildRequires: %{python_module pytest} -BuildRequires: config(Mesa) -BuildRequires: xorg-x11-server -%endif Requires: alsa-devel Requires: fontconfig-devel Requires: freetype2-devel @@ -90,18 +82,6 @@ %fdupes %{buildroot}%{$python_sitelib} } -%if %{with test} -%check -############################################# -### Launch a virtual framebuffer X server ### -############################################# -export DISPLAY=%{X_display} - vfb %{X_display} >& Xvfb.log & -trap "kill $! || true" EXIT -sleep 10 -%python_expand py.test-%{$python_bin_suffix} -%endif - %files %{python_files} %defattr(-,root,root,-) %doc LICENSE NOTICE README RELEASE_NOTES ++++++ pyglet-1.3.1.tar.gz -> pyglet-1.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/PKG-INFO new/pyglet-1.3.2/PKG-INFO --- old/pyglet-1.3.1/PKG-INFO 2018-02-05 15:04:31.000000000 +0100 +++ new/pyglet-1.3.2/PKG-INFO 2018-04-13 16:55:08.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyglet -Version: 1.3.1 +Version: 1.3.2 Summary: Cross-platform windowing and multimedia library Home-page: http://pyglet.readthedocs.org/en/latest/ Author: Alex Holkner @@ -26,5 +26,6 @@ Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 Classifier: Topic :: Games/Entertainment Classifier: Topic :: Software Development :: Libraries :: Python Modules diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/RELEASE_NOTES new/pyglet-1.3.2/RELEASE_NOTES --- old/pyglet-1.3.1/RELEASE_NOTES 2018-02-05 15:03:53.000000000 +0100 +++ new/pyglet-1.3.2/RELEASE_NOTES 2018-04-13 16:54:45.000000000 +0200 @@ -1,3 +1,16 @@ +Pyglet 1.3.2 +============ +Bugfix release. + +Bugfixes +-------- +- #154 Caret issues. +- #158 Additional fixes. +- #167 IndexedVertexDomains with non-1 primcount will now draw correctly on 64bit OSs. +- #168 Compatibility with python 3.7. +- #169 [Windows] window.flip too slow. +- #170 NameError: name 'PUINT' is not defined. + Pyglet 1.3.1 ============ Bugfix release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/examples/text_input.py new/pyglet-1.3.2/examples/text_input.py --- old/pyglet-1.3.1/examples/text_input.py 2018-02-05 15:03:40.000000000 +0100 +++ new/pyglet-1.3.2/examples/text_input.py 2018-04-13 16:54:45.000000000 +0200 @@ -132,6 +132,9 @@ pyglet.app.exit() def set_focus(self, focus): + if focus is self.focus: + return + if self.focus: self.focus.caret.visible = False self.focus.caret.mark = self.focus.caret.position = 0 @@ -139,8 +142,6 @@ self.focus = focus if self.focus: self.focus.caret.visible = True - self.focus.caret.mark = 0 - self.focus.caret.position = len(self.focus.document.text) window = Window(resizable=True) pyglet.app.run() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet/__init__.py new/pyglet-1.3.2/pyglet/__init__.py --- old/pyglet-1.3.1/pyglet/__init__.py 2018-02-05 15:03:53.000000000 +0100 +++ new/pyglet-1.3.2/pyglet/__init__.py 2018-04-13 16:54:45.000000000 +0200 @@ -81,7 +81,7 @@ #: >>> parse_version(pyglet.version) >= parse_version('1.1') #: True #: -version = '1.3.1' +version = '1.3.2' # Pyglet platform treats *BSD systems as Linux compat_platform = sys.platform diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet/gl/win32.py new/pyglet-1.3.2/pyglet/gl/win32.py --- old/pyglet-1.3.1/pyglet/gl/win32.py 2018-02-05 15:03:40.000000000 +0100 +++ new/pyglet-1.3.2/pyglet/gl/win32.py 2018-04-13 16:54:33.000000000 +0200 @@ -223,7 +223,7 @@ super(Win32Context, self).detach() def flip(self): - wgl.wglSwapLayerBuffers(self.canvas.hdc, wgl.WGL_SWAP_MAIN_PLANE) + _gdi32.SwapBuffers(self.canvas.hdc) def get_vsync(self): if wgl_info.have_extension('WGL_EXT_swap_control'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet/graphics/vertexdomain.py new/pyglet-1.3.2/pyglet/graphics/vertexdomain.py --- old/pyglet-1.3.1/pyglet/graphics/vertexdomain.py 2018-02-05 15:03:40.000000000 +0100 +++ new/pyglet-1.3.2/pyglet/graphics/vertexdomain.py 2018-04-13 16:54:45.000000000 +0200 @@ -749,10 +749,9 @@ self.index_buffer.ptr + starts[0]) elif gl_info.have_version(1, 4): starts = [s * self.index_element_size + self.index_buffer.ptr for s in starts] - starts = ctypes.cast((GLuint * primcount)(*starts), ctypes.POINTER(ctypes.c_void_p)) + starts = (ctypes.POINTER(GLvoid) * primcount)(*(GLintptr * primcount)(*starts)) sizes = (GLsizei * primcount)(*sizes) - glMultiDrawElements(mode, sizes, GL_UNSIGNED_INT, starts, - primcount) + glMultiDrawElements(mode, sizes, self.index_gl_type, starts, primcount) else: for start, size in zip(starts, sizes): glDrawElements(mode, size, self.index_gl_type, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet/libs/win32/__init__.py new/pyglet-1.3.2/pyglet/libs/win32/__init__.py --- old/pyglet-1.3.1/pyglet/libs/win32/__init__.py 2018-02-05 15:03:53.000000000 +0100 +++ new/pyglet-1.3.2/pyglet/libs/win32/__init__.py 2018-04-13 16:54:45.000000000 +0200 @@ -26,12 +26,12 @@ def format_error(err): msg = create_string_buffer(256) _FormatMessageA(constants.FORMAT_MESSAGE_FROM_SYSTEM, - c_void_p(), - err, - 0, - msg, - len(msg), - c_void_p()) + c_void_p(), + err, + 0, + msg, + len(msg), + c_void_p()) return msg.value class DebugLibrary(object): @@ -40,6 +40,7 @@ def __getattr__(self, name): fn = getattr(self.lib, name) + def f(*args): _SetLastError(0) result = fn(*args) @@ -49,6 +50,7 @@ _log_win32.write(entry) print(format_error(err), file=_log_win32) return result + return f else: DebugLibrary = lambda lib: lib @@ -101,6 +103,8 @@ _gdi32.SetPixelFormat.argtypes = [HDC, c_int, POINTER(PIXELFORMATDESCRIPTOR)] _gdi32.SetTextColor.restype = COLORREF _gdi32.SetTextColor.argtypes = [HDC, COLORREF] +_gdi32.SwapBuffers.restype = BOOL +_gdi32.SwapBuffers.argtypes = [HDC] _kernel32.CloseHandle.restype = BOOL _kernel32.CloseHandle.argtypes = [HANDLE] @@ -230,7 +234,7 @@ _user32.UnregisterClassW.argtypes = [c_wchar_p, HINSTANCE] _user32.UnregisterHotKey.restype = BOOL _user32.UnregisterHotKey.argtypes = [HWND, c_int] -#Raw inputs +# Raw inputs _user32.RegisterRawInputDevices.restype = BOOL _user32.RegisterRawInputDevices.argtypes = [PCRAWINPUTDEVICE, UINT, UINT] _user32.GetRawInputData.restype = UINT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet/libs/win32/types.py new/pyglet-1.3.2/pyglet/libs/win32/types.py --- old/pyglet-1.3.1/pyglet/libs/win32/types.py 2018-02-05 15:03:40.000000000 +0100 +++ new/pyglet-1.3.2/pyglet/libs/win32/types.py 2018-04-13 16:54:33.000000000 +0200 @@ -32,12 +32,13 @@ # POSSIBILITY OF SUCH DAMAGE. # ---------------------------------------------------------------------------- -''' -''' +""" +""" __docformat__ = 'restructuredtext' __version__ = '$Id: $' +import sys import ctypes from ctypes import * from ctypes.wintypes import * @@ -56,6 +57,11 @@ del _int_types +# PUINT is defined only from >= python 3.2 +if sys.version_info < (3, 2)[:2]: + PUINT = POINTER(UINT) + + class c_void(Structure): # c_void_p is a buggy return type, converting to int, so # POINTER(None) == c_void_p is actually written as @@ -78,6 +84,7 @@ return p + c_void_p = POINTER_(c_void) INT = c_int LPVOID = c_void_p @@ -104,6 +111,7 @@ TIMERAPCPROC = WINFUNCTYPE(None, PVOID, DWORD, DWORD) MONITORENUMPROC = WINFUNCTYPE(BOOL, HMONITOR, HDC, LPRECT, LPARAM) + def MAKEINTRESOURCE(i): return cast(ctypes.c_void_p(i & 0xFFFF), c_wchar_p) @@ -122,6 +130,7 @@ ('lpszClassName', c_wchar_p) ] + class SECURITY_ATTRIBUTES(Structure): _fields_ = [ ("nLength", DWORD), @@ -130,6 +139,7 @@ ] __slots__ = [f[0] for f in _fields_] + class PIXELFORMATDESCRIPTOR(Structure): _fields_ = [ ('nSize', WORD), @@ -160,6 +170,7 @@ ('dwDamageMask', DWORD) ] + class RGBQUAD(Structure): _fields_ = [ ('rgbBlue', BYTE), @@ -169,6 +180,7 @@ ] __slots__ = [f[0] for f in _fields_] + class CIEXYZ(Structure): _fields_ = [ ('ciexyzX', DWORD), @@ -177,6 +189,7 @@ ] __slots__ = [f[0] for f in _fields_] + class CIEXYZTRIPLE(Structure): _fields_ = [ ('ciexyzRed', CIEXYZ), @@ -185,6 +198,7 @@ ] __slots__ = [f[0] for f in _fields_] + class BITMAPINFOHEADER(Structure): _fields_ = [ ('biSize', DWORD), @@ -200,6 +214,7 @@ ('biClrImportant', DWORD), ] + class BITMAPV5HEADER(Structure): _fields_ = [ ('bV5Size', DWORD), @@ -228,6 +243,7 @@ ('bV5Reserved', DWORD), ] + class BITMAPINFO(Structure): _fields_ = [ ('bmiHeader', BITMAPINFOHEADER), @@ -235,6 +251,7 @@ ] __slots__ = [f[0] for f in _fields_] + class LOGFONT(Structure): _fields_ = [ ('lfHeight', LONG), @@ -253,6 +270,7 @@ ('lfFaceName', (c_char * LF_FACESIZE)) # Use ASCII ] + class TRACKMOUSEEVENT(Structure): _fields_ = [ ('cbSize', DWORD), @@ -262,6 +280,7 @@ ] __slots__ = [f[0] for f in _fields_] + class MINMAXINFO(Structure): _fields_ = [ ('ptReserved', POINT), @@ -272,6 +291,7 @@ ] __slots__ = [f[0] for f in _fields_] + class ABC(Structure): _fields_ = [ ('abcA', c_int), @@ -280,6 +300,7 @@ ] __slots__ = [f[0] for f in _fields_] + class TEXTMETRIC(Structure): _fields_ = [ ('tmHeight', c_long), @@ -305,6 +326,7 @@ ] __slots__ = [f[0] for f in _fields_] + class MONITORINFOEX(Structure): _fields_ = [ ('cbSize', DWORD), @@ -315,6 +337,7 @@ ] __slots__ = [f[0] for f in _fields_] + class DEVMODE(Structure): _fields_ = [ ('dmDeviceName', BCHAR * CCHDEVICENAME), @@ -354,6 +377,7 @@ ('dmPanningHeight', DWORD), ] + class ICONINFO(Structure): _fields_ = [ ('fIcon', BOOL), @@ -364,6 +388,7 @@ ] __slots__ = [f[0] for f in _fields_] + class RAWINPUTDEVICE(Structure): _fields_ = [ ('usUsagePage', USHORT), @@ -372,9 +397,11 @@ ('hwndTarget', HWND) ] + PCRAWINPUTDEVICE = POINTER(RAWINPUTDEVICE) HRAWINPUT = HANDLE + class RAWINPUTHEADER(Structure): _fields_ = [ ('dwType', DWORD), @@ -383,12 +410,14 @@ ('wParam', WPARAM), ] + class _Buttons(Structure): _fields_ = [ ('usButtonFlags', USHORT), ('usButtonData', USHORT), ] + class _U(Union): _anonymous_ = ('_buttons',) _fields_ = [ @@ -396,6 +425,7 @@ ('_buttons', _Buttons), ] + class RAWMOUSE(Structure): _anonymous_ = ('u',) _fields_ = [ @@ -407,6 +437,7 @@ ('ulExtraInformation', ULONG), ] + class RAWKEYBOARD(Structure): _fields_ = [ ('MakeCode', USHORT), @@ -417,6 +448,7 @@ ('ExtraInformation', ULONG), ] + class RAWHID(Structure): _fields_ = [ ('dwSizeHid', DWORD), @@ -424,6 +456,7 @@ ('bRawData', POINTER(BYTE)), ] + class _RAWINPUTDEVICEUNION(Union): _fields_ = [ ('mouse', RAWMOUSE), @@ -431,6 +464,7 @@ ('hid', RAWHID), ] + class RAWINPUT(Structure): _fields_ = [ ('header', RAWINPUTHEADER), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet/text/layout.py new/pyglet-1.3.2/pyglet/text/layout.py --- old/pyglet-1.3.1/pyglet/text/layout.py 2018-02-05 15:03:53.000000000 +0100 +++ new/pyglet-1.3.2/pyglet/text/layout.py 2018-04-13 16:54:45.000000000 +0200 @@ -1263,12 +1263,18 @@ if new_paragraph: line.paragraph_end = True yield line - line = _Line(next_start) - line.align = align_iterator[next_start] - line.margin_left = self._parse_distance( - margin_left_iterator[next_start]) - line.margin_right = self._parse_distance( - margin_right_iterator[next_start]) + try: + line = _Line(next_start) + line.align = align_iterator[next_start] + line.margin_left = self._parse_distance( + margin_left_iterator[next_start]) + line.margin_right = self._parse_distance( + margin_right_iterator[next_start]) + except IndexError: + # XXX This used to throw StopIteration in some cases, causing the + # final part of this method not to be executed. Refactoring + # required to fix this + return if new_paragraph: line.paragraph_begin = True @@ -2400,6 +2406,9 @@ line = self.lines[line] x -= self.top_group.translate_x + if x < line.x: + return line.start + position = line.start last_glyph_x = line.x for box in line.boxes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet/text/runlist.py new/pyglet-1.3.2/pyglet/text/runlist.py --- old/pyglet-1.3.1/pyglet/text/runlist.py 2018-02-05 15:03:40.000000000 +0100 +++ new/pyglet-1.3.2/pyglet/text/runlist.py 2018-04-13 16:54:33.000000000 +0200 @@ -223,7 +223,7 @@ if index == i: return self.runs[-1].value - assert False, 'Index not in range' + raise IndexError def __repr__(self): return str(list(self)) @@ -296,18 +296,24 @@ return next(self._run_list_iter) def __getitem__(self, index): - while index >= self.end and index > self.start: - # condition has special case for 0-length run (fixes issue 471) - self.start, self.end, self.value = next(self) - return self.value + try: + while index >= self.end and index > self.start: + # condition has special case for 0-length run (fixes issue 471) + self.start, self.end, self.value = next(self) + return self.value + except StopIteration: + raise IndexError def ranges(self, start, end): - while start >= self.end: - self.start, self.end, self.value = next(self) - yield start, min(self.end, end), self.value - while end > self.end: - self.start, self.end, self.value = next(self) - yield self.start, min(self.end, end), self.value + try: + while start >= self.end: + self.start, self.end, self.value = next(self) + yield start, min(self.end, end), self.value + while end > self.end: + self.start, self.end, self.value = next(self) + yield self.start, min(self.end, end), self.value + except StopIteration: + return class OverriddenRunIterator(AbstractRunIterator): '''Iterator over a `RunIterator`, with a value temporarily replacing @@ -394,18 +400,21 @@ self.range_iterators = range_iterators def ranges(self, start, end): - iterators = [i.ranges(start, end) for i in self.range_iterators] - starts, ends, values = zip(*[next(i) for i in iterators]) - starts = list(starts) - ends = list(ends) - values = list(values) - while start < end: - min_end = min(ends) - yield start, min_end, values - start = min_end - for i, iterator in enumerate(iterators): - if ends[i] == min_end: - starts[i], ends[i], values[i] = next(iterator) + try: + iterators = [i.ranges(start, end) for i in self.range_iterators] + starts, ends, values = zip(*[next(i) for i in iterators]) + starts = list(starts) + ends = list(ends) + values = list(values) + while start < end: + min_end = min(ends) + yield start, min_end, values + start = min_end + for i, iterator in enumerate(iterators): + if ends[i] == min_end: + starts[i], ends[i], values[i] = next(iterator) + except StopIteration: + return def __getitem__(self, index): return [i[index] for i in self.range_iterators] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet/window/win32/__init__.py new/pyglet-1.3.2/pyglet/window/win32/__init__.py --- old/pyglet-1.3.1/pyglet/window/win32/__init__.py 2018-02-05 15:03:40.000000000 +0100 +++ new/pyglet-1.3.2/pyglet/window/win32/__init__.py 2018-04-13 16:54:45.000000000 +0200 @@ -437,7 +437,7 @@ raw_mouse.dwFlags = RIDEV_NOLEGACY raw_mouse.hwndTarget = self._view_hwnd else: - raw_mouse.dwFlags |= RIDEV_REMOVE + raw_mouse.dwFlags = RIDEV_REMOVE raw_mouse.hwndTarget = None if not _user32.RegisterRawInputDevices( @@ -447,11 +447,6 @@ self._exclusive_mouse_buttons = 0 if exclusive and self._has_focus: - # Move mouse to the center of the window. - self._reset_exclusive_mouse_screen() - x, y = self._exclusive_mouse_screen - self.set_mouse_position(x, y, absolute=True) - # Clip to client area, to prevent large mouse movements taking # it outside the client area. rect = RECT() @@ -459,19 +454,16 @@ _user32.MapWindowPoints(self._view_hwnd, HWND_DESKTOP, byref(rect), 2) _user32.ClipCursor(byref(rect)) + # Release mouse capture in case is was acquired during mouse click + _user32.ReleaseCapture() else: # Release clip _user32.ClipCursor(None) - # Move mouse back to the middle of the client area. - if self._exclusive_mouse_screen: - x, y = self._exclusive_mouse_screen - self.set_mouse_position(x, y, absolute=True) self._exclusive_mouse = exclusive self._exclusive_mouse_focus = self._has_focus self.set_mouse_platform_visible(not exclusive) - def set_mouse_position(self, x, y, absolute=False): if not absolute: rect = RECT() @@ -1024,11 +1016,6 @@ return 0 ''' - @Win32EventHandler(WM_MOUSEACTIVATE) - def _event_mouse_activate(self, msg, wParam, lParam): - # The user clicked on the Window. Activate it but eat the click event. - return MA_ACTIVATEANDEAT - @Win32EventHandler(WM_SETFOCUS) def _event_setfocus(self, msg, wParam, lParam): self.dispatch_event('on_activate') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet.egg-info/PKG-INFO new/pyglet-1.3.2/pyglet.egg-info/PKG-INFO --- old/pyglet-1.3.1/pyglet.egg-info/PKG-INFO 2018-02-05 15:04:30.000000000 +0100 +++ new/pyglet-1.3.2/pyglet.egg-info/PKG-INFO 2018-04-13 16:55:07.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyglet -Version: 1.3.1 +Version: 1.3.2 Summary: Cross-platform windowing and multimedia library Home-page: http://pyglet.readthedocs.org/en/latest/ Author: Alex Holkner @@ -26,5 +26,6 @@ Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 Classifier: Topic :: Games/Entertainment Classifier: Topic :: Software Development :: Libraries :: Python Modules diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/pyglet.egg-info/SOURCES.txt new/pyglet-1.3.2/pyglet.egg-info/SOURCES.txt --- old/pyglet-1.3.1/pyglet.egg-info/SOURCES.txt 2018-02-05 15:04:30.000000000 +0100 +++ new/pyglet-1.3.2/pyglet.egg-info/SOURCES.txt 2018-04-13 16:55:08.000000000 +0200 @@ -914,4 +914,6 @@ tests/unit/media/test_riff.py tests/unit/media/test_silent_player.py tests/unit/media/test_sources.py +tests/unit/text/__init__.py +tests/unit/text/test_layout.py tools/inspect_font.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/setup.py new/pyglet-1.3.2/setup.py --- old/pyglet-1.3.1/setup.py 2018-02-05 15:03:53.000000000 +0100 +++ new/pyglet-1.3.2/setup.py 2018-04-13 16:54:45.000000000 +0200 @@ -5,7 +5,7 @@ from setuptools import setup, find_packages # Bump pyglet/__init__.py version as well. -VERSION = '1.3.1' +VERSION = '1.3.2' long_description = '''pyglet provides an object-oriented programming interface for developing games and other visually-rich applications @@ -59,6 +59,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Topic :: Games/Entertainment', 'Topic :: Software Development :: Libraries :: Python Modules', ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyglet-1.3.1/tests/unit/text/test_layout.py new/pyglet-1.3.2/tests/unit/text/test_layout.py --- old/pyglet-1.3.1/tests/unit/text/test_layout.py 1970-01-01 01:00:00.000000000 +0100 +++ new/pyglet-1.3.2/tests/unit/text/test_layout.py 2018-04-13 16:54:33.000000000 +0200 @@ -0,0 +1,19 @@ +import pyglet + +def test_incrementallayout_get_position_on_line_before_start_of_text(): + single_line_text = "This is a single line of text." + document = pyglet.text.document.UnformattedDocument(single_line_text) + font = document.get_font() + layout = pyglet.text.layout.IncrementalTextLayout(document, + height = font.ascent - font.descent, + width = 200, + multiline=False) + layout.x = 100 + layout.y = 100 + + assert layout.get_position_on_line(0, 100) == 0 + assert layout.get_position_on_line(0, 90) == 0 + assert layout.get_position_on_line(0, 80) == 0 + assert layout.get_position_on_line(0, 70) == 0 + assert layout.get_position_on_line(0, 60) == 0 + assert layout.get_position_on_line(0, 50) == 0
