[Feature Request]: Treat java duration as foreign variant of datetime.timedelta
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
The payload names no files. Start by finding how the existing java.time.ZonedDateTime interop mapping works and how the reverse timedelta to Java Duration conversion is implemented, since the issue says that direction already exists. Done means a Java method returning a java.time.Duration yields an object for which isinstance(duration, datetime.timedelta) is True, with a test covering it.
由索引模型根据 Issue 内容生成。
描述
Describe the feature
Similar to what is already possible for java.time.ZonedDateTime etc, a java.time.Duration instance should be seen as an instance of datetime.timedelta in python.
Notably timedelta objects already implicitly convert to java duration objects, it's just the other way round that is missing.
Expected behavior
Given a java method
java.time.Duration getDuration() {...}
A python side call should get an interop object:
duration = javaobject.getDuration()
# isinstance(duration, datetime.timedelta) returns True
Additional context
No response
- 主要语言
- Python
- 星标
- 1.7k
- 派生
- 163
- 平均合并
- 14 小时 10 分钟
- 30 天内合并 PR
- 56
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
oracle/graalpython 的其他 Issue
-
[Bug]: sys.flags.debug is 1 whenever optimization is off可能已有人在做 @hippi345 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
oracle/graalpython#1213 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
oracle/graalpython#1105 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
oracle/graalpython#1102 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 54/100
oracle/graalpython#1212 ·
维护者通常 1 天内回复
-
[Bug]: incompatible (wrt CPython int's) processing of strings by int() constructor with spaces可能已有人在做 @hippi345 于 7 天前认领。 未关闭bug
难度 3/5 半天 新手友好度 50/100
oracle/graalpython#1209 ·
维护者通常 1 天内回复
查看 oracle/graalpython 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 85/100
WLAN-Pi/wlanpi-profiler#341 ·
维护者通常 1 天内回复
-
Memory leak: the shared `validation_aborted_error` keeps every traceback it is raised through可能已有人在做 @Fire162 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
graphql-python/graphql-core#287 ·
-
难度 2/5 1-3 小时 新手友好度 67/100
roman-corgi/ctc-dip#160 ·
维护者通常 1 天内回复
-
type-bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
render_findings.py reads and writes in the host's default encoding, so findings.html breaks on a cp1252 Windows host可能已有人在做 @Aaqibhafeezkhan 今天认领。 未关闭bug good first issue mentored python size: XS up-for-grabs
难度 2/5 1-3 小时 新手友好度 75/100
dheerajjha/mcp-migrate#366 · 1 条评论 ·
维护者通常 1 天内回复