Commit Graph

161 Commits

Author SHA1 Message Date
Larry Hastings 61272b77b0 Issue #19273: The marker comments Argument Clinic uses have been changed
to improve readability.
2014-01-07 12:41:53 -08:00
Christian Heimes 47f02e5e17 ncurses' winch and mvwinch return an unsigned long 2013-12-04 08:50:32 +01:00
Christian Heimes abbc8ca708 ncurses' winch and mvwinch return an unsigned long 2013-12-04 08:50:22 +01:00
Larry Hastings 44e2eaab54 Issue #19674: inspect.signature() now produces a correct signature
for some builtins.
2013-11-23 15:37:55 -08:00
Larry Hastings abc716b058 Issue #19474: Argument Clinic now always specifies a default value for
variables in option groups, to prevent "uninitialized value" warnings.
2013-11-20 09:13:52 -08:00
Larry Hastings ed4a1c5703 Argument Clinic: rename "self" to "module" for module-level functions. 2013-11-18 09:32:13 -08:00
Victor Stinner bd303c165b Issue #19512, #19515: remove shared identifiers, move identifiers where they
are used.

Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
2013-11-07 23:07:29 +01:00
Victor Stinner 090543736f Issue #19512: add some common identifiers to only create common strings once,
instead of creating temporary Unicode string objects

Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
2013-11-06 22:41:44 +01:00
Serhiy Storchaka a412f763b3 Fix compilation of the curses module (broken by issue #16612). 2013-10-19 10:45:48 +03:00
Larry Hastings 3182680210 Issue #16612: Add "Argument Clinic", a compile-time preprocessor
for C files to generate argument parsing code.  (See PEP 436.)
2013-10-19 00:09:25 -07:00
Victor Stinner daf455554b Issue #18571: Implementation of the PEP 446: file descriptors and file handles
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
2013-08-28 00:53:59 +02:00
Christian Heimes ef86368ea6 Fix possible NULL pointer dereference in PyCurses_Start_Color()
CID 1058276
2013-07-26 14:46:02 +02:00
Christian Heimes a956e645c1 Fix possible NULL pointer dereference in PyCurses_Start_Color()
CID 1058276
2013-07-26 14:45:37 +02:00
Victor Stinner 49fc8ece81 Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup()
Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the
GIL is held or not.
2013-07-07 23:30:24 +02:00
Victor Stinner b64049183c Issue #18203: Replace malloc() with PyMem_Malloc() in Python modules
Replace malloc() with PyMem_Malloc() when the GIL is held, or with
PyMem_RawMalloc() otherwise.
2013-07-07 16:21:41 +02:00
Victor Stinner 640c35ce13 Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros
multiprocessing.h: remove unused MIN and MAX macros
2013-06-04 23:14:37 +02:00
Benjamin Peterson 18b7191653 C89 declaration compliance 2013-05-16 15:29:44 -05:00
Victor Stinner bd2d30cf31 Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c) 2013-03-21 12:21:06 +01:00
R David Murray 779dab9447 Merge: #8862: Fix curses cleanup with getchar is interrupted by a signal.
I have no idea how one would write a test for this.

Patch by July Tikhonov.
2013-03-19 16:24:35 -04:00
R David Murray f5d7cc239e #8862: Fix curses cleanup with getchar is interrupted by a signal.
I have no idea how one would write a test for this.

