diff --git a/.mailmap b/.mailmap
deleted file mode 100644
index ff16fd23d..000000000
--- a/.mailmap
+++ /dev/null
@@ -1,4 +0,0 @@
-Aric Hagberg <aric.hagberg@gmail.com> aric
-Aric Hagberg <aric.hagberg@gmail.com> aric <none@none>
-Chris Ellison <cellison@cse.ucdavis.edu> cellison <none@none>
-Dan Schult <dschult@colgate.edu> dschult <none@none>
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 292fd1139..db212c1fe 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -104,8 +104,9 @@ For a more detailed discussion, read these :doc:`detailed documents
    If your change introduces any API modifications, please update
    ``doc/release/release_dev.rst``.
 
-   If your change introduces a deprecation, add a reminder to ``TODO.txt``
-   for the team to remove the deprecated functionality in the future.
+   If your change introduces a deprecation, add a reminder to
+   ``doc/developer/deprecations.rst`` for the team to remove the
+   deprecated functionality in the future.
 
 .. note::
 
diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst
deleted file mode 100644
index 09f8af114..000000000
--- a/CONTRIBUTORS.rst
+++ /dev/null
@@ -1,225 +0,0 @@
-Credits
-=======
-
-NetworkX was originally written by Aric Hagberg, Dan Schult, and Pieter Swart,
-and has been developed with the help of many others. Thanks to everyone who has
-improved NetworkX by contributing code, bug reports (and fixes), documentation,
-and input on design, features, and the future of NetworkX.
-
-Contributions
--------------
-
-This section aims to provide a list of people and projects that have
-contributed to ``networkx``. It is intended to be an *inclusive* list, and
-anyone who has contributed and wishes to make that contribution known is
-welcome to add an entry into this file.  Generally, no name should be added to
-this list without the approval of the person associated with that name.
-
-Creating a comprehensive list of contributors can be difficult, and the list
-within this file is almost certainly incomplete.  Contributors include
-testers, bug reporters, contributors who wish to remain anonymous, funding
-sources, academic advisors, end users, and even build/integration systems (such
-as `TravisCI <https://travis-ci.org>`_).
-
-Do you want to make your contribution known? If you have commit access, edit
-this file and add your name. If you do not have commit access, feel free to
-open an `issue <https://github.com/networkx/networkx/issues/new>`_, submit a
-`pull request <https://github.com/networkx/networkx/compare/>`_, or get in
-contact with one of the official team
-`members <https://github.com/networkx?tab=members>`_.
-
-A supplementary (but still incomplete) list of contributors is given by the
-list of names that have commits in ``networkx``'s
-`git <http://git-scm.com>`_ repository. This can be obtained via::
-
-    git log --raw | grep "^Author: " | sort | uniq
-
-A historical, partial listing of contributors and their contributions to some
-of the earlier versions of NetworkX can be found
-`here <https://github.com/networkx/networkx/blob/886e790437bcf30e9f58368829d483efef7a2acc/doc/source/reference/credits_old.rst>`_.
-
-
-Original Authors
-^^^^^^^^^^^^^^^^
-
-| Aric Hagberg
-| Dan Schult
-| Pieter Swart
-|
-
-
-Contributors
-^^^^^^^^^^^^
-
-Optionally, add your desired name and include a few relevant links. The order
-is partially historical, and now, mostly arbitrary.
-
-- Aric Hagberg, GitHub: `hagberg <https://github.com/hagberg>`_
-- Dan Schult, GitHub: `dschult <https://github.com/dschult>`_
-- Pieter Swart
-- Katy Bold
-- Hernan Rozenfeld
-- Brendt Wohlberg
-- Jim Bagrow
-- Holly Johnsen
-- Arnar Flatberg
-- Chris Myers
-- Joel Miller
-- Keith Briggs
-- Ignacio Rozada
-- Phillipp Pagel
-- Sverre Sundsdal
-- Ross M. Richardson
-- Eben Kenah
-- Sasha Gutfriend
-- Udi Weinsberg
-- Matteo Dell'Amico
-- Andrew Conway
-- Raf Guns
-- Salim Fadhley
-- Fabrice Desclaux
-- Arpad Horvath
-- Minh Van Nguyen
-- Willem Ligtenberg
-- Loïc Séguin-C.
-- Paul McGuire
-- Jesus Cerquides
-- Ben Edwards
-- Jon Olav Vik
-- Hugh Brown
-- Ben Reilly
-- Leo Lopes
-- Jordi Torrents, GitHub: `jtorrents <https://github.com/jtorrents>`_
-- Dheeraj M R
-- Franck Kalala
-- Simon Knight
-- Conrad Lee
-- Sérgio Nery Simões
-- Robert King
-- Nick Mancuso
-- Brian Cloteaux
-- Alejandro Weinstein
-- Dustin Smith
-- Mathieu Larose
-- Romain Fontugne
-- Vincent Gauthier
-- chebee7i, GitHub: `chebee7i <https://github.com/chebee7i>`_
-- Jeffrey Finkelstein
-- Jean-Gabriel Young, Github: `jg-you <https://github.com/jgyou>`_
-- Andrey Paramonov, http://aparamon.msk.ru
-- Mridul Seth, GitHub: `MridulS <https://github.com/MridulS>`_
-- Thodoris Sotiropoulos, GitHub: `theosotr <https://github.com/theosotr>`_
-- Konstantinos Karakatsanis, GitHub: `k-karakatsanis <https://github.com/k-karakatsanis>`_
-- Ryan Nelson, GitHub: `rnelsonchem <https://github.com/rnelsonchem>`_
-- Niels van Adrichem, GitHub: `NvanAdrichem <https://github.com/NvanAdrichem>`_
-- Michael E. Rose, GitHub: `Michael-E-Rose <https://github.com/Michael-E-Rose>`_
-- Jarrod Millman, GitHub: `jarrodmillman <https://github.com/jarrodmillman>`_
-- Andre Weltsch
-- Lewis Robbins
-- Mads Jensen, Github: `atombrella <https://github.com/atombrella>`_
-- Edward L. Platt, `elplatt <https://elplatt.com>`_
-- James Owen, Github: `leamingrad <https://github.com/leamingrad>`_
-- Robert Gmyr, Github: `gmyr <https://github.com/gmyr>`_
-- Mike Trenfield
-- Jon Crall, Github: `Erotemic <https://github.com/Erotemic>`_
-- Issa Moradnejad, Github `<https://github.com/Moradnejad>`_, LinkedIn `<https://linkedin.com/in/moradnejad/>`_
-- Brian Kiefer, Github: `bkief <https://github.com/bkief>`_
-- Julien Klaus
-- Peter C. Kroon, Github: `pckroon <https://github.com/pckroon>`_
-- Weisheng Si, Github: `ws4u <https://github.com/ws4u>`_
-- Haakon H. Rød, Gitlab: `haakonhr <https://gitlab.com/haakonhr>`_, `<https://haakonhr.gitlab.io>`_
-- Efraim Rodrigues, GitHub `<https://github.com/efraimrodrigues>`_, LinkedIn `<https://linkedin.com/in/efraim-rodrigues/>`_
-- Erwan Le Merrer
-- Søren Fuglede Jørgensen, GitHub: `fuglede <https://github.com/fuglede>`_
-- Salim BELHADDAD, LinkedIn `<https://www.linkedin.com/in/salymdotme/>`_
-- Jangwon Yie, GitHub `<https://github.com/jangwon-yie>`_, LinkedIn `<https://www.linkedin.com/in/jangwon-yie-a7960065/>`_
-- ysitu
-- Tomas Gavenciak
-- Luca Baldesi
-- Yuto Yamaguchi
-- James Clough
-- Minas Gjoka
-- Drew Conway
-- Alex Levenson
-- Haochen Wu
-- Erwan  Le Merrer
-- Alex Roper
-- P C Kroon
-- Christopher Ellison
-- D. Eppstein
-- Federico Rosato
-- Aitor Almeida
-- Ferran Parés
-- Christian Olsson
-- Fredrik Erlandsson
-- Nanda H Krishna
-- Nicholas Mancuso
-- Fred Morstatter
-- Ollie Glass
-- Rodrigo Dorantes-Gilardi
-- Pranay Kanwar
-- Balint Tillman
-- Diederik van Liere
-- Ferdinando Papale
-- Miguel Sozinho Ramalho
-- Brandon Liu
-- Nima Mohammadi
-- Jason Grout
-- Jan Aagaard Meier
-- Henrik Haugbølle
-- Piotr Brodka
-- Sasha Gutfraind
-- Alessandro Luongo
-- Huston Hedinger
-- Oleguer Sagarra
-- Kazimierz Wojciechowski, GitHub `<https://github.com/kazimierz-256>`_, LinkedIn `<https://linkedin.com/in/wojciechowski-kazimierz/>`_
-- Gaetano Pietro Paolo Carpinato, Github `<https://github.com/Carghaez>`_, LinkedIn `<https://linkedin.com/in/gaetanocarpinato/>`_
-- Arun Nampally, GitHub `<https://github.com/arunwise>`_, LinkedIn `<https://www.linkedin.com/in/arun-nampally-b57845b7/>`_
-- Ryan Duve
-- Shashi Prakash Tripathi, Github `<https://github.com/itsshavar>`_,LinkedIn `<https://www.linkedin.com/in/itsshashitripathi/>`_
-
-Support
--------
-
-``networkx`` and those who have contributed to ``networkx`` have received
-support throughout the years from a variety of sources.  We list them below.
-If you have provided support to ``networkx`` and a support acknowledgment does
-not appear below, please help us remedy the situation, and similarly, please
-let us know if you'd like something modified or corrected.
-
-Research Groups
-^^^^^^^^^^^^^^^
-
-``networkx`` acknowledges support from the following:
-
-- `Center for Nonlinear Studies <http://cnls.lanl.gov>`_, Los Alamos National
-  Laboratory, PI: Aric Hagberg
-
-- `Open Source Programs Office <https://developers.google.com/open-source/>`_,
-  Google
-
-- `Complexity Sciences Center <http://csc.ucdavis.edu/>`_, Department of
-  Physics, University of California-Davis, PI: James P. Crutchfield
-
-- `Center for Complexity and Collective Computation <http://c4.discovery.wisc.edu>`_,
-  Wisconsin Institute for Discovery, University of Wisconsin-Madison,
-  PIs: Jessica C. Flack and David C. Krakauer
-
-Funding
-^^^^^^^
-
-``networkx`` acknowledges support from the following:
-
-- Google Summer of Code via Python Software Foundation
-
-- U.S. Army Research Office grant W911NF-12-1-0288
-
-- DARPA Physical Intelligence Subcontract No. 9060-000709
-
-- NSF Grant No. PHY-0748828
-
-- John Templeton Foundation through a grant to the Santa Fe Institute to
-  study complexity
-
-- U.S. Army Research Laboratory and the U.S. Army Research Office under
-  contract number W911NF-13-1-0340
diff --git a/INSTALL.rst b/INSTALL.rst
index b6ddff976..197edace9 100644
--- a/INSTALL.rst
+++ b/INSTALL.rst
@@ -80,24 +80,26 @@ Optional packages
 -----------------
 
 .. note::
-   Some optional packages (e.g., `scipy`, `gdal`) may require compiling
+   Some optional packages (e.g., `gdal`) may require compiling
    C or C++ code.  If you have difficulty installing these packages
    with `pip`, please review the instructions for installing
    the full `scientific Python stack <https://scipy.org/install.html>`_.
 
-The following optional packages provide additional functionality.
+The following optional packages provide additional functionality. See the
+files in the ``requirements/`` directory for information about specific
+version requirements.
 
-- `NumPy <http://www.numpy.org/>`_ (>= 1.15.4) provides matrix representation of
+- `NumPy <http://www.numpy.org/>`_ provides matrix representation of
   graphs and is used in some graph algorithms for high-performance matrix
   computations.
-- `SciPy <http://scipy.org/>`_ (>= 1.1.0) provides sparse matrix representation
+- `SciPy <http://scipy.org/>`_ provides sparse matrix representation
   of graphs and many numerical scientific tools.
-- `pandas <http://pandas.pydata.org/>`_ (>= 0.23.3) provides a DataFrame, which
+- `pandas <http://pandas.pydata.org/>`_ provides a DataFrame, which
   is a tabular data structure with labeled axes.
-- `Matplotlib <http://matplotlib.org/>`_ (>= 3.0.2) provides flexible drawing of
+- `Matplotlib <http://matplotlib.org/>`_ provides flexible drawing of
   graphs.
