From c18d147d30246513356e11228755b3c2960c33ec Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Sun, 14 Jul 2019 13:19:59 +0200 Subject: [PATCH] Start removing the "next" suffix in the documentation --- LICENSE | 4 +- README.md | 64 +++++++++----------- docs/Makefile | 8 +-- docs/conf.py | 16 ++--- docs/index.rst | 4 +- docs/intro.rst | 23 +++---- docs/make.bat | 4 +- docs/usage/other.rst | 4 +- pyproject.toml | 4 +- src/graphql/__init__.py | 10 +-- src/graphql/utilities/build_client_schema.py | 2 +- src/graphql/version.py | 7 --- 12 files changed, 65 insertions(+), 85 deletions(-) diff --git a/LICENSE b/LICENSE index 5aadf022..50122026 100644 --- a/LICENSE +++ b/LICENSE @@ -1,8 +1,8 @@ MIT License Copyright (c) GraphQL Contributors (GraphQL.js) -Copyright (c) Syrus Akbary (GraphQL-core) -Copyright (c) Christoph Zwerschke (GraphQL-core-next) +Copyright (c) Syrus Akbary (GraphQL-core 2) +Copyright (c) Christoph Zwerschke (GraphQL-core 3) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 543c92aa..0e0945ce 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# GraphQL-core-next +# GraphQL-core 3 -GraphQL-core-next is a Python 3.6+ port of [GraphQL.js](https://github.com/graphql/graphql-js), +GraphQL-core 3 is a Python 3.6+ port of [GraphQL.js](https://github.com/graphql/graphql-js), the JavaScript reference implementation for [GraphQL](https://graphql.org/), a query language for APIs created by Facebook. @@ -12,31 +12,22 @@ a query language for APIs created by Facebook. [![Python 3 Status](https://pyup.io/repos/github/graphql-python/graphql-core-next/python-3-shield.svg)](https://pyup.io/repos/github/graphql-python/graphql-core-next/) [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) -The current version 3.0.0a0 of GraphQL-core-next is up-to-date with GraphQL.js version -14.4.0. All parts of the API are covered by an extensive test suite of currently 1882 -unit tests. +The current version 3.0.0a0 of GraphQL-core is up-to-date +with GraphQL.js version 14.4.0. -Development will be continued with the new distribution name GraphQL-core from now on. - - -## GraphQL-core-next is now GraphQL-core 3 - -GraphQL-core-next has been discontinued as a separate Python distribution. -Instead, it is now released as GraphQL-core version 3 and newer, replacing -the existing GraphQL-core distribution. The old versions of GraphQL-core, -which also support older Python versions, are still available. +All parts of the API are covered by an extensive test suite +of currently 1882 unit tests. ## Documentation -A more detailed documentation for GraphQL-core-next can be found at +A more detailed documentation for GraphQL-core 3 can be found at [graphql-core-next.readthedocs.io](https://graphql-core-next.readthedocs.io/). The documentation for GraphQL.js can be found at [graphql.org/graphql-js/](https://graphql.org/graphql-js/). The documentation for GraphQL itself can be found at [graphql.org](https://graphql.org/). - There will be also [blog articles](https://cito.github.io/tags/graphql/) with more usage examples. @@ -53,19 +44,19 @@ README and the corresponding tests in parallel. ## Installation -GraphQL-core-next can be installed from PyPI using the built-in pip command: +GraphQL-core 3 can be installed from PyPI using the built-in pip command: - python -m pip install graphql-core-next + python -m pip install "graphql-core>=3" Alternatively, you can also use [pipenv](https://docs.pipenv.org/) for installation in a virtual environment: - pipenv install graphql-core-next + pipenv install "graphql-core>=3" ## Usage -GraphQL-core-next provides two important capabilities: building a type schema, and +GraphQL-core provides two important capabilities: building a type schema, and serving queries against that type schema. First, build a GraphQL type schema which maps to your code base: @@ -176,25 +167,25 @@ finally: ## Goals and restrictions -GraphQL-core-next tries to reproduce the code of the reference implementation GraphQL.js +GraphQL-core tries to reproduce the code of the reference implementation GraphQL.js in Python as closely as possible and to stay up-to-date with the latest development of GraphQL.js. -It has been created as a modern alternative to -[GraphQL-core](https://github.com/graphql-python/graphql-core), a prior work -by Syrus Akbary, based on an older version of GraphQL.js and also targeting -older Python versions. Some parts of GraphQL-core-next have been inspired by -GraphQL-core or directly taken over with only slight modifications, but most of the code -has been re-implemented from scratch, replicating the latest code in GraphQL.js very -closely and adding type hints for Python. +GraphQL-core 3 (formerly known as GraphQL-core-next) has been created as a modern +alternative to [GraphQL-core 2](https://github.com/graphql-python/graphql-core), +a prior work by Syrus Akbary, based on an older version of GraphQL.js and also +targeting older Python versions. Some parts of GraphQL-core 3 have been inspired by +GraphQL-core 2 or directly taken over with only slight modifications, but most of the +code has been re-implemented from scratch, replicating the latest code in GraphQL.js +very closely and adding type hints for Python. -Design goals for the GraphQL-core-next library are: +Design goals for the GraphQL-core 3 library are: * to be a simple, cruft-free, state-of-the-art implementation of GraphQL using current library and language versions * to be very close to the GraphQL.js reference implementation, while still using a Pythonic API and code style -* to make extensive use of Python type hints, similar to how GraphQL.js makes use of Flow +* to make extensive use of Python type hints, similar to how GraphQL.js makes uses Flow * to use [black](https://github.com/ambv/black) for automatic code formatting * to replicate the complete Mocha-based test suite of GraphQL.js using [pytest](https://docs.pytest.org/) @@ -216,10 +207,9 @@ Some restrictions (mostly in line with the design goals): also been created by Syrus Akbary, who meanwhile has handed over the maintenance and future development to members of the GraphQL-Python community. - The current version 2 of Graphene is using Graphql-core as core library for much of - the heavy lifting. Note that Graphene 2 is not compatible with GraphQL-core-next. - The new version 3 of Graphene however is planned to use GraphQL-core-next instead of - GraphQL-core, and GraphQL-core-next will be renamed to Graphql-core 3. + The current version 2 of Graphene is using Graphql-core 2 as core library for much of + the heavy lifting. Note that Graphene 2 is not compatible with GraphQL-core 3. + The new version 3 of Graphene will use GraphQL-core 3 instead of GraphQL-core 2. * [Ariadne](https://github.com/mirumee/ariadne) is a Python library for implementing GraphQL servers using schema-first approach created by Mirumee Software. @@ -239,9 +229,9 @@ Changes are tracked as ## Credits and history -The GraphQL-core-next library +The GraphQL-core 3 library * has been created and is maintained by Christoph Zwerschke -* uses ideas and code from GraphQL-core, a prior work by Syrus Akbary +* uses ideas and code from GraphQL-core 2, a prior work by Syrus Akbary * is a Python port of GraphQL.js which has been developed by Lee Byron and others at Facebook, Inc. and is now maintained by the [GraphQL foundation](https://gql.foundation/join/) @@ -255,6 +245,6 @@ and ported to many different programming languages. ## License -GraphQL-core-next is +GraphQL-core 3 is [MIT-licensed](https://github.com/graphql-python/graphql-core-next/blob/master/LICENSE), just like GraphQL.js. diff --git a/docs/Makefile b/docs/Makefile index f848e9f1..8d77678a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -91,9 +91,9 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GraphQL-core-next.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GraphQL-core.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GraphQL-core-next.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GraphQL-core.qhc" .PHONY: applehelp applehelp: @@ -110,8 +110,8 @@ devhelp: @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/GraphQL-core-next" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GraphQL-core-next" + @echo "# mkdir -p $$HOME/.local/share/devhelp/GraphQL-core" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GraphQL-core" @echo "# devhelp" .PHONY: epub diff --git a/docs/conf.py b/docs/conf.py index c9cfe0c1..f3aafd43 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# GraphQL-core-next documentation build configuration file, created by +# GraphQL-core 3 documentation build configuration file, created by # sphinx-quickstart on Thu Jun 21 16:28:30 2018. # # This file is execfile()d with the current directory set to its @@ -50,7 +50,7 @@ master_doc = 'index' # General information about the project. -project = u'GraphQL-core-next' +project = u'GraphQL-core 3' copyright = u'2019, Christoph Zwerschke' author = u'Christoph Zwerschke' @@ -134,7 +134,7 @@ # The name for this set of Sphinx documents. # " v documentation" by default. # -# html_title = u'GraphQL-core-next v1.0.0' +# html_title = u'GraphQL-core v3.0.0' # A shorter title for the navigation bar. Default is the same as html_title. # @@ -234,7 +234,7 @@ # html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. -htmlhelp_basename = 'GraphQL-core-next-doc' +htmlhelp_basename = 'GraphQL-core-3-doc' # -- Options for LaTeX output --------------------------------------------- @@ -260,7 +260,7 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'GraphQL-core-next.tex', u'GraphQL-core-next Documentation', + (master_doc, 'GraphQL-core-3.tex', u'GraphQL-core 3 Documentation', u'Christoph Zwerschke', 'manual'), ] @@ -296,7 +296,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'graphql-core-next', u'GraphQL-core-next Documentation', + (master_doc, 'graphql-core', u'GraphQL-core 3 Documentation', [author], 1) ] @@ -311,8 +311,8 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'GraphQL-core-next', u'GraphQL-core-next Documentation', - author, 'GraphQL-core-next', 'One line description of project.', + (master_doc, 'GraphQL-core', u'GraphQL-core 3 Documentation', + author, 'GraphQL-core 3', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/index.rst b/docs/index.rst index b24ec349..4b32fcf0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,5 @@ -Welcome to GraphQL-core-next -============================ +Welcome to GraphQL-core 3 +========================= Contents -------- diff --git a/docs/intro.rst b/docs/intro.rst index ccd5144f..4b708cb7 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -1,13 +1,10 @@ Introduction ============ -`GraphQL-core-next`_ is a Python port of `GraphQL.js`_, +`GraphQL-core-3`_ is a Python port of `GraphQL.js`_, the JavaScript reference implementation for GraphQL_, a query language for APIs created by Facebook. -.. attention:: GraphQL-core-next has been deprecated. - It is now released as GraphQL-core v3 and newer. - `GraphQL`_ consists of three parts: * A type system that you define @@ -25,22 +22,22 @@ which consists of the following sections: * Response_ This division into subsections is reflected in the :ref:`sub-packages` of -GraphQL-core-next. Each of these sub-packages implements the aspects specified in +GraphQL-core 3. Each of these sub-packages implements the aspects specified in one of the sections of the specification. Getting started --------------- -You can install GraphQL-core-next using pip_:: +You can install GraphQL-core 3 using pip_:: - pip install graphql-core-next + pip install "graphql-core>=3" -You can also install GraphQL-core-next with pipenv_, if you prefer that:: +You can also install GraphQL-core 3 with pipenv_, if you prefer that:: - pipenv install graphql-core-next + pipenv install "graphql-core>=3" -Now you can start using GraphQL-core-next by importing from the top-level +Now you can start using GraphQL-core 3 by importing from the top-level :mod:`graphql` package. Nearly everything defined in the sub-packages can also be imported directly from the top-level package. @@ -82,13 +79,13 @@ This will yield the following output:: Reporting Issues and Contributing --------------------------------- -Please visit the `GitHub repository of GraphQL-core-next`_ if you're interested +Please visit the `GitHub repository of GraphQL-core 3`_ if you're interested in the current development or want to report issues or send pull requests. .. _GraphQL: https://graphql.org/ .. _GraphQl.js: https://github.com/graphql/graphql-js -.. _GraphQl-core-next: https://github.com/graphql-python/graphql-core-next -.. _GitHub repository of GraphQL-core-next: https://github.com/graphql-python/graphql-core-next +.. _GraphQl-core-3: https://github.com/graphql-python/graphql-core-next +.. _GitHub repository of GraphQL-core 3: https://github.com/graphql-python/graphql-core-next .. _Specification for GraphQL: https://facebook.github.io/graphql/ .. _Language: https://facebook.github.io/graphql/draft/#sec-Language .. _Type System: https://facebook.github.io/graphql/draft/#sec-Type-System diff --git a/docs/make.bat b/docs/make.bat index fc8be384..7e316813 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -129,9 +129,9 @@ if "%1" == "qthelp" ( echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\GraphQL-core-next.qhcp + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\GraphQL-core.qhcp echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\GraphQL-core-next.ghc + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\GraphQL-core.ghc goto end ) diff --git a/docs/usage/other.rst b/docs/usage/other.rst index 8bfb0223..404fb5c7 100644 --- a/docs/usage/other.rst +++ b/docs/usage/other.rst @@ -19,7 +19,7 @@ Other Usages GraphQL-core-next provides many more low-level functions that can be used to work with GraphQL schemas and queries. We encourage you to explore the contents of the various :ref:`sub-packages`, particularly :mod:`graphql.utilities`, and to look into the source -code and tests of `GraphQL-core-next`_ in order to find all the functionality that is +code and tests of `GraphQL-core 3`_ in order to find all the functionality that is provided and understand it in detail. -.. _GraphQL-core-next: https://github.com/graphql-python/graphql-core-next +.. _GraphQL-core 3: https://github.com/graphql-python/graphql-core-next diff --git a/pyproject.toml b/pyproject.toml index 8e328334..9b494019 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [tool.poetry] -name = "graphql-core-next" +name = "graphql-core" version = "3.0.0a0" description = """ -GraphQL-core-next is a Python port of GraphQL.js, +GraphQL-core is a Python port of GraphQL.js, the JavaScript reference implementation for GraphQL.""" licese="MIT" authors = [ diff --git a/src/graphql/__init__.py b/src/graphql/__init__.py index 795c2409..43e251fb 100644 --- a/src/graphql/__init__.py +++ b/src/graphql/__init__.py @@ -1,9 +1,9 @@ -"""GraphQL-core-next +"""GraphQL-core The primary :mod:`graphql` package includes everything you need to define a GraphQL schema and fulfill GraphQL requests. -GraphQL-core-next provides a reference implementation for the GraphQL specification +GraphQL-core provides a reference implementation for the GraphQL specification but is also a useful utility for operating on GraphQL files and building sophisticated tools. @@ -25,7 +25,7 @@ from graphql import parse from graphql.language import parse -The sub-packages of GraphQL-core-next are: +The sub-packages of GraphQL-core 3 are: - :mod:`graphql.language`: Parse and operate on the GraphQL language. - :mod:`graphql.type`: Define GraphQL types and schema. @@ -37,7 +37,7 @@ - :mod:`graphql.subscription`: Subscribe to data updates. """ -# The GraphQL-core-next and GraphQL.js version info. +# The GraphQL-core 3 and GraphQL.js version info. from .version import version, version_info, version_js, version_info_js @@ -386,7 +386,7 @@ find_dangerous_changes, ) -# The GraphQL-core-next version info. +# The GraphQL-core version info. __version__ = version __version_info__ = version_info diff --git a/src/graphql/utilities/build_client_schema.py b/src/graphql/utilities/build_client_schema.py index 3072a6ed..2e5238a7 100644 --- a/src/graphql/utilities/build_client_schema.py +++ b/src/graphql/utilities/build_client_schema.py @@ -43,7 +43,7 @@ def build_client_schema( """Build a GraphQLSchema for use by client tools. Given the result of a client running the introspection query, creates and returns - a GraphQLSchema instance which can be then used with all GraphQL-core-next tools, + a GraphQLSchema instance which can be then used with all GraphQL-core 3 tools, but cannot be used to execute a query, as introspection does not represent the "resolver", "parse" or "serialize" functions or any other server-internal mechanisms. diff --git a/src/graphql/version.py b/src/graphql/version.py index 270a2bf4..fdac5f8b 100644 --- a/src/graphql/version.py +++ b/src/graphql/version.py @@ -1,5 +1,4 @@ from typing import NamedTuple -from warnings import warn __all__ = ["version", "version_info", "version_js", "version_info_js"] @@ -26,9 +25,3 @@ def __str__(self): version_js = "14.4.0" version_info_js = VersionInfo(14, 4, 0, "final", 0) - -warn( - "GraphQL-core-next has been discontinued." - " It is now released as GraphQL-core v3 and newer.", - DeprecationWarning, -)