Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2928)

Side by Side Diff: Doc/whatsnew/3.3.rst

Issue 10181: Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Patch Set: Created 1 year, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Misc/NEWS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 **************************** 1 ****************************
2 What's New In Python 3.3 2 What's New In Python 3.3
3 **************************** 3 ****************************
4 4
5 :Author: Raymond Hettinger 5 :Author: Raymond Hettinger
6 :Release: |release| 6 :Release: |release|
7 :Date: |today| 7 :Date: |today|
8 8
9 .. Rules for maintenance: 9 .. Rules for maintenance:
10 10
(...skipping 29 matching lines...) Expand all
40 * It's helpful to add the bug/patch number as a comment: 40 * It's helpful to add the bug/patch number as a comment:
41 41
42 XXX Describe the transmogrify() function added to the socket 42 XXX Describe the transmogrify() function added to the socket
43 module. 43 module.
44 (Contributed by P.Y. Developer in :issue:`12345`.) 44 (Contributed by P.Y. Developer in :issue:`12345`.)
45 45
46 This saves the maintainer the effort of going through the Mercurial log 46 This saves the maintainer the effort of going through the Mercurial log
47 when researching a change. 47 when researching a change.
48 48
49 This article explains the new features in Python 3.3, compared to 3.2. 49 This article explains the new features in Python 3.3, compared to 3.2.
50
51
52 .. _pep-3118:
53
54 PEP 3118: New memoryview implementation and buffer protocol documentation
55 =========================================================================
56
57 :issue:`10181` - memoryview bug fixes and features.
58 Written by Stefan Krah.
59
60 The new memoryview implementation comprehensively fixes all ownership and
61 lifetime issues of dynamically allocated fields in the Py_buffer struct
62 that led to multiple crash reports. Additionally, several functions that
63 crashed or returned incorrect results for non-contiguous or multi-dimensional
64 input have been fixed.
65
66 The memoryview object now has a PEP-3118 compliant getbufferproc()
67 that checks the consumer's request type. Many new features have been
68 added, most of them work in full generality for non-contiguous arrays
69 and arrays with suboffsets.
70
71 The documentation has been updated, clearly spelling out responsibilities
72 for both exporters and consumers. Buffer request flags are grouped into
73 basic and compound flags. The memory layout of non-contiguous and
74 multi-dimensional NumPy-style arrays is explained.
75
76 Features
77 --------
78
79 * All native single character format specifiers in struct module syntax
80 (optionally prefixed with '@') are now supported.
81
82 * With some restrictions, the cast() method allows changing of format and
83 shape of C-contiguous arrays.
84
85 * Multi-dimensional list representations are supported for any array type.
86
87 * Multi-dimensional comparisons are supported for any array type.
88
89 * All array types are hashable if the exporting object is hashable
90 and the view is read-only.
91
92 * Arbitrary slicing of any 1-D arrays type is supported. For example, it
93 is now possible to reverse a memoryview in O(1) by using a negative step.
94
95 API changes
96 -----------
97
98 * The maximum number of dimensions is officially limited to 64.
99
100 * The representation of empty shape, strides and suboffsets is now
101 an empty tuple instead of None.
102
103 * Accessing a memoryview element with format 'B' (unsigned bytes)
104 now returns an integer (in accordance with the struct module syntax).
105 For returning a bytes object the view must be cast to 'c' first.
50 106
51 107
52 .. _pep-393: 108 .. _pep-393:
53 109
54 PEP 393: Flexible String Representation 110 PEP 393: Flexible String Representation
55 ======================================= 111 =======================================
56 112
57 The Unicode string type is changed to support multiple internal 113 The Unicode string type is changed to support multiple internal
58 representations, depending on the character with the largest Unicode ordinal 114 representations, depending on the character with the largest Unicode ordinal
59 (1, 2, or 4 bytes) in the represented string. This allows a space-efficient 115 (1, 2, or 4 bytes) in the represented string. This allows a space-efficient
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 ------------ 1013 ------------
958 1014
959 .. Issue #11591: When :program:`python` was started with :option:`-S`, 1015 .. Issue #11591: When :program:`python` was started with :option:`-S`,
960 ``import site`` will not add site-specific paths to the module search 1016 ``import site`` will not add site-specific paths to the module search
961 paths. In previous versions, it did. See changeset for doc changes in 1017 paths. In previous versions, it did. See changeset for doc changes in
962 various files. Contributed by Carl Meyer with editions by Éric Araujo. 1018 various files. Contributed by Carl Meyer with editions by Éric Araujo.
963 1019
964 .. Issue #10998: the -Q command-line flag and related artifacts have been 1020 .. Issue #10998: the -Q command-line flag and related artifacts have been
965 removed. Code checking sys.flags.division_warning will need updating. 1021 removed. Code checking sys.flags.division_warning will need updating.
966 Contributed by Éric Araujo. 1022 Contributed by Éric Araujo.
OLDNEW
« no previous file with comments | « no previous file | Misc/NEWS » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7