-- `PyGraphviz <http://pygraphviz.github.io/>`_ (>= 1.5) and
-  `pydot <https://github.com/erocarrera/pydot>`_ (>= 1.2.4) provide graph drawing
+- `PyGraphviz <http://pygraphviz.github.io/>`_ and
+  `pydot <https://github.com/erocarrera/pydot>`_ provide graph drawing
   and graph layout algorithms via `GraphViz <http://graphviz.org/>`_.
 - `PyYAML <http://pyyaml.org/>`_ provides YAML format reading and writing.
 - `gdal <http://www.gdal.org/>`_ provides shapefile format reading and writing.
diff --git a/MANIFEST.in b/MANIFEST.in
index d79b6e036..34d558c70 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,11 +1,9 @@
 include MANIFEST.in
 include setup.py
 include CONTRIBUTING.rst
-include CONTRIBUTORS.rst
 include INSTALL.rst
 include LICENSE.txt
 include README.rst
-include RELEASE.rst
 
 recursive-include examples *.txt *.py *.edgelist *.mbox *.gz *.bz2 *.zip *.html *.js *.css
 recursive-include doc *.py *.rst Makefile *.html *.png *.txt *.css *.inc *.js
diff --git a/doc/README.md b/doc/README.md
index 568cbb14c..d463e2a64 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,10 +1,8 @@
 # Building docs
 
-We currently use Sphinx for generating the API and reference
-documentation for NetworkX.
+We use Sphinx for generating the API and reference documentation.
 
-If you only want to get the documentation, note that pre-built
-versions can be found at
+Pre-built versions can be found at
 
     http://networkx.github.io/
 
@@ -12,22 +10,22 @@ for both the stable and the latest (i.e., development) releases.
 
 ## Instructions
 
-In addition to installing NetworkX and its dependencies, install the Python
-packages need to build the documentation by entering::
+After installing NetworkX and its dependencies, install the Python
+packages needed to build the documentation by entering::
 
-    pip install -r requirements.txt
+    pip install -r requirements/doc.txt
 
-in the ``doc/`` directory.
+in the root directory.
 
 To build the HTML documentation, enter::
 
     make html
 
-in the ``doc/`` directory. If all goes well, this will generate a
-``build/html`` subdirectory containing the built documentation.
+in the ``doc/`` directory.  This will generate a ``build/html`` subdirectory
+containing the built documentation.
 
 To build the PDF documentation, enter::
 
     make latexpdf
 
