Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
2f54522d
Commit
2f54522d
authored
9 years ago
by
Erik Johnston
Browse files
Options
Downloads
Plain Diff
Merge pull request #167 from matrix-org/erikj/deep_copy_removal
Remove a deep copy
parents
36b3b75b
dd74436f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/util/jsonobject.py
+1
-11
1 addition, 11 deletions
synapse/util/jsonobject.py
with
1 addition
and
11 deletions
synapse/util/jsonobject.py
+
1
−
11
View file @
2f54522d
...
...
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
copy
class
JsonEncodedObject
(
object
):
"""
A common base class for defining protocol units that are represented
...
...
@@ -76,15 +74,7 @@ class JsonEncodedObject(object):
if
k
in
self
.
valid_keys
and
k
not
in
self
.
internal_keys
}
d
.
update
(
self
.
unrecognized_keys
)
return
copy
.
deepcopy
(
d
)
def
get_full_dict
(
self
):
d
=
{
k
:
_encode
(
v
)
for
(
k
,
v
)
in
self
.
__dict__
.
items
()
if
k
in
self
.
valid_keys
or
k
in
self
.
internal_keys
}
d
.
update
(
self
.
unrecognized_keys
)
return
copy
.
deepcopy
(
d
)
return
d
def
__str__
(
self
):
return
"
(%s, %s)
"
%
(
self
.
__class__
.
__name__
,
repr
(
self
.
__dict__
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment