Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown test comment #7991

Closed
Yay295 opened this issue Apr 17, 2024 · 6 comments
Closed

Unknown test comment #7991

Yay295 opened this issue Apr 17, 2024 · 6 comments

Comments

@Yay295
Copy link
Contributor

Yay295 commented Apr 17, 2024

What is "bug-200802-systemerror"?

def test_long_integers() -> None:
# see bug-200802-systemerror
def put(value: int) -> tuple[int, int, int, int]:
im = Image.new("RGBA", (1, 1))
im.putdata([value])
return im.getpixel((0, 0))
assert put(0xFFFFFFFF) == (255, 255, 255, 255)
assert put(0xFFFFFFFF) == (255, 255, 255, 255)
assert put(-1) == (255, 255, 255, 255)
assert put(-1) == (255, 255, 255, 255)
if sys.maxsize > 2**32:
assert put(sys.maxsize) == (255, 255, 255, 255)
else:
assert put(sys.maxsize) == (255, 255, 255, 127)

@cgohlke This comes all the way from your original tests. I don't suppose you remember what this was?

@hugovk
Copy link
Member

hugovk commented Apr 17, 2024

There's an archive of the old Mercurial repo at https://bitbucket-archive.softwareheritage.org/projects/ef/effbot/pil-2009-raclette.html

I have a copy at https://github.com/hugovk/pil-2009-raclette

The commit is "Handle long integers in putpixel/putdata." by Fredrik aka effbot on Apr 25, 2010:

hugovk/pil-2009-raclette@52970c6

Maybe you can find something in the repo metadata at softwareheritage.

@Yay295
Copy link
Contributor Author

Yay295 commented Apr 17, 2024

Oh, interesting. It looks like the L suffixes were probably removed when going from Python 2 to 3, which is why there are some duplicate lines in that test now.

@nulano
Copy link
Contributor

nulano commented Apr 17, 2024

Checking the metadata archive from https://bitbucket-archive.softwareheritage.org/projects/ef/effbot/pil-2009-raclette.html, I get no hits with grep for "systemerror", "putpixel", nor "putdata".

I've also tried checking the Image-SIG mailing list archive, but I can't see anything relevant.

@nulano
Copy link
Contributor

nulano commented Apr 17, 2024

The commit is "Handle long integers in putpixel/putdata." by Fredrik aka effbot on Apr 25, 2010:
hugovk/pil-2009-raclette@52970c6

The Pillow version of that commit is c8ce29c from #35:

FIX: Handle long values in _imaging getink

This gets the putdata test case to run correctly under 2.6/2.7. It fixes an
issue where the value 0xFFFFFFFF (which is long in old Python) isn't
recognized and putdata tries to parse it as a tuple.

The original fix comes from Christoph Gohlke. It was adapted to work in
both 2.* and 3.*.

@Yay295
Copy link
Contributor Author

Yay295 commented Apr 17, 2024

That seems like the answer to me. I don't know what the exact error report was, but it looks like it was something to do with big numbers and Python 2/3 compatibility.

@Yay295 Yay295 closed this as completed Apr 17, 2024
Yay295 added a commit to Yay295/Pillow that referenced this issue Apr 23, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Apr 25, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Apr 25, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
@radarhere
Copy link
Member

#8017 now suggests removing this comment.

Yay295 added a commit to Yay295/Pillow that referenced this issue Apr 28, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue May 15, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue May 15, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue May 15, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue May 15, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue May 23, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jun 3, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jun 15, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jun 22, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jun 25, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jun 28, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jun 28, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jul 8, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jul 16, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jul 16, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jul 19, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jul 19, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jul 26, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Jul 26, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Aug 1, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Aug 1, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Aug 14, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Yay295 added a commit to Yay295/Pillow that referenced this issue Aug 28, 2024
The original bug this was referring to seems to have been lost, but it looks to have been something to do with Python 2/3 compatibility and big numbers.
See commit c8ce29c and python-pillow#7991.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants