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

Remove special casing for PyPy not required anymore #24943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions 12 src/_c_internal_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,7 @@ mpl_GetCurrentProcessExplicitAppUserModelID(PyObject* module)
wchar_t* appid = NULL;
HRESULT hr = GetCurrentProcessExplicitAppUserModelID(&appid);
if (FAILED(hr)) {
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x07030600
/* Remove when we require PyPy 7.3.6 */
PyErr_SetFromWindowsErr(hr);
return NULL;
#else
return PyErr_SetFromWindowsErr(hr);
#endif
}
PyObject* py_appid = PyUnicode_FromWideChar(appid, -1);
CoTaskMemFree(appid);
Expand All @@ -95,13 +89,7 @@ mpl_SetCurrentProcessExplicitAppUserModelID(PyObject* module, PyObject* arg)
HRESULT hr = SetCurrentProcessExplicitAppUserModelID(appid);
PyMem_Free(appid);
if (FAILED(hr)) {
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x07030600
/* Remove when we require PyPy 7.3.6 */
PyErr_SetFromWindowsErr(hr);
return NULL;
#else
return PyErr_SetFromWindowsErr(hr);
#endif
}
Py_RETURN_NONE;
#else
Expand Down
4 changes: 0 additions & 4 deletions 4 src/_macosx.m
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,7 @@ static void lazy_init(void) {
NSApp = [NSApplication sharedApplication];
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];

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

WindowServerConnectionManager* connectionManager = [WindowServerConnectionManager sharedManager];
NSWorkspace* workspace = [NSWorkspace sharedWorkspace];
Expand Down
5 changes: 0 additions & 5 deletions 5 src/_path.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
#include "_backend_agg_basic_types.h"
#include "numpy_cpp.h"

/* Compatibility for PyPy3.7 before 7.3.4. */
#ifndef Py_DTSF_ADD_DOT_0
#define Py_DTSF_ADD_DOT_0 0x2
#endif

struct XY
{
double x;
Expand Down
20 changes: 0 additions & 20 deletions 20 src/ft2font_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,19 +575,9 @@ static PyObject *PyFT2Font_get_fontmap(PyFT2Font *self, PyObject *args, PyObject

if (PyUnicode_Check(textobj)) {
size = PyUnicode_GET_LENGTH(textobj);
#if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x07040000)
// PyUnicode_ReadChar is available from PyPy 7.3.2, but wheels do not
// specify the micro-release version, so put the version bound at 7.4
// to prevent generating wheels unusable on PyPy 7.3.{0,1}.
Py_UNICODE *unistr = PyUnicode_AsUnicode(textobj);
for (size_t i = 0; i < size; ++i) {
codepoints.insert(unistr[i]);
}
#else
for (size_t i = 0; i < size; ++i) {
codepoints.insert(PyUnicode_ReadChar(textobj, i));
}
#endif
} else {
PyErr_SetString(PyExc_TypeError, "string must be str");
return NULL;
Expand Down Expand Up @@ -656,19 +646,9 @@ static PyObject *PyFT2Font_set_text(PyFT2Font *self, PyObject *args, PyObject *k
if (PyUnicode_Check(textobj)) {
size = PyUnicode_GET_LENGTH(textobj);
codepoints.resize(size);
#if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x07040000)
// PyUnicode_ReadChar is available from PyPy 7.3.2, but wheels do not
// specify the micro-release version, so put the version bound at 7.4
// to prevent generating wheels unusable on PyPy 7.3.{0,1}.
Py_UNICODE *unistr = PyUnicode_AsUnicode(textobj);
for (size_t i = 0; i < size; ++i) {
codepoints[i] = unistr[i];
}
#else
for (size_t i = 0; i < size; ++i) {
codepoints[i] = PyUnicode_ReadChar(textobj, i);
}
#endif
} else {
PyErr_SetString(PyExc_TypeError, "set_text requires str-input.");
return NULL;
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.