Skip to content

python312Packages.pysrt: drop nose dependency#330441

Merged
emilazy merged 1 commit intoNixOS:masterfrom
Sigmanificient:pysrt
Jul 27, 2024
Merged

python312Packages.pysrt: drop nose dependency#330441
emilazy merged 1 commit intoNixOS:masterfrom
Sigmanificient:pysrt

Conversation

@Sigmanificient
Copy link
Member

@Sigmanificient Sigmanificient commented Jul 27, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jul 27, 2024
@Sigmanificient Sigmanificient force-pushed the pysrt branch 2 times, most recently from 21d4c38 to 81a49b9 Compare July 27, 2024 15:43
@Sigmanificient Sigmanificient changed the title python312Packagees.pysrt: drop nose dependency python312Packages.pysrt: drop nose dependency Jul 27, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jul 27, 2024
@emilazy
Copy link
Member

emilazy commented Jul 27, 2024

Please migrate to pyproject = true;, and it looks like the licence should be gpl3Only. LGTM otherwise.

Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

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

Uh, spoke too soon.

=================================== FAILURES ===================================
______________________________ TestSlice.test_at _______________________________

self = <tests.test_srtfile.TestSlice testMethod=test_at>

    def test_at(self):
>       self.assertEquals(len(self.file.at((0, 0, 31, 0))), 1)
E       AttributeError: 'TestSlice' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

tests/test_srtfile.py:120: AttributeError
_________________________ TestText.test_multiple_item __________________________

self = <tests.test_srtfile.TestText testMethod=test_multiple_item>

    def test_multiple_item(self):
        srt_file = SubRipFile([
            SubRipItem(1, {'seconds': 0}, {'seconds': 3}, 'Hello'),
            SubRipItem(1, {'seconds': 1}, {'seconds': 2}, 'World !')
        ])
>       self.assertEquals(srt_file.text, 'Hello\nWorld !')
E       AttributeError: 'TestText' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

tests/test_srtfile.py:147: AttributeError
__________________________ TestText.test_single_item ___________________________

self = <tests.test_srtfile.TestText testMethod=test_single_item>

    def test_single_item(self):
        srt_file = SubRipFile([
            SubRipItem(1, {'seconds': 1}, {'seconds': 2}, 'Hello')
        ])
>       self.assertEquals(srt_file.text, 'Hello')
E       AttributeError: 'TestText' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

tests/test_srtfile.py:140: AttributeError
_____________________ TestIntegration.test_missing_indexes _____________________

self = <tests.test_srtfile.TestIntegration testMethod=test_missing_indexes>

    def test_missing_indexes(self):
        items = pysrt.open(os.path.join(self.base_path, 'no-indexes.srt'))
>       self.assertEquals(len(items), 7)
E       AttributeError: 'TestIntegration' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

tests/test_srtfile.py:254: AttributeError
________________ TestSerialAndParsing.test_junk_after_timestamp ________________

self = <tests.test_srtitem.TestSerialAndParsing testMethod=test_junk_after_timestamp>

    def test_junk_after_timestamp(self):
        item = SubRipItem.from_string(self.junk_after_timestamp)
>       self.assertEquals(item, self.item)
E       AttributeError: 'TestSerialAndParsing' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

tests/test_srtitem.py:210: AttributeError
______________________ TestSerialAndParsing.test_no_index ______________________

self = <tests.test_srtitem.TestSerialAndParsing testMethod=test_no_index>

    def test_no_index(self):
        item = SubRipItem.from_string(self.no_index)
>       self.assertEquals(item.index, None)
E       AttributeError: 'TestSerialAndParsing' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

tests/test_srtitem.py:205: AttributeError
____________________ TestSerialAndParsing.test_string_index ____________________

self = <tests.test_srtitem.TestSerialAndParsing testMethod=test_string_index>

    def test_string_index(self):
        item = SubRipItem.from_string(self.string_index)
>       self.assertEquals(item.index, 'foo')
E       AttributeError: 'TestSerialAndParsing' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

tests/test_srtitem.py:200: AttributeError
=========================== short test summary info ============================
FAILED tests/test_srtfile.py::TestSlice::test_at - AttributeError: 'TestSlice' object has no attribute 'assertEquals'. Did you...
FAILED tests/test_srtfile.py::TestText::test_multiple_item - AttributeError: 'TestText' object has no attribute 'assertEquals'. Did you ...
FAILED tests/test_srtfile.py::TestText::test_single_item - AttributeError: 'TestText' object has no attribute 'assertEquals'. Did you ...
FAILED tests/test_srtfile.py::TestIntegration::test_missing_indexes - AttributeError: 'TestIntegration' object has no attribute 'assertEquals'. D...
FAILED tests/test_srtitem.py::TestSerialAndParsing::test_junk_after_timestamp - AttributeError: 'TestSerialAndParsing' object has no attribute 'assertEqual...
FAILED tests/test_srtitem.py::TestSerialAndParsing::test_no_index - AttributeError: 'TestSerialAndParsing' object has no attribute 'assertEqual...
FAILED tests/test_srtitem.py::TestSerialAndParsing::test_string_index - AttributeError: 'TestSerialAndParsing' object has no attribute 'assertEqual...
========================= 7 failed, 68 passed in 0.45s =========================

@Sigmanificient
Copy link
Member Author

Hopefully it's good now

@Sigmanificient
Copy link
Member Author

Almost forget the license change

Comment on lines 28 to 33
Copy link
Member

Choose a reason for hiding this comment

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

This was actually fixed upstream; it might be better to just pin to the latest Git commit, or vendor the relevant commit. This is fine too though so I’ll merge if you don’t feel like doing that.

@emilazy
Copy link
Member

emilazy commented Jul 27, 2024

Result of nixpkgs-review pr 330441 run on x86_64-linux 1

4 packages marked as broken and skipped:
  • python311Packages.subliminal
  • python311Packages.subliminal.dist
  • python312Packages.subliminal
  • python312Packages.subliminal.dist
4 packages built:
  • python311Packages.pysrt
  • python311Packages.pysrt.dist
  • python312Packages.pysrt
  • python312Packages.pysrt.dist

@emilazy emilazy merged commit 52e4d16 into NixOS:master Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants