kszucs commented on code in PR #13230:
URL: https://github.com/apache/arrow/pull/13230#discussion_r881773204
##########
dev/archery/archery/release.py:
##########
@@ -287,44 +296,42 @@ def from_jira(version, jira=None, repo=None):
elif not isinstance(version, Version):
raise TypeError(version)
- # decide the type of the release based on the version number
- if version.patch == 0:
- if version.minor == 0:
- klass = MajorRelease
- elif version.major == 0:
- # handle minor releases before 1.0 as major releases
- klass = MajorRelease
- else:
- klass = MinorRelease
- else:
- klass = PatchRelease
+ self.version = version
+ self.jira = jira
+ self.repo = repo
- # prevent instantiating release object directly
- obj = klass.__new__(klass)
- obj.version = version
- obj.jira = jira
- obj.repo = repo
+ def __repr__(self):
+ if self.version.released:
+ status = "released_at={self.version.release_date!r}"
+ else:
+ status = "pending"
+ return f"<{self.__class__.__name__} {self.version!r} {status}>"
- return obj
+ @staticmethod
+ def from_jira(version, jira=None, repo=None):
+ return Release(version, jira, repo)
@property
def is_released(self):
return self.version.released
@property
def tag(self):
- return "apache-arrow-{}".format(str(self.version))
+ return f"apache-arrow-{self.version}"
- @property
+ @abstractproperty
Review Comment:
Yes, updating
--
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]