Skip to content

feat(configparser): update to 3.11 #4595

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

Merged
merged 4 commits into from
Mar 1, 2023

Conversation

carlosmiei
Copy link
Contributor

Test

RUSTPYTHONPATH=Lib cargo run --release Lib/test/test_configparser.py
    Updating git repository `https://github.com/youknowone/unicode_names2.git`
    Finished release [optimized] target(s) in 0.92s
     Running `target/release/rustpython Lib/test/test_configparser.py`
...
Ran 343 tests in 1.312s

OK (skipped=5)

@@ -521,7 +528,6 @@ def test_default_case_sensitivity(self):
cf.get(self.default_section, "Foo"), "Bar",
"could not locate option, expecting case-insensitive defaults")

@unittest.skipIf(os.name == "nt", "TODO: RUSTPYTHON, universal newlines")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably need to add this again, it skipped the tests for windows (which are now failing)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DimitrisJim restored thanks

@fanninpm
Copy link
Contributor

When I update a library from a newer version of CPython, I usually do this:

  1. Copy/paste the library straight from CPython unless it has any RustPython-related annotations, and put that into the first commit. (Your first commit is fine as is, but personally, I would title it Update configparser.py from CPython 3.11 in accordance with this guide.)
  2. Copy/paste the test straight from CPython, without touching the RustPython-related annotations, and put that into a second commit, titled something like Update test_configparser.py from CPython 3.11. (You can follow the guide in the wiki, but I use Meld for this.)
  3. Run the new test. Add/remove any necessary RustPython-related annotations, and put that into one or more commits, titled something like Mark failing/erroring tests or Unmark passing tests or Skip panicking test.

@youknowone
Copy link
Member

#4597 will make it simpler

@carlosmiei
Copy link
Contributor Author

carlosmiei commented Mar 1, 2023

When I update a library from a newer version of CPython, I usually do this:

  1. Copy/paste the library straight from CPython unless it has any RustPython-related annotations, and put that into the first commit. (Your first commit is fine as is, but personally, I would title it Update configparser.py from CPython 3.11 in accordance with this guide.)
  2. Copy/paste the test straight from CPython, without touching the RustPython-related annotations, and put that into a second commit, titled something like Update test_configparser.py from CPython 3.11. (You can follow the guide in the wiki, but I use Meld for this.)
  3. Run the new test. Add/remove any necessary RustPython-related annotations, and put that into one or more commits, titled something like Mark failing/erroring tests or Unmark passing tests or Skip panicking test.

@fanninpm thanks for your suggestions, I was trying to follow conventional commits convention but will stick with your advice next time.

Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! many more tests run successful 😄

@youknowone youknowone merged commit e731e65 into RustPython:main Mar 1, 2023
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

Successfully merging this pull request may close these issues.

4 participants