-You will need to have Latex installed for this.
+You will need to have LaTeX installed for this.
diff --git a/doc/credits.rst b/doc/credits.rst
index 902048045..09f8af114 100644
--- a/doc/credits.rst
+++ b/doc/credits.rst
@@ -1,1 +1,225 @@
-.. include:: ../CONTRIBUTORS.rst
+Credits
+=======
+
+NetworkX was originally written by Aric Hagberg, Dan Schult, and Pieter Swart,
+and has been developed with the help of many others. Thanks to everyone who has
+improved NetworkX by contributing code, bug reports (and fixes), documentation,
+and input on design, features, and the future of NetworkX.
+
+Contributions
+-------------
+
+This section aims to provide a list of people and projects that have
+contributed to ``networkx``. It is intended to be an *inclusive* list, and
+anyone who has contributed and wishes to make that contribution known is
+welcome to add an entry into this file.  Generally, no name should be added to
+this list without the approval of the person associated with that name.
+
+Creating a comprehensive list of contributors can be difficult, and the list
+within this file is almost certainly incomplete.  Contributors include
+testers, bug reporters, contributors who wish to remain anonymous, funding
+sources, academic advisors, end users, and even build/integration systems (such
+as `TravisCI <https://travis-ci.org>`_).
+
+Do you want to make your contribution known? If you have commit access, edit
+this file and add your name. If you do not have commit access, feel free to
+open an `issue <https://github.com/networkx/networkx/issues/new>`_, submit a
+`pull request <https://github.com/networkx/networkx/compare/>`_, or get in
+contact with one of the official team
+`members <https://github.com/networkx?tab=members>`_.
+
+A supplementary (but still incomplete) list of contributors is given by the
+list of names that have commits in ``networkx``'s
+`git <http://git-scm.com>`_ repository. This can be obtained via::
+
+    git log --raw | grep "^Author: " | sort | uniq
+
+A historical, partial listing of contributors and their contributions to some
+of the earlier versions of NetworkX can be found
+`here <https://github.com/networkx/networkx/blob/886e790437bcf30e9f58368829d483efef7a2acc/doc/source/reference/credits_old.rst>`_.
+
+
+Original Authors
+^^^^^^^^^^^^^^^^
+
+| Aric Hagberg
+| Dan Schult
+| Pieter Swart
+|
+
+
+Contributors
+^^^^^^^^^^^^
+
+Optionally, add your desired name and include a few relevant links. The order
+is partially historical, and now, mostly arbitrary.
+
+- Aric Hagberg, GitHub: `hagberg <https://github.com/hagberg>`_
+- Dan Schult, GitHub: `dschult <https://github.com/dschult>`_
+- Pieter Swart
+- Katy Bold
+- Hernan Rozenfeld
+- Brendt Wohlberg
+- Jim Bagrow
+- Holly Johnsen
+- Arnar Flatberg
+- Chris Myers
+- Joel Miller
+- Keith Briggs
+- Ignacio Rozada
+- Phillipp Pagel
+- Sverre Sundsdal
+- Ross M. Richardson
+- Eben Kenah
+- Sasha Gutfriend
+- Udi Weinsberg
+- Matteo Dell'Amico
+- Andrew Conway
+- Raf Guns
+- Salim Fadhley
+- Fabrice Desclaux
+- Arpad Horvath
+- Minh Van Nguyen
+- Willem Ligtenberg
+- Loïc Séguin-C.
+- Paul McGuire
+- Jesus Cerquides
+- Ben Edwards
+- Jon Olav Vik
+- Hugh Brown
+- Ben Reilly
+- Leo Lopes
+- Jordi Torrents, GitHub: `jtorrents <https://github.com/jtorrents>`_
+- Dheeraj M R
+- Franck Kalala
+- Simon Knight
+- Conrad Lee
+- Sérgio Nery Simões
+- Robert King
+- Nick Mancuso
+- Brian Cloteaux
+- Alejandro Weinstein
+- Dustin Smith
+- Mathieu Larose
+- Romain Fontugne
+- Vincent Gauthier
+- chebee7i, GitHub: `chebee7i <https://github.com/chebee7i>`_
+- Jeffrey Finkelstein
+- Jean-Gabriel Young, Github: `jg-you <https://github.com/jgyou>`_
+- Andrey Paramonov, http://aparamon.msk.ru
+- Mridul Seth, GitHub: `MridulS <https://github.com/MridulS>`_
+- Thodoris Sotiropoulos, GitHub: `theosotr <https://github.com/theosotr>`_
+- Konstantinos Karakatsanis, GitHub: `k-karakatsanis <https://github.com/k-karakatsanis>`_
+- Ryan Nelson, GitHub: `rnelsonchem <https://github.com/rnelsonchem>`_
+- Niels van Adrichem, GitHub: `NvanAdrichem <https://github.com/NvanAdrichem>`_
+- Michael E. Rose, GitHub: `Michael-E-Rose <https://github.com/Michael-E-Rose>`_
+- Jarrod Millman, GitHub: `jarrodmillman <https://github.com/jarrodmillman>`_
+- Andre Weltsch
+- Lewis Robbins
+- Mads Jensen, Github: `atombrella <https://github.com/atombrella>`_
+- Edward L. Platt, `elplatt <https://elplatt.com>`_
+- James Owen, Github: `leamingrad <https://github.com/leamingrad>`_
+- Robert Gmyr, Github: `gmyr <https://github.com/gmyr>`_
+- Mike Trenfield
+- Jon Crall, Github: `Erotemic <https://github.com/Erotemic>`_
+- Issa Moradnejad, Github `<https://github.com/Moradnejad>`_, LinkedIn `<https://linkedin.com/in/moradnejad/>`_
+- Brian Kiefer, Github: `bkief <https://github.com/bkief>`_
+- Julien Klaus
+- Peter C. Kroon, Github: `pckroon <https://github.com/pckroon>`_
+- Weisheng Si, Github: `ws4u <https://github.com/ws4u>`_
+- Haakon H. Rød, Gitlab: `haakonhr <https://gitlab.com/haakonhr>`_, `<https://haakonhr.gitlab.io>`_
+- Efraim Rodrigues, GitHub `<https://github.com/efraimrodrigues>`_, LinkedIn `<https://linkedin.com/in/efraim-rodrigues/>`_
+- Erwan Le Merrer
+- Søren Fuglede Jørgensen, GitHub: `fuglede <https://github.com/fuglede>`_
+- Salim BELHADDAD, LinkedIn `<https://www.linkedin.com/in/salymdotme/>`_
+- Jangwon Yie, GitHub `<https://github.com/jangwon-yie>`_, LinkedIn `<https://www.linkedin.com/in/jangwon-yie-a7960065/>`_
+- ysitu
+- Tomas Gavenciak
+- Luca Baldesi
+- Yuto Yamaguchi
+- James Clough
+- Minas Gjoka
+- Drew Conway
+- Alex Levenson
+- Haochen Wu
+- Erwan  Le Merrer
+- Alex Roper
+- P C Kroon
+- Christopher Ellison
+- D. Eppstein
+- Federico Rosato
+- Aitor Almeida
+- Ferran Parés
+- Christian Olsson
+- Fredrik Erlandsson
+- Nanda H Krishna
+- Nicholas Mancuso
+- Fred Morstatter
+- Ollie Glass
+- Rodrigo Dorantes-Gilardi
+- Pranay Kanwar
+- Balint Tillman
+- Diederik van Liere
+- Ferdinando Papale
+- Miguel Sozinho Ramalho
+- Brandon Liu
+- Nima Mohammadi
+- Jason Grout
+- Jan Aagaard Meier
+- Henrik Haugbølle
+- Piotr Brodka
+- Sasha Gutfraind
+- Alessandro Luongo
+- Huston Hedinger
+- Oleguer Sagarra
+- Kazimierz Wojciechowski, GitHub `<https://github.com/kazimierz-256>`_, LinkedIn `<https://linkedin.com/in/wojciechowski-kazimierz/>`_
+- Gaetano Pietro Paolo Carpinato, Github `<https://github.com/Carghaez>`_, LinkedIn `<https://linkedin.com/in/gaetanocarpinato/>`_
+- Arun Nampally, GitHub `<https://github.com/arunwise>`_, LinkedIn `<https://www.linkedin.com/in/arun-nampally-b57845b7/>`_
+- Ryan Duve
+- Shashi Prakash Tripathi, Github `<https://github.com/itsshavar>`_,LinkedIn `<https://www.linkedin.com/in/itsshashitripathi/>`_
+
+Support
+-------
+
+``networkx`` and those who have contributed to ``networkx`` have received
+support throughout the years from a variety of sources.  We list them below.
+If you have provided support to ``networkx`` and a support acknowledgment does
+not appear below, please help us remedy the situation, and similarly, please
+let us know if you'd like something modified or corrected.
+
+Research Groups
+^^^^^^^^^^^^^^^
+
+``networkx`` acknowledges support from the following:
+
+- `Center for Nonlinear Studies <http://cnls.lanl.gov>`_, Los Alamos National
+  Laboratory, PI: Aric Hagberg
+
+- `Open Source Programs Office <https://developers.google.com/open-source/>`_,
+  Google
+
+- `Complexity Sciences Center <http://csc.ucdavis.edu/>`_, Department of
+  Physics, University of California-Davis, PI: James P. Crutchfield
+
+- `Center for Complexity and Collective Computation <http://c4.discovery.wisc.edu>`_,
+  Wisconsin Institute for Discovery, University of Wisconsin-Madison,
+  PIs: Jessica C. Flack and David C. Krakauer
+
+Funding
+^^^^^^^
+
+``networkx`` acknowledges support from the following:
+
+- Google Summer of Code via Python Software Foundation
+
+- U.S. Army Research Office grant W911NF-12-1-0288
+
+- DARPA Physical Intelligence Subcontract No. 9060-000709
+
+- NSF Grant No. PHY-0748828
+
+- John Templeton Foundation through a grant to the Santa Fe Institute to
+  study complexity
+
+- U.S. Army Research Laboratory and the U.S. Army Research Office under
+  contract number W911NF-13-1-0340
diff --git a/TODO.txt b/doc/developer/deprecations.rst
similarity index 94%
rename from TODO.txt
rename to doc/developer/deprecations.rst
index 8e00141e3..019d295c7 100644
--- a/TODO.txt
+++ b/doc/developer/deprecations.rst
@@ -1,3 +1,6 @@
+Deprecations
+============
+
 Make sure to review ``networkx/conftest.py`` after removing deprecated code.
 
 Version 3.0
