Skip to content

Commit cafa53c

Browse files
committed
Merge remote-tracking branch 'main/master'
Conflicts: CHANGELOG INSTALL doc/_templates/indexsidebar.html doc/mpl_toolkits/mplot3d/api.rst examples/api/sankey_demo_old.py examples/pylab_examples/stix_fonts_demo.py examples/user_interfaces/embedding_in_tk.py examples/user_interfaces/embedding_in_tk2.py lib/matplotlib/axes.py lib/matplotlib/backend_bases.py lib/matplotlib/backends/backend_gtk.py lib/matplotlib/backends/backend_qt4.py lib/matplotlib/backends/backend_svg.py lib/matplotlib/backends/qt4_editor/formlayout.py lib/matplotlib/lines.py lib/matplotlib/markers.py lib/matplotlib/mathtext.py lib/matplotlib/scale.py lib/matplotlib/sphinxext/ipython_directive.py lib/matplotlib/sphinxext/plot_directive.py lib/matplotlib/tests/baseline_images/test_axes/symlog.pdf lib/matplotlib/tests/baseline_images/test_axes/symlog.png lib/matplotlib/tests/baseline_images/test_axes/symlog.svg lib/matplotlib/tests/baseline_images/test_axes/symlog2.pdf lib/matplotlib/tests/baseline_images/test_axes/symlog2.png lib/matplotlib/tests/baseline_images/test_axes/symlog2.svg lib/matplotlib/tests/test_axes.py lib/matplotlib/tests/test_figure.py lib/matplotlib/tests/test_mlab.py lib/matplotlib/tests/test_text.py lib/matplotlib/textpath.py lib/matplotlib/ticker.py lib/mpl_toolkits/axisartist/angle_helper.py release/win32/data/setupwin.py release/win32/data/setupwinegg.py setupext.py src/_png.cpp src/_tkagg.cpp
2 parents cedc5ad + 1aa1161 commit cafa53c

File tree

208 files changed

+15408
-1520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+15408
-1520
lines changed

.mailmap

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
John Hunter <jdh2358@gmail.com> jdh2358 <jdh2358@gmail.com>
2+
Michael Droettboom <mdboom@gmail.com> Michael Droettboom <mdroe@stsci.edu>
3+
Jouni K. Seppänen <jks@iki.fi> Jouni K. Seppänen <jks@iki.fi>
4+
Ben Root <ben.v.root@gmail.com> Benjamin Root <ben.v.root@gmail.com>
5+
Michiel de Hoon <mjldehoon@yahoo.com> Michiel de Hoon <mdehoon@michiel-de-hoons-computer.local>
6+
Kevin Davies <kdavies4@gmail.com> Kevin Davies <daviesk24@yahoo.com>
7+
Christoph Gohlke <cgohlke@uci.edu> cgohlke <cgohlke@uci.edu>

CHANGELOG

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2011-10-25 added support for \operatorname to mathtext,
2+
including the ability to insert spaces, such as
3+
$\operatorname{arg\,max}$ - PI
4+
15
2011-08-18 Change api of Axes.get_tightbbox and add an optional
26
keyword parameter *call_axes_locator*. - JJL
37

@@ -29,6 +33,14 @@
2933
Significant revisions to the documentation as well.
3034
- BVR
3135

36+
2011-07-07 Added compatibility with IPython strategy for picking
37+
a version of Qt4 support, and an rcParam for making
38+
the choice explicitly: backend.qt4. - EF
39+
40+
2011-07-07 Modified AutoMinorLocator to improve automatic choice of
41+
the number of minor intervals per major interval, and
42+
to allow one to specify this number via a kwarg. - EF
43+
3244
2011-06-28 3D versions of scatter, plot, plot_wireframe, plot_surface,
3345
bar3d, and some other functions now support empty inputs. - BVR
3446

@@ -39,10 +51,16 @@
3951
2011-06-22 Add axes.labelweight parameter to set font weight to axis
4052
labels - MGD.
4153

54+
2011-06-20 Add pause function to pyplot. - EF
55+
4256
2011-06-16 Added *bottom* keyword parameter for the stem command.
4357
Also, implemented a legend handler for the stem plot.
4458
- JJL
4559

60+
2011-06-16 Added legend.frameon rcParams. - Mike Kaufman
61+
62+
2011-05-31 Made backend_qt4 compatible with PySide . - Gerald Storer
63+
4664
2011-04-17 Disable keyboard auto-repeat in qt4 backend by ignoring
4765
key events resulting from auto-repeat. This makes
4866
constrained zoom/pan work. - EF

CXX/Python2/ExtensionModule.hxx

+10-2
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,19 @@ namespace Py
136136
{
137137
MethodDefExt<T> *method_def = (*i).second;
138138

139-
static PyObject *self = PyCObject_FromVoidPtr( this, do_not_dealloc );
139+
#if PY_VERSION_HEX < 0x02070000
140+
static PyObject *self = PyCObject_FromVoidPtr( this, do_not_dealloc );
141+
#else
142+
static PyObject *self = PyCapsule_New( this, NULL, NULL );
143+
#endif
140144

141145
Tuple args( 2 );
142146
args[0] = Object( self );
143-
args[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ) );
147+
#if PY_VERSION_HEX < 0x02070000
148+
args[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ) );
149+
#else
150+
args[1] = Object( PyCapsule_New( method_def, NULL, NULL ) );
151+
#endif
144152

145153
PyObject *func = PyCFunction_New
146154
(

CXX/Python2/ExtensionOldType.hxx

+23-8
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,11 @@ namespace Py
178178
Tuple self( 2 );
179179

180180
self[0] = Object( this );
181-
self[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ), true );
182-
181+
#if PY_VERSION_HEX < 0x02070000
182+
self[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ), true );
183+
#else
184+
self[1] = Object( PyCapsule_New( method_def, NULL, NULL ), true );
185+
#endif
183186
PyObject *func = PyCFunction_New( &method_def->ext_meth_def, self.ptr() );
184187

185188
return Object(func, true);
@@ -235,8 +238,12 @@ namespace Py
235238

236239
PyObject *self_in_cobject = self_and_name_tuple[0].ptr();
237240
T *self = static_cast<T *>( self_in_cobject );
238-
MethodDefExt<T> *meth_def = reinterpret_cast<MethodDefExt<T> *>(
239-
PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() ) );
241+
#if PY_VERSION_HEX < 0x02070000
242+
void *capsule = PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() );
243+
#else
244+
void *capsule = PyCapsule_GetPointer( self_and_name_tuple[1].ptr(), NULL );
245+
#endif
246+
MethodDefExt<T> *meth_def = reinterpret_cast<MethodDefExt<T> *>( capsule );
240247
Object result;
241248

242249
// Adding try & catch in case of STL debug-mode exceptions.
@@ -271,8 +278,12 @@ namespace Py
271278
PyObject *self_in_cobject = self_and_name_tuple[0].ptr();
272279
T *self = static_cast<T *>( self_in_cobject );
273280

274-
MethodDefExt<T> *meth_def = reinterpret_cast<MethodDefExt<T> *>(
275-
PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() ) );
281+
#if PY_VERSION_HEX < 0x02070000
282+
void *capsule = PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() );
283+
#else
284+
void *capsule = PyCapsule_GetPointer( self_and_name_tuple[1].ptr(), NULL );
285+
#endif
286+
MethodDefExt<T> *meth_def = reinterpret_cast<MethodDefExt<T> *>( capsule );
276287
Tuple args( _args );
277288

278289
Object result;
@@ -308,8 +319,12 @@ namespace Py
308319
PyObject *self_in_cobject = self_and_name_tuple[0].ptr();
309320
T *self = static_cast<T *>( self_in_cobject );
310321

311-
MethodDefExt<T> *meth_def = reinterpret_cast<MethodDefExt<T> *>(
312-
PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() ) );
322+
#if PY_VERSION_HEX < 0x02070000
323+
void *capsule = PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() );
324+
#else
325+
void *capsule = PyCapsule_GetPointer( self_and_name_tuple[1].ptr(), NULL );
326+
#endif
327+
MethodDefExt<T> *meth_def = reinterpret_cast<MethodDefExt<T> *>( capsule );
313328

