You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/09/30 08:47:56 UTC

[GitHub] [iceberg] Fokko commented on a diff in pull request #5879: Python: Add code conventions for Python

Fokko commented on code in PR #5879:
URL: https://github.com/apache/iceberg/pull/5879#discussion_r984364466


##########
python/CONTRIBUTING.md:
##########
@@ -94,3 +94,31 @@ make test PYTEST_ARGS="--pdb"
 ```
 
 To see all available pytest arguments, run `make test PYTEST_ARGS="--help"`.
+
+# Code standards
+
+Below are the formalized conventions that we adhere to in the PyIceberg project. The goal of this is to have a common agreement on how to evolve the codebase, but also using it as guidelines for newcomers to the project.
+
+## API Compatibility
+
+We try to keep the Python public API compatible across versions. The Python official [PEP-8](https://peps.python.org/pep-0008/) defines Public methods as: _Public attributes should have no leading underscores_. This means not removing any methods without any notice, or removing or renaming any existing parameters. Adding new optional parameters is okay.
+
+If you want to remove a method, please add a deprecation notice by annotating the function using `@deprecated`:
+
+```python
+from pyiceberg.utils.deprecated import deprecated
+
+@deprecated(deprecated_in="0.1.0", removed_in="0.2.0")

Review Comment:
   Great suggestion, added it. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org