Skip to content
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

[Do Not Merge] Convert `Misc/NEWS` so that it is managed by towncrier #552

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
6 participants
@dstufft
Copy link
Member

commented Mar 7, 2017

This is a demo of a towncrier solution to python/core-workflow#6. It has ported the entire Misc/NEWS (at the time I forked the branch) to give a comprehensive example. I did not do a very thorough job of correctly determining if a change log entry was for a feature, bugfix, etc instead opting to just do it quickly to get an example finished.

Towncrier will not run on Python 3.x until hawkowl/towncrier#47 is fixed (I have it patched locally, will send a PR later). In addition, the title (What's new in Python X.Y) will be a bit ugly until hawkowl/towncrier#46 is solved.

Overview:

  • Files are placed into Misc/News/{section} where the section is the category short name for the change log entry (Core/Builtins, Library, etc).
  • Files are named with an extension that control what type of change they are (feature, removal, bugfix, doc, misc).
  • The file fragments are simple text files that can contain rst. This will be reflowed and added to the list entry on the changelog but otherwise they have no special syntax.
    • We may want to consider add a perf type as well, as categorizing performance improvements/optimizations is a bit funky.
  • The Misc/NEWS.rst (renamed) file contains all of the past change logs, these are free to be edited for things like typos and such. Merge conflicts should be very rare.
  • The change log draft can be output without any modifications occurring at any time by running towncrier --draft --version $VERSION.
  • Release managers, as part of the release, will "compile" the news fragments into Misc/NEWS.rst by running towncrier --version $VERSION.
    • This will edit Misc/NEWS.rst and delete the consumed news fragments and will stage these changes in git. It will not actually commit these changes, expecting the release manager to review them before committing them.
  • Files are named after the issue they fixed (e.g. bpo-1234.bugfix). If there is not an issue for the change you can use hide-<anything>.<ext> which will cause a ticket number to not appear in the change log (recommended that <anything> be a UUID4).
  • If there is only one "type" of ticket for a category (e.g. only .doc for the Documentation category) then the type heading is suppressed.
  • I believe if a single change fixes multiple issues, you can put the exact same text into multiple files named after each issue, and towncrier will collapse them into a single entry that references all of the tickets.
  • If a single ticket belongs in multiple categories or types, you can make multiple files with different messages for each category or news type.
  • The new change log data will be added into the existing Misc/NEWS.rst at the location specified by the comment: .. towncrier release notes start.
  • The output is controlled by a jinja2 template, so we can adjust it as desired.
  • If there any issues fixed that don't deserve a specific callout in the news files, but it would still be nice to record that they have been fixed, you can create an empty file named after the ticket with the .misc extension (e.g. bpo-1234.misc). This will be placed into a "Misc" category where it is simply a list of tickets that have been fixed, with no messages (see example).
  • We can add any categories we want or any entry types by adding them to pyproject.toml.

TODO:

  • Actually implement the logic to hide the ticket numbers if they are prefixed with hide- (this should be a template only change).

Example:

What's New in Python 3.7.0a1?
=============================

*Release date: 2017-03-07*


Core and Builtins
-----------------

Features
~~~~~~~~

- More than 255 arguments can now be passed to a function. (bpo-12844)
- Python function can now have more than 255 parameters.
  collections.namedtuple() now supports tuples with more than 255 elements.
  (bpo-18896)
- Added C implementation of asyncio.Future. Original patch by Yury Selivanov.
  (bpo-26081)
- Speed-up method calls: add LOAD_METHOD and CALL_METHOD opcodes. (bpo-26110)
- Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize
  memcpy(). (bpo-28126)
- Optimize and cleanup dict iteration. (bpo-28183)
- Show sys.version when -V option is supplied twice. (bpo-28532)
- Optimize iterating split table values. Patch by Xiang Zhang. (bpo-28580)
- Sped up converting int to float by reusing faster bits counting
  implementation. Patch by Adrian Wielgosik. (bpo-28621)
- Improve speed of the STORE_DEREF opcode by 40%. (bpo-28665)
- Optimize _PyDict_NewPresized() to create correct size dict. Improve speed of
  dict literal with constant keys up to 30%. (bpo-28731)
- bytes.fromhex() and bytearray.fromhex() now ignore all ASCII whitespace, not
  only spaces. Patch by Robert Xiao. (bpo-28927)
- Call _PyObject_GC_TRACK() lazily when calling Python function. Calling
  function is up to 5% faster. (bpo-29049)
- Add ``docstring`` field to Module, ClassDef, FunctionDef, and
  AsyncFunctionDef ast nodes. docstring is not first stmt in their body
  anymore. It affects ``co_firstlineno`` and ``co_lnotab`` of code object for
  module and class. (bpo-29463)
- Improve from-import error message with location and set the 'path' and 'name'
  attribute on ImportError for ``from ... import ...``. (bpo-29546)
- Upgrade internal unicode databases to Unicode version 9.0.0. (bpo-unknown)

Removal
~~~~~~~

- Raise DeprecationWarning when async and await keywords are used as
  variable/attribute/class/function name. (bpo-26182)
- Creating instances of range_iterator by calling range_iterator type now is
  disallowed. Calling iter() on range instance is the only way. Patch by Oren
  Milman. (bpo-28376)