diff --git a/doc/developer/index.rst b/doc/developer/index.rst
index cbf1a6de6..a82a9e204 100644
--- a/doc/developer/index.rst
+++ b/doc/developer/index.rst
@@ -6,10 +6,12 @@ Developer Guide
 .. toctree::
    :maxdepth: 2
 
+   code_of_conduct
    values
    contribute
    core_developer
-   code_of_conduct
    roadmap
    nxeps/index
    gitwash/index
+   release
+   deprecations
diff --git a/doc/developer/nxeps/index.rst b/doc/developer/nxeps/index.rst
index b44cf71b6..1a1e9d2a9 100644
--- a/doc/developer/nxeps/index.rst
+++ b/doc/developer/nxeps/index.rst
@@ -1,9 +1,9 @@
 .. _nxep_list:
 
-Enhancement Proposals (NXEPS)
-*****************************
+NXEPs
+*****
 
-NXEPs document any major changes or proposals to the NetworkX project.
+NetworkX Enhancement Proposals (NXEPs) document major changes or proposals.
 
 .. toctree::
    :maxdepth: 1
diff --git a/RELEASE.rst b/doc/developer/release.rst
similarity index 91%
rename from RELEASE.rst
rename to doc/developer/release.rst
index e1a386c81..182586274 100644
--- a/RELEASE.rst
+++ b/doc/developer/release.rst
@@ -1,5 +1,5 @@
-How to make a new release of ``networkx``
-=========================================
+Release Process
+===============
 
 - Update the release notes:
 
