vine-5.1.0+dfsg.orig/0000755000175000017500000000000014521652663014610 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/.github/0000755000175000017500000000000014521652663016150 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/.github/workflows/0000755000175000017500000000000014521652663020205 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/.github/workflows/ci.yml0000644000175000017500000000123014521652663021317 0ustar cjwatsoncjwatsonname: CI on: [pull_request, push] jobs: #################### Unittests #################### unittest: runs-on: ubuntu-latest strategy: matrix: python-version: [3.8,3.9,"3.10","3.12"] steps: - name: Check out code from GitHub uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} id: python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: pip install --upgrade pip setuptools wheel tox - name: Run unittest run: tox -v -e ${{ matrix.python-version }}-unit -- -v vine-5.1.0+dfsg.orig/.github/workflows/codeql-analysis.yml0000644000175000017500000000437414521652663024030 0ustar cjwatsoncjwatson# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # # ******** NOTE ******** # We have attempted to detect the languages in your repository. Please check # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # name: "CodeQL" on: push: branches: [ master ] pull_request: # The branches below must be a subset of the branches above branches: [ master ] jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: [ 'python' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - name: Checkout repository uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v2 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines # and modify them (or add more) to build your code if your project # uses a compiled language #- run: | # make bootstrap # make release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 vine-5.1.0+dfsg.orig/Changelog0000644000175000017500000001071714521652663016430 0ustar cjwatsoncjwatsonChanges ======= .. _version-5.1.0: 5.1.0 ===== :release-date: 2023-11-05 2:45 P.M UTC+6:00 :release-by: ASIF SAIF UDDIN - Dropped Python 3.6 support. - Added new Python versions support. - Dropped old dependencies. - Added new GHA based CI. - Added slots support and impproved dynamic assignment. Contributed by **Asif Saif Uddin** .. _version-5.0.0: 5.0.0 ===== :release-date: 2020-09-06 6:10 P.M UTC+3:00 :release-by: Omer Katz - Dropped Python 3.5 support. Contributed by **Omer Katz** .. _version-5.0.0a1: 5.0.0a1 ======= :release-date: 2019-04-01 4:30 P.M UTC+3:00 :release-by: Omer Katz - Dropped Python 2.x support. Contributed by **Omer Katz** - Dropped Python 3.4 support. Contributed by **Omer Katz** - Removed the :mod:`vine.five` module. Contributed by **Omer Katz** - Removed the :mod:`vine.backports.weakref_backports` module. Contributed by **Omer Katz** .. _version-1.3.0: 1.3.0 ===== :release-date: 2019-03-19 11:00 A.M UTC+2 :release-by: Omer Katz - Added the option to ignore the result of a function and simply call the callback without arguments. Contributed by **Omer Katz** .. _version-1.2.0: 1.2.0 ===== :release-date: 2018-01-06 4:30 P.M UTC+2 :release-by: Omer Katz - Added Python 3.7 support. Contributed by **Jon Dufresne** & **:github_user:`dequis`** - Handle bound methods in weak reference promise instances. Contributed by **George Psarakis** Documentation fixes, CI adjustments and cleanups by: - **Omer Katz** - **Jon Dufresne** - **Edward Betts** - **Jacopo Notarstefano** - **Christopher Hoskin** - **Fahad Siddiqui** .. _version-1.1.4: 1.1.4 ===== :release-date: 2017-07-16 10:30 P.M UTC+2 :release-by: Ask Solem - Added official support for Python 3.5 & 3.6. - Improve Python 2/3 compatibility. - Don't set mutable default values to keyword arguments. .. _version-1.1.3: 1.1.3 ===== :release-date: 2016-10-13 06:02 P.M PDT :release-by: Ask Solem - New ``promise(fun, weak=True)`` argument, creates weakref to callback. .. _version-1.1.2: 1.1.2 ===== :release-date: 2016-09-07 04:18 P.M PDT :release-by: Ask Solem - barrier: now handles the case where len(promises) returns NotImplemented. .. _version-1.1.1: 1.1.1 ===== :release-date: 2016-06-30 12:05 P.M PDT :release-by: Ask Solem - Requirements: Tests now depends on :pypi:`case` 1.2.2 - Five: python_2_unicode_compatible now ensures `__repr__` returns bytes on Python 2. .. _version-1.1.0: 1.1.0 ===== :release-date: 2016-04-21 01:30 P.M PDT :release-by: Ask Solem - :meth:`promise.throw() ` now passes partial args/kwargs to the errback: .. code-block:: pycon >>> p = promise(args=(self,), on_error=handle_error) >>> p.throw(exc) # --> handle_error(self, exc) - New :class:`vine.abstract.ThenableProxy` can be used to add promise-capabilities to a class by forwarding to a different promise. .. code-block:: python from vine import promise from vine.abstract import ThenableProxy class P(ThenableProxy): def __init__(self, on_success=None, on_error=None): self._set_promise_target(promise( args=(self,), callback=on_success, on_error=on_error, )) p = P() p.then(download_file(url)).then(extract_file) - :meth:`promise.throw() ` now supports a propagate argument that can be set to False to never reraise the exception. - :meth:`promise.throw() ` now also reraises the current exception from the stack, if the exc argument is passed and that value is the same as the current exception. - :meth:`Thenable.register() ` can now be used as a decorator. - Argument to :meth:`promise.throw1(exc) ` can now be :const:`None` to use the current exception. - ``monotonic()`` now uses ``librt.so.0`` as an alternative if ``librt.so.1`` does not exist. Contributed by Fahad Siddiqui. .. _version-1.0.2: 1.0.2 ===== :release-date: 2016-04-11 05:30 P.M PDT :release-by: Ask Solem - ``promise.throw()`` now supports second ``traceback`` argument to throw exception with specific traceback. Contributed by Ionel Cristian Mărieș. .. _version-1.0.1: 1.0.1 ===== :release-date: 2016-04-11 03:00 P.M PDT :release-by: Ask Solem - Adds vine.five.python_2_unicode_compatible. .. _version-1.0.0: 1.0.0 ===== :release-date: 2016-04-07 06:02 P.M PDT :release-by: Ask Solem - Initial release. vine-5.1.0+dfsg.orig/.travis.yml0000644000175000017500000000150314521652663016720 0ustar cjwatsoncjwatsondist: bionic language: python cache: pip stages: - lint - test env: global: PYTHONUNBUFFERED=yes matrix: include: - python: 3.6 env: TOXENV=3.6 - python: 3.7 env: TOXENV=3.7 - python: 3.8 env: TOXENV=3.8 - python: pypy3.6-7.3.1 env: TOXENV=pypy3 - python: 3.8 env: TOXENV=flake8 stage: lint - python: 3.8 env: TOXENV=apicheck stage: lint - python: 3.8 env: TOXENV=pydocstyle stage: lint install: - pip install -U pip setuptools wheel | cat - pip install -U tox | cat script: tox -v -- -v after_success: - .tox/$TRAVIS_PYTHON_VERSION/bin/coverage xml - .tox/$TRAVIS_PYTHON_VERSION/bin/codecov -e TOXENV notifications: irc: channels: - "chat.freenode.net#celery" on_success: change on_failure: change vine-5.1.0+dfsg.orig/SECURITY.md0000644000175000017500000000050114521652663016375 0ustar cjwatsoncjwatson# Security Policy ## Supported Versions | Version | Supported | | ------- | ------------------ | | 5.1.x | :white_check_mark: | | 2.0.x | :x: | | 5.0.x | :white_check_mark: | | < 5.0 | :x: | ## Reporting a Vulnerability please report Vulnerability to auvipy@gmail.com. vine-5.1.0+dfsg.orig/appveyor.yml0000644000175000017500000000072414521652663017203 0ustar cjwatsoncjwatsonenvironment: matrix: - TOXENV: "3.9" TOX_APPVEYOR_X64: 0 - TOXENV: "3.7" TOX_APPVEYOR_X64: 0 - TOXENV: "3.8" TOX_APPVEYOR_X64: 0 - TOXENV: "3.9" TOX_APPVEYOR_X64: 1 - TOXENV: "3.7" TOX_APPVEYOR_X64: 1 - TOXENV: "3.8" TOX_APPVEYOR_X64: 1 build: off install: - "py -3.8 -m pip install -U pip setuptools wheel tox tox-appveyor" test_script: - "py -3.8 -m tox" cache: - '%LOCALAPPDATA%\pip\Cache' vine-5.1.0+dfsg.orig/setup.cfg0000644000175000017500000000056714521652663016441 0ustar cjwatsoncjwatson[tool:pytest] testpaths = t/unit/ python_classes = test_* [pydocstyle] ignore = D102,D104,D203,D105,D213,D107,D407,D412,D413 [flake8] # classes can be lowercase, arguments and variables can be uppercase # whenever it makes the code more readable. extend-ignore = N806, N802, N801, N803 [bdist_wheel] universal = 0 [metadata] license_file = LICENSE [isort] profile=black vine-5.1.0+dfsg.orig/README.rst0000644000175000017500000000305514521652663016302 0ustar cjwatsoncjwatson===================================================================== vine - Python Promises ===================================================================== |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| :Version: 5.1.0 :Web: https://vine.readthedocs.io/ :Download: https://pypi.org/project/vine/ :Source: https://github.com/celery/vine/ :Keywords: promise, async, future About ===== This is a special implementation of promises in that it can be used both for promise of a value and lazy evaluation. The biggest upside for this is that everything in a promise can also be a promise, e.g. filters, callbacks and errbacks can all be promises. .. |build-status| image:: https://secure.travis-ci.org/celery/vine.png?branch=master :alt: Build status :target: https://travis-ci.org/celery/vine .. |coverage| image:: https://codecov.io/github/celery/vine/coverage.svg?branch=master :target: https://codecov.io/github/celery/vine?branch=master .. |license| image:: https://img.shields.io/pypi/l/vine.svg :alt: BSD License :target: https://opensource.org/licenses/BSD-3-Clause .. |wheel| image:: https://img.shields.io/pypi/wheel/vine.svg :alt: Vine can be installed via wheel :target: https://pypi.org/project/vine/ .. |pyversion| image:: https://img.shields.io/pypi/pyversions/vine.svg :alt: Supported Python versions. :target: https://pypi.org/project/vine/ .. |pyimp| image:: https://img.shields.io/pypi/implementation/vine.svg :alt: Support Python implementations. :target: https://pypi.org/project/vine/ vine-5.1.0+dfsg.orig/docs/0000755000175000017500000000000014521652663015540 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/docs/changelog.rst0000644000175000017500000000003214521652663020214 0ustar cjwatsoncjwatson.. include:: ../Changelog vine-5.1.0+dfsg.orig/docs/templates/0000755000175000017500000000000014521652663017536 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/docs/templates/readme.txt0000644000175000017500000000223614521652663021537 0ustar cjwatsoncjwatson===================================================================== vine - Python Promises ===================================================================== |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| .. include:: ../includes/introduction.txt .. |build-status| image:: https://secure.travis-ci.org/celery/vine.png?branch=master :alt: Build status :target: https://travis-ci.org/celery/vine .. |coverage| image:: https://codecov.io/github/celery/vine/coverage.svg?branch=master :target: https://codecov.io/github/celery/vine?branch=master .. |license| image:: https://img.shields.io/pypi/l/vine.svg :alt: BSD License :target: https://opensource.org/licenses/BSD-3-Clause .. |wheel| image:: https://img.shields.io/pypi/wheel/vine.svg :alt: Vine can be installed via wheel :target: https://pypi.org/project/vine/ .. |pyversion| image:: https://img.shields.io/pypi/pyversions/vine.svg :alt: Supported Python versions. :target: https://pypi.org/project/vine/ .. |pyimp| image:: https://img.shields.io/pypi/implementation/vine.svg :alt: Support Python implementations. :target: https://pypi.org/project/vine/ vine-5.1.0+dfsg.orig/docs/_static/0000755000175000017500000000000014521652663017166 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/docs/_static/.keep0000644000175000017500000000000014521652663020101 0ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/docs/includes/0000755000175000017500000000000014521652663017346 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/docs/includes/introduction.txt0000644000175000017500000000067014521652663022633 0ustar cjwatsoncjwatson:Version: 5.1.0 :Web: https://vine.readthedocs.io/ :Download: https://pypi.org/project/vine/ :Source: https://github.com/celery/vine/ :Keywords: promise, async, future About ===== This is a special implementation of promises in that it can be used both for promise of a value and lazy evaluation. The biggest upside for this is that everything in a promise can also be a promise, e.g. filters, callbacks and errbacks can all be promises. vine-5.1.0+dfsg.orig/docs/_templates/0000755000175000017500000000000014521652663017675 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/docs/_templates/sidebardonations.html0000644000175000017500000000601214521652663024112 0ustar cjwatsoncjwatson vine-5.1.0+dfsg.orig/docs/reference/0000755000175000017500000000000014521652663017476 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/docs/reference/vine.synchronization.rst0000644000175000017500000000041514521652663024431 0ustar cjwatsoncjwatson===================================================== vine.synchronization ===================================================== .. contents:: :local: .. currentmodule:: vine.synchronization .. automodule:: vine.synchronization :members: :undoc-members: vine-5.1.0+dfsg.orig/docs/reference/vine.utils.rst0000644000175000017500000000035714521652663022335 0ustar cjwatsoncjwatson===================================================== vine.utils ===================================================== .. contents:: :local: .. currentmodule:: vine.utils .. automodule:: vine.utils :members: :undoc-members: vine-5.1.0+dfsg.orig/docs/reference/vine.promises.rst0000644000175000017500000000037014521652663023031 0ustar cjwatsoncjwatson===================================================== vine.promises ===================================================== .. contents:: :local: .. currentmodule:: vine.promises .. automodule:: vine.promises :members: :undoc-members: vine-5.1.0+dfsg.orig/docs/reference/vine.abstract.rst0000644000175000017500000000037014521652663022773 0ustar cjwatsoncjwatson===================================================== vine.abstract ===================================================== .. contents:: :local: .. currentmodule:: vine.abstract .. automodule:: vine.abstract :members: :undoc-members: vine-5.1.0+dfsg.orig/docs/reference/index.rst0000644000175000017500000000033614521652663021341 0ustar cjwatsoncjwatson.. _apiref: =============== API Reference =============== :Release: |version| :Date: |today| .. toctree:: :maxdepth: 1 vine.promises vine.synchronization vine.funtools vine.abstract vine.utils vine-5.1.0+dfsg.orig/docs/reference/vine.funtools.rst0000644000175000017500000000037014521652663023041 0ustar cjwatsoncjwatson===================================================== vine.funtools ===================================================== .. contents:: :local: .. currentmodule:: vine.funtools .. automodule:: vine.funtools :members: :undoc-members: vine-5.1.0+dfsg.orig/docs/images/0000755000175000017500000000000014521652663017005 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/docs/images/celery_128.png0000644000175000017500000005277214614215557021405 0ustar cjwatsoncjwatsonPNG  IHDR>aUIDATx{fU[{so?<4H#i@ aX`Ǣ~T9MW?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?]=;pZeβSȫWʭVɬUǪSŧQOLHE@<7z2s/n'jsQx-dx?FILNNf/^I_?_?>r\lӷYͰ^г]ϲ[ͰYʭXȫYŦVTROMJHC~<|+bx7oxHKLNQPgå/^I`@_?@t^mԸ^гaҵaҵ_г[̯UȫOťWɧVáSQOMLIG7ox9qxLNORSTiƨ.]H_@`@@q[~WӴ[ѳ[Ҵ\Եb׹nھîoƪUßUSQNMJ9ox>sxQQTWXXàk̭6cP[;gI Z;{ɵ{^uG-dkԱUXURQOT0Z8`=1VDwǬ\ɣ\YWTS@uxDwxY˜Z[^ĝ`ɣa˦hԮoƪ:+O/gHjKdA`=b@fEgG]?E(+6+fdѫ^Ş]Ü[XWDwxFyx\ƛ]˜`ƞbȠdͥfϩfЫr߸m(H;(7A$@#90/%F8Crb`sбkհdͧcʢ`ƞ^Ú]—[ŚFyxJ{xaʞbƛdɟf̣gШiҫk֯k֯uyںgYUwW{\fr©yع{vlڲiӬhѩfΥdʡbǝař`ɝJyxL~yc̠gʠhͣiϥjҪl֮nٰp۳o۴rz~|wsoܶnٲnٱmׯkԫiЧhͣg̡eǜa˞L~yS~Ylթd̟g͢hХjөkլmدo۳pܵp޸o޷opppppqpݷo۴nڱl׮jԪiҧhϣf̠bʝkӧS{Yp}߷zߵ}~~}|yݳ|޵oxWtqrrrrrrrrrrrrrrrrrrrrqtxW@@vine-5.1.0+dfsg.orig/docs/conf.py0000644000175000017500000000125114521652663017036 0ustar cjwatsoncjwatsonfrom sphinx_celery import conf globals().update(conf.build_config( 'vine', __file__, project='Vine', description='Python Promises', # version_dev='2.0', # version_stable='1.0', canonical_url='https://vine.readthedocs.io', webdomain='celeryproject.org', github_project='celery/vine', author='Ask Solem & contributors', author_name='Ask Solem', copyright='2016', publisher='Celery Project', html_logo='images/celery_128.png', html_favicon='images/favicon.ico', html_prepend_sidebars=['sidebardonations.html'], extra_extensions=[], include_intersphinx={'python', 'sphinx'}, apicheck_ignore_modules=['vine'], )) vine-5.1.0+dfsg.orig/docs/Makefile0000644000175000017500000001751214521652663017206 0ustar cjwatsoncjwatson# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " applehelp to make an Apple Help Book" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " epub3 to make an epub3" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " coverage to run coverage check of the documentation (if enabled)" @echo " apicheck to make sure all modules are documented by autodoc" .PHONY: clean clean: rm -rf $(BUILDDIR)/* .PHONY: html html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." .PHONY: dirhtml dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." .PHONY: singlehtml singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." .PHONY: pickle pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." .PHONY: json json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." .PHONY: htmlhelp htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." .PHONY: qthelp qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PROJ.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PROJ.qhc" .PHONY: applehelp applehelp: $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp @echo @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." @echo "N.B. You won't be able to view it unless you put it in" \ "~/Library/Documentation/Help or install it in your application" \ "bundle." .PHONY: devhelp devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/PROJ" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PROJ" @echo "# devhelp" .PHONY: epub epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." .PHONY: epub3 epub3: $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 @echo @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." .PHONY: latex latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." .PHONY: latexpdf latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: latexpdfja latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: text text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." .PHONY: man man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." .PHONY: texinfo texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." .PHONY: info info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." .PHONY: gettext gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." .PHONY: changes changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." .PHONY: linkcheck linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." .PHONY: doctest doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." .PHONY: coverage coverage: $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage @echo "Testing of coverage in the sources finished, look at the " \ "results in $(BUILDDIR)/coverage/python.txt." .PHONY: apicheck apicheck: $(SPHINXBUILD) -b apicheck $(ALLSPHINXOPTS) $(BUILDDIR)/apicheck .PHONY: xml xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." .PHONY: pseudoxml pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." vine-5.1.0+dfsg.orig/docs/index.rst0000644000175000017500000000051614521652663017403 0ustar cjwatsoncjwatson============================================= vine - Python Promises ============================================= .. include:: includes/introduction.txt Contents ======== .. toctree:: :maxdepth: 2 reference/index changelog Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` vine-5.1.0+dfsg.orig/docs/make.bat0000644000175000017500000001646414521652663017160 0ustar cjwatsoncjwatson@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. epub3 to make an epub3 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. xml to make Docutils-native XML files echo. pseudoxml to make pseudoxml-XML files for display purposes echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled echo. coverage to run coverage check of the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) REM Check if sphinx-build is available and fallback to Python version if any %SPHINXBUILD% 1>NUL 2>NUL if errorlevel 9009 goto sphinx_python goto sphinx_ok :sphinx_python set SPHINXBUILD=python -m sphinx.__init__ %SPHINXBUILD% 2> nul if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) :sphinx_ok if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\PROJ.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\PROJ.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "epub3" ( %SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3 if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub3 file is in %BUILDDIR%/epub3. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdf" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf cd %~dp0 echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdfja" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf-ja cd %~dp0 echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) if "%1" == "coverage" ( %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage if errorlevel 1 exit /b 1 echo. echo.Testing of coverage in the sources finished, look at the ^ results in %BUILDDIR%/coverage/python.txt. goto end ) if "%1" == "xml" ( %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml if errorlevel 1 exit /b 1 echo. echo.Build finished. The XML files are in %BUILDDIR%/xml. goto end ) if "%1" == "pseudoxml" ( %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml if errorlevel 1 exit /b 1 echo. echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. goto end ) :end vine-5.1.0+dfsg.orig/setup.py0000644000175000017500000000605614521652663016331 0ustar cjwatsoncjwatson#!/usr/bin/env python3 import codecs import os import re import sys import setuptools import setuptools.command.test NAME = 'vine' # -*- Classifiers -*- classes = """ Development Status :: 5 - Production/Stable Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy License :: OSI Approved :: BSD License Intended Audience :: Developers Operating System :: OS Independent """ classifiers = [s.strip() for s in classes.split('\n') if s] # -*- Distribution Meta -*- re_meta = re.compile(r'__(\w+?)__\s*=\s*(.*)') re_doc = re.compile(r'^"""(.+?)"""') def add_default(m): attr_name, attr_value = m.groups() return ((attr_name, attr_value.strip("\"'")),) def add_doc(m): return (('doc', m.groups()[0]),) pats = {re_meta: add_default, re_doc: add_doc} here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'vine', '__init__.py')) as meta_fh: meta = {} for line in meta_fh: if line.strip() == '# -eof meta-': break for pattern, handler in pats.items(): m = pattern.match(line.strip()) if m: meta.update(handler(m)) # -*- Installation Requires -*- py_version = sys.version_info is_jython = sys.platform.startswith('java') is_pypy = hasattr(sys, 'pypy_version_info') def strip_comments(line): return line.split('#', 1)[0].strip() def reqs(f): with open(os.path.join(os.getcwd(), "requirements", f)) as fp: return [r for r in (strip_comments(line) for line in fp) if r] # -*- Long Description -*- if os.path.exists('README.rst'): long_description = codecs.open('README.rst', 'r', 'utf-8').read() else: long_description = 'See https://pypi.org/project/vine/' # -*- Entry Points -*- # # -*- %%% -*- class pytest(setuptools.command.test.test): user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')] def initialize_options(self): super().initialize_options() self.pytest_args = [] def run_tests(self): import pytest sys.exit(pytest.main(self.pytest_args)) setuptools.setup( name=NAME, packages=setuptools.find_packages(exclude=['t', 't.*']), version=meta['version'], description=meta['doc'], long_description=long_description, keywords='promise promises lazy future futures', author=meta['author'], author_email=meta['contact'], url=meta['homepage'], platforms=['any'], classifiers=classifiers, license='BSD', python_requires=">=3.6", install_requires=[], tests_require=reqs('test.txt'), cmdclass={'test': pytest}, zip_safe=False, include_package_data=False, ) vine-5.1.0+dfsg.orig/tox.ini0000644000175000017500000000170714521652663016130 0ustar cjwatsoncjwatson[tox] envlist = {pypy3,3.12,3.8,3.9,3.10}-unit flake8 apicheck pydocstyle [testenv] deps= -r{toxinidir}/requirements/test.txt -r{toxinidir}/requirements/test-ci.txt apicheck,linkcheck: -r{toxinidir}/requirements/docs.txt flake8,pydocstyle: -r{toxinidir}/requirements/pkgutils.txt sitepackages = False recreate = False commands = py.test -xv --cov=vine --cov-report=xml --no-cov-on-fail t/unit {posargs} basepython = flake8,apicheck,linkcheck,pydocstyle: python3.10 pypy3: pypy3.10 3.8: python3.8 3.9: python3.9 3.10: python3.10 3.12: python3.12 [testenv:apicheck] commands = sphinx-build -b apicheck -d {envtmpdir}/doctrees docs docs/_build/apicheck [testenv:linkcheck] commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck [testenv:flake8] commands = flake8 {toxinidir}/vine {toxinidir}/t [testenv:pydocstyle] commands = pydocstyle {toxinidir}/vine vine-5.1.0+dfsg.orig/LICENSE0000644000175000017500000000463514521652663015625 0ustar cjwatsoncjwatsonCopyright (c) 2015-2016 Ask Solem & contributors. All rights reserved. Vine is licensed under The BSD License (3 Clause, also known as the new BSD license). The license is an OSI approved Open Source license and is GPL-compatible(1). The license text can also be found here: http://www.opensource.org/licenses/BSD-3-Clause License ======= Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Ask Solem, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Ask Solem OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Documentation License ===================== The documentation portion of Vine (the rendered contents of the "docs" directory of a software distribution or checkout) is supplied under the "Creative Commons Attribution-ShareAlike 4.0 International" (CC BY-SA 4.0) License as described by http://creativecommons.org/licenses/by-sa/4.0/ Footnotes ========= (1) A GPL-compatible license makes it possible to combine Vine with other software that is released under the GPL, it does not mean that we're distributing Vine under the GPL license. The BSD license, unlike the GPL, let you distribute a modified version without making your changes open source. vine-5.1.0+dfsg.orig/.pre-commit-config.yaml0000644000175000017500000000112214521652663021065 0ustar cjwatsoncjwatsonrepos: - repo: https://github.com/asottile/pyupgrade rev: v3.15.0 hooks: - id: pyupgrade args: ["--py36-plus"] - repo: https://github.com/PyCQA/flake8 rev: 6.1.0 hooks: - id: flake8 - repo: https://github.com/asottile/yesqa rev: v1.5.0 hooks: - id: yesqa - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: check-merge-conflict - id: check-toml - id: check-yaml - id: mixed-line-ending - repo: https://github.com/pycqa/isort rev: 5.12.0 hooks: - id: isort vine-5.1.0+dfsg.orig/vine/0000755000175000017500000000000014521652663015551 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/vine/__init__.py0000644000175000017500000000202114521652663017655 0ustar cjwatsoncjwatson"""Python promises.""" import re from collections import namedtuple from .abstract import Thenable from .funtools import ( ensure_promise, maybe_promise, ppartial, preplace, starpromise, transform, wrap, ) from .promises import promise from .synchronization import barrier __version__ = '5.1.0' __author__ = 'Ask Solem' __contact__ = 'auvipy@gmail.com' __homepage__ = 'https://github.com/celery/vine' __docformat__ = 'restructuredtext' # -eof meta- version_info_t = namedtuple('version_info_t', ( 'major', 'minor', 'micro', 'releaselevel', 'serial', )) # bump version can only search for {current_version} # so we have to parse the version here. _temp = re.match( r'(\d+)\.(\d+).(\d+)(.+)?', __version__).groups() VERSION = version_info = version_info_t( int(_temp[0]), int(_temp[1]), int(_temp[2]), _temp[3] or '', '') del (_temp) del (re) __all__ = [ 'Thenable', 'promise', 'barrier', 'maybe_promise', 'ensure_promise', 'ppartial', 'preplace', 'starpromise', 'transform', 'wrap', ] vine-5.1.0+dfsg.orig/vine/funtools.py0000644000175000017500000000545614521652663020006 0ustar cjwatsoncjwatson"""Functional utilities.""" from .abstract import Thenable from .promises import promise __all__ = [ 'maybe_promise', 'ensure_promise', 'ppartial', 'preplace', 'ready_promise', 'starpromise', 'transform', 'wrap', ] def maybe_promise(p): """Return None if p is undefined, otherwise make sure it's a promise.""" if p: if not isinstance(p, Thenable): return promise(p) return p def ensure_promise(p): """Ensure p is a promise. If p is not a promise, a new promise is created with p' as callback. """ if p is None: return promise() return maybe_promise(p) def ppartial(p, *args, **kwargs): """Create/modify promise with partial arguments.""" p = ensure_promise(p) if args: p.args = args + p.args if kwargs: p.kwargs.update(kwargs) return p def preplace(p, *args, **kwargs): """Replace promise arguments. This will force the promise to disregard any arguments the promise is fulfilled with, and to be called with the provided arguments instead. """ def _replacer(*_, **__): return p(*args, **kwargs) return promise(_replacer) def ready_promise(callback=None, *args): """Create promise that is already fulfilled.""" p = ensure_promise(callback) p(*args) return p def starpromise(fun, *args, **kwargs): """Create promise, using star arguments.""" return promise(fun, args, kwargs) def transform(filter_, callback, *filter_args, **filter_kwargs): """Filter final argument to a promise. E.g. to coerce callback argument to :class:`int`:: transform(int, callback) or a more complex example extracting something from a dict and coercing the value to :class:`float`: .. code-block:: python def filter_key_value(key, filter_, mapping): return filter_(mapping[key]) def get_page_expires(self, url, callback=None): return self.request( 'GET', url, callback=transform(get_key, callback, 'PageExpireValue', int), ) """ callback = ensure_promise(callback) P = promise(_transback, (filter_, callback, filter_args, filter_kwargs)) P.then(promise(), callback.throw) return P def _transback(filter_, callback, args, kwargs, ret): try: ret = filter_(*args + (ret,), **kwargs) except Exception: callback.throw() else: return callback(ret) def wrap(p): """Wrap promise. This wraps the promise such that if the promise is called with a promise as argument, we attach ourselves to that promise instead. """ def on_call(*args, **kwargs): if len(args) == 1 and isinstance(args[0], promise): return args[0].then(p) else: return p(*args, **kwargs) return on_call vine-5.1.0+dfsg.orig/vine/promises.py0000644000175000017500000001700114521652663017763 0ustar cjwatsoncjwatson"""Promise implementation.""" import inspect import sys from collections import deque from weakref import WeakMethod, ref from .abstract import Thenable from .utils import reraise __all__ = ['promise'] @Thenable.register class promise: """Promise of future evaluation. This is a special implementation of promises in that it can be used both for "promise of a value" and lazy evaluation. The biggest upside for this is that everything in a promise can also be a promise, e.g. filters, callbacks and errbacks can all be promises. Usage examples: .. code-block:: python >>> p = promise() >>> p.then(promise(print, ('OK',))) # noqa >>> p.on_error = promise(print, ('ERROR',)) # noqa >>> p(20) OK, 20 >>> p.then(promise(print, ('hello',))) # noqa hello, 20 >>> p.throw(KeyError('foo')) ERROR, KeyError('foo') >>> p2 = promise() >>> p2.then(print) # noqa >>> p2.cancel() >>> p(30) Example: .. code-block:: python from vine import promise, wrap class Protocol: def __init__(self): self.buffer = [] def receive_message(self): return self.read_header().then( self.read_body).then( wrap(self.prepare_body)) def read(self, size, callback=None): callback = callback or promise() tell_eventloop_to_read(size, callback) return callback def read_header(self, callback=None): return self.read(4, callback) def read_body(self, header, callback=None): body_size, = unpack('>L', header) return self.read(body_size, callback) def prepare_body(self, value): self.buffer.append(value) """ if not hasattr(sys, 'pypy_version_info'): # pragma: no cover __slots__ = ( 'fun', 'args', 'kwargs', 'ready', 'failed', 'value', 'ignore_result', 'reason', '_svpending', '_lvpending', 'on_error', 'cancelled', 'weak', '__weakref__', # adding '__dict__' to get dynamic assignment if needed "__dict__", ) def __init__(self, fun=None, args=None, kwargs=None, callback=None, on_error=None, weak=False, ignore_result=False): self.weak = weak self.ignore_result = ignore_result self.fun = self._get_fun_or_weakref(fun=fun, weak=weak) self.args = args or () self.kwargs = kwargs or {} self.ready = False self.failed = False self.value = None self.reason = None # Optimization # Most promises will only have one callback, so we optimize for this # case by using a list only when there are multiple callbacks. # s(calar) pending / l(ist) pending self._svpending = None self._lvpending = None self.on_error = on_error self.cancelled = False if callback is not None: self.then(callback) if self.fun: assert self.fun and callable(fun) @staticmethod def _get_fun_or_weakref(fun, weak): """Return the callable or a weak reference. Handles both bound and unbound methods. """ if not weak: return fun if inspect.ismethod(fun): return WeakMethod(fun) else: return ref(fun) def __repr__(self): return ('<{0} --> {1!r}>' if self.fun else '<{0}>').format( f'{type(self).__name__}@0x{id(self):x}', self.fun, ) def cancel(self): self.cancelled = True try: if self._svpending is not None: self._svpending.cancel() if self._lvpending is not None: for pending in self._lvpending: pending.cancel() if isinstance(self.on_error, Thenable): self.on_error.cancel() finally: self._svpending = self._lvpending = self.on_error = None def __call__(self, *args, **kwargs): retval = None if self.cancelled: return final_args = self.args + args if args else self.args final_kwargs = dict(self.kwargs, **kwargs) if kwargs else self.kwargs # self.fun may be a weakref fun = self._fun_is_alive(self.fun) if fun is not None: try: if self.ignore_result: fun(*final_args, **final_kwargs) ca = () ck = {} else: retval = fun(*final_args, **final_kwargs) self.value = (ca, ck) = (retval,), {} except Exception: return self.throw() else: self.value = (ca, ck) = final_args, final_kwargs self.ready = True svpending = self._svpending if svpending is not None: try: svpending(*ca, **ck) finally: self._svpending = None else: lvpending = self._lvpending try: while lvpending: p = lvpending.popleft() p(*ca, **ck) finally: self._lvpending = None return retval def _fun_is_alive(self, fun): return fun() if self.weak else self.fun def then(self, callback, on_error=None): if not isinstance(callback, Thenable): callback = promise(callback, on_error=on_error) if self.cancelled: callback.cancel() return callback if self.failed: callback.throw(self.reason) elif self.ready: args, kwargs = self.value callback(*args, **kwargs) if self._lvpending is None: svpending = self._svpending if svpending is not None: self._svpending, self._lvpending = None, deque([svpending]) else: self._svpending = callback return callback self._lvpending.append(callback) return callback def throw1(self, exc=None): if not self.cancelled: exc = exc if exc is not None else sys.exc_info()[1] self.failed, self.reason = True, exc if self.on_error: self.on_error(*self.args + (exc,), **self.kwargs) def throw(self, exc=None, tb=None, propagate=True): if not self.cancelled: current_exc = sys.exc_info()[1] exc = exc if exc is not None else current_exc try: self.throw1(exc) svpending = self._svpending if svpending is not None: try: svpending.throw1(exc) finally: self._svpending = None else: lvpending = self._lvpending try: while lvpending: lvpending.popleft().throw1(exc) finally: self._lvpending = None finally: if self.on_error is None and propagate: if tb is None and (exc is None or exc is current_exc): raise reraise(type(exc), exc, tb) @property def listeners(self): if self._lvpending: return self._lvpending return [self._svpending] vine-5.1.0+dfsg.orig/vine/synchronization.py0000644000175000017500000000562014521652663021367 0ustar cjwatsoncjwatson"""Synchronization primitives.""" from .abstract import Thenable from .promises import promise __all__ = ['barrier'] class barrier: """Barrier. Synchronization primitive to call a callback after a list of promises have been fulfilled. Example: .. code-block:: python # Request supports the .then() method. p1 = http.Request('http://a') p2 = http.Request('http://b') p3 = http.Request('http://c') requests = [p1, p2, p3] def all_done(): pass # all requests complete b = barrier(requests).then(all_done) # oops, we forgot we want another request b.add(http.Request('http://d')) Note that you cannot add new promises to a barrier after the barrier is fulfilled. """ def __init__(self, promises=None, args=None, kwargs=None, callback=None, size=None): self.p = promise() self.args = args or () self.kwargs = kwargs or {} self._value = 0 self.size = size or 0 if not self.size and promises: # iter(l) calls len(l) so generator wrappers # can only return NotImplemented in the case the # generator is not fully consumed yet. plen = promises.__len__() if plen is not NotImplemented: self.size = plen self.ready = self.failed = False self.reason = None self.cancelled = False self.finalized = False [self.add_noincr(p) for p in promises or []] self.finalized = bool(promises or self.size) if callback: self.then(callback) __slots__ = ( # noqa 'p', 'args', 'kwargs', '_value', 'size', 'ready', 'reason', 'cancelled', 'finalized', '__weakref__', # adding '__dict__' to get dynamic assignment "__dict__", ) def __call__(self, *args, **kwargs): if not self.ready and not self.cancelled: self._value += 1 if self.finalized and self._value >= self.size: self.ready = True self.p(*self.args, **self.kwargs) def finalize(self): if not self.finalized and self._value >= self.size: self.p(*self.args, **self.kwargs) self.finalized = True def cancel(self): self.cancelled = True self.p.cancel() def add_noincr(self, p): if not self.cancelled: if self.ready: raise ValueError('Cannot add promise to full barrier') p.then(self) def add(self, p): if not self.cancelled: self.add_noincr(p) self.size += 1 def then(self, callback, errback=None): self.p.then(callback, errback) def throw(self, *args, **kwargs): if not self.cancelled: self.p.throw(*args, **kwargs) throw1 = throw Thenable.register(barrier) vine-5.1.0+dfsg.orig/vine/abstract.py0000644000175000017500000000312414521652663017726 0ustar cjwatsoncjwatson"""Abstract classes.""" import abc from collections.abc import Callable __all__ = ['Thenable'] class Thenable(Callable, metaclass=abc.ABCMeta): # pragma: no cover """Object that supports ``.then()``.""" __slots__ = () @abc.abstractmethod def then(self, on_success, on_error=None): raise NotImplementedError() @abc.abstractmethod def throw(self, exc=None, tb=None, propagate=True): raise NotImplementedError() @abc.abstractmethod def cancel(self): raise NotImplementedError() @classmethod def __subclasshook__(cls, C): if cls is Thenable: if any('then' in B.__dict__ for B in C.__mro__): return True return NotImplemented @classmethod def register(cls, other): # overide to return other so `register` can be used as a decorator type(cls).register(cls, other) return other @Thenable.register class ThenableProxy: """Proxy to object that supports ``.then()``.""" def _set_promise_target(self, p): self._p = p def then(self, on_success, on_error=None): return self._p.then(on_success, on_error) def cancel(self): return self._p.cancel() def throw1(self, exc=None): return self._p.throw1(exc) def throw(self, exc=None, tb=None, propagate=True): return self._p.throw(exc, tb=tb, propagate=propagate) @property def cancelled(self): return self._p.cancelled @property def ready(self): return self._p.ready @property def failed(self): return self._p.failed vine-5.1.0+dfsg.orig/vine/utils.py0000644000175000017500000000152514521652663017266 0ustar cjwatsoncjwatson"""Python compatibility utilities.""" from functools import WRAPPER_ASSIGNMENTS, WRAPPER_UPDATES, partial from functools import update_wrapper as _update_wrapper __all__ = ['update_wrapper', 'wraps'] def update_wrapper(wrapper, wrapped, *args, **kwargs): """Update wrapper, also setting .__wrapped__.""" wrapper = _update_wrapper(wrapper, wrapped, *args, **kwargs) wrapper.__wrapped__ = wrapped return wrapper def wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES): """Backport of Python 3.5 wraps that adds .__wrapped__.""" return partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated) def reraise(tp, value, tb=None): """Reraise exception.""" if value.__traceback__ is not tb: raise value.with_traceback(tb) raise value vine-5.1.0+dfsg.orig/MANIFEST.in0000644000175000017500000000043114521652663016344 0ustar cjwatsoncjwatsoninclude README.rst Changelog LICENSE recursive-include docs * recursive-include extra README *.py recursive-include requirements *.txt recursive-include t *.py recursive-exclude docs/_build * recursive-exclude * __pycache__ recursive-exclude * *.py[co] recursive-exclude * .*.sw* vine-5.1.0+dfsg.orig/.editorconfig0000644000175000017500000000031514521652663017264 0ustar cjwatsoncjwatson# http://editorconfig.org root = true [*] indent_style = space indent_size = 4 trim_trailing_whitespace = true insert_final_newline = true charset = utf-8 end_of_line = lf [Makefile] indent_style = tab vine-5.1.0+dfsg.orig/AUTHORS0000644000175000017500000000022414521652663015656 0ustar cjwatsoncjwatsonAsk Solem Asif Saif Uddin Ionel Cristian Mărieș Fahad Siddiqui vine-5.1.0+dfsg.orig/t/0000755000175000017500000000000014521652663015053 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/t/unit/0000755000175000017500000000000014521652663016032 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/t/unit/test_promises.py0000644000175000017500000002317514521652663021314 0ustar cjwatsoncjwatsonimport sys import traceback import weakref from collections import deque from struct import pack, unpack from unittest.mock import Mock import pytest from vine.funtools import wrap from vine.promises import promise class test_promise: def test_example(self): _pending = deque() class Protocol: def __init__(self): self.buffer = [] def read(self, size, callback=None): callback = callback or promise() _pending.append((size, callback)) return callback def read_header(self, callback=None): return self.read(4, callback) def read_body(self, header, callback=None): body_size, = unpack('>L', header) return self.read(body_size, callback) def prepare_body(self, value): self.buffer.append(value) proto = Protocol() proto.read_header().then( proto.read_body).then(wrap(proto.prepare_body)) while _pending: size, callback = _pending.popleft() if size == 4: callback(pack('>L', 1231012302)) else: callback('Hello world') assert proto.buffer assert proto.buffer[0] == 'Hello world' def test_signal(self): callback = Mock(name='callback') a = promise() a.then(callback) a(42) callback.assert_called_once_with(42) def test_signal_callback_kwargs(self): callback = Mock(name='callback') a = promise(callback=callback) a(42) callback.assert_called_once_with(42) def test_call_ignore_result(self): fun = Mock(name='fun') callback = Mock(name='callback') a = promise(fun=fun, ignore_result=True) a.then(callback) a() fun.assert_called_once_with() callback.assert_called_once_with() def test_call_ignore_result_callback_kwarg(self): fun = Mock(name='fun') callback = Mock(name='callback') a = promise(fun=fun, ignore_result=True, callback=callback) a() callback.assert_called_once_with() def test_chained(self): def add(x, y): return x + y def pow2(x): return x ** 2 adder = Mock(name='adder') adder.side_effect = add power = Mock(name='multiplier') power.side_effect = pow2 final = Mock(name='final') p = promise() p.then(adder).then(power).then(final) p(42, 42) assert p.value == ((42, 42), {}) adder.assert_called_with(42, 42) power.assert_called_with(84) final.assert_called_with(7056) def test_shallow_filter(self): a, b = promise(Mock(name='a')), promise(Mock(name='b')) p = promise(a, callback=b) assert p._svpending is not None assert p._lvpending is None p(30) assert p._svpending is None a.fun.assert_called_with(30) b.fun.assert_called_with(a.fun.return_value) c, d = Mock(name='c'), Mock(name='d') promise(c, callback=d)(1) c.assert_called_with(1) d.assert_called_with(c.return_value) def test_deep_filter(self): a = promise(Mock(name='a')) b1, b2, b3 = ( promise(Mock(name='a1')), promise(Mock(name='a2')), promise(Mock(name='a3')), ) p = promise(a) p.then(b1) assert p._lvpending is None assert p._svpending is not None p.then(b2) assert p._lvpending is not None assert p._svpending is None p.then(b3) p(42) a.fun.assert_called_with(42) b1.fun.assert_called_with(a.fun.return_value) b2.fun.assert_called_with(a.fun.return_value) b3.fun.assert_called_with(a.fun.return_value) def test_chained_filter(self): a = promise(Mock(name='a')) b = promise(Mock(name='b')) c = promise(Mock(name='c')) d = promise(Mock(name='d')) p = promise(a) p.then(b).then(c).then(d) p(42, kw=300) a.fun.assert_called_with(42, kw=300) b.fun.assert_called_with(a.fun.return_value) c.fun.assert_called_with(b.fun.return_value) d.fun.assert_called_with(c.fun.return_value) def test_repr(self): assert repr(promise()) assert repr(promise(Mock())) def test_cancel(self): on_error = promise(Mock(name='on_error')) p = promise(on_error=on_error) a, b, c = ( promise(Mock(name='a')), promise(Mock(name='b')), promise(Mock(name='c')), ) a2 = promise(Mock(name='a1')) p.then(a).then(b).then(c) p.then(a2) p.cancel() p(42) assert p.cancelled assert a.cancelled assert a2.cancelled assert b.cancelled assert c.cancelled assert on_error.cancelled d = promise(Mock(name='d')) p.then(d) assert d.cancelled def test_svpending_raises(self): p = promise() a_on_error = promise(Mock(name='a_on_error')) a = promise(Mock(name='a'), on_error=a_on_error) p.then(a) exc = KeyError() a.fun.side_effect = exc p(42) a_on_error.fun.assert_called_with(exc) def test_empty_promise(self): p = promise() p(42) x = Mock(name='x') p.then(x) x.assert_called_with(42) def test_with_partial_args(self): m = Mock(name='m') p = promise(m, (1, 2, 3), {'foobar': 2}) p() m.assert_called_with(1, 2, 3, foobar=2) def test_with_partial_args_and_args(self): m = Mock(name='m') p = promise(m, (1, 2, 3), {'foobar': 2}) p(4, 5, bazbar=3) m.assert_called_with(1, 2, 3, 4, 5, foobar=2, bazbar=3) def test_lvpending_raises(self): p = promise() a_on_error = promise(Mock(name='a_on_error')) a = promise(Mock(name='a'), on_error=a_on_error) b_on_error = promise(Mock(name='b_on_error')) b = promise(Mock(name='a'), on_error=b_on_error) p.then(a) p.then(b) exc = KeyError() a.fun.side_effect = exc a.then(Mock(name='foobar')) a.then(Mock(name='foozi')) p.on_error = a_on_error p(42) a_on_error.fun.assert_called_with(exc) b.fun.assert_called_with(42) def test_cancel_sv(self): p = promise() a = promise(Mock(name='a')) p.then(a) p.cancel() assert p.cancelled assert a.cancelled p.throw(KeyError()) p.throw1(KeyError()) def test_cancel_no_cb(self): p = promise() p.cancel() assert p.cancelled assert p.on_error is None p.throw(KeyError()) def test_throw_no_exc(self): p = promise() with pytest.raises((TypeError, RuntimeError)): p.throw() def test_throw_no_excinfo(self): p = promise() with pytest.raises(KeyError): p.throw(KeyError()) def test_throw_with_tb(self): p = promise() def foo(): raise KeyError() try: foo() except KeyError: try: p.throw() except KeyError: err = traceback.format_exc() assert 'in foo\n raise KeyError()' in err else: raise AssertionError('Did not throw.') def test_throw_with_other_tb(self): p = promise() def foo(): raise KeyError() def bar(): raise ValueError() try: bar() except ValueError: tb = sys.exc_info()[2] try: foo() except KeyError as exc: try: p.throw(exc, tb) except KeyError: err = traceback.format_exc() assert 'in bar\n raise ValueError()' in err else: raise AssertionError('Did not throw.') def test_throw_None(self): try: raise KeyError() except Exception: with pytest.raises(KeyError): promise().throw() def test_listeners(self): p = promise() p.then(Mock()) assert len(p.listeners) == 1 p.then(Mock()) assert len(p.listeners) == 2 def test_throw_from_cb(self): ae = promise(Mock(name='ae')) a = Mock(name='a') be = promise(Mock(name='be')) b = promise(Mock(name='b'), on_error=be) ce = promise(Mock(name='ce')) c = promise(Mock(name='c'), on_error=ce) exc = a.side_effect = KeyError() p1 = promise(a, on_error=ae) p1.then(b) assert p1._svpending p1(42) p1.on_error.fun.assert_called_with(exc) p2 = promise(a) p2.then(b).then(c) with pytest.raises(KeyError): p2(42) de = promise(Mock(name='de')) d = promise(Mock(name='d'), on_error=de) p2.then(d) de.fun.assert_called_with(exc) def test_weak_reference_unbound(self): def f(x): return x ** 2 promise_f = promise(f, weak=True) assert isinstance(promise_f.fun, weakref.ref) assert promise_f(2) == 4 def test_weak_reference_bound(self): class Example: def __init__(self, y): self.y = y def f(self, x): return self.y + x ** 2 example = Example(5) promise_f = promise(example.f, weak=True) assert isinstance(promise_f.fun, weakref.ref) assert promise_f(2) == 9 vine-5.1.0+dfsg.orig/t/unit/__init__.py0000644000175000017500000000000014521652663020131 0ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/t/unit/test_abstract.py0000644000175000017500000000060714521652663021251 0ustar cjwatsoncjwatsonfrom vine.abstract import Thenable from vine.promises import promise class CanThen: def then(self, x, y): pass class CannotThen: pass class test_Thenable: def test_isa(self): assert isinstance(CanThen(), Thenable) assert not isinstance(CannotThen(), Thenable) def test_promise(self): assert isinstance(promise(lambda x: x), Thenable) vine-5.1.0+dfsg.orig/t/unit/test_funtools.py0000644000175000017500000000314314521652663021315 0ustar cjwatsoncjwatsonfrom unittest.mock import Mock import pytest from vine.abstract import Thenable from vine.funtools import ( maybe_promise, ppartial, preplace, ready_promise, starpromise, transform, wrap, ) from vine.promises import promise def test_wrap(): cb1 = Mock() cb2 = Mock() x = wrap(promise(cb1)) x(1, y=2) cb1.assert_called_with(1, y=2) p2 = promise(cb2) x(p2) p2() cb1.assert_called_with(cb2()) def test_transform(): callback = Mock() def filter_key_value(key, filter_, mapping): return filter_(mapping[key]) x = transform(filter_key_value, promise(callback), 'Value', int) x({'Value': 303}) callback.assert_called_with(303) with pytest.raises(KeyError): x({}) class test_maybe_promise: def test_when_none(self): assert maybe_promise(None) is None def test_when_promise(self): p = promise() assert maybe_promise(p) is p def test_when_other(self): m = Mock() p = maybe_promise(m) assert isinstance(p, Thenable) def test_starpromise(): m = Mock() p = starpromise(m, 1, 2, z=3) p() m.assert_called_with(1, 2, z=3) def test_ready_promise(): m = Mock() p = ready_promise(m, 1, 2, 3) m.assert_called_with(1, 2, 3) assert p.ready def test_ppartial(): m = Mock() p = ppartial(m, 1) p() m.assert_called_with(1) p = ppartial(m, z=2) p() m.assert_called_with(z=2) def test_preplace(): m = Mock() p = promise(m) p2 = preplace(p, 1, 2, z=3) p2(4, 5, x=3) m.assert_called_with(1, 2, z=3) vine-5.1.0+dfsg.orig/t/unit/test_synchronization.py0000644000175000017500000000222114521652663022701 0ustar cjwatsoncjwatsonfrom unittest.mock import Mock import pytest from vine.promises import promise from vine.synchronization import barrier class test_barrier: def setup(self): self.m1, self.m2, self.m3 = Mock(), Mock(), Mock() self.ps = [promise(self.m1), promise(self.m2), promise(self.m3)] def test_evaluate(self): x = barrier(self.ps) x() assert not x.ready x() assert not x.ready x.add(promise()) x() assert not x.ready x() assert x.ready x() x() with pytest.raises(ValueError): x.add(promise()) def test_reverse(self): callback = Mock() x = barrier(self.ps, callback=promise(callback)) for p in self.ps: p() assert x.ready callback.assert_called_with() def test_cancel(self): x = barrier(self.ps) x.cancel() for p in self.ps: p() x.add(promise()) x.throw(KeyError()) assert not x.ready def test_throw(self): x = barrier(self.ps) with pytest.raises(KeyError): x.throw(KeyError(10)) vine-5.1.0+dfsg.orig/t/__init__.py0000644000175000017500000000000014521652663017152 0ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/.bumpversion.cfg0000644000175000017500000000052514521652663017722 0ustar cjwatsoncjwatson[bumpversion] current_version = 5.1.0 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(?P[a-z\d]+)? serialize = {major}.{minor}.{patch}{releaselevel} {major}.{minor}.{patch} [bumpversion:file:vine/__init__.py] [bumpversion:file:docs/includes/introduction.txt] [bumpversion:file:README.rst] vine-5.1.0+dfsg.orig/.cookiecutterrc0000644000175000017500000000056414521652663017643 0ustar cjwatsoncjwatsondefault_context: email: 'ask@celeryproject.org' full_name: 'Ask Solem' github_username: 'celery' project_name: 'vine' project_short_description: 'Promises, promises, promises.' project_slug: 'vine' version: '1.0.0' year: '2016' vine-5.1.0+dfsg.orig/Makefile0000644000175000017500000000705714521652663016261 0ustar cjwatsoncjwatsonPROJ=vine PGPIDENT="Celery Security Team" PYTHON=python PYTEST=py.test GIT=git TOX=tox ICONV=iconv FLAKE8=flake8 FLAKEPLUS=flakeplus PYDOCSTYLE=pydocstyle SPHINX2RST=sphinx2rst TESTDIR=t SPHINX_DIR=docs/ SPHINX_BUILDDIR="${SPHINX_DIR}/_build" README=README.rst README_SRC="docs/templates/readme.txt" CONTRIBUTING=CONTRIBUTING.rst CONTRIBUTING_SRC="docs/contributing.rst" SPHINX_HTMLDIR="${SPHINX_BUILDDIR}/html" DOCUMENTATION=Documentation FLAKEPLUSTARGET=2.7 all: help help: @echo "docs - Build documentation." @echo "test-all - Run tests for all supported python versions." @echo "distcheck ---------- - Check distribution for problems." @echo " test - Run unittests using current python." @echo " lint ------------ - Check codebase for problems." @echo " apicheck - Check API reference coverage." @echo " readmecheck - Check README.rst encoding." @echo " contribcheck - Check CONTRIBUTING.rst encoding" @echo " flakes -------- - Check code for syntax and style errors." @echo " flakecheck - Run flake8 on the source code." @echo " flakepluscheck - Run flakeplus on the source code." @echo " pep257check - Run pep257 on the source code." @echo "readme - Regenerate README.rst file." @echo "contrib - Regenerate CONTRIBUTING.rst file" @echo "clean-dist --------- - Clean all distribution build artifacts." @echo " clean-git-force - Remove all uncomitted files." @echo " clean ------------ - Non-destructive clean" @echo " clean-pyc - Remove .pyc/__pycache__ files" @echo " clean-docs - Remove documentation build artifacts." @echo " clean-build - Remove setup artifacts." @echo "bump - Bump patch version number." @echo "bump-minor - Bump minor version number." @echo "bump-major - Bump major version number." @echo "release - Make PyPI release." clean: clean-docs clean-pyc clean-build clean-dist: clean clean-git-force bump: bumpversion patch bump-minor: bumpversion minor bump-major: bumpversion major release: python setup.py register sdist bdist_wheel upload --sign --identity="$(PGPIDENT)" Documentation: (cd "$(SPHINX_DIR)"; $(MAKE) html) mv "$(SPHINX_HTMLDIR)" $(DOCUMENTATION) docs: Documentation clean-docs: -rm -rf "$(SPHINX_BUILDDIR)" lint: flakecheck apicheck readmecheck apicheck: (cd "$(SPHINX_DIR)"; $(MAKE) apicheck) flakecheck: $(FLAKE8) "$(PROJ)" "$(TESTDIR)" flakediag: -$(MAKE) flakecheck flakepluscheck: $(FLAKEPLUS) --$(FLAKEPLUSTARGET) "$(PROJ)" "$(TESTDIR)" flakeplusdiag: -$(MAKE) flakepluscheck pep257check: $(PYDOCSTYLE) "$(PROJ)" flakes: flakediag flakeplusdiag pep257check clean-readme: -rm -f $(README) readmecheck: $(ICONV) -f ascii -t ascii $(README) >/dev/null $(README): $(SPHINX2RST) "$(README_SRC)" --ascii > $@ readme: clean-readme $(README) readmecheck clean-contrib: -rm -f "$(CONTRIBUTING)" $(CONTRIBUTING): $(SPHINX2RST) "$(CONTRIBUTING_SRC)" > $@ contrib: clean-contrib $(CONTRIBUTING) clean-pyc: -find . -type f -a \( -name "*.pyc" -o -name "*$$py.class" \) | xargs rm -find . -type d -name "__pycache__" | xargs rm -r removepyc: clean-pyc clean-build: rm -rf build/ dist/ .eggs/ *.egg-info/ .tox/ .coverage cover/ clean-git: $(GIT) clean -xdn clean-git-force: $(GIT) clean -xdf test-all: clean-pyc $(TOX) test: $(PYTHON) setup.py test cov: $(PYTEST) -x --cov=vine --cov-report=html build: $(PYTHON) setup.py sdist bdist_wheel distcheck: lint test clean dist: readme contrib clean-dist build vine-5.1.0+dfsg.orig/.gitignore0000644000175000017500000000045414521652663016603 0ustar cjwatsoncjwatson.DS_Store *.pyc *$py.class *~ .*.sw[pon] dist/ *.egg-info *.egg *.egg/ build/ .build/ _build/ pip-log.txt .directory erl_crash.dump *.db Documentation/ .tox/ .ropeproject/ .project .pydevproject .idea/ .coverage celery/tests/cover/ .ve* cover/ .vagrant/ coverage.xml htmlcov/ .cache/ .python-version vine-5.1.0+dfsg.orig/requirements/0000755000175000017500000000000014521652663017333 5ustar cjwatsoncjwatsonvine-5.1.0+dfsg.orig/requirements/test.txt0000644000175000017500000000001414521652663021046 0ustar cjwatsoncjwatsonpytest>=7.2 vine-5.1.0+dfsg.orig/requirements/docs.txt0000644000175000017500000000007614521652663021027 0ustar cjwatsoncjwatsonsphinx_celery>=1.1 six # missing dependency in sphinx_celery vine-5.1.0+dfsg.orig/requirements/test-ci.txt0000644000175000017500000000002314521652663021437 0ustar cjwatsoncjwatsonpytest-cov codecov vine-5.1.0+dfsg.orig/requirements/pkgutils.txt0000644000175000017500000000014214521652663021733 0ustar cjwatsoncjwatsonsetuptools>=59.2.0 wheel>=0.37.0 flake8>=4.0.1 tox>=3.24.4 sphinx2rst>=1.0 bumpversion pydocstyle vine-5.1.0+dfsg.orig/.coveragerc0000644000175000017500000000023514521652663016731 0ustar cjwatsoncjwatson[run] branch = 1 cover_pylib = 0 include=*vine/* omit = vine.tests.* [report] omit = */python?.?/* */site-packages/* */pypy/* *vine/five.py