- f-string expressions are no longer accepted as docstrings and by
  ast.literal_eval() even if they do not include expressions. (bpo-28739)
- Remove the ``PyEval_GetCallStats()`` function and deprecate the untested and
  undocumented ``sys.callstats()`` function. Remove the ``CALL_PROFILE``
  special build: use the :func:`sys.setprofile` function, :mod:`cProfile` or
  :mod:`profile` to profile function calls. (bpo-28799)
- bool(), float(), list() and tuple() no longer take keyword arguments. The
  first argument of int() can now be passes only as positional argument.
  (bpo-29695)

Bug Fixes
~~~~~~~~~

- PyType_Ready() now checks that tp_name is not NULL. Original patch by Niklas
  Koep. (bpo-18287)
- Extra slash no longer added to sys.path components in case of empty compile-
  time PYTHONPATH components. (bpo-19398)
- Fixed misleading error message when ImportError called with invalid keyword
  args. (bpo-21578)
- Rather than silently producing a class that doesn't support zero-argument
  ``super()`` in methods, failing to pass the new ``__classcell__`` namespace
  entry up to ``type.__new__`` now results in a ``DeprecationWarning`` and a
  class that supports zero-argument ``super()``. (bpo-23722)
- Fixed possible memory leak in _PyTraceback_Add() and exception loss in
  PyTraceBack_Here(). (bpo-23782)
- Fixed possible crash when AST is changed in process of compiling it.
  (bpo-24098)
- Correct the positioning of the syntax error caret for indented blocks. Based
  on patch by Michael Layzell. (bpo-25677)
- Fix a refleak in code that raises DeprecationWarning. (bpo-26182)
- Fix crash when GC runs during weakref callbacks. (bpo-26617)
- Resolving special methods of uninitialized type now causes implicit
  initialization of the type instead of a fail. (bpo-26906)
- On Android, operating system data is now always encoded/decoded to/from
  UTF-8, instead of the locale encoding to avoid inconsistencies with
  os.fsencode() and os.fsdecode() which are already using UTF-8. (bpo-26919)
- Fix not getting the locale's charset upon initializing the interpreter, on
  platforms that do not have langinfo. (bpo-26920)
- The with-statement now checks for __enter__ before it checks for __exit__.
  This gives less confusing error messages when both methods are missing. Patch
  by Jonathan Ellington. (bpo-27100)
- Clean up redundant code in long_rshift function. Thanks Oren Milman.
  (bpo-27222)
- Remove some redundant assignments to ob_size in longobject.c. Thanks Oren
  Milman. (bpo-27441)
- String constants now interned recursively in tuples and frozensets.
  (bpo-27942)
- Fallback on reading /dev/urandom device when the getrandom() syscall fails
  with EPERM, for example when blocked by SECCOMP. (bpo-27955)
- Single var-positional argument of tuple subtype was passed unscathed to the
  C-defined function. Now it is converted to exact tuple. (bpo-28086)
- Fix dict.pop() for splitted dictionary when trying to remove a "pending key"
  (Not yet inserted in split-table). Patch by Xiang Zhang. (bpo-28120)
- Deprecation warning for invalid str and byte escape sequences now prints
  better information about where the error occurs. Patch by Serhiy Storchaka
  and Eric Smith. (bpo-28128)
- Fix a regression in zipimport's compile_source(). zipimport should use the
  same optimization level as the interpreter. (bpo-28131)
- Fix a memory leak in split-table dictionaries: setattr() must not convert
  combined table into split table. Patch written by INADA Naoki. (bpo-28147)
- Don't import readline in isolated mode. (bpo-28192)
- Dict reduces possibility of 2nd conflict in hash table when hashes have same
  lower bits. (bpo-28201)
- Fix incorrect type in complex(1.0, {2:3}) error message. Patch by Soumya
  Sharma. (bpo-28203)
- Improved exception reporting for problematic __set_name__ attributes by
  looking up on class instead of instance. (bpo-28214)
- ImportError.__init__ now resets not specified attributes. (bpo-28289)
- String constants with null character no longer interned. (bpo-28350)
- The type of long range iterator is now registered as Iterator. Patch by Oren
  Milman. (bpo-28376)
- Added sanity checks and tests for PyUnicode_CopyCharacters(). Patch by Xiang
  Zhang. (bpo-28379)
- Fixed potential crash in PyUnicode_AsDecodedObject() in debug build.
  (bpo-28426)
- dict.update() no longer allocate unnecessary large memory. (bpo-28509)
- Fixed setting the offset attribute of SyntaxError by PyErr_SyntaxLocationEx()
  and PyErr_SyntaxLocationObject(). (bpo-28512)
- Fixed of-by-one error in the peephole optimizer that caused keeping
  unreachable code. (bpo-28517)
- PyDict_SetDefault didn't combine split table when needed. Patch by Xiang
  Zhang. (bpo-28583)
- The preferred encoding is UTF-8 on Android. Patch written by Chi Hsuan Yen.
  (bpo-28596)
- Support __rmod__ for subclasses of str being called before str.__mod__. Patch
  by Martijn Pieters. (bpo-28598)
- Fixed crash in Py_DecodeLocale() in debug build on Mac OS X when decode
  astral characters. Patch by Xiang Zhang. (bpo-28648)
- Fix asynchronous generators aclose() and athrow() to handle
  StopAsyncIteration propagation properly. (bpo-28721)
- Fix the set_inheritable() file descriptor method on platforms that do not
  have the ioctl FIOCLEX and FIONCLEX commands. (bpo-28746)
- Fix error position of the unicode error in ASCII and Latin1 encoders when a
  string returned by the error handler contains multiple non-encodable
  characters (non-ASCII for the ASCII codec, characters out of the
  U+0000-U+00FF range for Latin1). (bpo-28774)
- Fix a bug in the implementation ``yield from`` when checking if the next
  instruction is YIELD_FROM. Regression introduced by WORDCODE (bpo-26647).
  (bpo-28782)
- Modifying the class __dict__ inside the __set_name__ method of a descriptor
  that is used inside that class no longer prevents calling the __set_name__
  method of other descriptors. (bpo-28797)
- Set correct __cause__ for errors about invalid awaitables returned from
  __aiter__ and __anext__. (bpo-28893)
- Fix the cross compilation of xxlimited when Python has been built with
  Py_DEBUG defined. (bpo-28918)
- Do not include <sys/random.h> if it does not exist. (bpo-28932)
- functools.lru_cache() was susceptible to an obscure reentrancy bug
  triggerable by a monkey-patched len() function. (bpo-28991)
- Fixed bytes formatting of octals with zero padding in alternate form.
  (bpo-29000)
- Fix memory leak and use-after-free in os module (path_converter). (bpo-29034)
- Fix regression in bytes(x) when x.__index__() raises Exception. (bpo-29159)
- Prevent RunMainFromImporter overwriting sys.path[0]. (bpo-29319)
- Fixed a crash when pass the iterable keyword argument to sorted().
  (bpo-29327)
- Fixed possible BytesWarning when compare the code objects. Warnings could be
  emitted at compile time. (bpo-29337)
- Fixed possibly dereferencing undefined pointers when creating weakref
  objects. (bpo-29347)
- Fixed use-after-free problem in key sharing dict. (bpo-29438)
- Fix incorrect handling of signed zeros in complex constructor for complex
  subclasses and for inputs having a __complex__ method. Patch by Serhiy
  Storchaka. (bpo-29602)
- Fix stack_effect computation for CALL_FUNCTION_EX. Patch by Matthieu
  Dartiailh. (bpo-29607)
- Fixes to memory allocation in _PyCode_SetExtra. Patch by Brian Coleman.
  (bpo-29683)
- Fix minor regression of PyEval_CallObjectWithKeywords. It should raise
  TypeError when kwargs is not a dict. But it might cause segv when args=NULL
  and kwargs is not a dict. (bpo-29684)
- Fix a regression that bytes format may fail when containing zero bytes
  inside. (bpo-29714)

Misc
~~~~

- bpo-7777777, bpo-8888888, bpo-9999999


Extension Modules
-----------------

- Update zlib to 1.2.11. (bpo-29169)


Library
-------

Features
~~~~~~~~

- Optimize csv.DictWriter for large number of columns. Patch by Mariatta
  Wijaya. (bpo-18219)
- random.choices() now has k as a keyword-only argument to improve the
  readability of common cases and come into line with the signature used in
  other languages. (bpo-18844)
- Add uuid.SafeUUID and uuid.UUID.is_safe to relay information from the
  platform about whether generated UUIDs are generated with a multiprocessing
  safe method. (bpo-22807)
- The webbrowser module now supports Firefox 36+ and derived browsers. Based on
  patch by Oleg Broytman. (bpo-23262)
- The webbrowser in an X environment now prefers using the default browser
  directly. Also, the webbrowser register() function now has a documented
  'preferred' argument, to specify browsers to be returned by get() with no
  arguments. Patch by David Steele (bpo-24241)
- Make webbrowser support Chrome on Mac OS X. Patch by Ned Batchelder.
  (bpo-24452)
- Allow falsy values to be used for msg parameter of subTest(). (bpo-25651)
- Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by Gergely Imreh
  and Markus Holtermann. (bpo-25895)
- Add new :data:`socket.TCP_CONGESTION` (Linux 2.6.13) and
  :data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written by
  Omar Sandoval. (bpo-26273)
- Generated names for Tkinter widgets now start by the "!" prefix for
  readability (was "\`"). (bpo-27025)
- To assist with upgrades from 2.7, the previously documented deprecation of
  ``inspect.getfullargspec()`` has been reversed. This decision may be
  revisited again after the Python 2.7 branch is no longer officially
  supported. (bpo-27172)
- Optimized merging var-keyword arguments and improved error message when
  passing a non-mapping as a var-keyword argument. (bpo-27358)
- Command-line interface of the zipfile module now uses argparse. Added support
  of long options. (bpo-28115)
- bz2 module now supports pathlib. Initial patch by Ethan Furman. (bpo-28225)
- compileall now supports pathlib. (bpo-28226)
- gzip now supports pathlib. Patch by Ethan Furman. (bpo-28227)
- imghdr now supports pathlib. (bpo-28228)
- lzma module now supports pathlib. (bpo-28229)
- Improved error message when passing a non-iterable as a var-positional
  argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL. (bpo-28257)