Patch by July Tikhonov.
2013-03-19 16:23:09 -04:00
Ross Lagerwall 2dabaf63cf Issue #15876: Fix a refleak in the curses module
The refleak occurred when assigning to window.encoding.
2012-09-07 08:34:23 +02:00
Victor Stinner 9f16e44a47 Close #14223: Fix window.addch(curses.ACS_HLINE)
Fix window.addch() of the curses module for special characters like
curses.ACS_HLINE: the Python function addch(int) and addch(bytes) is now
calling the C function waddch()/mvwaddch() (as it was done in Python 3.2),
instead of wadd_wch()/mvwadd_wch(). The Python function addch(str) is still
calling the C function wadd_wch()/mvwadd_wch() if the Python curses is linked
to libncursesw.
2012-09-01 15:00:34 +02:00
Victor Stinner 1d39cde50c Issue #15785: Modify window.get_wch() API of the curses module: return a
character for most keys, and an integer for special keys, instead of always
returning an integer. So it is now possible to distinguish special keys like
keypad keys.
2012-08-29 01:40:57 +02:00
Benjamin Peterson 5e5451940c fix compiler warnings 2012-03-14 18:21:35 -05:00
Victor Stinner 8f40860944 Close #14223: curses.addch() is no more limited to the range 0-255 when the
Python curses is not linked to libncursesw. It was a regression introduced in
Python 3.3a1.
2012-03-08 02:08:48 +01:00
Ronald Oussoren 2a7fe03528 Add missing sentinel to PyCursesWindow_getsets
The PyCursesWindow_getsets array was introduced without sentinel in c3581ca21a57.
2012-01-17 16:53:20 +01:00
Victor Stinner 0fdfceb782 Issue #12567: The curses module uses Unicode functions for Unicode arguments
when it is linked to the ncurses library. It encodes also Unicode strings to
the locale encoding instead of UTF-8.
2011-11-25 22:10:02 +01:00
Victor Stinner 65f51bb150 (Merge 3.2) Issue #10570: curses.putp() is now expecting a byte string, instead
of a Unicode string.

This is an incompatible change, but putp() is used to emit terminfo commands,
which are bytes strings, not Unicode strings.
2011-11-03 20:36:55 +01:00
Victor Stinner b3bc7e764d Issue #10570: curses.putp() is now expecting a byte string, instead of a
Unicode string.

This is an incompatible change, but putp() is used to emit terminfo commands,
which are bytes strings, not Unicode strings.
2011-11-03 20:35:40 +01:00
Victor Stinner df5bccc8a3 (Merge 3.2) Issue #10570: curses.tigetstr() is now expecting a byte string,
instead of a Unicode string.

This is an incompatible change, but the previous behaviour was completly wrong.
2011-11-02 23:47:58 +01:00
Victor Stinner 2662133a05 Issue #10570: curses.tigetstr() is now expecting a byte string, instead of a
Unicode string.

This is an incompatible change, but the previous behaviour was completly wrong.
2011-11-02 23:45:29 +01:00
Martin v. Löwis 1c67dd9b15 Port SetAttrString/HasAttrString to SetAttrId/GetAttrId. 2011-10-14 15:16:45 +02:00
Martin v. Löwis bd928fef42 Rename _Py_identifier to _Py_IDENTIFIER. 2011-10-14 10:20:37 +02:00
Victor Stinner c4f281eba3 Fix misuse of PyUnicode_GET_SIZE, use PyUnicode_GET_LENGTH instead 2011-10-11 22:11:42 +02:00
Martin v. Löwis afe55bba33 Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-10-09 10:38:36 +02:00
Martin v. Löwis d63a3b8beb Implement PEP 393. 2011-09-28 07:41:54 +02:00
Victor Stinner 71e44cb97f Issue #12567: Add curses.unget_wch() function
Push a character so the next get_wch() will return it.
2011-09-06 01:53:03 +02:00
Nadeem Vawda 9e2e99097c Fix build error in _curses module when not using libncursesw.
Code extracted from Victor Stinner's patch for issue #12567.
2011-07-31 15:01:11 +02:00
Victor Stinner a7878b77dc Close #6755: Add get_wch() method to curses.window class
Patch by Iñigo Serna.
2011-07-14 23:07:44 +02:00
Jesus Cea 736e7fc0f6 Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2 2011-03-14 17:36:54 +01:00
Matthias Klose 635edd1990 - Issue #7567: PyCurses_setupterm: Don't call `setupterm' twice. 2010-07-30 21:40:57 +00:00
Victor Stinner 26486ea29f Recorded merge of revisions 81213 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81213 | victor.stinner | 2010-05-16 00:19:27 +0200 (dim., 16 mai 2010) | 5 lines

  reindent _cursesmodule.c

  Use untabify.py + emacs (python3 mode) + manual editions for
  Py_BEGIN_ALLOW_THREADS / Py_END_ALLOW_THREADS
........
2010-05-15 22:23:53 +00:00
Mark Dickinson e047cfa72e Issue #8677: Make curses module PY_SSIZE_T_CLEAN. 2010-05-11 17:57:09 +00:00
Andrew M. Kuchling 2b14676f0f Merged revisions 81073 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81073 | andrew.kuchling | 2010-05-10 19:27:01 -0400 (Mon, 10 May 2010) | 1 line

  Use ';' after initialization macros to avoid confusing re-indenters