314329
Tuple args( _args );
315330

CXX/Python2/IndirectPythonInterface.cxx

+10
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ namespace Py
4242
bool _Buffer_Check( PyObject *op ) { return (op)->ob_type == _Buffer_Type(); }
4343
bool _CFunction_Check( PyObject *op ) { return (op)->ob_type == _CFunction_Type(); }
4444
bool _Class_Check( PyObject *op ) { return (op)->ob_type == _Class_Type(); }
45+
#if PY_VERSION_HEX < 0x02070000
4546
bool _CObject_Check( PyObject *op ) { return (op)->ob_type == _CObject_Type(); }
47+
#endif
4648
bool _Complex_Check( PyObject *op ) { return (op)->ob_type == _Complex_Type(); }
4749
bool _Dict_Check( PyObject *op ) { return (op)->ob_type == _Dict_Type(); }
4850
bool _File_Check( PyObject *op ) { return (op)->ob_type == _File_Type(); }
@@ -123,7 +125,9 @@ static PyObject *ptr__PyTrue = NULL;
123125
static PyTypeObject *ptr__Buffer_Type = NULL;
124126
static PyTypeObject *ptr__CFunction_Type = NULL;
125127
static PyTypeObject *ptr__Class_Type = NULL;
128+
#if PY_VERSION_HEX < 0x02070000
126129
static PyTypeObject *ptr__CObject_Type = NULL;
130+
#endif
127131
static PyTypeObject *ptr__Complex_Type = NULL;
128132
static PyTypeObject *ptr__Dict_Type = NULL;
129133
static PyTypeObject *ptr__File_Type = NULL;
@@ -310,7 +314,9 @@ bool InitialisePythonIndirectInterface()
310314
ptr__Buffer_Type = GetPyTypeObject_As_PyTypeObjectPointer( "PyBuffer_Type" );
311315
ptr__CFunction_Type = GetPyTypeObject_As_PyTypeObjectPointer( "PyCFunction_Type" );
312316
ptr__Class_Type = GetPyTypeObject_As_PyTypeObjectPointer( "PyClass_Type" );
317+
#if PY_VERSION_HEX < 0x02070000
313318
ptr__CObject_Type = GetPyTypeObject_As_PyTypeObjectPointer( "PyCObject_Type" );
319+
#endif
314320
ptr__Complex_Type = GetPyTypeObject_As_PyTypeObjectPointer( "PyComplex_Type" );
315321
ptr__Dict_Type = GetPyTypeObject_As_PyTypeObjectPointer( "PyDict_Type" );
316322
ptr__File_Type = GetPyTypeObject_As_PyTypeObjectPointer( "PyFile_Type" );
@@ -398,7 +404,9 @@ PyObject * _True() { return ptr__PyTrue; }
398404
PyTypeObject * _Buffer_Type() { return ptr__Buffer_Type; }
399405
PyTypeObject * _CFunction_Type(){ return ptr__CFunction_Type; }
400406
PyTypeObject * _Class_Type() { return ptr__Class_Type; }
407+
#if PY_VERSION_HEX < 0x02070000
401408
PyTypeObject * _CObject_Type() { return ptr__CObject_Type; }
409+
#endif
402410
PyTypeObject * _Complex_Type() { return ptr__Complex_Type; }
403411
PyTypeObject * _Dict_Type() { return ptr__Dict_Type; }
404412
PyTypeObject * _File_Type() { return ptr__File_Type; }
@@ -542,7 +550,9 @@ PyObject * _True() { return Py_True; }
542550
PyTypeObject * _Buffer_Type() { return &PyBuffer_Type; }
543551
PyTypeObject * _CFunction_Type() { return &PyCFunction_Type; }
544552
PyTypeObject * _Class_Type() { return &PyClass_Type; }
553+
#if PY_VERSION_HEX < 0x02070000
545554
PyTypeObject * _CObject_Type() { return &PyCObject_Type; }
555+
#endif
546556
PyTypeObject * _Complex_Type() { return &PyComplex_Type; }
547557
PyTypeObject * _Dict_Type() { return &PyDict_Type; }
548558
PyTypeObject * _File_Type() { return &PyFile_Type; }

