Skip to content

happybase emulation docs mention private api #1761

Closed

Description

@wbolster

the page at https://googlecloudplatform.github.io/gcloud-python/latest/happybase-package.html mentions make_row() and make_ordered_row(), both of which are not public api. please don't mention those at all. :)

(fyi: i'm the happybase author)

Activity

  1. dhermes commented on Apr 28, 2016

    @dhermes
    Contributor

    @wbolster happybase.table.make_row and happybase.table.make_ordered_row are both public in the happybase.table module / namespace. I realize they are helpers / not intended for users, but the names don't start with _, hence they are public. I'm happy to remove them since they both just raise a NotImplementedError.

    I totally recognized your name, though thanks for the reminder you're the author.

  2. wbolster commented on Apr 28, 2016

    @wbolster
    Author

    well, as i am the author, i can assure you that api is not public. regardless of its name. these functions serve no use to the end user of the library.

    to clear up your misunderstanding: the public api is even more limited. the whole happybase.table module is not public, nor are any of its sibling modules. the only public api is the one described in the documentation, and it's exported/imported from the main happybase package. anything that uses happybase.submodule.something is poking into internals, and that should not be done, even though we're consenting adults.

  3. dhermes commented on Apr 28, 2016

    @dhermes
    Contributor

    Gotcha. I didn't realize. I'd suggest renaming those modules with an _ to make that clear / be in line with Python convention.

  4. rimey commented on Apr 28, 2016

    @rimey
    Contributor

    I'm not sure how common it is to add a leading underscore to the names of private modules in the wider Python world.

  5. dhermes commented on Apr 29, 2016

    @dhermes
    Contributor

    Having a leading underscore is the "definition" of non-public. Maybe I'm crazy?

  6. wbolster commented on May 2, 2016

    @wbolster
    Author

    There is no single definition of what consitutes private/public in Python.

    In general, for more established and matured projects, documented API and documented usage patterns (e.g. this class is public API, but instantiation should only happen through this other class) constitute what should be considered public API, and by extension, everything else is not public API.

    Naming conventions and things like __all__ surely help here, but those are never leading and often insufficient anyway to express the intentions of the author/maintainer.

  7. added a commit that references this issue on May 4, 2016
    ddc0e9c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: bigtableIssues related to the Bigtable API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions