Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a95775e

Browse filesBrowse files
authored
Merge pull request #24943 from oscargus/pypyspecialcaseremoval
Remove special casing for PyPy not required anymore
2 parents 21663b5 + be1f0c2 commit a95775e
Copy full SHA for a95775e

File tree

Expand file treeCollapse file tree

4 files changed

+0
-41
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+0
-41
lines changed

‎src/_c_internal_utils.c

Copy file name to clipboardExpand all lines: src/_c_internal_utils.c
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,7 @@ mpl_GetCurrentProcessExplicitAppUserModelID(PyObject* module)
6868
wchar_t* appid = NULL;
6969
HRESULT hr = GetCurrentProcessExplicitAppUserModelID(&appid);
7070
if (FAILED(hr)) {
71-
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x07030600
72-
/* Remove when we require PyPy 7.3.6 */
73-
PyErr_SetFromWindowsErr(hr);
74-
return NULL;
75-
#else
7671
return PyErr_SetFromWindowsErr(hr);
77-
#endif
7872
}
7973
PyObject* py_appid = PyUnicode_FromWideChar(appid, -1);
8074
CoTaskMemFree(appid);
@@ -95,13 +89,7 @@ mpl_SetCurrentProcessExplicitAppUserModelID(PyObject* module, PyObject* arg)
9589
HRESULT hr = SetCurrentProcessExplicitAppUserModelID(appid);
9690
PyMem_Free(appid);
9791
if (FAILED(hr)) {
98-
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x07030600
99-
/* Remove when we require PyPy 7.3.6 */
100-
PyErr_SetFromWindowsErr(hr);
101-
return NULL;
102-
#else
10392
return PyErr_SetFromWindowsErr(hr);
104-
#endif
10593
}
10694
Py_RETURN_NONE;
10795
#else

‎src/_macosx.m

Copy file name to clipboardExpand all lines: src/_macosx.m
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,7 @@ static void lazy_init(void) {
285285
NSApp = [NSApplication sharedApplication];
286286
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
287287

288-
#ifndef PYPY
289-
/* TODO: remove ifndef after the new PyPy with the PyOS_InputHook implementation
290-
get released: https://bitbucket.org/pypy/pypy/commits/caaf91a */
291288
PyOS_InputHook = wait_for_stdin;
292-
#endif
293289

294290
WindowServerConnectionManager* connectionManager = [WindowServerConnectionManager sharedManager];
295291
NSWorkspace* workspace = [NSWorkspace sharedWorkspace];

‎src/_path.h

Copy file name to clipboardExpand all lines: src/_path.h
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
#include "_backend_agg_basic_types.h"
2222
#include "numpy_cpp.h"
2323

24-
/* Compatibility for PyPy3.7 before 7.3.4. */
25-
#ifndef Py_DTSF_ADD_DOT_0
26-
#define Py_DTSF_ADD_DOT_0 0x2
27-
#endif
28-
2924
struct XY
3025
{
3126
double x;

‎src/ft2font_wrapper.cpp

Copy file name to clipboardExpand all lines: src/ft2font_wrapper.cpp
-20Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -575,19 +575,9 @@ static PyObject *PyFT2Font_get_fontmap(PyFT2Font *self, PyObject *args, PyObject
575575

576576
if (PyUnicode_Check(textobj)) {
577577
size = PyUnicode_GET_LENGTH(textobj);
578-
#if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x07040000)
579-
// PyUnicode_ReadChar is available from PyPy 7.3.2, but wheels do not
580-
// specify the micro-release version, so put the version bound at 7.4
581-
// to prevent generating wheels unusable on PyPy 7.3.{0,1}.
582-
Py_UNICODE *unistr = PyUnicode_AsUnicode(textobj);
583-
for (size_t i = 0; i < size; ++i) {
584-
codepoints.insert(unistr[i]);
585-
}
586-
#else
587578
for (size_t i = 0; i < size; ++i) {
588579
codepoints.insert(PyUnicode_ReadChar(textobj, i));
589580
}
590-
#endif
591581
} else {
592582
PyErr_SetString(PyExc_TypeError, "string must be str");
593583
return NULL;
@@ -656,19 +646,9 @@ static PyObject *PyFT2Font_set_text(PyFT2Font *self, PyObject *args, PyObject *k
656646
if (PyUnicode_Check(textobj)) {
657647
size = PyUnicode_GET_LENGTH(textobj);
658648
codepoints.resize(size);
659-
#if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x07040000)
660-
// PyUnicode_ReadChar is available from PyPy 7.3.2, but wheels do not
661-
// specify the micro-release version, so put the version bound at 7.4
662-
// to prevent generating wheels unusable on PyPy 7.3.{0,1}.
663-
Py_UNICODE *unistr = PyUnicode_AsUnicode(textobj);
664-
for (size_t i = 0; i < size; ++i) {
665-
codepoints[i] = unistr[i];
666-
}
667-
#else
668649
for (size_t i = 0; i < size; ++i) {
669650
codepoints[i] = PyUnicode_ReadChar(textobj, i);
670651
}
671-
#endif
672652
} else {
673653
PyErr_SetString(PyExc_TypeError, "set_text requires str-input.");
674654
return NULL;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.