- Speedup asyncio.StreamReader.readexactly. Patch by Коренберг Марк.
  (bpo-28370)
- Various updates to typing module: typing.Counter, typing.ChainMap, improved
  ABC caching, etc. Original PRs by Jelle Zijlstra, Ivan Levkivskyi, Manuel
  Krebber, and Łukasz Langa. (bpo-28556)
- Add sys.getandroidapilevel(): return the build time API version of Android as
  an integer. Function only available on Android. (bpo-28740)
- The extend() method is now called instead of the append() method when
  unpickle collections.deque and other list-like objects. This can speed up
  unpickling to 2 times. (bpo-29368)
- Add SlotWrapperType, MethodWrapperType, and MethodDescriptorType built-in
  types to types module. Original patch by Manuel Krebber. (bpo-29377)
- Allow use of path-like object as a single argument in ConfigParser.read().
  Patch by David Ellis. (bpo-29623)
- Method register_function() of xmlrpc.server.SimpleXMLRPCDispatcher and its
  subclasses can now be used as a decorator. (bpo-7769)

Removal
~~~~~~~

- Remove the subprocess.Popen.wait endtime parameter. It was deprecated in 3.4
  and undocumented prior to that. (bpo-20572)
- timeit: remove ``-c/--clock`` and ``-t/--time`` command line options which
  were deprecated since Python 3.3. (bpo-28240)
- Remove vestigial MacOS 9 macurl2path module and its tests. (bpo-28325)
- Deprecated silent truncations in socket.htons and socket.ntohs. Original
  patch by Oren Milman. (bpo-28332)
- Deprecate passing asyncio.Handles to run_in_executor. (bpo-28371)
- Removed deprecated features in the http.cookies module. (bpo-29192)
- A format string argument for string.Formatter.format() is now positional-
  only. (bpo-29193)
- Removed support of deprecated undocumented keyword arguments in methods of
  regular expression objects. (bpo-29195)
- Removed deprecated function ntpath.splitunc(). (bpo-29197)
- Removed support of deprecated argument "exclude" in tarfile.TarFile.add().
  (bpo-29210)
- Unused install_misc command is now removed. It has been documented as unused
  since 2000. Patch by Eric N. Vander Weele. (bpo-29218)

Bug Fixes
~~~~~~~~~

- Fixed recursion errors in large or resized curses.textpad.Textbox. Based on
  patch by Tycho Andersen. (bpo-13051)
- inspect.getframeinfo() now correctly shows the first line of a context. Patch
  by Sam Breese. (bpo-15812)
- subprocess.Popen uses /system/bin/sh on Android as the shell, instead of
  /bin/sh. (bpo-16255)
- urrlib.parse.quote is now based on RFC 3986 and hence includes '~' in the set
  of characters that is not quoted by default. Patch by Christian Theune and
  Ratnadeep Debnath. (bpo-16285)
- Fix invalid exception handling in Lib/ctypes/macholib/dyld.py. Patch by
  Madison May. (bpo-18893)
- Fix bugs in WeakValueDictionary.setdefault() and WeakValueDictionary.pop()
  when a GC collection happens in another thread. (bpo-19542)
- Makes Path.resolve() succeed on paths that do not exist. Patch by Vajrasky
  Kok (bpo-19717)
- Fixed a crash in resource.prlimit() when passing a sequence that doesn't own
  its elements as limits. (bpo-20191)
- The textwrap.TextWrapper class now honors non-breaking spaces. Based on patch
  by Kaarle Ritvanen. (bpo-20491)
- Fix references leaked by pdb in the handling of SIGINT handlers. (bpo-20766)
- The unittest.mock.sentinel attributes now preserve their identity when they
  are copied or pickled. (bpo-20804)
- Warning message emitted by using inline flags in the middle of regular
  expression now contains a (truncated) regex pattern. Patch by Tim Graham.
  (bpo-22493)
- In the "io" module, the argument to BufferedReader and BytesIO's read1()
  methods is now optional and can be -1, matching the BufferedIOBase
  specification. (bpo-23214)
- Reading a corrupt config file left configparser in an invalid state. Original
  patch by Florian Höch. (bpo-24142)
- Prevent codecs.escape_encode() from raising SystemError when an empty
  bytestring is passed. (bpo-25270)
- RobotFileParser now correctly returns default values for crawl_delay and
  request_rate. Initial patch by Peter Wirtz. (bpo-25400)
- Fixed HList.header_exists() in tkinter.tix module by addin a workaround to
  Tix library bug. (bpo-25464)
- In ctypes, prevent a crash calling the from_buffer() and from_buffer_copy()
  methods on abstract classes like Array. (bpo-25659)
- re.sub() now raises an error for invalid numerical group reference in
  replacement template even if the pattern is not found in the string. Error
  message for invalid group reference now includes the group index and the
  position of the reference. Based on patch by SilentGhost. (bpo-25953)
- Fixed writing ZIP files that starts not from the start of the file. Offsets
  in ZIP file now are relative to the start of the archive in conforming to the
  specification. (bpo-26293)
- Inspect functools.partial in asyncio.Handle.__repr__. Patch by iceboy.
  (bpo-26654)
