Bug 201699 - [Patch] devel/drpython: Fixes AttributeError on wx.HIDE_READONLY for wx.FileDialog
Summary: [Patch] devel/drpython: Fixes AttributeError on wx.HIDE_READONLY for wx.FileD...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-07-19 22:08 UTC by Jordan Irwin
Modified: 2016-08-18 22:55 UTC (History)
1 user (show)

See Also:


Attachments
Patch that removes wx.HIDE_READONLY attribute from wx.FileDialog (925 bytes, patch)
2015-07-19 22:08 UTC, Jordan Irwin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Irwin 2015-07-19 22:08:54 UTC
Created attachment 158986 [details]
Patch that removes wx.HIDE_READONLY attribute from wx.FileDialog

DrPython could not open or save any files because of the attribute wx.HIDE_READONLY which is not defined within the installed version of wxPython 2.8. The included patch removes the attribute from wx.FileDialog.

I will also submit the patch upstream (when possible as the Sourceforge site is currently down) in the case it is not related solely to FreeBSD.
Comment 1 Jordan Irwin 2015-07-19 22:11:51 UTC
This is the traceback of the error previously mentioned:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/drpython/drpython.py", line 2340, in OnOpen
    dlg = drFileDialog.FileDialog(self, "Open", self.prefs.wildcard, MultipleSelection=True, ShowRecentFiles=True)
  File "/usr/local/lib/python2.7/site-packages/drpython/drFileDialog.py", line 1031, in FileDialog
    return drWxFileDialog(parent, title, "", "", wildcard, wx.OPEN|wx.HIDE_READONLY|wx.MULTIPLE)
AttributeError: 'module' object has no attribute 'HIDE_READONLY'

The patch also changes "wx.OPEN" to "wx.FD_OPEN" and "wx.MULTIPLE" to "wx.FD_MULTIPLE".
Comment 2 commit-hook freebsd_committer 2016-08-18 22:55:03 UTC
A commit references this bug:

Author: marino
Date: Thu Aug 18 22:54:22 UTC 2016
New revision: 420428
URL: https://svnweb.freebsd.org/changeset/ports/420428

Log:
  devel/drpython: Remove wx.HIDE_READONLY attribute from wx.FileDialog

  This attribute has been removed for wxPython 3.0.  Remove the flag
  to fix runtime error during saving and loading.  See similar report on
  DrPython bug report 137.

  PR:		201699
  Submitted by:	Jordan Irwin

Changes:
  head/devel/drpython/Makefile
  head/devel/drpython/files/patch-drFileDialog.py