@@ -28,8 +28,8 @@ How to make a new release of ``networkx``
 
 - Commit changes::
 
-  git add networkx/release.py
-  git commit -m "Designate X.X release"
+   git add networkx/release.py
+   git commit -m "Designate X.X release"
 
 - Add the version number as a tag in git::
 
@@ -47,7 +47,7 @@ How to make a new release of ``networkx``
 
 - Review the github release page::
 
-  https://github.com/networkx/networkx/releases
+   https://github.com/networkx/networkx/releases
 
 - Publish on PyPi::
 
@@ -83,9 +83,9 @@ How to make a new release of ``networkx``
 
  - Commit and push changes::
 
-   git add networkx/release.py
-   git commit -m "Bump release version"
-   git push upstream master
+    git add networkx/release.py
+    git commit -m "Bump release version"
+    git push upstream master
 
 - Update the web frontpage:
   The webpage is kept in a separate repo: networkx/website
diff --git a/doc/reference/algorithms/community.rst b/doc/reference/algorithms/community.rst
index dbdca0c43..e61e8f35a 100644
--- a/doc/reference/algorithms/community.rst
+++ b/doc/reference/algorithms/community.rst
@@ -62,6 +62,7 @@ Measuring partitions
    :toctree: generated/
 
    coverage
+   modularity
    performance
 
 Partitions via centrality measures
diff --git a/doc/requirements.txt b/doc/requirements.txt
deleted file mode 100644
index d727adc26..000000000
--- a/doc/requirements.txt
+++ /dev/null
@@ -1,2 +0,0 @@
--r ../requirements/doc.txt
-
diff --git a/networkx/classes/function.py b/networkx/classes/function.py
index a24b39268..378fd77a7 100644
--- a/networkx/classes/function.py
+++ b/networkx/classes/function.py
@@ -1205,7 +1205,7 @@ def selfloop_edges(G, data=False, keys=False, default=None):
                     (n, n)
                     for n, nbrs in G.adj.items()
                     if n in nbrs
-                    for d in nbrs[n].values()
+                    for i in range(len(nbrs[n]))  # for easy edge removal (#4068)
                 )
         else:
             return ((n, n) for n, nbrs in G.adj.items() if n in nbrs)
diff --git a/networkx/generators/random_graphs.py b/networkx/generators/random_graphs.py
index 4f4dfbb4b..124b5fdeb 100644
--- a/networkx/generators/random_graphs.py
+++ b/networkx/generators/random_graphs.py
@@ -117,9 +117,6 @@ def gnp_random_graph(n, p, seed=None, directed=False):
 
     The $G_{n,p}$ model chooses each of the possible edges with probability $p$.
 
-    The functions :func:`binomial_graph` and :func:`erdos_renyi_graph` are
-    aliases of this function.
-
     Parameters
     ----------
     n : int
@@ -141,6 +138,14 @@ def gnp_random_graph(n, p, seed=None, directed=False):
     This algorithm [2]_ runs in $O(n^2)$ time.  For sparse graphs (that is, for
     small values of $p$), :func:`fast_gnp_random_graph` is a faster algorithm.
 