- Fix slow pipes IO in asyncio. Patch by INADA Naoki. (bpo-26909)
- The chown() method of the tarfile.TarFile class does not fail now when the
  grp module cannot be imported, as for example on Android platforms.
  (bpo-26937)
- Unknown escapes consisting of ``'\'`` and an ASCII letter in re.sub()
  replacement templates regular expressions now are errors. (bpo-27030)
- In the traceback module, restore the formatting of exception messages like
  "Exception: None". This fixes a regression introduced in 3.5a2. (bpo-27348)
- LZMA compressor and decompressor no longer raise exceptions if given empty
  data twice. Patch by Benjamin Fogle. (bpo-27517)
- Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp(). (bpo-27599)
- Fixed support of default root window in the tkinter.tix module. Added the
  master parameter in the DisplayStyle constructor. (bpo-27611)
- Fix selectors incorrectly retain invalid file descriptors. Patch by Mark
  Williams. (bpo-27759)
- Fix a memory leak in os.getrandom() when the getrandom() is interrupted by a
  signal and a signal handler raises a Python exception. (bpo-27778)
- Fixed possible crash in sqlite3.Connection.create_collation() if pass invalid
  string-like object as a name. Patch by Xiang Zhang. (bpo-27897)
- Fix socket accept exhaustion during high TCP traffic. Patch by Kevin Conway.
  (bpo-27906)
- Prevent memory leak in win32_ver(). (bpo-27932)
- Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused by
  representing the scale as float value internally in Tk. tkinter.IntVar now
  works if float value is set to underlying Tk variable. (bpo-27939)
- Prohibit Tasks to await on themselves. (bpo-27972)
- Fixed bytes path support in os.scandir() on Windows. Patch by Eryk Sun.
  (bpo-27998)
- Check for ERROR_ACCESS_DENIED in Windows implementation of os.stat(). Patch
  by Eryk Sun. (bpo-28075)
- Fix a crash in parse_envlist() when env contains byte strings. Patch by Eryk
  Sun. (bpo-28114)
- Stop using localtime() and gmtime() in the time module. Introduced platform
  independent _PyTime_localtime API that is similar to POSIX localtime_r, but
  available on all platforms. Patch by Ed Schouten. (bpo-28148)
- Handle when SO_REUSEPORT isn't properly supported. Patch by Seth Michael
  Larson. (bpo-28174)
- Fix callbacks race in asyncio.SelectorLoop.sock_connect. (bpo-28176)
- Get antigravity over HTTPS. Patch by Kaartic Sivaraam. (bpo-28181)
- Fix memory leak on Windows in the os module (fix path_converter() function).
  (bpo-28200)
- timeit now repeats the benchmarks 5 times instead of only 3 to make
  benchmarks more reliable. In addition autorange now uses a single loop
  iteration if the benchmark takes less than 10 seconds, instead of 10
  iterations. "python3 -m timeit -s 'import time' 'time.sleep(1)'" now takes 4
  seconds instead of 40 seconds. (bpo-28240)
- Fixed calendar functions for extreme months: 0001-01 and 9999-12. Methods
  itermonthdays() and itermonthdays2() are reimplemented so that they don't
  call itermonthdates() which can cause datetime.date under/overflow.
  (bpo-28253)
- calendar.TextCalendar.prweek() no longer prints a space after a weeks's
  calendar. calendar.TextCalendar.pryear() no longer prints redundant newline
  after a year's calendar. Based on patch by Xiang Zhang. (bpo-28255)
- Fixed possible use after free in the decompress() methods of the
  LZMADecompressor and BZ2Decompressor classes. Original patch by John Leitch.
  (bpo-28275)
- Fix function declaration (C flags) for the getiterator() method of
  xml.etree.ElementTree.Element. (bpo-28314)
- The disassembler now decodes FORMAT_VALUE argument. (bpo-28317)
- Fixed writing non-BMP characters with binary format in plistlib. (bpo-28321)
- Fixed possible crashes when unpickle itertools objects from incorrect pickle
  data. Based on patch by John Leitch. (bpo-28322)
- os.fwalk() no longer fails on broken links. (bpo-28353)
- Refuse monitoring processes if the child watcher has no loop attached. Patch
  by Vincent Michel. (bpo-28368)
- Raise RuntimeError when transport's FD is used with add_reader, add_writer,
  etc. (bpo-28369)
- Fix asyncio to support formatting of non-python coroutines. (bpo-28372)
- unittest.mock Mock autospec functions now properly support assert_called,
  assert_not_called, and assert_called_once. (bpo-28380)
- Fixed possible crash in _io.TextIOWrapper deallocator when the garbage
  collector is invoked in other thread. Based on patch by Sebastian Cufre.
  (bpo-28387)
- Remove UNIX socket from FS before binding. Patch by Коренберг Марк.
  (bpo-28399)
- old keys should not remove new values from WeakValueDictionary when
  collecting from another thread. (bpo-28427)
- Fix iterator of C implemented asyncio.Future doesn't accept non-None value is
  passed to it.send(val). (bpo-28430)
- Fix C implemented asyncio.Future didn't work on Windows. (bpo-28448)
- tarfile.open() with mode "r" or "r:" now tries to open a tar file with
  compression before trying to open it without compression. Otherwise it had
  50% chance failed with ignore_zeros=True. (bpo-28449)
