Skip to content

bpo-36101: remove non-ascii characters in docstring #12018

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 2 commits into from Feb 24, 2019
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
8 changes: 4 additions & 4 deletions Modules/_curses_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,12 @@ _curses_panel.panel.set_userptr
obj: object
/

Set the panels user pointer to obj.
Set the panel's user pointer to obj.
[clinic start generated code]*/

static PyObject *
_curses_panel_panel_set_userptr(PyCursesPanelObject *self, PyObject *obj)
/*[clinic end generated code: output=6fb145b3af88cf4a input=2056be1cd148b05c]*/
/*[clinic end generated code: output=6fb145b3af88cf4a input=d2c6a9dbefabbf39]*/
{
PyObject *oldobj;
int rc;
Expand Down Expand Up @@ -587,12 +587,12 @@ _curses_panel.update_panels

Updates the virtual screen after changes in the panel stack.

This does not call curses.doupdate(), so youll have to do this yourself.
This does not call curses.doupdate(), so you'll have to do this yourself.
[clinic start generated code]*/

static PyObject *
_curses_panel_update_panels_impl(PyObject *module)
/*[clinic end generated code: output=2f3b4c2e03d90ded input=a127069202b0a097]*/
/*[clinic end generated code: output=2f3b4c2e03d90ded input=5299624c9a708621]*/
{
PyCursesInitialised;
update_panels();
Expand Down
6 changes: 3 additions & 3 deletions Modules/clinic/_curses_panel.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Python/clinic/context.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Python/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,12 +592,12 @@ _contextvars_Context_keys_impl(PyContext *self)
/*[clinic input]
_contextvars.Context.values

Return a list of all variables values in the context object.
Return a list of all variables' values in the context object.
[clinic start generated code]*/

static PyObject *
_contextvars_Context_values_impl(PyContext *self)
/*[clinic end generated code: output=d286dabfc8db6dde input=6c3d08639ba3bf67]*/
/*[clinic end generated code: output=d286dabfc8db6dde input=ce8075d04a6ea526]*/
{
return _PyHamt_NewIterValues(self->ctx_vars);
}
Expand Down
3 changes: 3 additions & 0 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,9 @@ def render(self, clinic, signatures):
return self.render_function(clinic, function)

def docstring_for_c_string(self, f):
if re.search(r'[^\x00-\x7F]', f.docstring):
warn("Non-ascii character appear in docstring.")

text, add, output = _text_accumulator()
# turn docstring into a properly quoted C string
for line in f.docstring.split('\n'):
Expand Down