| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -335,39 +335,6 @@ Miscellaneous | |||
| 335 | 335 | feature set. | |
| 336 | 336 | ||
| 337 | 337 | ||
| 338 | - Information about the version of the lzma library in use is available through | ||
| 339 | - the following constants: | ||
| 340 | - | ||
| 341 | - | ||
| 342 | - .. data:: LZMA_VERSION | ||
| 343 | - .. data:: LZMA_VERSION_STRING | ||
| 344 | - | ||
| 345 | - The version of the lzma C library actually loaded at runtime, in both | ||
| 346 | - integer and string forms. | ||
| 347 | - | ||
| 348 | - .. versionadded:: 3.15 | ||
| 349 | - | ||
| 350 | - .. data:: LZMA_HEADER_VERSION | ||
| 351 | - .. data:: LZMA_HEADER_VERSION_STRING | ||
| 352 | - | ||
| 353 | - The version of the lzma library that was used for building the module, in | ||
| 354 | - both integer and string forms. This may be different from the lzma library | ||
| 355 | - actually used at runtime. | ||
| 356 | - | ||
| 357 | - .. versionadded:: 3.15 | ||
| 358 | - | ||
| 359 | - The version number and string formats are as defined in by C library. The | ||
| 360 | - integer is represented in decimal digits as ``jmmmppps`` where ``j`` is the | ||
| 361 | - major version, ``mmm`` is the minor version, ``ppp`` is the patch level, and | ||
| 362 | - ``s`` is the "stability indicator" (2 means stable):: | ||
| 363 | - | ||
| 364 | - >>> import lzma | ||
| 365 | - >>> lzma.LZMA_VERSION | ||
| 366 | - 50020052 | ||
| 367 | - >>> lzma.LZMA_VERSION_STRING | ||
| 368 | - '5.2.5' | ||
| 369 | - | ||
| 370 | - | ||
| 371 | 338 | .. _filter-chain-specs: | |
| 372 | 339 | ||
| 373 | 340 | Specifying custom filter chains | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,8 +15,6 @@ | |||
| 15 | 15 | "FILTER_ARM", "FILTER_ARMTHUMB", "FILTER_POWERPC", "FILTER_SPARC", | |
| 16 | 16 | "FILTER_ARM64", "FILTER_RISCV", | |
| 17 | 17 | "FORMAT_AUTO", "FORMAT_XZ", "FORMAT_ALONE", "FORMAT_RAW", | |
| 18 | - "LZMA_HEADER_VERSION", "LZMA_HEADER_VERSION_STRING", | ||
| 19 | - "LZMA_VERSION", "LZMA_VERSION_STRING", | ||
| 20 | 18 | "MF_HC3", "MF_HC4", "MF_BT2", "MF_BT3", "MF_BT4", | |
| 21 | 19 | "MODE_FAST", "MODE_NORMAL", "PRESET_DEFAULT", "PRESET_EXTREME", | |
| 22 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -389,14 +389,6 @@ def test_riscv_filter_constant_exists(self): | |||
| 389 | 389 | def test_arm64_filter_constant_exists(self): | |
| 390 | 390 | self.assertTrue(lzma.FILTER_ARM64) | |
| 391 | 391 | ||
| 392 | - def test_lzma_header_versions(self): | ||
| 393 | - self.assertIsInstance(lzma.LZMA_HEADER_VERSION_STRING, str) | ||
| 394 | - self.assertGreater(lzma.LZMA_HEADER_VERSION, 0) | ||
| 395 | - | ||
| 396 | - def test_lzma_versions(self): | ||
| 397 | - self.assertIsInstance(lzma.LZMA_VERSION_STRING, str) | ||
| 398 | - self.assertGreater(lzma.LZMA_VERSION, 0) | ||
| 399 | - | ||
| 400 | 392 | ||
| 401 | 393 | class CompressDecompressFunctionTestCase(unittest.TestCase): | |
| 402 | 394 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,2 +1 @@ | |||
| 1 | - :mod:`lzma` gains C library version info constants and adds constants to | ||
| 2 | - support the newer BCJ filters for ARM64 and RISC-V. | ||
| 1 | + :mod:`lzma` adds constants to support the newer BCJ filters for ARM64 and RISC-V. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1603,27 +1603,6 @@ lzma_exec(PyObject *module) | |||
| 1603 | 1603 | return -1; | |
| 1604 | 1604 | } | |
| 1605 | 1605 | ||
| 1606 | - if (PyModule_AddStringConstant( | ||
| 1607 | - module, "LZMA_HEADER_VERSION_STRING", | ||
| 1608 | - LZMA_VERSION_STRING) < 0) { | ||
| 1609 | - return -1; | ||
| 1610 | - } | ||
| 1611 | - if (PyModule_AddStringConstant( | ||
| 1612 | - module, "LZMA_VERSION_STRING", | ||
| 1613 | - lzma_version_string()) < 0) { | ||
| 1614 | - return -1; | ||
| 1615 | - } | ||
| 1616 | - PyObject *uint32_obj = PyLong_FromUnsignedLong(LZMA_VERSION); | ||
| 1617 | - if (PyModule_AddObject(module, "LZMA_HEADER_VERSION", uint32_obj) < 0) { | ||
| 1618 | - Py_XDECREF(uint32_obj); | ||
| 1619 | - return -1; | ||
| 1620 | - } | ||
| 1621 | - uint32_obj = PyLong_FromUnsignedLong(lzma_version_number()); | ||
| 1622 | - if (PyModule_AddObject(module, "LZMA_VERSION", uint32_obj) < 0) { | ||
| 1623 | - Py_XDECREF(uint32_obj); | ||
| 1624 | - return -1; | ||
| 1625 | - } | ||
| 1626 | - | ||
| 1627 | 1606 | return 0; | |
| 1628 | 1607 | } | |
| 1629 | 1608 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments