Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: incompatible (wrt CPython int's) processing of strings by int() constructor with spaces

オープン
#1,209 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, python
領域
backend

調査の方向性

The bug is in how GraalPy's int() constructor parses strings: a leading non-breaking space (\xa0) makes it raise ValueError, while CPython 3.13 strips it. Start by reproducing int("\xa0123") on GraalPy and comparing it with CPython's whitespace handling for int(). Done when int("\xa0123") returns 123, matching CPython 3.13, and the change is covered by a test.

索引モデルが issue の本文から書いたものです。

説明

bug
Describe the bug

An example:

Python 3.13.14 (Thu Sep 17 18:51:21 UTC 2026)
[Graal, Oracle GraalVM, Java 25.0.4.1.1 (amd64)] on 'linux'
Type "help", "copyright", "credits" or "license" for more information.
>>> int("\xa0123")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    int("\xa0123")
    ~~~^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '\xa0123'

vs

Python 3.13.15 (tags/v3.13.15:4061bc4c35f, Aug 12 2026, 12:19:57) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> int("\xa0123")  # ignores leading/trailing spaces
123
Operating system

Linux

CPU architecture

x86_64

GraalPy version

25.4.4.1.1

JDK version

No response

Context configuration

No response

Steps to reproduce

See description.

Expected behavior

As in the CPython 3.13.

Stack trace

Additional context

No response

主要言語
Python
スター
1.7k
フォーク
156
平均マージ
5時間 11分
マージ済み PR(30日)
51

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oracle/graalpython のほかの issue

oracle/graalpython の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。