Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xml_marshaller
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
xml_marshaller
Commits
b7a8d1d8
Commit
b7a8d1d8
authored
Jul 05, 2010
by
Nicolas Delaby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- during unmarshalling create classes of real input objects (if such are
found while unmarshalling)
parent
9ed0a1a6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
setup.py
setup.py
+1
-1
xml_marshaller/xml_marshaller.py
xml_marshaller/xml_marshaller.py
+3
-3
No files found.
setup.py
View file @
b7a8d1d8
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
import
sys
,
os
import
sys
,
os
version
=
'0.9.
1
'
version
=
'0.9.
2
'
setup
(
name
=
'xml_marshaller'
,
setup
(
name
=
'xml_marshaller'
,
version
=
version
,
version
=
version
,
...
...
xml_marshaller/xml_marshaller.py
View file @
b7a8d1d8
...
@@ -9,7 +9,7 @@ Patched by Nicolas Delaby nicolas@nexedi.com to support namespaces
...
@@ -9,7 +9,7 @@ Patched by Nicolas Delaby nicolas@nexedi.com to support namespaces
# same name, with four functions:
# same name, with four functions:
# dump(value, file), load(file)
# dump(value, file), load(file)
# dumps(value), loads(string)
# dumps(value), loads(string)
from
types
import
ClassType
from
types
import
ClassType
,
TypeType
import
sys
import
sys
from
xml.sax
import
make_parser
from
xml.sax
import
make_parser
from
xml.sax.saxutils
import
escape
,
unescape
from
xml.sax.saxutils
import
escape
,
unescape
...
@@ -527,9 +527,9 @@ class Unmarshaller(ElementTreeContentHandler):
...
@@ -527,9 +527,9 @@ class Unmarshaller(ElementTreeContentHandler):
value
,
module
,
classname
,
initargs
,
kw
=
self
.
data_stack
[
-
5
:]
value
,
module
,
classname
,
initargs
,
kw
=
self
.
data_stack
[
-
5
:]
klass
=
self
.
find_class
(
module
,
classname
)
klass
=
self
.
find_class
(
module
,
classname
)
instantiated
=
0
instantiated
=
0
if
(
not
initargs
and
isinstance
(
klass
,
ClassType
)
and
if
(
not
initargs
and
(
isinstance
(
klass
,
(
ClassType
,
TypeType
))
)
and
not
hasattr
(
klass
,
'__getinitargs__'
)):
not
hasattr
(
klass
,
'__getinitargs__'
)):
value
.
__class__
=
klass
value
=
klass
()
instantiated
=
1
instantiated
=
1
if
not
instantiated
:
if
not
instantiated
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment