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

python3Packages.fluent-pygments: init at 1.0 #255937

Merged
merged 3 commits into from
Jul 19, 2024

Conversation

GetPsyched
Copy link
Member

@GetPsyched GetPsyched commented Sep 18, 2023

Description of changes

Project Fluent is a localisation system. python-fluent is its Python implementation.

This PR adds all 3 of its Python packages:

  • fluent-syntax
  • fluent-runtime
  • fluent-pygments

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@GetPsyched
Copy link
Member Author

I apologise for the non-standard PR in terms of the PR name and not having a default.nix file. The reason for both is the same: this PR adds multiple packages of the same project. One of the packages depends on the other, so, I had to merge them in a single PR. Please let me know if there is something else I could have done. (I couldn't find any contributing guidelines for a scenario like this one)

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 labels Sep 18, 2023
@GetPsyched
Copy link
Member Author

Hey, @fabaff! Thanks for the review. Just tested the changes on my project locally. Everything seems to be working fine.

@GetPsyched GetPsyched requested a review from fabaff October 1, 2023 17:02
@GetPsyched
Copy link
Member Author

Awaiting further review.

@GetPsyched GetPsyched force-pushed the python-fluent branch 2 times, most recently from 6447812 to f9c4290 Compare December 30, 2023 18:38
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 20, 2024
@Sigmanificient Sigmanificient added 0.kind: package adoption Requests or PRs for adopting packages that have no maintainers and removed 0.kind: package adoption Requests or PRs for adopting packages that have no maintainers labels May 13, 2024
@GetPsyched GetPsyched removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 20, 2024
@GetPsyched
Copy link
Member Author

How do I reload the ofborg test? It seems like the error was that ofborg ran out of memory.

Copy link
Member

@Aleksanaa Aleksanaa left a comment

Choose a reason for hiding this comment

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

Looks good, just some recent changes in Nixpkgs need to be changed accordingly

Copy link
Member

@erictapen erictapen left a comment

Choose a reason for hiding this comment

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

Just noticed that fluent-pygments fails currently:

python3.11-fluent-pygments> Running phase: setuptoolsCheckPhase                                                                                                                                                       
python3.11-fluent-pygments> Executing setuptoolsCheckPhase                                                                                                                                                            
python3.11-fluent-pygments> running test                                                                                                                                                                              
python3.11-fluent-pygments> WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox
.                                                                                                                                                                                                                     
python3.11-fluent-pygments> /nix/store/9ryla5qrjhmb3nix3cp0n57qx06scgc0-python3.11-setuptools-69.5.1/lib/python3.11/site-packages/setuptools/command/test.py:193: _DeprecatedInstaller: setuptools.installer and fetch
_build_eggs are deprecated.                                                                                                                                                                                           
python3.11-fluent-pygments> !!                                                                                                                                                                                        
python3.11-fluent-pygments>         ********************************************************************************                                                                                                  
python3.11-fluent-pygments>         Requirements should be satisfied by a PEP 517 installer.                                                                                                                          
python3.11-fluent-pygments>         If you are using pip, you can try `pip install --use-pep517`.                                                                                                                     
python3.11-fluent-pygments>         ********************************************************************************
python3.11-fluent-pygments> !!                       
python3.11-fluent-pygments>   ir_d = dist.fetch_build_eggs(dist.install_requires)                          
python3.11-fluent-pygments> /nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/bin/python3.11: No module named pip
python3.11-fluent-pygments> error: Command '['/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/bin/python3.11', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmpw4bqqroj'
, '--quiet', 'six']' returned non-zero exit status 1.

@GetPsyched
Copy link
Member Author

Wow, can't believe I missed that; and so did ofborg for some reason. Fixed it, thanks!

@SuperSandro2000 SuperSandro2000 changed the title python-fluent: init python3Packages.fluent-pygments: init at 1.0 Jul 8, 2024
Copy link
Member

@erictapen erictapen left a comment

Choose a reason for hiding this comment

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

Looks good and builds for me. Is there anything else blocking this?

@erictapen
Copy link
Member

