@@ -5,20 +5,97 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## Unreleased
9
+
10
+ This version is all about improving the UX and upgrading it's tooling. Support for
11
+ Python 3.8 has been dropped, but 3.12 is now supported. Unfortunately this means
12
+ dropping support for Windows 7/8/8.1 as well. This was more or less necessary to keep
13
+ up with the latest versions of other dependencies as well as crucial bug fixes.
14
+
15
+ ### Fixed
16
+
17
+ - Various CI and linting tooling mistakes and made it more efficient.
18
+ - Fixed unsetting of verbosity and cracking modes on Windows systems by requiring
19
+ Python 3.9 or newer as the ` os.unsetenv ` function only existed on other operating
20
+ systems before then.
21
+ - Fixed value comparison used when unsetting cracking mode to "unset" string, not
22
+ ` -1 ` integer.
23
+
24
+ ### Changed
25
+
26
+ - Various doc-strings were improved and made more clear in various ways.
27
+ - Most PyDvdCss-inherited exceptions now try to call ` DvdCss.error() ` for you to
28
+ include potentially useful error information when the errors happen. Though, Errors
29
+ from the library are not always available.
30
+ - The base exception ` PyDvdCssException ` was renamed to ` PyDvdCssError ` .
31
+ - The exception ` LibDvdCssNotFound ` was renamed to ` LibraryNotFoundError ` .
32
+ - ` DvdCss.close() ` now only returns True if a device was actually closed when called.
33
+ - ` DvdCss.set_verbosity() ` has been renamed to ` DvdCss.set_verbosity_level() ` .
34
+ - ` DvdCss.error() ` is now a property, via ` @property ` decorator.
35
+ - ` DvdCss.error ` will now return None if no DVD device or directory was opened yet.
36
+ - ` DvdCss.error ` may now return None if there is no error string to return, or if
37
+ the error string is falsey (basically empty).
38
+ - ` DvdCss.error ` now does whitespace stripping on both the left and right instead
39
+ of just the right.
40
+ - ` DvdCss.is_scrambled() ` is now a property, via ` @property ` decorator.
41
+ - ` DvdCss.is_scrambled ` will now return False if no DVD device or directory was opened yet.
42
+ - ` DvdCss.open() ` changed parameter names from ` psz_target ` to ` target ` .
43
+ - ` DvdCss.seek() ` changed parameter names from ` i_blocks ` to ` sector ` and ` i_flags ` to
44
+ ` flag ` .
45
+ - ` DvdCss.read() ` changed parameter names from ` i_blocks ` to ` sectors ` and ` i_flags ` to
46
+ ` flag ` .
47
+ - ` DvdCss.set_verbosity_level() ` changed parameter names from ` verbosity ` to ` level ` .
48
+ - ` DvdCss.seek() ` now uses a ` SeekFlag ` enum for the ` flag ` parameter instead of an
49
+ integer value. However, you can still use an int if you prefer.
50
+ - ` DvdCss.read() ` now uses a ` ReadFlag ` enum for the ` flag ` parameter instead of an
51
+ integer value. However, you can still use an int if you prefer.
52
+ - ` DvdCss.set_verbosity_level() ` now uses a ` VerbosityLevel ` enum for the ` level ` parameter
53
+ and return value instead of an integer value. However, you can still pass an int if
54
+ you prefer.
55
+ - ` DvdCss.set_cracking_mode() ` now uses a ` CrackingMode ` enum for the ` mode ` parameter
56
+ and return value instead of a string value. However, you can still pass a string if
57
+ you prefer.
58
+ - ` DvdCss.open() ` and ` DvdCss.open_stream() ` now raises an ` AlreadyInUseError ` exception
59
+ instead of a ` ValueError ` when you try to open a 2nd disc in the same class instance.
60
+ - ` DvdCss.open() ` and ` DvdCss.open_stream() ` now raises an ` OpenFailureError ` exception
61
+ instead of returning -1 on failure to open and initialize the device or directory.
62
+ - ` DvdCss.seek() ` and ` DvdCss.read() ` now raises a ` NoDeviceError ` exception when called
63
+ if no DVD device or directory was opened yet.
64
+ - ` DvdCss.seek() ` now raises a ` SeekError ` exception instead of returning negative
65
+ numbers on seek failures.
66
+ - ` DvdCss.read() ` now raises a ` SeekError ` exception instead of a negative integer when
67
+ it fails to seek.
68
+ - ` DvdCss.read() ` now raises a ` ReadError ` exception instead of an ` IOError ` on failure
69
+ to read one or more sectors.
70
+ - ` DvdCss.close() ` now raises a ` CloseError ` exception instead of a ` ValueError ` on
71
+ failure to close an open device or directory.
72
+ - ` DvdCss.dispose() ` is now deprecated and an alias of ` DvdCss.close() ` and no longer
73
+ unsets the verbosity level or cracking mode environment variables. This is because
74
+ this is set in your environment, not per-instance. Its not logical to reset it when
75
+ it will affect every other instance running. Instead, pay close attention to your
76
+ instances and handle resetting the level/mode yourself.
77
+ - The list of possible library names were put into constants as ` LIBRARY_NAMES ` .
78
+
79
+ ### Removed
80
+
81
+ - The ` SECTOR_SIZE ` , ` BLOCK_BUFFER ` , ` NO_FLAGS ` , ` READ_DECRYPT ` , ` SEEK_MPEG ` ,
82
+ ` SEEK_KEY ` , ` flags_m ` , and ` flags_s ` class variables were removed. The variables to
83
+ do with flags/read/seek were refactored as SeekFlag and ReadFlag.
84
+
8
85
## [ 1.4.0] - 2023-10-12
9
86
10
- ## Added
87
+ ### Added
11
88
12
89
- Added function ` open_stream() ` that calls the ` dvdcss_open_stream ` function of the libdvdcss library.
13
90
- Defined ` dvdcss_stream_cb ` , ` pf_seek ` , ` pf_read ` , ` pf_readv ` , and ` dvdcss_open_stream ` .
14
91
15
- ## Changed
92
+ ### Changed
16
93
17
94
- Various structural and organisational changes to the repository, CI/CD, and more.
18
95
- Updated dependencies as far as I could while keeping support for actively supported versions of Python.
19
96
- Moved all documentation dependencies from dev to main group as optionals installed through the ` docs ` extra.
20
97
21
- ## Removed
98
+ ### Removed
22
99
23
100
- Dropped support for Python 3.5, 3.6, and 3.7. This is to have support for the latest dependency versions.
24
101
- Removed all uses of poetry-dynamic-versioning as it's simply unnecessary.
0 commit comments