You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by GitBox <gi...@apache.org> on 2022/07/19 20:26:13 UTC

[GitHub] [thrift] risicle opened a new pull request, #2635: python tests: support setuptools >=62.1 libpaths

risicle opened a new pull request, #2635:
URL: https://github.com/apache/thrift/pull/2635

   <!-- Explain the changes in the pull request below: -->
   
   The `distutils` bundled with setuptools >= 62.1.0 changes its platform specifier format in paths (https://github.com/pypa/setuptools/pull/3258/files#diff-769cc4d175b0f8a3dbcfdb24c7d29e8a468ab6931abecf54c868cb4d5d28e9a1). This causes the tests to fail without this modification. Also allow the older style for backwards compatibility.
   
   <!-- We recommend you review the checklist/tips before submitting a pull request. -->
   
   - [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?  (not required for trivial changes)
   - [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
   - [x] Did you squash your changes to a single commit?  (not required, but preferred)
   - [x] Did you do your best to avoid breaking changes?  If one was needed, did you label the Jira ticket with "Breaking-Change"?
   - [ ] If your change does not involve any code, include `[skip ci]` anywhere in the commit message to free up build resources.
   


-- 
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: dev-unsubscribe@thrift.apache.org

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


[GitHub] [thrift] Jimexist commented on a diff in pull request #2635: python tests: support setuptools >=62.1 libpaths

Posted by GitBox <gi...@apache.org>.
Jimexist commented on code in PR #2635:
URL: https://github.com/apache/thrift/pull/2635#discussion_r969052937


##########
lib/py/test/_import_local_thrift.py:
##########
@@ -25,6 +25,7 @@
 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(SCRIPT_DIR)))
 
 for libpath in glob.glob(os.path.join(ROOT_DIR, 'lib', 'py', 'build', 'lib.*')):
-    if libpath.endswith('-%d.%d' % (sys.version_info[0], sys.version_info[1])):
+    if libpath.endswith('-%d.%d' % (sys.version_info[0], sys.version_info[1])) \
+        or libpath.endswith('-%s' % sys.implementation.cache_tag):

Review Comment:
   can you add inline code comment explaining this?



##########
test/py/util.py:
##########
@@ -28,5 +28,6 @@
 def local_libpath():
     globdir = os.path.join(_ROOT_DIR, 'lib', 'py', 'build', 'lib.*')
     for libpath in glob.glob(globdir):
-        if libpath.endswith('-%d.%d' % (sys.version_info[0], sys.version_info[1])):
+        if libpath.endswith('-%d.%d' % (sys.version_info[0], sys.version_info[1])) \
+            or libpath.endswith('-%s' % sys.implementation.cache_tag):

Review Comment:
   can you add inline code comment explaining this?



-- 
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: notifications-unsubscribe@thrift.apache.org

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


[GitHub] [thrift] risicle commented on a diff in pull request #2635: python tests: support setuptools >=62.1 libpaths

Posted by GitBox <gi...@apache.org>.
risicle commented on code in PR #2635:
URL: https://github.com/apache/thrift/pull/2635#discussion_r970065430


##########
test/py/util.py:
##########
@@ -28,5 +28,6 @@
 def local_libpath():
     globdir = os.path.join(_ROOT_DIR, 'lib', 'py', 'build', 'lib.*')
     for libpath in glob.glob(globdir):
-        if libpath.endswith('-%d.%d' % (sys.version_info[0], sys.version_info[1])):
+        if libpath.endswith('-%d.%d' % (sys.version_info[0], sys.version_info[1])) \
+            or libpath.endswith('-%s' % sys.implementation.cache_tag):

Review Comment:
   Done



-- 
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: notifications-unsubscribe@thrift.apache.org

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