IronLanguages / IronLanguages/ironpython3

Type `str` is missing `casefold` method

Open
#1,635 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

What's New In Python 3.3
Dominant language
C#
Stars
2.8k
Forks
316
Avg merge
1d 9h
Merged PRs (30d)
1

Description

Prerequisites
  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you perform a cursory search?
Description

Type str implementation is missing casefold method. This method was added in Python 3.3

Steps to Reproduce
  1. Run ipy.exe
  2. Type str.casefold and hit enter
  3. See exception
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'type' object has no attribute 'casefold'

Expected behavior: [What you expected to happen]

Runtime should find the method and repor <method 'casefold' of 'str' objects>

Actual behavior: [What actually happened]

Runtime reports AttributeError

Versions

You can get this information from executing ipy -VV.

IronPython 3.4.0 (3.4.0.1000)
[.NETFramework,Version=v4.6.2 on .NET Framework 4.8.4515.0 (64-bit)]

and

IronPython 3.4.0 (3.4.0.1000)
[.NETCoreApp,Version=v6.0 on .NET 6.0.5 (64-bit)]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with ipy.exe using str.casefold on the listed IronPython versions, then locate the str type implementation. Add the missing method so the runtime reports the expected bound-method description, and verify that the AttributeError no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.