| Summary: | Python export and re-import breaks function names and private attribute of private functions | ||
|---|---|---|---|
| Product: | [Applications] umbrello | Reporter: | a.baumfalk |
| Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 2.13.3 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/umbrello/4284cc069969b3b53916f7eeaaed5fa0c62ac54d | Version Fixed/Implemented In: | 2.21.1 (KDE Applications 16.12.1) |
| Sentry Crash Report: | |||
| Attachments: |
re-imported from python code
starting case after adding public/private function pair |
||
Created attachment 103214 [details]
starting case after adding public/private function pair
Git commit 4284cc069969b3b53916f7eeaaed5fa0c62ac54d by Ralf Habacker. Committed on 05/01/2017 at 15:43. Pushed by habacker into branch 'Applications/16.12'. Parse and set method visibility in python import. FIXED-IN:2.21.1 (KDE Applications 16.12.1) M +10 -3 umbrello/codeimport/pythonimport.cpp https://commits.kde.org/umbrello/4284cc069969b3b53916f7eeaaed5fa0c62ac54d |
Created attachment 103213 [details] re-imported from python code Steps to reproduce: --------------------------- 1. create a class with a public function named "publicFunction" and a private function named "privateFunction". 2. Export to python, result will be: --- class MyClass(object): """ :version: :author: """ def publicFunction(self): """ @return : @author """ pass def __privateFunction(self): """ @return : @author """ pass --- 3. re-import from exported Code (see attached Umbrello2.xmi). As a result I get a public function with the name "__privateFunction" instead of a private function with the name "privateFunction".