CXX/Python2/IndirectPythonInterface.hxx

+2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ bool _Instance_Check( PyObject *op );
113113
PyTypeObject * _Method_Type();
114114
bool _Method_Check( PyObject *op );
115115

116+
#if PY_VERSION_HEX < 0x02070000
116117
PyTypeObject * _CObject_Type();
117118
bool _CObject_Check( PyObject *op );
119+
#endif
118120

119121
PyTypeObject * _Complex_Type();
120122
bool _Complex_Check( PyObject *op );

CXX/Python2/cxx_extensions.cxx

+25-5
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,11 @@ extern "C" PyObject *method_keyword_call_handler( PyObject *_self_and_name_tuple
17191719
Tuple self_and_name_tuple( _self_and_name_tuple );
17201720

17211721
PyObject *self_in_cobject = self_and_name_tuple[0].ptr();
1722-
void *self_as_void = PyCObject_AsVoidPtr( self_in_cobject );
1722+
#if PY_VERSION_HEX < 0x02070000
1723+
void *self_as_void = PyCObject_AsVoidPtr( self_in_cobject );
1724+
#else
1725+
void *self_as_void = PyCapsule_GetPointer( self_in_cobject, NULL );
1726+
#endif
17231727
if( self_as_void == NULL )
17241728
return NULL;
17251729

@@ -1735,7 +1739,11 @@ extern "C" PyObject *method_keyword_call_handler( PyObject *_self_and_name_tuple
17351739
(
17361740
self->invoke_method_keyword
17371741
(
1738-
PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() ),
1742+
#if PY_VERSION_HEX < 0x02070000
1743+
PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() ),
1744+
#else
1745+
PyCapsule_GetPointer( self_and_name_tuple[1].ptr(), NULL ),
1746+
#endif
17391747
args,
17401748
keywords
17411749
)
@@ -1751,7 +1759,11 @@ extern "C" PyObject *method_keyword_call_handler( PyObject *_self_and_name_tuple
17511759
(
17521760
self->invoke_method_keyword
17531761
(
1754-
PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() ),
1762+
#if PY_VERSION_HEX < 0x02070000
1763+
PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() ),
1764+
#else
1765+
PyCapsule_GetPointer( self_and_name_tuple[1].ptr(), NULL ),
1766+
#endif
17551767
args,
17561768
keywords
17571769
)
@@ -1773,7 +1785,11 @@ extern "C" PyObject *method_varargs_call_handler( PyObject *_self_and_name_tuple
17731785
Tuple self_and_name_tuple( _self_and_name_tuple );
17741786

17751787
PyObject *self_in_cobject = self_and_name_tuple[0].ptr();
1776-
void *self_as_void = PyCObject_AsVoidPtr( self_in_cobject );
1788+
#if PY_VERSION_HEX < 0x02070000
1789+
void *self_as_void = PyCObject_AsVoidPtr( self_in_cobject );
1790+
#else
1791+
void *self_as_void = PyCapsule_GetPointer( self_in_cobject, NULL );
1792+
#endif
17771793
if( self_as_void == NULL )
17781794
return NULL;
17791795

@@ -1784,7 +1800,11 @@ extern "C" PyObject *method_varargs_call_handler( PyObject *_self_and_name_tuple
17841800
(
17851801
self->invoke_method_varargs
17861802
(
1787-
PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() ),
1803+
#if PY_VERSION_HEX < 0x02070000
1804+
PyCObject_AsVoidPtr( self_and_name_tuple[1].ptr() ),
1805+
#else
1806+
PyCapsule_GetPointer( self_and_name_tuple[1].ptr(), NULL ),
1807+
#endif
17881808
args
17891809
)
17901810
);

0 commit comments

Comments
 (0)