IronLanguages / IronLanguages/ironpython3

future feature is not defined:annotations

Open
#1,675 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

python: 3.11.2
ironpython: 3.4.0
vs studio: vs 2022

Description

`
ScriptRuntime pyRuntime = Python.CreateRuntime();

        var engine = Python.CreateEngine();


        var pyScope = engine.CreateScope();
        var paths = engine.GetSearchPaths();

        string pathToVirtualEnv = @"C:\Program Files\Python311";

        paths.Add(pathToVirtualEnv +@"\Lib");
        paths.Add(pathToVirtualEnv + @"\Lib\site-packages");
        paths.Add(pathToVirtualEnv + @"\DLLs");
        engine.SetSearchPaths(paths);

        dynamic py = engine.ExecuteFile(AppContext.BaseDirectory + @"IAMed/prescript_cluster.py");

`

when run at " dynamic py = engine.ExecuteFile(AppContext.BaseDirectory + @"IAMed/prescript_cluster.py");"

show error: future feature is not defined:annotations

捕获

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

Start by reproducing the reported failure in the C# host using Python 3.11 and the referenced IAMed/prescript_cluster.py file, focusing on the ExecuteFile call and the annotations future feature. Trace the IronPython handling of that feature and compare the behavior with the script's expected Python syntax; done means the script loads without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.