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:58:21 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #5834: Python: Test if version is PEP440 compliant

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