- timeit now uses the sequence 1, 2, 5, 10, 20, 50,... instead of 1, 10,
  100,... for autoranging. (bpo-28469)
- Fix error building socket module when multithreading is disabled. (bpo-28480)
- shutil.make_archive() no longer adds entry "./" to ZIP archive. (bpo-28488)
- Start a transaction implicitly before a DML statement. Patch by Aviv
  Palivoda. (bpo-28518)
- In the "http.server" module, parse the protocol version if possible, to avoid
  using HTTP 0.9 in some error responses. (bpo-28548)
- Fixed segfault in curses's addch() with ncurses6. (bpo-28549)
- Fixed possible DoS and arbitrary code execution when handle plural form
  selections in the gettext module. The expression parser now supports exact
  syntax supported by GNU gettext. (bpo-28563)
- Add a test that checks that cwd parameter of Popen() accepts PathLike
  objects. Patch by Sayan Chowdhury. (bpo-28624)
- Regular expression patterns, _sre.SRE_Pattern objects created by
  re.compile(), become comparable (only x==y and x!=y operators). This change
  should fix the issue #18383: don't duplicate warning filters when the
  warnings module is reloaded (thing usually only done in unit tests).
  (bpo-28727)
- Fixed the comparison of mock.MagickMock with mock.ANY. (bpo-28735)
- Restored the __reduce__() methods of datetime objects. (bpo-28752)
- multiprocessing.set_forkserver_preload() would crash the forkserver process
  if a preloaded module instantiated some multiprocessing objects such as
  locks. (bpo-28779)
- Fix a regression introduced in warnings.catch_warnings(): call
  warnings.showwarning() if it was overriden inside the context manager.
  (bpo-28835)
- dbm.dumb now supports reading read-only files and no longer writes the index
  file when it is not changed. A deprecation warning is now emitted if the
  index file is missed and recreated in the 'r' and 'w' modes (will be an error
  in future Python releases). (bpo-28847)
- Fixed a crash when deallocate deep ElementTree. (bpo-28871)
- Remove editor artifacts from Tix.py. (bpo-28923)
- Fix unittest.mock._Call helper: don't ignore the name parameter anymore.
  Patch written by Jiajun Huang. (bpo-28961)
- Fix out of bound iteration in asyncio.Future.remove_done_callback implemented
  in C. (bpo-28963)
- Fixed race condition in C implementation of functools.lru_cache. KeyError
  could be raised when cached function with full cache was simultaneously
  called from different threads with the same uncached arguments. (bpo-28969)
- Update authorizer constants in sqlite3 module. Patch by Dingyuan Wang.
  (bpo-28985)
- Prevent infinite loop in pathlib.resolve() on Windows (bpo-29079)
- Offsets in a ZIP file created with extern file object and modes "w" and "x"
  now are relative to the start of the file. (bpo-29094)
- Fix datetime.fromtimestamp() regression introduced in Python 3.6.0: check
  minimum and maximum years. (bpo-29100)
- Fix file object leak in aifc.open() when file is given as a filesystem path
  and is not in valid AIFF format. Patch by Anthony Zhang. (bpo-29110)
- In urllib.request, suffixes in no_proxy environment variable with leading
  dots could match related hostnames again (e.g. .b.c matches a.b.c). Patch by
  Milan Oberkirch. (bpo-29142)
- Fixed infinite recursion in the repr of uninitialized ctypes.CDLL instances.
  (bpo-29219)
- Fix Task.current_task and Task.all_tasks implemented in C to accept None
  argument as their pure Python implementation. (bpo-29271)
- Fix a regression in argparse that help messages would wrap at non-breaking
  spaces. (bpo-29290)
- Fix subprocess.Popen.wait() when the child process has exited to a stopped
  instead of terminated state (ex: when under ptrace). (bpo-29335)
- The help of a builtin or extension class now includes the constructor
  signature if __text_signature__ is provided for the class. (bpo-29338)
- Fix assertion error in threading._DummyThread.is_alive(). (bpo-29376)
- Prevent infinite loop in pathlib.Path.mkdir (bpo-29416)
- Fixed out-of-bounds buffer access in the group() method of the match object.
  Based on patch by WGH. (bpo-29444)
- Altering a kwarg dictionary passed to functools.partial() no longer affects a
  partial object after creation. (bpo-29532)
- Fixed different behaviour of Decimal.from_float() for _decimal and
  _pydecimal. Thanks Andrew Nester. (bpo-29534)
- Improve some deprecations in importlib. Some deprecated methods now emit
  DeprecationWarnings and have better descriptive messages. (bpo-29576)
- SimpleXMLRPCDispatcher no longer chains KeyError (or any other exception) to
  exception(s) raised in the dispatched methods. Patch by Petr Motejlek.
  (bpo-29615)
- Fix asyncio to support instantiation of new event loops in child processes.
  (bpo-29703)
- asyncio.subprocess.SubprocessStreamProtocol no longer closes before all pipes
  are closed. (bpo-29704)
- Migrate sqlite3 module to _v2 API. Patch by Aviv Palivoda. (bpo-9303)
- curses.ascii predicates now work correctly with negative integers. (bpo-9770)
- Distutils.sdist now looks for README and setup.py files with case
  sensitivity. This behavior matches that found in Setuptools 6.0 and later.
  See `setuptools 100 <https://github.com/pypa/setuptools/issues/100>`_ for
  rationale. (hide-011698d6-bd92-4321-b872-3a17ce67c9e3)
- Fix UnboundLocalError in socket._sendfile_use_sendfile.
  (hide-e5edf785-97bc-49ff-8b9e-1cb036590314)


Windows
-------

Features
~~~~~~~~

- Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk Sun)
  (bpo-28333)
- Adds signed catalog files for stdlib on Windows. (bpo-28402)

Removal
~~~~~~~

- Deprecate WindowsRegistryFinder and disable it by default (bpo-28896)
- Removes readme.txt from the installer. (bpo-29579)

Bug Fixes
~~~~~~~~~

- winreg does not truncate string correctly (Patch by Eryk Sun) (bpo-25778)
- launcher.msi has different product codes between 32-bit and 64-bit
  (bpo-28110)
- Renames Windows path file to ._pth (bpo-28137)
- Windows ._pth file should allow import site (bpo-28138)
- Opening CON for write access fails (bpo-28161)
- WindowsConsoleIO readall() fails if first line starts with Ctrl+Z (bpo-28162)
- WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle (bpo-28163)
- _PyIO_get_console_type fails for various paths (bpo-28164)
- Improvements to help manuals on Windows. (bpo-28251)
- Fixes mishandled buffer reallocation in getpathp.c (bpo-28522)


C API
-----

Features
~~~~~~~~

- Compiler warnings are now emitted if use most of deprecated functions.
  (bpo-19569)
- Added functions PySlice_Unpack() and PySlice_AdjustIndices(). (bpo-27867)

Removal
~~~~~~~

- Function PySlice_GetIndicesEx() is deprecated and replaced with a macro if
  Py_LIMITED_API is not set or set to the value between 0x03050400 and
  0x03060000 (not including) or 0x03060100 or higher. (bpo-27867)
- Deprecated undocumented functions PyUnicode_AsEncodedObject(),
  PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and
  PyUnicode_AsEncodedUnicode(). (bpo-28426)

Bug Fixes
~~~~~~~~~

- Private variable _Py_PackageContext is now of type ``const char *`` rather of
  ``char *``. (bpo-28748)
- The fields name and doc of structures PyMemberDef, PyGetSetDef,
  PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of
  type ``const char *`` rather of ``char *``. (bpo-28761)
- The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8() is now of type
  ``const char *`` rather of ``char *``. (bpo-28769)
- PyUnicode_CompareWithASCIIString() now never raises exceptions. (bpo-28808)
- The index parameters *start* and *end* of PyUnicode_FindChar() are now
  adjusted to behave like ``str[start:end]``. (bpo-28822)
- All stable API extensions added after Python 3.2 are now available only when
  Py_LIMITED_API is set to the PY_VERSION_HEX value of the minimum Python
  version supporting this API. (bpo-29058)
- Fixed the declaration of some public API functions. PyArg_VaParse() and
  PyArg_VaParseTupleAndKeywords() were not available in limited API.
  PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and Py_BuildValue()
  were not available in limited API of version < 3.3 when PY_SSIZE_T_CLEAN is
  defined. (bpo-29083)


Documentation
-------------

- The data model reference and the porting section in the 3.6 What's New guide
  now covers the additional ``__classcell__`` handling needed for custom
  metaclasses to fully support PEP 487 and zero-argument ``super()``.
  (bpo-23722)
- Document smtpd.py as effectively deprecated and add a pointer to aiosmtpd, a
  third-party asyncio-based replacement. (bpo-25008)
- Add canonical header link on each page to corresponding major version of the
  documentation. Patch by Matthias Bussonnier. (bpo-26355)
- Documented command-line interface of zipfile. (bpo-28513)
- Link the documentation to its source file on GitHub. (bpo-28929)
- Fix Python 2 syntax in code for building the documentation. (bpo-29349)


Build
-----

Features
~~~~~~~~

- Update Windows build and OS X installers to use SQLite 3.14.2. (bpo-#28208)
- sys.version and the platform module python_build(), python_branch(), and
  python_revision() functions now use git information rather than hg when
  building from a repo. (bpo-27593)
- Update Windows build and OS X installers to use OpenSSL 1.0.2j. (bpo-28248)
- Update Windows build and OS X installers to use OpenSSL 1.0.2k. (bpo-29572)

Removal
~~~~~~~

- A full copy of libffi is no longer bundled for use when building _ctypes on
  non-OSX UNIX platforms. An installed copy of libffi is now required when
  building _ctypes on such platforms. (bpo-27979)
- Remove old Be OS helper scripts. (bpo-29384)

Bug Fixes
~~~~~~~~~

- Fix out-of-tree building on AIX. Patch by Tristan Carel and Michael
  Haubenwallner. (bpo-10656)
- Fix building extensions modules on Cygwin. Patch by Roumen Petrov, based on
  original patch by Jason Tishler. (bpo-13756)
- Remove redundant include search directory option for building outside the
  source tree. (bpo-15819)
- Do not add the directory for installing C header files and the directory for
  installing object code libraries to the cross compilation search paths.
  Original patch by Thomas Petazzoni. (bpo-20211)
- Add configure check for siginfo_t.si_band, which Cygwin does not provide.
  Patch by Masayuki Yamamoto with review and rebase by Erik Bray. (bpo-21085)
- Fix building the _struct module on Cygwin by passing ``NULL`` instead of
  ``&PyType_Type`` to PyVarObject_HEAD_INIT. Patch by Masayuki Yamamoto.
  (bpo-21124)
- Added missed names to PC/python3.def. (bpo-23903)
- Rename --with-optimiations to --enable-optimizations. (bpo-26359)
- setup.py now detects system libffi with multiarch wrapper. (bpo-26661)
- Set Android compilation and link flags. (bpo-26851)
- Prohibit implicit C function declarations: use -Werror=implicit-function-
  declaration when possible (GCC and Clang, but it depends on the compiler
  version). Patch written by Chi Hsuan Yen. (bpo-27659)
- Fixed build with Estonian locale (python-config and distclean targets in
  Makefile). Patch by Arfrever Frehtes Taifersar Arahesis. (bpo-28258)
- Fix missing extensions modules when cross compiling. (bpo-28444)
- Fix the compilation error that occurs because if_nameindex() is available on
  Android API level 24, but the if_nameindex structure is not defined.
  (bpo-28538)
- Prevent missing 'getentropy' declaration warning on macOS. Patch by Gareth
  Rees. (bpo-28676)
- lockf() is available on Android API level 24, but the F_LOCK macro is not
  defined in android-ndk-r13. (bpo-28762)
- Fix implicit declaration of function _setmode. Patch by Masayuki Yamamoto
  (bpo-28768)
- Do not define sys.implementation._multiarch on Android. (bpo-28849)
- Removes hard dependency on hg.exe from PCBuild/build.bat (bpo-29080)


Tools/Demos
-----------

Features
~~~~~~~~

- The zipfile module CLI now prints usage to stderr. Patch by Stephen J.
  Turnbull. (bpo-28102)
- python-gdb.py now supports also ``method-wrapper`` (``wrapperobject``)
  objects. (bpo-29367)

Removal
~~~~~~~

- The pybench and pystone microbenchmark have been removed from Tools. Please
  use the new Python benchmark suite https://github.com/python/performance
  which is more reliable and includes a portable version of pybench working on
  Python 2 and Python 3. (bpo-15369)

Bug Fixes
~~~~~~~~~

- Fix python-gdb.py didn't support new dict implementation. (bpo-28023)


Tests
-----

- Various caches now are cleared before running every test file. (bpo-23839)
- Use proper command line parsing in _testembed (bpo-24932)
- Fix the test_socket failures on Android - getservbyname(), getservbyport()
  and getaddrinfo() are broken on some Android API levels. (bpo-26936)
- Add the support.setswitchinterval() function to fix test_functools hanging on
  the Android armv7 qemu emulator. (bpo-26939)
- Fix test_posix for Android where 'id -G' is entirely wrong or missing the
  effective gid. (bpo-26944)
- Skip test_asyncore and test_eintr poll failures on macOS. Skip some tests of
  select.poll when running on macOS due to unresolved issues with the
  underlying system poll function on some macOS versions. (bpo-28087)
- Adds _testconsole module to test console input. (bpo-28217)
- regrtest: fix the parser of command line arguments. (bpo-28409)
- Now test.support.rmtree is able to remove unwritable or unreadable
  directories. (bpo-28666)
- Fix the tests that bind() a unix socket and raise PermissionError on Android
  for a non-root user. (bpo-28683)
- Disallow -j0 to be combined with -T/-l in regrtest command line arguments.
  (bpo-28950)
- To match the behaviour of the ``re.LOCALE`` flag, test_re.test_locale_flag
  now uses ``locale.getpreferredencoding(False)`` to determine the candidate
  encoding for the test regex (allowing it to correctly skip the test when the
  default locale encoding is a multi-byte encoding) (bpo-29571)
@mention-bot

This comment has been minimized.

Copy link

commented Mar 7, 2017

@dstufft, thanks for your PR! By analyzing the history of the files in this pull request, we identified @akheron, @zware, @zooba, @brettcannon and @akuchling to be potential reviewers.

@dstufft dstufft changed the title Convert `Misc/NEWS` so that it is managed by towncrier [Do Not Merge] Convert `Misc/NEWS` so that it is managed by towncrier Mar 7, 2017

@ncoghlan

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2017

As noted at python/core-workflow#6 (comment) I'd suggest something like noissue-<BPO username>-<change ID>.<category> for the changes without issue numbers. ("hide" isn't clear as to what it signifies, while UUIDs in filenames aren't a particularly human friendly approach to avoiding merge conflicts)

@hawkowl

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2017

I believe if a single change fixes multiple issues, you can put the exact same text into multiple files named after each issue, and towncrier will collapse them into a single entry that references all of the tickets.

Correct. If it doesn't, it's a bug! :)

@brettcannon

This comment has been minimized.

Copy link
Member

commented Mar 31, 2017

Just decided to go with blurb, so closing this example PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.