+    :func:`binomial_graph` and :func:`erdos_renyi_graph` are
+    aliases for :func:`gnp_random_graph`.
+
+    >>> nx.binomial_graph is nx.gnp_random_graph
+    True
+    >>> nx.erdos_renyi_graph is nx.gnp_random_graph
+    True
+
     References
     ----------
     .. [1] P. Erdős and A. Rényi, On Random Graphs, Publ. Math. 6, 290 (1959).
diff --git a/networkx/linalg/laplacianmatrix.py b/networkx/linalg/laplacianmatrix.py
index b8d28fd68..c1342131c 100644
--- a/networkx/linalg/laplacianmatrix.py
+++ b/networkx/linalg/laplacianmatrix.py
@@ -85,7 +85,7 @@ def normalized_laplacian_matrix(G, nodelist=None, weight="weight"):
 
     Returns
     -------
-    N : NumPy matrix
+    N : Scipy sparse matrix
       The normalized Laplacian matrix of G.
 
     Notes
@@ -175,7 +175,7 @@ def directed_laplacian_matrix(
 
     Returns
     -------
-    L : NumPy array
+    L : NumPy matrix
       Normalized Laplacian of G.
 
     Notes
@@ -253,7 +253,7 @@ def directed_combinatorial_laplacian_matrix(
 
     Returns
     -------
-    L : NumPy array
+    L : NumPy matrix
       Combinatorial Laplacian of G.
 
     Notes
@@ -318,7 +318,7 @@ def _transition_matrix(G, nodelist=None, weight="weight", walk_type=None, alpha=
 
     Returns
     -------
-    P : NumPy array
+    P : NumPy matrix
       transition matrix of G.
 
     Raises

instructions for removing self-edges in `configuration_model` are out of date
In the configuration model documentation, it says to use `G.remove_edges_from(nx.selfloop_edges(G))` to remove self-edges.  This no longer works (I think it broke with 2.0).  Something to do with the dictionary changing size while iterating.

The documentation should be updated to `G.remove_edges_from(list(nx.selfloop_edges(G)))`.

It's curious that this breaks, because it does seem to work on directed graphs.  That suggests that there's something I don't understand about the internal details of how the different graph types are implemented.
diff --git a/networkx/classes/tests/test_function.py b/networkx/classes/tests/test_function.py
index ed87e4d7e..23c6617b3 100644
--- a/networkx/classes/tests/test_function.py
+++ b/networkx/classes/tests/test_function.py
@@ -664,3 +664,28 @@ def test_selfloops():
         assert_edges_equal(
             nx.selfloop_edges(G, data="weight"), [(0, 0, None), (1, 1, 2)]
         )
+        # test removing selfloops behavior vis-a-vis altering a dict while iterating
+        G.add_edge(0, 0)
+        G.remove_edges_from(nx.selfloop_edges(G))
+        if G.is_multigraph():
+            G.add_edge(0, 0)
+            pytest.raises(
+                RuntimeError, G.remove_edges_from, nx.selfloop_edges(G, keys=True)
+            )
+            G.add_edge(0, 0)
+            pytest.raises(
+                TypeError, G.remove_edges_from, nx.selfloop_edges(G, data=True)
+            )
+            G.add_edge(0, 0)
+            pytest.raises(
+                RuntimeError,
+                G.remove_edges_from,
+                nx.selfloop_edges(G, data=True, keys=True),
+            )
+        else:
+            G.add_edge(0, 0)
+            G.remove_edges_from(nx.selfloop_edges(G, keys=True))
+            G.add_edge(0, 0)
+            G.remove_edges_from(nx.selfloop_edges(G, data=True))
+            G.add_edge(0, 0)
+            G.remove_edges_from(nx.selfloop_edges(G, keys=True, data=True))

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest cython distro pytest-cov pytest-xdist pytest-mock pytest-asyncio pytest-bdd pytest-benchmark pytest-randomly responses mock hypothesis freezegun trustme requests-mock requests tomlkit
apt-get update apt-get install -y gcc
3.9
requirements/default.txt requirements/test.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
codecov==2.1.13
coverage==7.8.0
cryptography==44.0.2
Cython==3.0.12
decorator==5.2.1
distro==1.9.0
exceptiongroup==1.2.2
execnet==2.1.1
freezegun==1.5.1
gherkin-official==29.0.0
hypothesis==6.130.5
idna==3.10
importlib_metadata==8.6.1
iniconfig==2.1.0
Mako==1.3.9
MarkupSafe==3.0.2
mock==5.2.0
-e git+https://github.com/networkx/networkx.git@fccab33625fd69ff3414cd0921a4287bc736bb93#egg=networkx
packaging==24.2
parse==1.20.2
parse_type==0.6.4
pluggy==1.5.0
py-cpuinfo==9.0.0
pycparser==2.22
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-bdd==8.1.0
pytest-benchmark==5.1.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-randomly==3.16.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
PyYAML==6.0.2
requests==2.32.3
requests-mock==1.12.1
responses==0.25.7
six==1.17.0
sortedcontainers==2.4.0
tomli==2.2.1
tomlkit==0.13.2
trustme==1.2.1
typing_extensions==4.13.0
urllib3==2.3.0
zipp==3.21.0

name: networkx
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - certifi==2025.1.31
      - cffi==1.17.1
      - charset-normalizer==3.4.1
      - codecov==2.1.13
      - coverage==7.8.0
      - cryptography==44.0.2
      - cython==3.0.12
      - decorator==5.2.1
      - distro==1.9.0
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - freezegun==1.5.1
      - gherkin-official==29.0.0
      - hypothesis==6.130.5
      - idna==3.10
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - mako==1.3.9
      - markupsafe==3.0.2
      - mock==5.2.0
      - packaging==24.2
      - parse==1.20.2
      - parse-type==0.6.4
      - pluggy==1.5.0
      - py-cpuinfo==9.0.0
      - pycparser==2.22
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-bdd==8.1.0
      - pytest-benchmark==5.1.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-randomly==3.16.0
      - pytest-xdist==3.6.1
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.2
      - requests==2.32.3
      - requests-mock==1.12.1
      - responses==0.25.7
      - six==1.17.0
      - sortedcontainers==2.4.0
      - tomli==2.2.1
      - tomlkit==0.13.2
      - trustme==1.2.1
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - zipp==3.21.0
prefix: /opt/conda/envs/networkx

networkx/classes/tests/test_function.py::test_selfloops
networkx/classes/tests/test_function.py::TestFunction::test_edge_subgraph networkx/classes/tests/test_function.py::TestFunction::test_add_path networkx/classes/tests/test_function.py::TestFunction::test_number_of_nodes networkx/classes/tests/test_function.py::TestFunction::test_info networkx/classes/tests/test_function.py::TestFunction::test_nodes networkx/classes/tests/test_function.py::TestFunction::test_is_weighted networkx/classes/tests/test_function.py::TestFunction::test_density_selfloop networkx/classes/tests/test_function.py::TestFunction::test_neighbors networkx/classes/tests/test_function.py::TestFunction::test_add_cycle networkx/classes/tests/test_function.py::TestFunction::test_non_edges networkx/classes/tests/test_function.py::TestFunction::test_degree networkx/classes/tests/test_function.py::TestFunction::test_subgraph networkx/classes/tests/test_function.py::TestFunction::test_is_directed networkx/classes/tests/test_function.py::TestFunction::test_density networkx/classes/tests/test_function.py::TestFunction::test_neighbors_complete_graph networkx/classes/tests/test_function.py::TestFunction::test_freeze networkx/classes/tests/test_function.py::TestFunction::test_restricted_view networkx/classes/tests/test_function.py::TestFunction::test_info_digraph networkx/classes/tests/test_function.py::TestFunction::test_create_empty_copy networkx/classes/tests/test_function.py::TestFunction::test_is_negatively_weighted networkx/classes/tests/test_function.py::TestFunction::test_add_star networkx/classes/tests/test_function.py::TestFunction::test_is_frozen networkx/classes/tests/test_function.py::TestFunction::test_edges networkx/classes/tests/test_function.py::TestFunction::test_non_neighbors networkx/classes/tests/test_function.py::TestFunction::test_degree_histogram networkx/classes/tests/test_function.py::TestFunction::test_number_of_edges networkx/classes/tests/test_function.py::test_set_edge_attributes networkx/classes/tests/test_function.py::test_get_edge_attributes networkx/classes/tests/test_function.py::test_set_edge_attributes_multi networkx/classes/tests/test_function.py::test_set_node_attributes networkx/classes/tests/test_function.py::test_get_node_attributes networkx/classes/tests/test_function.py::test_is_empty networkx/classes/tests/test_function.py::TestCommonNeighbors::test_S4 networkx/classes/tests/test_function.py::TestCommonNeighbors::test_digraph networkx/classes/tests/test_function.py::TestCommonNeighbors::test_custom2 networkx/classes/tests/test_function.py::TestCommonNeighbors::test_K5 networkx/classes/tests/test_function.py::TestCommonNeighbors::test_custom1 networkx/classes/tests/test_function.py::TestCommonNeighbors::test_nonexistent_nodes networkx/classes/tests/test_function.py::TestCommonNeighbors::test_P3
doc/developer/index.rst doc/requirements.txt CONTRIBUTORS.rst networkx/classes/function.py MANIFEST.in doc/README.md CONTRIBUTING.rst TODO.txt RELEASE.rst networkx/generators/random_graphs.py networkx/linalg/laplacianmatrix.py INSTALL.rst doc/developer/nxeps/index.rst .mailmap doc/reference/algorithms/community.rst doc/credits.rst
doc/developer/index.rst doc/requirements.txt CONTRIBUTORS.rst doc/developer/release.rst networkx/classes/function.py MANIFEST.in doc/README.md CONTRIBUTING.rst networkx/generators/random_graphs.py networkx/linalg/laplacianmatrix.py INSTALL.rst doc/developer/nxeps/index.rst .mailmap doc/reference/algorithms/community.rst doc/developer/deprecations.rst doc/credits.rst