You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/07/01 10:15:30 UTC

[GitHub] [arrow] pitrou opened a new pull request #7605: ARROW-9283: [Python] Expose build info

pitrou opened a new pull request #7605:
URL: https://github.com/apache/arrow/pull/7605


   


----------------------------------------------------------------
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] [arrow] pitrou commented on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
pitrou commented on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-653088054


   @kou I don't understand. Do you mean we should have different version numbers for Arrow C++ and PyArrow? That sounds terribly confusing.
   


----------------------------------------------------------------
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] [arrow] kou commented on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
kou commented on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-652646475


   How about using our SNAPSHOT version as the next version of pyarrow?
   
   ```diff
   diff --git a/python/setup.py b/python/setup.py
   index 4c264a2d7..bc3efee77 100755
   --- a/python/setup.py
   +++ b/python/setup.py
   @@ -546,6 +546,15 @@ def parse_git(root, **kwargs):
        return parse(root, **kwargs)
    
    
   +def guess_next_dev_version(version):
   +    if version.exact:
   +        return version.format_with('{tag}')
   +    else:
   +        def guess_next_version(tag_version):
   +            return default_version.replace('-SNAPSHOT', '')
   +        return version.format_next_version(guess_next_version)
   +
   +
    with open('README.md') as f:
        long_description = f.read()
    
   @@ -595,7 +604,8 @@ setup(
            'root': os.path.dirname(setup_dir),
            'parse': parse_git,
            'write_to': os.path.join(scm_version_write_to_prefix,
   -                                 'pyarrow/_generated_version.py')
   +                                 'pyarrow/_generated_version.py'),
   +        'version_scheme': guess_next_dev_version
        },
        setup_requires=['setuptools_scm', 'cython >= 0.29'] + setup_requires,
        install_requires=install_requires,
   ```
   
   `pyarrow.__version__` will return `"1.0.0.dev..."` with this change.
   
   And how about exporting `-SNAPSHOT` tag as `arrow::BuildInfo::version_tag`? It will show that this version is a snapshot version like `.devXXX` in Python.
   
   And how about adding `cpp_` prefix to Arrow C++ related versions like `pa.cpp_version` to show that they show C++ version not pyarrow version?


----------------------------------------------------------------
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] [arrow] wesm closed pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
wesm closed pull request #7605:
URL: https://github.com/apache/arrow/pull/7605


   


----------------------------------------------------------------
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] [arrow] github-actions[bot] commented on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-652332966


   https://issues.apache.org/jira/browse/ARROW-9283


----------------------------------------------------------------
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] [arrow] wesm commented on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
wesm commented on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-657136826


   +1.  If the setup.py changes create problems for the release we will have some time to fix things


----------------------------------------------------------------
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] [arrow] pitrou commented on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
pitrou commented on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-652330730


   There's a problem where we already generate `__version__` and it ends up different, for example:
   ```python
   >>> import pyarrow as pa                                                                                                                                                 
   >>> pa.__version__                                                                                                                                                       
   '0.17.1.dev572+gf25a014ab.d20200701'
   >>> pa.version                                                                                                                                                           
   '1.0.0'
   >>> pa.version_info                                                                                                                                                      
   VersionInfo(major=1, minor=0, patch=0)
   >>> pa.build_info                                                                                                                                                        
   BuildInfo(version='1.0.0', version_info=VersionInfo(major=1, minor=0, patch=0), so_version='100', full_so_version='100.0.0', git_id='5f1800a4dfaf38754362914faf2776d6c3ec9eb9', git_description='apache-arrow-0.17.0-568-g5f1800a4d', package_kind='')
   ```
   
   @xhochy @kou What is your advice on 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.

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



[GitHub] [arrow] wesm edited a comment on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
wesm edited a comment on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-657136410


   I implemented some changes:
   
   * Passing through `ARROW_VERSION` unmodified to arrow/util/config.h, so it will say 1.0.0-SNAPSHOT now
   * Add cpp_ prefix to the Python variables
   * Add Kou's version scheme suggestion 
   
   so now we have
   
   ```
   In [1]: pa.show_versions()                                                                                                                   
   pyarrow version info
   --------------------
   Package kind: not indicated
   Arrow C++ library version: 1.0.0-SNAPSHOT
   Arrow C++ git revision: b396060b1437149523248b0eb50d7101f75d7034
   Arrow C++ git description: apache-arrow-0.17.0-677-gb396060b1
   ```


----------------------------------------------------------------
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] [arrow] wesm commented on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
wesm commented on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-657136410


   I implemented some changes:
   
   * Passing through `ARROW_VERSION` unmodified to arrow/util/config.h, so it will say 1.0.0-SNAPSHOT now
   * Add cpp_ prefix to the Python variables
   * Add Kou's version scheme suggestion 
   
   so now we have
   
   ```
   In [1]: pa.show_versions()                                                                                                                   
   pyarrow version info
   --------------------
   Arrow C++ library version: 1.0.0-SNAPSHOT
   Arrow C++ git revision: b396060b1437149523248b0eb50d7101f75d7034
   Arrow C++ git description: apache-arrow-0.17.0-677-gb396060b1
   ```


----------------------------------------------------------------
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] [arrow] pitrou commented on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
pitrou commented on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-653221217


   While it may be supported to do so (upgrade only Arrow C++ DLLs), I'm not sure it's something we want to encourage, and exposing different version numbers is confusing for users.
   
   @wesm What do you think?


----------------------------------------------------------------
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] [arrow] wesm commented on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
wesm commented on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-653223316


   I think the scenarios where the C++ library would be upgraded but not the Python library are likely to be infrequently occurring, that said I think it would be useful to be clear that the version info that's being shown was produced by the C++ library. I could imagine actually people creating multiple C++ builds like `$VERSION-avx2` `$VERSION-avx512` 


----------------------------------------------------------------
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] [arrow] kou commented on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
kou commented on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-653216334


   Yes.
   
   We may release a patch version (1.0.1 for 1.0.0) that should be compatible with base version (1.0.0).
   If a patch version includes fixes only in C++, source pyarrow package users don't need to upgrade pyarrow. They just need to upgrade Arrow C++. In this situation, pyarrow's version is 1.0.0 and runtime Arrow C++ version is 1.0.1.
   


----------------------------------------------------------------
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] [arrow] wesm edited a comment on pull request #7605: ARROW-9283: [Python] Expose build info

Posted by GitBox <gi...@apache.org>.
wesm edited a comment on pull request #7605:
URL: https://github.com/apache/arrow/pull/7605#issuecomment-653223316


   I think the scenarios where the C++ library would be upgraded but not the Python library are likely to be infrequently occurring, that said I think it would be useful to be clear that the version info that's being shown was produced by the C++ library. I could imagine actually people creating multiple C++ builds like `$VERSION-avx2` `$VERSION-avx512`  etc


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