areusch commented on a change in pull request #8382:
URL: https://github.com/apache/tvm/pull/8382#discussion_r663231702



##########
File path: .pre-commit-config.yaml
##########
@@ -0,0 +1,40 @@
+repos:
+    - repo: https://github.com/pre-commit/pre-commit-hooks
+      rev: v2.5.0
+      hooks:
+        - id: check-added-large-files
+        - id: check-merge-conflict
+        - id: check-yaml
+        - id: end-of-file-fixer
+    - repo: local
+      hooks:
+        -   id: run-file-types
+            name: Checking File Types...
+            entry: python3 tests/lint/check_file_type.py
+            language: system
+            always_run: true
+            pass_filenames: false
+        -   id: run-headers-check
+            name: Checking ASF License Headers...
+            entry: tests/lint/check_asf_header.sh --local
+            language: system
+            always_run: true
+            pass_filenames: false
+        -   id: run-black

Review comment:
       @mshawcroft so most python package dependencies are fairly loose in 
order to allow you to create mega-venv. imagine if a middleware required a 
precise version of a common library e.g. `attrs`. it would be very difficult to 
combine such middleware with other larger packages in the same venv while 
respecting the constraints of `install_requires`. therefore, many packages 
don't specify exact `install_requires`. you can 
[see](https://github.com/PyCQA/pylint/commit/fed98574f909bb34cff32b63db4e93d5271cee32#diff-fa602a8a75dc9dcc92261bac5f533c2a85e34fcceaff63b3a3a81d9acde2fc52)
 that when pylint updates its `astroid` dep, it merely pushes along the `>=` 
constraint, but now that astroid 2.6.2 is 
[released](https://pypi.org/project/astroid/#history), that old constraint is 
ambiguous.
   
   this lax specification has made python easy to use, but as a result, API 
mismatches pervade the ecosystem. In general, duck typing has minimized the 
impact of these--up to the point that you want to reproduce exact results 
machine-to-machine. at this point, you need a lockfile and potentially the new 
pip dep resolver (note that the `install_requires` constraints were [not even 
enforced](https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020)
 until last year). this is why lint is particularly sensitive to the exact set 
of packages installed in the venv, and why i don't currently recommend to use 
anything checked-in other than the docker container to repro ci lint results 
right now.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to