........
2010-05-10 23:30:25 +00:00
Andrew M. Kuchling d6d058feae Merged revisions 81072 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81072 | andrew.kuchling | 2010-05-10 19:24:09 -0400 (Mon, 10 May 2010) | 1 line

  Break long line in macros
........
2010-05-10 23:28:28 +00:00
Andrew M. Kuchling abc79cd6bb Merged revisions 81049 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81049 | andrew.kuchling | 2010-05-10 13:18:25 -0400 (Mon, 10 May 2010) | 1 line

  Move { out of #if...#else block; this confuses Emacs' C-mode
........
2010-05-10 23:14:26 +00:00
Victor Stinner 41ff399486 Merged revisions 79395 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79395 | victor.stinner | 2010-03-25 01:51:58 +0100 (jeu., 25 mars 2010) | 5 lines

  Fix _curses.tiget*() functions: deny None to avoid a crash.

  Fix the following calls: _curses.tigetflag(None), _curses.tigetnum(None),
  _curses.tigetstr(None).
........
2010-03-25 00:55:12 +00:00
Benjamin Peterson 2614cda209 Merged revisions 78338,78345-78346,78561-78562,78566,78574,78581,78634,78660,78675 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78338 | andrew.kuchling | 2010-02-22 15:04:02 -0600 (Mon, 22 Feb 2010) | 4 lines

  Remove Tools/modulator, a reference to it in the docs, and a screenshot of it.
  (I asked the BDFL first, and he approved removing it.  The last actual bugfix
  to Tools/modulator was in 2001; since then all changes have been search-and-replace:
  string methods, whitespace fixes, etc.)
........
  r78345 | andrew.kuchling | 2010-02-22 17:10:52 -0600 (Mon, 22 Feb 2010) | 1 line

  #7706: DONT_HAVE_ERRNO_H is no longer defined by configure (after rev.46819).
........
  r78346 | andrew.kuchling | 2010-02-22 17:12:00 -0600 (Mon, 22 Feb 2010) | 1 line

  #7706: add include guards where they're missing; required for Windows CE
........
  r78561 | andrew.kuchling | 2010-03-01 13:51:43 -0600 (Mon, 01 Mar 2010) | 1 line

  #7191: describe more details of wbits parameter
........
  r78562 | andrew.kuchling | 2010-03-01 14:11:57 -0600 (Mon, 01 Mar 2010) | 1 line

  #7637: avoid repeated-concatenation antipattern in example
........
  r78566 | barry.warsaw | 2010-03-01 15:46:51 -0600 (Mon, 01 Mar 2010) | 4 lines

  Manually copy patch for bug 7250 from the release26-maint branch.  I suck
  because I did this in the wrong order and couldn't smack svnmerge into
  submission.
........
  r78574 | benjamin.peterson | 2010-03-01 17:25:13 -0600 (Mon, 01 Mar 2010) | 1 line

  remove CVS id
........
  r78581 | michael.foord | 2010-03-02 08:22:15 -0600 (Tue, 02 Mar 2010) | 1 line

  Link correction in documentation.
........
  r78634 | benjamin.peterson | 2010-03-03 15:28:25 -0600 (Wed, 03 Mar 2010) | 1 line

  rephrase
........
  r78660 | dirkjan.ochtman | 2010-03-04 13:21:53 -0600 (Thu, 04 Mar 2010) | 4 lines

  Try to fix buildbot breakage from r78384.

  Thanks bitdancer and briancurtin for the help.
........
  r78675 | florent.xicluna | 2010-03-04 19:12:14 -0600 (Thu, 04 Mar 2010) | 2 lines

  These line should not be there.
........
2010-03-21 22:36:19 +00:00
Benjamin Peterson 21896a330a Merged revisions 77952,78030,78102,78104,78107,78206,78216,78296-78297,78328,78331-78332,78336,78339,78343,78378-78379,78415,78559,78717,78791 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77952 | mark.dickinson | 2010-02-03 10:50:14 -0600 (Wed, 03 Feb 2010) | 1 line

  Fix test_inspect.py data to match recent change to inspect_fodder.py (r77942).
........
  r78030 | benjamin.peterson | 2010-02-06 14:14:10 -0600 (Sat, 06 Feb 2010) | 1 line

  check type_getattro for correctness in a descriptor corner case
........
  r78102 | andrew.kuchling | 2010-02-07 19:35:35 -0600 (Sun, 07 Feb 2010) | 1 line

  Move distutils into its own subsection; add various items
........
  r78104 | andrew.kuchling | 2010-02-08 07:22:24 -0600 (Mon, 08 Feb 2010) | 1 line

  Add two items; move a subsection
........
  r78107 | antoine.pitrou | 2010-02-08 14:25:47 -0600 (Mon, 08 Feb 2010) | 3 lines

  Clarify and correct description for ccbench and iobench.
........
  r78206 | r.david.murray | 2010-02-16 11:55:26 -0600 (Tue, 16 Feb 2010) | 3 lines

  Make the references to Popen in the description of Call
  and check_call into links.
........
  r78216 | andrew.kuchling | 2010-02-18 08:16:48 -0600 (Thu, 18 Feb 2010) | 1 line

  Add various items
........
  r78296 | andrew.kuchling | 2010-02-21 20:08:45 -0600 (Sun, 21 Feb 2010) | 1 line

  Re-word
........
  r78297 | andrew.kuchling | 2010-02-21 20:29:10 -0600 (Sun, 21 Feb 2010) | 1 line

  #7076: mention SystemRandom class near start of the module docs; reword change description for clarity.  Noted by Shawn Ligocki.
........
  r78328 | jack.diederich | 2010-02-22 12:17:16 -0600 (Mon, 22 Feb 2010) | 1 line

  fixes issue #7530, serve_forever()
........
  r78331 | andrew.kuchling | 2010-02-22 12:38:23 -0600 (Mon, 22 Feb 2010) | 1 line

  Fix comment typo
........
  r78332 | andrew.kuchling | 2010-02-22 12:42:07 -0600 (Mon, 22 Feb 2010) | 2 lines

  #7627: MH.remove() would fail if the MH mailbox was locked;
  it would call _unlock_file() and pass it a closed file object.  Noted by Rob Austein.
........
  r78336 | jack.diederich | 2010-02-22 13:55:22 -0600 (Mon, 22 Feb 2010) | 1 line

  fixes issue #1522237, bad init check in _threading_local
........
  r78339 | jack.diederich | 2010-02-22 15:27:38 -0600 (Mon, 22 Feb 2010) | 1 line

  * fix issue#7476
........
  r78343 | andrew.kuchling | 2010-02-22 16:48:41 -0600 (Mon, 22 Feb 2010) | 10 lines

  #2560: remove an unnecessary 'for' loop from my_fgets() in Parser/myreadline.c.
  Noted by Joseph Armbruster; patch by Jessica McKellar.

  The original code was 'for (;;) {...}', where ... ended
  with a 'return -2' statement and did not contain a 'break' or 'continue'
  statement.  Therefore, the body of the loop is always executed once.

  Once upon a time there was a 'continue' in the loop, but it was removed in
  rev36346, committed by mwh on Wed Jul 7 17:44:12 2004.
........
  r78378 | jack.diederich | 2010-02-23 11:23:30 -0600 (Tue, 23 Feb 2010) | 1 line

  fixup markup error
........
  r78379 | jack.diederich | 2010-02-23 13:34:06 -0600 (Tue, 23 Feb 2010) | 1 line

   issue#6442 use in operator instead of has_key
........
  r78415 | dirkjan.ochtman | 2010-02-23 22:00:52 -0600 (Tue, 23 Feb 2010) | 1 line

  Issue #7733: add explicit reference in asyncore docs.
........
  r78559 | andrew.kuchling | 2010-03-01 13:45:21 -0600 (Mon, 01 Mar 2010) | 1 line

  #7637: update discussion of minidom.unlink() and garbage collection
........
  r78717 | benjamin.peterson | 2010-03-05 21:13:33 -0600 (Fri, 05 Mar 2010) | 1 line

  settscdump is definitely an implementation detail
........
  r78791 | andrew.kuchling | 2010-03-08 06:00:39 -0600 (Mon, 08 Mar 2010) | 1 line

  Add various items
........
2010-03-21 22:03:03 +00:00
Ezio Melotti ad0ef571b7 Merged revisions 78900 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78900 | ezio.melotti | 2010-03-13 06:39:51 +0200 (Sat, 13 Mar 2010) | 1 line

  Silence compiler warnings.
........
2010-03-13 04:42:07 +00:00