[issue34605] Avoid master/slave terminology
New submission from STINNER Victor <vstinner@redhat.com>: For diversity reasons, it would be nice to try to avoid "master" and "slave" terminology which can be associated to slavery. For more context, see: * https://github.com/antirez/redis/issues/3185 * https://www.drupal.org/node/2275877 * https://issues.apache.org/jira/browse/COUCHDB-2248 * https://github.com/django/django/pull/2692 ---------- assignee: docs@python components: 2to3 (2.x to 3.x conversion tool), Argument Clinic, Build, Cross-Build, Demos and Tools, Distutils, Documentation, Extension Modules, FreeBSD, IDLE, IO, Installation, Interpreter Core, Library (Lib), Regular Expressions, SSL, Tests, Tkinter, Unicode, Windows, XML, asyncio, ctypes, email, macOS messages: 324739 nosy: Alex.Willmer, asvetlov, barry, docs@python, dstufft, eric.araujo, ezio.melotti, koobs, larry, mrabarnett, ned.deily, paul.moore, r.david.murray, ronaldoussoren, steve.dower, terry.reedy, tim.golden, vstinner, yselivanov, zach.ware priority: normal severity: normal status: open title: Avoid master/slave terminology versions: Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
Ammar Askar <ammar@ammaraskar.com> added the comment: Do you have examples of where this occurs?
From https://github.com/python/cpython/search?p=1&q=master+slave&unscoped_q=master+slave I really only found the openpty function, and the man pages/argument names there already use this terminology so it wouldn't make much sense to change it there.
---------- nosy: +ammar2 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
STINNER Victor <vstinner@redhat.com> added the comment: I'm working on patches to change that. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
Change by STINNER Victor <vstinner@redhat.com>: ---------- keywords: +patch pull_requests: +8553 stage: -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
Change by STINNER Victor <vstinner@redhat.com>: ---------- pull_requests: +8554 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
STINNER Victor <vstinner@redhat.com> added the comment: IMHO it's ok to keep the "master" term for: * Git "master" branch * "webmaster" * "postmaster" To find all impacted files, I used the commend: git grep -i -E 'master|slave'|grep -v -E 'webmaster|postmaster|/blob/master/' ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
Ammar Askar <ammar@ammaraskar.com> added the comment: The libregrtest change looks good but I disagree on the pty/openpty changes. If you look at all the current Linux man pages and documentation, they follow the master/slave terminology. Generally, Python documentation for underlying os functions like fork, stat etc are kept short because the OS documentation is the ultimate resource for them. This change causes a deviation from the existing standard and will only serve to make things more confusing, I would suggest deferring it until the actual OS documentation reflects this change as well. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
STINNER Victor <vstinner@redhat.com> added the comment: The doctest module has doctest.master symbol: --- # For backward compatibility, a global instance of a DocTestRunner # class, updated by testmod. master = None --- I'm not sure about changing this one. Here there is no slave, so it's less confusing. But more generally, maybe it's time to remove this deprecated variable only kept for backward compatibility? ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
STINNER Victor <vstinner@redhat.com> added the comment: Tkinter and IDLE are full of "master" variables: master: parent for widgets. It seems to be a keep concept of Tkinter windows. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
STINNER Victor <vstinner@redhat.com> added the comment: nntplib.NNTP() has a slave() method, but this method sends a "SLAVE" command to the NNTP server. Changing that would require to modify the NNTP protocol, that's out of the scope of this issue... RFC 977 "Network News Transfer Protocol" (NNTP) Section 3.12: The SLAVE command https://tools.ietf.org/html/rfc977 ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
STINNER Victor <vstinner@redhat.com> added the comment: In the C API, PyMemoryViewObject has a mbuf.master attribute, Include/memoryview.h: --- typedef struct { PyObject_HEAD int flags; /* state flags */ Py_ssize_t exports; /* number of direct memoryview exports */ Py_buffer master; /* snapshot buffer obtained from the original exporter */ } _PyManagedBufferObject; /* memoryview state flags */ #define _Py_MEMORYVIEW_RELEASED 0x001 /* access to master buffer blocked */ #define _Py_MEMORYVIEW_C 0x002 /* C-contiguous layout */ #define _Py_MEMORYVIEW_FORTRAN 0x004 /* Fortran contiguous layout */ #define _Py_MEMORYVIEW_SCALAR 0x008 /* scalar: ndim = 0 */ #define _Py_MEMORYVIEW_PIL 0x010 /* PIL-style layout */ typedef struct { PyObject_VAR_HEAD _PyManagedBufferObject *mbuf; /* managed buffer */ Py_hash_t hash; /* hash value for read-only views */ int flags; /* state flags */ Py_ssize_t exports; /* number of buffer re-exports */ Py_buffer view; /* private copy of the exporter's view */ PyObject *weakreflist; Py_ssize_t ob_array[1]; /* shape, strides, suboffsets */ } PyMemoryViewObject; --- ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
STINNER Victor <vstinner@redhat.com> added the comment: sqlite3.dump._iterdump() access to the "sqlite_master" table.... Hum, I don't think that Python chose the name of this table. This issue should be addressed in SQLite, not in Python. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
STINNER Victor <vstinner@redhat.com> added the comment: nis module contains the error message: NisError("No NIS master found for any map"), but libnis has a yp_master() function, it's no like Python picked this name. I suggest to keep "master" here to keep Python consistent with libnis. And "NIP master" gives the context of the "master" term. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
Change by Yury Selivanov <yselivanov@gmail.com>: ---------- components: -asyncio nosy: -yselivanov _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
Change by STINNER Victor <vstinner@redhat.com>: ---------- pull_requests: +8555 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
Change by STINNER Victor <vstinner@redhat.com>: ---------- components: -2to3 (2.x to 3.x conversion tool), Argument Clinic, Build, Cross-Build, Demos and Tools, Distutils, Documentation, Extension Modules, FreeBSD, IDLE, IO, Installation, Library (Lib), Regular Expressions, SSL, Tests, Tkinter, Unicode, Windows, XML, ctypes, email, macOS _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34605> _______________________________________
participants (3)
-
Ammar Askar -
STINNER Victor -
Yury Selivanov