You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/06/19 21:32:08 UTC

[GitHub] [airflow] mik-laj opened a new pull request #9419: Pylint fixes and deprecation of rare used methods in Connection

mik-laj opened a new pull request #9419:
URL: https://github.com/apache/airflow/pull/9419


   I wanted to fix the pylint errors for connection, but I saw that there is a small mess here that would be worth cleaning up.
   
   All changes are backward compatible or not part of the end-user interface (`_parse_netloc_to_hostname`)
   
   ---
   Make sure to mark the boxes below before creating PR: [x]
   
   - [X] Description above provides context of the change
   - [X] Unit tests coverage for changes (not needed for documentation changes)
   - [X] Target Github ISSUE in description if exists
   - [X] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [X] Relevant documentation is updated including usage instructions.
   - [X] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   


----------------------------------------------------------------
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.

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



[GitHub] [airflow] kaxil commented on a change in pull request #9419: Pylint fixes and deprecation of rare used methods in Connection

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #9419:
URL: https://github.com/apache/airflow/pull/9419#discussion_r443086868



##########
File path: UPDATING.md
##########
@@ -62,6 +62,29 @@ https://developers.google.com/style/inclusive-documentation
 
 -->
 
+### Deprecated method in Connection
+
+The Connection class has new deprecated methods.
+
+- Connection.parse_from_uri
+- Connection.log_info
+- Connection.debug_info
+
+You used to create a connection object in two ways

Review comment:
       ```suggestion
   Previously, users could create a connection object in two ways
   ```

##########
File path: UPDATING.md
##########
@@ -62,6 +62,29 @@ https://developers.google.com/style/inclusive-documentation
 
 -->
 
+### Deprecated method in Connection
+
+The Connection class has new deprecated methods.
+
+- Connection.parse_from_uri
+- Connection.log_info
+- Connection.debug_info
+
+You used to create a connection object in two ways
+```
+conn_1 = Connection(conn_id="conn_a", uri="mysql://AAA/")
+# or
+conn_2 = Connection(conn_id="conn_a")
+conn_2.parse_uri(uri="mysql://AAA/")
+```
+Now the second way is not supported.
+
+Instead of the log_info and debug_info method. You can read each field individually or use the
+default representation (`__repr__`).

Review comment:
       ```suggestion
   `Connection.log_info` and `Connection.debug_info` method have been deprecated. Read each Connection field individually or use the
   default representation (`__repr__`).
   ```

##########
File path: UPDATING.md
##########
@@ -62,6 +62,29 @@ https://developers.google.com/style/inclusive-documentation
 
 -->
 
+### Deprecated method in Connection
+
+The Connection class has new deprecated methods.
+
+- Connection.parse_from_uri
+- Connection.log_info
+- Connection.debug_info

Review comment:
       ```suggestion
   - `Connection.parse_from_uri`
   - `Connection.log_info`
   - `Connection.debug_info`
   ```




----------------------------------------------------------------
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.

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



[GitHub] [airflow] mik-laj merged pull request #9419: Pylint fixes and deprecation of rare used methods in Connection

Posted by GitBox <gi...@apache.org>.
mik-laj merged pull request #9419:
URL: https://github.com/apache/airflow/pull/9419


   


----------------------------------------------------------------
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.

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



[GitHub] [airflow] mik-laj commented on pull request #9419: Pylint fixes and deprecation of rare used methods in Connection

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #9419:
URL: https://github.com/apache/airflow/pull/9419#issuecomment-647377021


   I added backward compatibility method with the warning, but no alternative suggestion. This has always been an internal detail and should not be used externally.


----------------------------------------------------------------
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.

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