Issue 198 in couchdb-python: Naming: mapping.Document conflicts with client.Document

18 views
Skip to first unread message

couchdb...@googlecode.com

unread,
Sep 6, 2011, 11:56:53 PM9/6/11
to couchdb...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 198 by SpaX...@gmail.com: Naming: mapping.Document conflicts with
client.Document
http://code.google.com/p/couchdb-python/issues/detail?id=198

Could we rename

mapping.Document

to

mapping.DocumentMap

to better avoid the naming confusion?

In addition, the documentation at
http://packages.python.org/CouchDB/mapping.html

says (mine emphasised)

To define a document mapping, you declare a Python class inherited from
**Document**, and add any number of Field attributes:

Please change that to

To define a document mapping, you declare a Python class inherited from
**mapping.DocumentMap**, and add any number of Field attributes:

This will probably break a lot of things, and is a breaking change, but
would be nice to see.

couchdb...@googlecode.com

unread,
Sep 7, 2011, 8:43:16 AM9/7/11
to couchdb...@googlegroups.com

Comment #1 on issue 198 by mva.led: Naming: mapping.Document conflicts with
client.Document
http://code.google.com/p/couchdb-python/issues/detail?id=198

I don't really think the name should be changed. However, IMO, the
documentation is not really helpful in this regards. There should be a
topic on What's the difference between couchdb.client.Document and
couchdb.mapping.Document.

This a rather confusing thing at first. Since we may expect some unique
interface to Documents. However, this is a feature I really appreciate:
mappings are designed to cover specific use cases; and not all possible
uses cases. So, having a simple/direct interface to CouchDB json documents
as dicts is really useful thing.

Best regards,
Manuel.

couchdb...@googlecode.com

unread,
Sep 7, 2011, 8:58:22 AM9/7/11
to couchdb...@googlegroups.com

Comment #2 on issue 198 by SpaX...@gmail.com: Naming: mapping.Document

Thanks Manuel. Even if it's a documentation update, I would greatly
appreciate it, as I lost an hour today trying to figure out why my Document
(from couchdb import Document, who knew?) didn't inherit from the right
methods, and I saw iterkeys()...

couchdb...@googlecode.com

unread,
Oct 11, 2012, 7:58:27 PM10/11/12
to couchdb...@googlegroups.com
Updates:
Status: Accepted
Owner: kxepal
Labels: Component-Docs Milestone-0.9

Comment #3 on issue 198 by kxepal: Naming: mapping.Document conflicts with
client.Document
http://code.google.com/p/couchdb-python/issues/detail?id=198

I suppose explicit Document import in documentation have to solve this
misunderstood.

Attachments:
couchdb-python-198-r1.patch 806 bytes

couchdb...@googlecode.com

unread,
Oct 12, 2012, 4:20:47 AM10/12/12
to couchdb...@googlegroups.com
Updates:
Status: Fixed

Comment #4 on issue 198 by djc.ochtman: Naming: mapping.Document conflicts
with client.Document
http://code.google.com/p/couchdb-python/issues/detail?id=198

I've pushed your patch as revision 911a7e72d8a3, thanks. I think we can
consider this issue fixed!

Reply all
Reply to author
Forward
0 new messages