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/22 19:22:59 UTC
[GitHub] [iceberg] Fokko opened a new pull request, #5834: Python: Test if version is PEP440 compliant
Fokko opened a new pull request, #5834:
URL: https://github.com/apache/iceberg/pull/5834
Turned out that my regex isn't PEP440 compatible.
RCs are represented as 0.1.0rc1 and dev versions are with a dot: 0.1.0.dev1 And, they can be combined: 0.1.0rc1.dev1.
Instead of figuring out the regex myself, we can just use the one from packaging.
This package is already installed because it is also a dependency of pytest.
--
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
[GitHub] [iceberg] rdblue merged pull request #5834: Python: Test if version is PEP440 compliant
Posted by GitBox <gi...@apache.org>.
rdblue merged PR #5834:
URL: https://github.com/apache/iceberg/pull/5834
--
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
[GitHub] [iceberg] rdblue commented on a diff in pull request #5834: Python: Test if version is PEP440 compliant
Posted by GitBox <gi...@apache.org>.
rdblue commented on code in PR #5834:
URL: https://github.com/apache/iceberg/pull/5834#discussion_r978034822
##########
python/tests/test_version.py:
##########
@@ -14,16 +14,12 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-import re
-from pyiceberg import __version__
+from packaging.version import Version
-VERSION_REGEX = re.compile(r"^\d+.\d+.\d+(.(dev|rc)\d+)?$")
+from pyiceberg import __version__
def test_version_format():
- # should be in the format of 0.14.0 or 0.14.0.dev0
- assert VERSION_REGEX.search(__version__)
-
- # RCs should work as well
- assert VERSION_REGEX.search("0.1.0.rc0")
+ # We should be able to parse the version
+ assert Version(__version__)
Review Comment:
This seems reasonable to me. I don't think that the rc number should be included in release candidate versions, though. That was the main issue.
--
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