@GrahamcOfBorg build python3Packages.fluent-syntax python3Packages.fluent-runtime python3Packages.fluent-pygments

@GetPsyched
Copy link
Member Author

No blockers from my end.

@erictapen
Copy link
Member

@GrahamcOfBorg build python3Packages.fluent-syntax python3Packages.fluent-runtime python3Packages.fluent-pygments

Copy link
Member

@erictapen erictapen left a comment

Choose a reason for hiding this comment

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

There is now a test failure for fluent-runtime:

python3.12-fluent-runtime> =================================== FAILURES ===================================
python3.12-fluent-runtime> _________________________ TestFluentDate.test_timeZone _________________________
python3.12-fluent-runtime> self = <tests.test_types.TestFluentDate testMethod=test_timeZone>
python3.12-fluent-runtime>     def test_timeZone(self):
python3.12-fluent-runtime>         en_GB = Locale.parse('en_GB')
python3.12-fluent-runtime>         LondonTZ = pytz.timezone('Europe/London')
python3.12-fluent-runtime>         # 1st July is a date in British Summer Time
python3.12-fluent-runtime>         # datetime object with tzinfo set to BST
python3.12-fluent-runtime>         dt1 = datetime(2018, 7, 1, 23, 30, 0, tzinfo=pytz.UTC).astimezone(LondonTZ)
python3.12-fluent-runtime>         fd1 = fluent_date(dt1, dateStyle='short', timeStyle='short')
python3.12-fluent-runtime>         self.assertEqual(fd1.format(en_GB), '02/07/2018, 00:30')
python3.12-fluent-runtime>         fd1b = fluent_date(dt1, dateStyle='full', timeStyle='full')
python3.12-fluent-runtime> >       self.assertRegex(fd1b.format(en_GB), '^Monday, 2 July 2018(,| at) 00:30:00 British Summer Time$')
python3.12-fluent-runtime> E       AssertionError: Regex didn't match: '^Monday, 2 July 2018(,| at) 00:30:00 British Summer Time$' not found in 'Monday 2 July 2018, 00:30:00 British Summer Time'
python3.12-fluent-runtime> tests/test_types.py:249: AssertionError
python3.12-fluent-runtime> =============================== warnings summary ===============================
python3.12-fluent-runtime> tests/test_types.py::TestFluentDate::test_copy_attributes
python3.12-fluent-runtime>   /build/source/fluent.runtime/fluent/runtime/types.py:308: UserWarning: FluentDateType option hour12 is not yet supported
python3.12-fluent-runtime>     warnings.warn(f"FluentDateType option {k} is not yet supported")
python3.12-fluent-runtime> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
python3.12-fluent-runtime> =========================== short test summary info ============================
python3.12-fluent-runtime> FAILED tests/test_types.py::TestFluentDate::test_timeZone - AssertionError: Regex didn't match: '^Monday, 2 July 2018(,| at) 00:30:00 B...
python3.12-fluent-runtime> ============= 1 failed, 179 passed, 1 skipped, 1 warning in 0.31s ==============
python3.12-fluent-runtime> /nix/store/5r0df66ikad3xw06azlqvswcvncll8wa-stdenv-linux/setup: line 1641: pop_var_context: head of shell_variables not a function context

@erictapen
Copy link
Member

Looks like this PR would fix the test failure: projectfluent/python-fluent#203

@GetPsyched
Copy link
Member Author

Interesting, it didn't fail when I made the commit, but it does now.

I tried adding a patch using fetchpatch but got some parsing error. I don't want to add the patch to the repo itself so I've disabled the test with the PR in a comment.

@erictapen
Copy link
Member

@GrahamcOfBorg build python3Packages.fluent-syntax python3Packages.fluent-runtime python3Packages.fluent-pygments

Copy link
Member

@erictapen erictapen left a comment

Choose a reason for hiding this comment

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

LGTM again!

@erictapen
Copy link
Member

@SuperSandro2000 can you unblock the PR/give it another look?

@SuperSandro2000 SuperSandro2000 merged commit aa70ff8 into NixOS:master Jul 19, 2024
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: python 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants