Ditching universal support for multiple displays from 1.2

81 views
Skip to first unread message

anatoly techtonik

unread,
Jul 17, 2012, 6:13:02 AM7/17/12
to pyglet...@googlegroups.com
It looks like it is hard to get multiple displays working right in cross-platform manner. Should we remove deprecated API to make things less confusing?

http://code.google.com/p/pyglet/issues/detail?id=586

Nathan

unread,
Jul 17, 2012, 12:04:54 PM7/17/12
to pyglet...@googlegroups.com
If the API's were deprecated in the 1.1.4 release (2.5 years ago) then
it seems sensible to drop them in the 1.2 release to me.

~ Nathan

anatoly techtonik

unread,
Jul 17, 2012, 12:23:22 PM7/17/12
to pyglet...@googlegroups.com
Not really. 1.1.4 release doesn't contain deprecation comments.
http://code.google.com/p/pyglet/source/browse/pyglet/window/__init__.py?name=pyglet-1.1.4
--
anatoly t.

Bruce Smith

unread,
Jul 17, 2012, 1:41:01 PM7/17/12
to pyglet...@googlegroups.com
On Tue, Jul 17, 2012 at 3:13 AM, anatoly techtonik <tech...@gmail.com> wrote:
It looks like it is hard to get multiple displays working right in cross-platform manner. Should we remove deprecated API to make things less confusing?

http://code.google.com/p/pyglet/issues/detail?id=586

Assuming they still work for some platforms, and presuming that some people are relying on this feature in their specific applications, it seems to me more friendly to just warn in the readme and documentation that this feature doesn't work properly on all systems. (And if practical to provide a list, or point to a wiki page, which lists the systems it works on or is known to not work on.)

- Bruce Smith

Nathan

unread,
Jul 17, 2012, 3:04:27 PM7/17/12
to pyglet...@googlegroups.com
If there are fully functional replacements, then shouldn't someone
mark the older classes/functions as deprecated now so that they can be
removed _next_ release?

~ Nathan

anatoly techtonik

unread,
Jul 18, 2012, 5:27:57 PM7/18/12
to pyglet...@googlegroups.com
Is that ok? 

$ hg diff CHANGELOG 
diff -r 8261d434c4e5 CHANGELOG
--- a/CHANGELOG Thu Jul 19 00:25:45 2012 +0300
+++ b/CHANGELOG Thu Jul 19 00:26:35 2012 +0300
@@ -14,6 +14,19 @@
  * renamed Label parameter 'halign' to 'align', fix for issue:460
  * remove unused module 'glext_missing' - everything should already be in
   'glext_arb'
+ * window.get_platform() is deprecated and always returns window.Platform
+          instance (which is deprecated too)
+
+        Deprecated API (might be removed in future releases):
+
+        * app.displays and multiple display support - this unique X11 feature is
+          still accessible by using canvas.xlib.XlibDisplay class directly
+        * window.get_platform() and window.Platform
+          * Platform.get_display(name) - no equivalent, named displays are only
+            supported by X11, so you need to track them manualy
+          * Platform.get_default_display() - use pyglet.canvas.get_display()
+        * window.Display - use pyglet.canvas.Display
+        * window.Screen - use pyglet.canvas.Screen
 
  Other changes and fixes:
 

anatoly techtonik

unread,
Jul 18, 2012, 5:30:01 PM7/18/12
to pyglet...@googlegroups.com
Programming Guide has a whole dedicated chapter that should be rewritten for 1.2. =/

Jon

unread,
Jul 23, 2012, 6:03:04 AM7/23/12
to pyglet...@googlegroups.com


On Tuesday, July 17, 2012 6:41:01 PM UTC+1, Bruce Smith wrote:
I agree with Bruce. For our software (psychopy) we use the pyglet's multi-display handling a great deal and it would be a shame to see it go away. On 1.1.4 we use this code:

    allScrs = pyglet.window.get_platform().get_default_display().get_screens()        
    if len(allScrs) > requestedScreen:
            screen = allScrs[requestedScreen]

Although the pyglet call looks long and contrived, it seems to work correctly on all systems (we have over 2000 active users and I'm sure someone would have complained if multi-screen handling didn't work on their system).

 Jon

Bruce Smith

unread,
Jul 28, 2012, 2:06:28 PM7/28/12
to pyglet...@googlegroups.com
On Thu, Jul 26, 2012 at 11:27 PM, Andre D <an...@andred.ca> wrote:
You are confusing multiple screen with multiple displays (Multiple separate X11 servers for an example).  The only difference they are proposing (which would affect you) is instead of get_default_display() you should be using:


pyglet.canvas.Display.get_screens() 


Thanks for the clarification. In that case I see nothing wrong with the proposed change, if (on non-X11 platforms) it would just be a deprecation of the old interface, i.e. if it still worked for now but gave a warning about future removal (and a hint about what code to use instead).

- Bruce Smith

 
--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pyglet-users/-/KYZyfud1WF4J.

To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.

Reply all
Reply to author
Forward
0 new messages