Code Monkey home page Code Monkey logo

pytest-flask's Introduction

pytest-flask

PyPi version conda-forge version CI status PyPi downloads Documentation status Maintenance GitHub last commit GitHub closed pull requests GitHub closed issues PyPI - Downloads Code size License Issues style

An extension of pytest test runner which provides a set of useful tools to simplify testing and development of the Flask extensions and applications.

To view a more detailed list of extension features and examples go to the PyPI overview page or package documentation.

How to start?

Considering the minimal flask application factory below in myapp.py as an example:

from flask import Flask

def create_app():
   # create a minimal app
   app = Flask(__name__)

   # simple hello world view
   @app.route('/hello')
   def hello():
      return 'Hello, World!'

   return app

You first need to define your application fixture in conftest.py:

from myapp import create_app

@pytest.fixture
def app():
    app = create_app()
    return app

Finally, install the extension with dependencies and run your test suite:

$ pip install pytest-flask
$ pytest

Contributing

Don’t hesitate to create a GitHub issue for any bug or suggestion. For more information check our contribution guidelines.

pytest-flask's People

Contributors

allanlewis avatar amateja avatar daniel-butler avatar davehunt avatar doriander avatar douglasbagnall avatar dusktreader avatar greedo avatar jab avatar jadkik avatar jeffwidman avatar jineshpaloor avatar jvllmr avatar kianmeng avatar mattwbarry avatar mekza avatar nickveld avatar nicoddemus avatar northernsage avatar o1da avatar pamelafox avatar pre-commit-ci[bot] avatar razerm avatar roguelazer avatar steenzout avatar twood67 avatar vaibhavwakde52 avatar vitalk avatar yourun-proger avatar zgoda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytest-flask's Issues

Please make a new release

I'm kindly requesting a release with the deprecation warning fixed (which I see was merged a few days ago).

Any examples of usage pattern?

I'm new to both py.test and Flask, and find it difficult to understand what goes where as far as testing is concerned :(

How to go about mocking application functions when running app in Live Server

Hello,

I realise this is a general Python question (how to mock functions running in other processes) but I couldn't find anything useful on the net and decided to ask here since it relates to pytest-flask.

I'm testing my application with Selenium and pytest-flask's Live Server and would like to mock (external) functions in my application. I'm using pytest-mock's mocker.patch() function.

The problem is that the functions are not mocked and mocked_function.assert_called_once() fails.

So: how do I go about mocking (external) functions in my application while it is served by Live Server? If this isn't possible, what is a good replacement for preventing some functions from executing during testing (in this case: the sending of an email)?

use fixtures 'client_class' for test has error

I want to use application test client for class-based tests instead of application test client. I read the document of pytest-flask, and change my code like this below:
old code:

import pytest
from flask import url_for
...
id = 'test_id'
......
def test_get(client):
    assert client.get(url_for('mainview')).status_code == 200

new code:

import pytest
from flask import url_for
...
@pytest.mark.usefixtures('client_class')
class TestSite:
    __id:int
    def __init__(self):
        self.__id = 'test_id'
    ......
    def test_get(self):
        assert self.client.get(url_for(mainview')).status_code == 200
    ......

Then, pylint tell me the message: "E1101:Instance of 'TestSite' has no 'client' member", Why does it happen?
The version detail:

  • pytest 3.7.1
  • pytest-flask 0.10.0
  • pylint 2.1.1

My conftest.py is this:

@pytest.fixture
def app():
    # set os mode
    os.environ['MODE'] = 'TESTING'
    app = create_app()
    return app

@pytest.fixture
def client(app):
    return app.test_client()

When I use my old code, it has no error and runs good.

please add a LICENSE

We want to package pytest-flask for Debian, could you please add a LICENSE text?

client.post json doesn't work

Take the official flask doc example: http://flask.pocoo.org/docs/1.0/testing/#testing-json-apis
This works:

    with app.test_client() as c:
        rv = c.post('/', json={'username': 'flask', 'password': 'secret'})
    assert rv.status_code == 200

but this with pytest flask client fixture doesn't:

def test_create_merchant(client):
    rv = client.post('/', json={'username': 'flask', 'password': 'secret'})
    assert rv.status_code == 200

In the @app.route('/') function, I print request.get_json(), in first case it prints the username and password as a dict. In the second it prints None

pytest-flask breaks in pytest 2.8 when using --doctest-modules

After pytest update to 2.8 this weekend a project which has pytest-flask as dependency installed failed. If i removed the --doctest-modules flag or remove pytest-flask package the test run went fine. Since the pytest-flask module was an artifact of a previous test setup and no longer needed my problem has been resolved by not including the module in de dependencies. So there was no actual use of the module, it was just installed as a test dependency.

The resulting error looks like this but can vary in the filename (eg: test.py) and Session object:

AssertionError: assert (<DoctestModule 'test.py'> is None or <DoctestModule 'test.py'> in [<Session 'pytest-flask-bug'>] or isinstance(<DoctestModule 'test.py'>, tuple))
 +  where [<Session 'pytest-flask-bug'>] = [<Session 'pytest-flask-bug'>]
 +    where [<Session 'pytest-flask-bug'>] = <_pytest.runner.SetupState object at 0x103914ac8>.stack

This gist shows test case I used and complete log: https://gist.github.com/aequitas/e36d3c8e901aba30ea22

HTTP request using 'live_server'

I took a live_server example, and placed it on the root of my project (not committed), as manager.py:

# @manager.py

import urllib2
from flask import Flask, url_for
import pytest

def test_add_endpoint_to_live_server(live_server):
    @live_server.app.route('/load-data/')
    def test_endpoint():
        return 'got it', 200

    live_server.start()

    res = urllib2.urlopen(url_for('test_endpoint', _external=True))
    assert res.code == 200

Then, defined a very simple conftest.py, also on the root of my project (not committed):

#confteset.py

from factory import create_app

@pytest.fixture
def app():
    app = create_app()
    return app

My pytest.ini, is pretty simple as well, and again on the root of my project (not committed):

[pytest]
python_files=manager.py
python_classes=Test
python_functions=test

I've attempted to implement py.test several different ways in terminal (vagrant vm):

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ cd /vagrant
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ py.test
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line 320, in
_importconftest
    mod = conftestpath.pyimport()
  File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", line 650, in
pyimport
    __import__(modname)
  File "/vagrant/conftest.py", line 17, in <module>
    from factory import create_app
  File "/vagrant/factory.py", line 20, in <module>
    from interface.views import blueprint
  File "/vagrant/interface/views.py", line 10, in <module>
    from brain.load_data import Load_Data
ImportError: No module named brain.load_data
ERROR: could not load /vagrant/conftest.py

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ python -m pytest manager.py
============================= test session starts ==============================

platform linux2 -- Python 2.7.6, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
rootdir: /vagrant, inifile: pytest.ini
plugins: flask-0.10.0
collected 1 items

manager.py F

=================================== FAILURES ===================================

_______________________ test_add_endpoint_to_live_server _______________________


live_server = <LiveServer listening at http://localhost:51685>

    def test_add_endpoint_to_live_server(live_server):
        @live_server.app.route('/load-data/')
        def test_endpoint():
            return 'got it', 200

        live_server.start()

>       res = urllib2.urlopen(url_for('test_endpoint', _external=True))

manager.py:30:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

/usr/lib/python2.7/urllib2.py:127: in urlopen
    return _opener.open(url, data, timeout)
/usr/lib/python2.7/urllib2.py:410: in open
    response = meth(req, response)
/usr/lib/python2.7/urllib2.py:523: in http_response
    'http', request, response, code, msg, hdrs)
/usr/lib/python2.7/urllib2.py:448: in error
    return self._call_chain(*args)
/usr/lib/python2.7/urllib2.py:382: in _call_chain
    result = func(*args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


self = <urllib2.HTTPDefaultErrorHandler instance at 0x7f4e9eb567e8>
req = <urllib2.Request instance at 0x7f4e9eb6d290>
fp = <addinfourl at 139975646958944 whose fp = <socket._fileobject object at 0x7
f4e9eb92dd0>>
code = 405, msg = 'METHOD NOT ALLOWED'
hdrs = <httplib.HTTPMessage instance at 0x7f4e9eb6d518>

    def http_error_default(self, req, fp, code, msg, hdrs):
>       raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
E       HTTPError: HTTP Error 405: METHOD NOT ALLOWED

/usr/lib/python2.7/urllib2.py:531: HTTPError
----------------------------- Captured stderr call -----------------------------

Process Process-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pytest_flask/fixtures.py", line 5
9, in <lambda>
    worker = lambda app, port: app.run(port=port, use_reloader=False)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 843, in run
    run_simple(host, port, self, **options)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 694, i
n run_simple
    inner()
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 656, i
n inner
    fd=fd)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 550, i
n make_server
    passthrough_errors, ssl_context, fd=fd)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 464, i
n __init__
    HTTPServer.__init__(self, (host, int(port)), handler)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use
=========================== 1 failed in 2.27 seconds ===========================

I spent this past weekend, and a few days last week after work, trying to understand pytest. I noticed pytest-flask, and really like the rst files being generated to the documentation. But, I haven't been successful implementing the above example taken straight out from the live_server documentation. My overall goal, is to have pytest-flask start a flask instance (app context?). This flask instance (i.e. http://localhost:xxxx), would exist for the duration, or scope of the unit testing. Specifically, I need the flask instance to be running, and I want to run some of my general programmatic_interface tests. Later, I will drill down, and have more specific unit tests.

I've been going back and forth, trying to implement live_server, and client.post(). However, the documentation very lightly discusses about client.get(), and never mentions the existence of client.post(). I was hoping if I used live_server, I would have a flask instance (i.e. http://localhost:xxxx), which would exist for the duration of the implemented unit tests. But, I wasn't sure if I need to cleverly integrate client.post() within the live_test implementation.

Pickling error on OS X / Python 3.8 (but not in 3.7)

I am getting very similar errors to those described in #54, but in a different context:
I'm using Python 3.8 on MacOS.

Note that everything works fine with python 3.7!

$ py.test -x
========================================== test session starts ==========================================
platform darwin -- Python 3.8.1, pytest-5.3.2, py-1.8.1, pluggy-0.13.1
rootdir: [...], inifile: pytest.ini
plugins: typeguard-2.7.1, flask-0.15.0

test_cli.py E


================================================ ERRORS =================================================
_______________________________ ERROR at setup of test_idempotent_upload ________________________________

[...]
/Users/avirshup/.pyenv/versions/anaconda3-2019.10/envs/wcdb-py38/lib/python3.8/site-packages/pytest_flask/fixtures.py:72: in start
    self._process.start()
/Users/avirshup/.pyenv/versions/anaconda3-2019.10/envs/wcdb-py38/lib/python3.8/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
/Users/avirshup/.pyenv/versions/anaconda3-2019.10/envs/wcdb-py38/lib/python3.8/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
/Users/avirshup/.pyenv/versions/anaconda3-2019.10/envs/wcdb-py38/lib/python3.8/multiprocessing/context.py:283: in _Popen
    return Popen(process_obj)
/Users/avirshup/.pyenv/versions/anaconda3-2019.10/envs/wcdb-py38/lib/python3.8/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
/Users/avirshup/.pyenv/versions/anaconda3-2019.10/envs/wcdb-py38/lib/python3.8/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
/Users/avirshup/.pyenv/versions/anaconda3-2019.10/envs/wcdb-py38/lib/python3.8/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-1' parent=61378 initial>, file = <_io.BytesIO object at 0x7ff570abf9f0>
protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       AttributeError: Can't pickle local object 'LiveServer.start.<locals>.worker'

/Users/avirshup/.pyenv/versions/anaconda3-2019.10/envs/wcdb-py38/lib/python3.8/multiprocessing/reduction.py:60: AttributeError
======================================== short test summary info ========================================
ERROR test_cli.py::test_idempotent_upload - AttributeError: Can't pickle local object 'LiveServer.star...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================== 393 deselected, 1 error in 4.41s ====================================

LiveServer requires flask having root path

If server is not ready it will try again taking up to 5 seconds.
The problem apears when application do not implement '/', when app returns 404 LiveServer considers it a failure and tries again, resulting in it always taking 5 seconds.

Rendering Templates with Jinja 2 Does Not Work

Hi,

First of all thank you for your great library, I really appreciate your effort.

I am having an issue with testing a function which calls Flask's render_template function. Whenever executing the command pytest the error shown below is thrown.

    def test_generate_notebook_for_experiment():
>       notebook = generate_notebook_for_experiment(constants.EXPERIMENT_CONFIG)

test\jupyterlab\jupyter_hub_test.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jupyterlab\jupyter_hub.py:31: in generate_notebook_for_experiment
    import_code = render_template(f'{TEMPLATE_FOLDER}/imports.pytemplate', configuration = notebook_configuration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

template_name_or_list = 'notebook/imports.pytemplate'
context = {'configuration': {'collections': {'edge_collections': {'BNL_data_juvnf6wv': 'pcbs_local_BNL_data_juvnf6wv_data_edges'...': 'gduser@Siemens', 'port': 8080, ...}, 'graphname': 'pcbs_local', 'module': 'gdf.contrib.managers.ArangoDBManager'}}}
ctx = None

    def render_template(template_name_or_list, **context):
        """Renders a template from the template folder with the given
        context.

        :param template_name_or_list: the name of the template to be
                                      rendered, or an iterable with template names
                                      the first one existing will be rendered
        :param context: the variables that should be available in the
                        context of the template.
        """
        ctx = _app_ctx_stack.top
>       ctx.app.update_template_context(context)
E       AttributeError: 'NoneType' object has no attribute 'app'

The following snippet shows the method to be tested, which invokes the render_template function.

from nbformat.v4 import new_notebook, new_code_cell, new_markdown_cell
from nbformat import NotebookNode

from flask import Flask, render_template

def generate_notebook_for_experiment(notebook_configuration: Dict) -> NotebookNode:
    """Create a new Jupyter notebook with template code for the specified experiment."""

    TEMPLATE_FOLDER = 'notebook'
    title = new_markdown_cell('# Experiment Notebook')
    import_code = render_template(f'{TEMPLATE_FOLDER}/imports.pytemplate', configuration = notebook_configuration)
    import_code_cell = new_code_cell(import_code, metadata = __create_metadata_for_hidden_cell__())

    notebook = new_notebook(
        cells=[ title, import_code_cell ],
        ...
    )
    return notebook

This is the complete test method causing the error:

def test_generate_notebook_for_experiment():
    notebook = generate_notebook_for_experiment(constants.EXPERIMENT_CONFIG)
    assert notebook.nbformat == 4
    nbformat.validate(nbjson=notebook, version=4, version_minor=2)

My code for creating the fixture is shown below.

import pytest

from gdrest.application import create_app

@pytest.fixture
def app():
    app, _ = create_app()
    return app

What do I need to do to make sure the Jinja2 runtime environment is appropriately configured by Flask so the function render_template is safe to execute? Thank you so much for your answers!

live_server listening on configurable HOST

Live_server can run only on 127.0.0.1 interface because it doesn't set host parameter for app.run call
https://github.com/pytest-dev/pytest-flask/blob/master/pytest_flask/fixtures.py#L65

Does it make sense to add this option? I use different docker containers for testing (one with pytest, one with selenium chrome standalone). And if selenium tries to connect to the live_server it fails because it listens inside a different container on the localhost interface. I probably can use tools like socat to propagate localhost outside the container, or maybe run docker container with --network="host" and use it accordingly. But for me, it seems to be the most appropriate to configure live_server.

Pytest failing on error that is handled in app/__init__.py

I have a custom error I raise within one resource in my flask app. It's defined as such:

class BotAlreadyExists(Exception):
    status_code = 400

    def __init__(self, message='Bot already exists for this slack team', status_code=None, payload=None):
        Exception.__init__(self)
        self.message = message
        if status_code is not None:
            self.status_code = status_code
        self.payload = payload

    def to_dict(self):
        rv = dict(self.payload or ())
        rv['message'] = self.message
        return rv

In app/__init__.py, I use a decorator to handle this exception so that I get a 400 instead of 500 error as well as a useful message.

    @app.errorhandler(BotAlreadyExists)
    def handle_bot_already_exists_usage(error):
        response = jsonify(error.to_dict())
        response.status_code = error.status_code
        return response

This works perfectly when running locally, however, when I run a functional test using pytest / pytest-flask, it's as if the decorator never has an effect. Rather than returning the error message with a HTTP 400 status, the test fails because of the exception. Why is the flask app correctly handling the exception locally but failing to when testing?

Add context for create_app import in quickstart docs

Summary

Add more context about how to define application fixture

Background

The quickstart docs has this confusing line:

from myapp import create_app

However, to a newcomer like me, it is not clear where the create_app import comes from. If you refer to the Flask quickstart docs, it does not set up a new Flask app with a create_app method.

This is a problem for me since I am importing app in my application, and then in my pytest-flask fixture, I need to override the app.

Details

I am confused about what the ideal example looks like for a Flask web app tested with pytest-flask. It would help to clarify this in the docs a little bit.

If someone could better explain it to me, I could work on a PR to make this improvement too.

Outcome

More straightforward for a newcomer to learn how to test their Flask web application if their app is structured in a different way

LiveServer is not terminated cleanly which breaks pytest-cov functionality

When using the live_server with pytest-cov, the coverage is not reported correctly. As mentioned in the issues pytest-dev/pytest-cov#44 and jarus/flask-testing#70, the problem is that the live_server process is not being terminated cleanly.

One of the proposed solutions in the flask-testing project works well here too:

def _clean_liveserver_stop(self):
    """Stop application process."""
    if self._process:
        try:
            os.kill(self._process.pid, signal.SIGINT)
            self._process.join(LIVESERVER_TIMEOUT)
        except Exception as ex:
            logging.error('Failed to join the live server process: %r', ex)
        finally:
            if self._process.is_alive():
                # If it's still alive, kill it
                self._process.terminate()

The problem is that such a solution is not cross-platform. How about adding a config option that enables/disables cleanly terminating the live server? Or always trying to cleanly exit the live server process and warn on platforms which do not support that easily/directly/without too much work?

I can submit a pull request if needed.

set a fixed port for live_server fixture

How can I set a fixed port for my live_server Selenium tests?

These two tests start two different live servers under two different ports, however the url used in the second test points to the wrong port. It's using the port used in the first test. How can I either

A. Tell the live_server fixture to use a fixed port number? or
B. Create a session scoped live_server that uses a single port? I only need to start the server once for all tests. Not for each function.

@pytest.mark.usefixtures('live_server')
class TestIndexPage(object):

    def test_title(self, driver):
        print(driver.current_url)
        assert 'Marvin' in driver.title

    def test_goto_random(self, driver):
        print(driver.current_url)
        assert 'Marvin' in driver.title
        driver.find_element_by_id("image_link").click()  # fails to find the correct element
        time.sleep(1)
        assert 'random' in driver.current_url

These tests accept a Selenium driver fixture that gets the base_url before each test, but is not updating properly.

My conftest.py file has

@pytest.fixture()
def base_url():
    url = url_for('index_page.index', _external=True)
    return url

@pytest.fixture(scope='function')
def driver(base_url):
    driver = webdriver.Chrome()
    print('baseurl', base_url)
    driver.get(base_url)
    yield driver
    # teardown
    driver.quit()

@pytest.mark.usefixtures('live_server')
class TestLiveServer(object):

    def test_server_is_up_and_running(self):
        url = url_for('index_page.Marvin:index', _external=True)
        print('testlive url', url)
        response = requests.get(url)
        assert response.status_code == 200

Middleware advice/documentation

I'm trying to use pytest-flask to test a flask server that has some WSGI middleware wrapping it, but it seems this isn't supported as an exception is raised from within pytest-flask:

    @pytest.fixture(autouse=True)
    def _monkeypatch_response_class(request, monkeypatch):
        """Set custom response class before test suite and restore the original
        after. Custom response has `json` property to easily test JSON responses::

            @app.route('/ping')
            def ping():
                return jsonify(ping='pong')

            def test_json(client):
                res = client.get(url_for('ping'))
                assert res.json == {'ping': 'pong'}

        """
        if 'app' not in request.fixturenames:
            return

        app = request.getfuncargvalue('app')
        monkeypatch.setattr(app, 'response_class',
>                           _make_test_response_class(app.response_class))
E       AttributeError: 'function' object has no attribute 'response_class'

This makes sense, as the flask app is no longer a flask app with all the properties that pytest-flask is expecting, but I'm unsure how to go about testing this as a result.

Is there a way to get around this with pytest-flask? Is there a different API I should be using for my middleware (or a different way of registering them) than WSGI middleware? Am I missing something obvious here?

Thanks for the help!

Sessions are empty when testing

This doc expresses that we can access session without any extra context manager.

However the following code does not return any session key (session is empty):

from flask import Flask


import pytest
from flask import session


myapp = Flask('testing')
myapp.secret_key = 'secret'
myapp.debug = True

@myapp.route('/')
def home():
    return session['message']


@pytest.fixture
def app():
    return myapp


def test_home(client):
    session['message'] = 'something'
    response = client.get('/')
    assert response.data == 'something'

Any hint on what we're missing here?

Thanks :)

Consider moving to pytest-dev?

Hi @vitalk,

Just noticed your plugin, what do you think about moving it under the pytest-dev organization? The idea is to provide more visibility and avoid plugins to become abandoned (which is obviously not the case with pytest-flask). You keep sole admin permissions over the repository, releases, etc etc... the only thing that changes in practice is that now it lives under the pytest-dev namespace.

PicklingError using live_server fixture on Windows

Not sure if Windows is supposed to be supported, but for me it fails on Windows 10 Python 2.7.12 with the following error when live_server fixture used:

request = <SubRequest '_push_request_context' for <Function 'test_get_url'>>                                                                                       
                                                                                                                                                                   
    @pytest.fixture(autouse=True)                                                                                                                                  
    def _push_request_context(request):                                                                                                                            
        """During tests execution request context has been pushed, e.g. `url_for`,                                                                                 
        `session`, etc. can be used in tests as is::                                                                                                               
                                                                                                                                                                   
            def test_app(app, client):                                                                                                                             
                assert client.get(url_for('myview')).status_code == 200                                                                                            
                                                                                                                                                                   
        """                                                                                                                                                        
        if 'app' not in request.fixturenames:                                                                                                                      
            return                                                                                                                                                 
                                                                                                                                                                   
        app = request.getfuncargvalue('app')                                                                                                                       
                                                                                                                                                                   
        # Get application bound to the live server if ``live_server`` fixture                                                                                      
        # is applyed. Live server application has an explicit ``SERVER_NAME``,                                                                                     
        # so ``url_for`` function generates a complete URL for endpoint which                                                                                      
        # includes application port as well.                                                                                                                       
        if 'live_server' in request.fixturenames:                                                                                                                  
>           app = request.getfuncargvalue('live_server').app                                                                                                       
                                                                                                                                                                   
..\..\..\..\python-virtualenv\shadow\Lib\site-packages\pytest_flask\plugin.py:85:                                                                                  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _                                                                                    
..\..\..\..\python-virtualenv\shadow\Lib\site-packages\pytest_flask\fixtures.py:127: in live_server                                                                
    server.start()                                                                                                                                                 
..\..\..\..\python-virtualenv\shadow\Lib\site-packages\pytest_flask\fixtures.py:64: in start                                                                       
    self._process.start()                                                                                                                                          
c:\python27\Lib\multiprocessing\process.py:130: in start                                                                                                           
    self._popen = Popen(self)                                                                                                                                      
c:\python27\Lib\multiprocessing\forking.py:277: in __init__                                                                                                        
    dump(process_obj, to_child, HIGHEST_PROTOCOL)                                                                                                                  
c:\python27\Lib\multiprocessing\forking.py:199: in dump                                                                                                            
    ForkingPickler(file, protocol).dump(obj)                                                                                                                       
c:\python27\Lib\pickle.py:224: in dump                                                                                                                             
    self.save(obj)                                                                                                                                                 
c:\python27\Lib\pickle.py:331: in save                                                                                                                             
    self.save_reduce(obj=obj, *rv)                                                                                                                                 
c:\python27\Lib\pickle.py:425: in save_reduce                                                                                                                      
    save(state)                                                                                                                                                    
c:\python27\Lib\pickle.py:286: in save                                                                                                                             
    f(self, obj) # Call unbound method with explicit self                                                                                                          
c:\python27\Lib\pickle.py:655: in save_dict                                                                                                                        
    self._batch_setitems(obj.iteritems())                                                                                                                          
c:\python27\Lib\pickle.py:687: in _batch_setitems                                                                                                                  
    save(v)                                                                                                                                                        
c:\python27\Lib\pickle.py:286: in save                                                                                                                             
    f(self, obj) # Call unbound method with explicit self                                                                                                          
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _                                                                                    
                                                                                                                                                                   
self = <multiprocessing.forking.ForkingPickler instance at 0x0000000007EDBA08>                                                                                     
obj = <function <lambda> at 0x00000000081B9DD8>, name = '<lambda>'                                                                                                 
pack = <built-in function pack>                                                                                                                                    
                                                                                                                                                                   
    def save_global(self, obj, name=None, pack=struct.pack):                                                                                                       
        write = self.write                                                                                                                                         
        memo = self.memo                                                                                                                                           
                                                                                                                                                                   
        if name is None:                                                                                                                                           
            name = obj.__name__                                                                                                                                    
                                                                                                                                                                   
        module = getattr(obj, "__module__", None)                                                                                                                  
        if module is None:                                                                                                                                         
            module = whichmodule(obj, name)                                                                                                                        
                                                                                                                                                                   
        try:                                                                                                                                                       
            __import__(module)                                                                                                                                     
            mod = sys.modules[module]                                                                                                                              
            klass = getattr(mod, name)                                                                                                                             
        except (ImportError, KeyError, AttributeError):                                                                                                            
            raise PicklingError(                                                                                                                                   
                "Can't pickle %r: it's not found as %s.%s" %                                                                                                       
>               (obj, module, name))                                                                                                                               
E           PicklingError: Can't pickle <function <lambda> at 0x00000000081B9DD8>: it's not found as pytest_flask.fixtures.<lambda>                                

Getting error: AttributeError: 'function' object has no attribute 'test_request_context'

Here is an example of my flask web app:

from flask import Flask, jsonify, json, render_template, Response, request


app = Flask(__name__)


@app.route("/")
def index():
    return render_template('main.html')

if __name__ == "__main__":
    app.run()

Here is my test:

#!/usr/bin/env python3
from flask import Flask, url_for, Response
import app
import pytest


@pytest.fixture
def app():
    app.debug = True
    app.response_class = Response
    return app

def test_api(client):
    assert(True)

When I run this test, I get the error below:

======================================================== ERRORS ========================================================
___________________________________________ ERROR at setup of test_api____________________________________________

request = <SubRequest '_push_request_context' for <Function 'test_api'>>

    @pytest.fixture(autouse=True)
    def _push_request_context(request):
        """During tests execution request context has been pushed, e.g. `url_for`,
        `session`, etc. can be used in tests as is::

            def test_app(app, client):
                assert client.get(url_for('myview')).status_code == 200

        """
        if 'app' not in request.fixturenames:
            return

        app = request.getfuncargvalue('app')

        # Get application bound to the live server if ``live_server`` fixture
        # is applyed. Live server application has an explicit ``SERVER_NAME``,
        # so ``url_for`` function generates a complete URL for endpoint which
        # includes application port as well.
        if 'live_server' in request.fixturenames:
            app = request.getfuncargvalue('live_server').app

>       ctx = app.test_request_context()
E       AttributeError: 'function' object has no attribute 'test_request_context'

I'm not exactly sure how to fix this error if someone can lead me in the right direction I would appropriate it.

Thanks!

debugging live_server crash

Hi there!

Thanks for the great library.

I have a test like this

@pytest.mark.usefixtures('live_server')
def test_cookie_getting(setup):
    sesh = requests.Session()

    username = 'foo'
    password = 'bar'

    response = sesh.post(
        url_for('security.login', _external=True),
        data={'email': username, 'password': password, 'next': None},
    )

    ...

When the requests makes the post, it kills the server. The test ends up exiting with a Connection aborted exception.

I'm not sure why the server is halting. Do you have suggestions for getting messages or tracebacks from live_server?

Warning summary

I am using the example tests in https://github.com/pytest-dev/pytest-flask/tree/master/tests

The tests runs fine, but includes

========== warnings summary ===========
None
  Module already imported so can not be re-written: pytest_flask
  Module already imported so can not be re-written: _pytest.pytester

I found similar issue addressed here: pytest-dev/pytest#2005
but am not understanding if there is a problem in one of the pytest packages or if I have my setup wrong?

What's in create_app?

This framework seems to depend on a method called create_app() whose implementation is not provided. I've created a similar method based on these snippets. My problem is that when I run my tests the method url_for() is not visible.

Can you provide your implementation of create_app()?

Equalize pypi 0.10.0 tarball contents with github's repository 0.10.0 tag

Hi,

I would like to package pytest-flask in Debian. I noticed that the tarball provided by PyPI and the the tarball procuded with git archive 0.10.0 on this repository slightly differ. Namely:

➜  localhost /tmp/pytest-flask  diff -r github pypi
Only in github: .gitignore
Only in github: Makefile
Only in pypi: PKG-INFO
Only in pypi: pytest_flask.egg-info
diff -r github/setup.cfg pypi/setup.cfg
2a3,8
> 
> [egg_info]
> tag_build = 
> tag_date = 0
> tag_svn_revision = 0
> 
Only in github: tests
Only in github: .travis.yml

It would greatly help my Debian packaging effort if these tarballs were exactly the same.
Please consider fixing this. Thanks.

The import 'werkzeug.cached_property' is deprecated

I ran into this issue using Werkzeug 1.0.0RC1 with pytest-flask:

ImportError: cannot import name 'cached_property' from 'werkzeug' (c:\***\.virtualenvs\***-ceh2yp3w\lib\site-packages\werkzeug\__init__.py)

The current version of Werkzeug (0.16.1) gives a deprecation warning for this import:

>>> from werkzeug import cached_property
__main__:1: DeprecationWarning: The import 'werkzeug.cached_property' is deprecated and will be removed in Werkzeug 1.0. Use 'from werkzeug.utils import cached_property' instead.

I'm unable to do a PR now, but I thought I'd log the issue here already.

Using live_server for Flask web app tests inside docker container

I want to test the following Flask app inside a docker container. The default flask port 5000 is binded (docker run -p 5000:5000):

from flask import Flask

def create_app():
    app = Flask(__name__)
    return app

app = create_app()

@app.route('/')
def index():
    return render_template('index.html')

My test is as follows:

@pytest.fixture
def app():
    app = create_app()
    return app

@pytest.mark.usefixtures('live_server')
class TestLiveServer:

    def test_homepage(self):
        res = urlopen('http://0.0.0.0:5000')
        assert b'OK' in res.read()
        assert res.code == 200

I get urllib.error.URLError: <urlopen error [Errno 111] Connection refused>.

Should I change my host + port config somewhere?

client_class fixture not working with pytest>=2.7.1

After upgrading pytest to version 2.7.1, test that uses client_class fixture crashes with the following error:
ScopeMismatch: You tried to access the 'function' scoped fixture 'client' with a 'module' scoped request object, involved factories.

pytest-flask version: 0.8.1

Applicaiton config doesn't teardown when `pytest.mark.app` applied

When application fixture has session/class scope, e.g.

@pytest.fixture(scope='session')
def app():
    app = Flask(__name__)
    return app

The pytest.mark.app decorator doesn't properly teardown

@pytest.mark.app(my_key=42)
def test_foo(app):
    assert 'MY_KEY' in app.config

def test_bar(app):
    assert 'MY_KEY' not in app.config, 'WTF?'

"ImportError: cannot import name 'json'" when debugging with pydevd

Hi!
I'm receiving this error when attempting to debug with a pydevd -debugger.

Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm 2018.1.3\helpers\pydev\pydevd.py", line 1664, in <module>
    main()
  File "C:\Program Files\JetBrains\PyCharm 2018.1.3\helpers\pydev\pydevd.py", line 1658, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "C:\Program Files\JetBrains\PyCharm 2018.1.3\helpers\pydev\pydevd.py", line 1068, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:\Program Files\JetBrains\PyCharm 2018.1.3\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:\Program Files\JetBrains\PyCharm 2018.1.3\helpers\pycharm\_jb_pytest_runner.py", line 31, in <module>
    pytest.main(args, plugins_to_load)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\_pytest\config.py", line 54, in main
    config = _prepareconfig(args, plugins)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\_pytest\config.py", line 167, in _prepareconfig
    pluginmanager=pluginmanager, args=args
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pluggy\__init__.py", line 617, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pluggy\__init__.py", line 222, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pluggy\__init__.py", line 216, in <lambda>
    firstresult=hook.spec_opts.get('firstresult'),
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pluggy\callers.py", line 196, in _multicall
    gen.send(outcome)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\_pytest\helpconfig.py", line 89, in pytest_cmdline_parse
    config = outcome.get_result()
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pluggy\callers.py", line 76, in get_result
    raise ex[1].with_traceback(ex[2])
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pluggy\callers.py", line 180, in _multicall
    res = hook_impl.function(*args)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\_pytest\config.py", line 981, in pytest_cmdline_parse
    self.parse(args)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\_pytest\config.py", line 1146, in parse
    self._preparse(args, addopts=addopts)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\_pytest\config.py", line 1098, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pluggy\__init__.py", line 397, in load_setuptools_entrypoints
    plugin = ep.load()
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pkg_resources\__init__.py", line 2318, in load
    return self.resolve()
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pkg_resources\__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\_pytest\assertion\rewrite.py", line 216, in load_module
    py.builtin.exec_(co, mod.__dict__)
  File "D:\Projects\Python\FlaskSQLAlchemyMasterClass\lib\site-packages\pytest_flask\plugin.py", line 11, in <module>
    from flask import json
ImportError: cannot import name 'json'

New release

I'm running into this warning for my tests:

~/.virtualenvs/api/lib/python2.7/site-packages/pytest_flask/plugin.py:109: DeprecationWarning: use of getfuncargvalue is deprecated, use getfixturevalue
    app = request.getfuncargvalue('app')

I see that the deprecation is fixed in 8aba5e0, but there was not yet a release after this fix. Could you provide one? Thanks!

pytest-flask example with SQLAlchemy

Hi, there
Could you include a SQLAlchemy example in the documentation? I'm using the following code but it doesn't work:

import pytest

from projeto import create_app, db as _db


@pytest.fixture(scope='session')
def app():
    app = create_app('testing')
    return app


@pytest.fixture(scope='session')
def db(app, request):
    _db.app = app
    _db.create_all()
    yield _db
    _db.drop_all()


@pytest.yield_fixture(scope='function')
def session(db):
    connection = db.engine.connect()
    transaction = connection.begin()

    options = dict(bind=connection)
    session = db.create_scoped_session(options=options)

    db.session = session

    yield session

    transaction.rollback()
    connection.close()
    session.remove()

This is the error that I get:

app = <Flask 'projeto'>, request = <SubRequest 'db' for <Function 'test_login_page'>>

    @pytest.fixture(scope='session')
    def db(app, request):
       _db.app = app
       _db.create_all()
       yield _db
 >       _db.drop_all()

conftest.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/andref/.virtualenvs/projeto/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py:1015: in drop_all
    self._execute_for_all_tables(app, bind, 'drop_all')
/home/andref/.virtualenvs/projeto/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py:999: in _execute_for_all_tables
    op(bind=self.get_engine(app, bind), **extra)
/home/andref/.virtualenvs/projeto/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py:941: in get_engine
    return connector.get_engine()
/home/andref/.virtualenvs/projeto/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py:533: in get_engine
    uri = self.get_uri()
/home/andref/.virtualenvs/projeto/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py:524: in get_uri
    return self._app.config['SQLALCHEMY_DATABASE_URI']
/home/andref/.virtualenvs/projeto/lib/python3.5/site-packages/werkzeug/local.py:347: in __getattr__
    return getattr(self._get_current_object(), name)
/home/andref/.virtualenvs/projeto/lib/python3.5/site-packages/werkzeug/local.py:306: in _get_current_object
    return self.__local()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def _find_app():
        top = _app_ctx_stack.top
        if top is None:
>           raise RuntimeError(_app_ctx_err_msg)
E           RuntimeError: Working outside of application context.
E           
E           This typically means that you attempted to use functionality that needed
E           to interface with the current application object in a way.  To solve
E           this set up an application context with app.app_context().  See the
E           documentation for more information.

/home/andref/.virtualenvs/projeto/lib/python3.5/site-packages/flask/globals.py:51: RuntimeError

pytest_flask.plugin.JSONResponse PicklingError

The app code

from flask import Flask,jsonify
from flask_caching import Cache

CACHE_TYPE = 'redis'
CACHE_KEY_PREFIX = 'caches:'
CACHE_REDIS_URL = 'redis://localhost:8888/0'
DEBUG = True
CACHE_DEFAULT_TIMEOUT = 5 * 60  # seconds

app = Flask(__name__)
app.config.from_object(__name__)

cache = Cache(app)


@app.route('/')
@cache.cached(query_string=True)
def index():
    return jsonify({"message": "Hello world"})


if __name__ == '__main__':
    app.run()

when test with pytest_flask

from flask import url_for

def test_get_index(client):
    assert client.get(url_for('index')).status_code == 200

the error output

 _pickle.PicklingError: Can't pickle <class 'pytest_flask.plugin.<class 'pytest_flask.plugin.JSONResponse'>'>: attribute lookup <class 'pytest_flask.plugin.JSONResponse'> on pytest_flask.plugin failed

When debug the error, I found the error was caused by pytest_flask dynamic changed the Flask Response in pytest_flask/plugin.py with type .

def _make_test_response_class(response_class):
    """Extends the response class with special attribute to test JSON
    responses. Don't override user-defined `json` attribute if any.

    :param response_class: An original response class.
    """
    if 'json' in response_class.__dict__:
        return response_class

    return type(str(JSONResponse), (response_class, JSONResponse), {})

But I don't kwon how to fix this issure. Any suggestion on pickle dynamic class ?

indeterminate live_server segfaults on macos (workaround: threading.Thread)

Not sure this is short-run actionable, and I don't think it's actually a pytest-flask bug. If others encounter this it may still make sense to add something like the workaround I identified as an optional run mode or automatic fallback. Opening an issue in case it helps others or attracts more information/reports. The lack of similar reports makes me suspect this might come down to the OS or specific dependency versions--but I haven't had time to fiddle with them.

We had some trouble this fall with flaky test runs using live_server and selenium for end-to-end tests. I'll describe everything I can recall in case it helps someone find the issue; scroll to the end for the workaround. :)


Initial encounter/debug

The issue initially manifested as inconsistent test/fixture failures at the first location in a test that depended on finding/interacting with anything specific loaded (because the server never started and the browser has a blank page loaded). When I first encountered this, the test exception/assertion errors were all I got.

I eventually figured out that live_server._process could silently fail to start during setup. You can detect this with something like:

live_server.start()
if not live_server._process.is_alive():
   ...

While most of my test runs fail (running 2 parameterized tests 8x each), there's usually only one failure across the run. It often (but not always) fails on the same test. Any remaining tests usually run fine. Playing around for a bit (different numbers of tests, turning each test into a simple pass, renaming them to force different orders) made me think that where it breaks is somewhat correlated with how much work the tests make the server do.

Stepping through the code isolated the problem to when app.run(host=host, port=port, use_reloader=False, threaded=True) is called inside the worker/target function passed to multiprocessing.Process. At the time, I had trouble introspecting the child process (see the paragraph), but I did notice the crash produces OS crash reports. Here's an example:

segfault crash report
Process:               python3.6 [92689]
Path:                  /nix/*/python3.6
Identifier:            python3.6
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        python3.6 [92491]
Responsible:           python3.6 [92689]
User ID:               501

Date/Time:             2019-12-30 11:58:18.934 -0600
OS Version:            Mac OS X 10.14.6 (18G103)
Report Version:        12
Bridge OS Version:     3.6 (16P6571)
Anonymous UUID:        73B82B43-D894-E9FF-58D2-C4D60BD5AEFB

Sleep/Wake UUID:       6A0E1A0F-A8D2-4968-9C72-E38508FDB072

Time Awake Since Boot: 550000 seconds
Time Since Wake:       8300 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x000000010b060a3a
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x10b060a3a:
    VM_ALLOCATE            000000010abe0000-000000010b060000 [ 4608K] rw-/rwx SM=COW  
--> 
    VM_ALLOCATE            000000010b0a0000-000000010b2a0000 [ 2048K] rw-/rwx SM=COW  

Application Specific Information:
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff6ac462c6 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff6ad01bf1 pthread_kill + 284
2   libsystem_c.dylib             	0x00007fff6ab63d8a raise + 26
3   libsystem_platform.dylib      	0x00007fff6acf6b5d _sigtramp + 29
4   ???                           	0x00007fffa13ad000 0 + 140735898374144
5   libsystem_trace.dylib         	0x00007fff6ad1a13d os_log_type_enabled + 627
6   libsystem_info.dylib          	0x00007fff6ac2c709 si_destination_compare_statistics + 1993
7   libsystem_info.dylib          	0x00007fff6ac2b1a5 si_destination_compare_internal + 661
8   libsystem_info.dylib          	0x00007fff6ac2ad3f si_destination_compare + 559
9   libsystem_info.dylib          	0x00007fff6ac096df _gai_addr_sort + 111
10  libsystem_c.dylib             	0x00007fff6abb3e5b _isort + 193
11  libsystem_c.dylib             	0x00007fff6abb3d88 _qsort + 2125
12  libsystem_info.dylib          	0x00007fff6ac00f2d _gai_sort_list + 781
13  libsystem_info.dylib          	0x00007fff6abff885 si_addrinfo + 2021
14  libsystem_info.dylib          	0x00007fff6abfef77 _getaddrinfo_internal + 231
15  libsystem_info.dylib          	0x00007fff6abfee7d getaddrinfo + 61
16  _socket.cpython-36m-darwin.so 	0x0000000107e4649e setipaddr + 494
17  _socket.cpython-36m-darwin.so 	0x0000000107e45d3b getsockaddrarg + 539
18  _socket.cpython-36m-darwin.so 	0x0000000107e43044 sock_bind + 52
19  libpython3.6m.dylib           	0x00000001064ab852 _PyCFunction_FastCallDict + 610
20  libpython3.6m.dylib           	0x000000010653f57a call_function + 602
21  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
22  libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
23  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
24  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
25  libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
26  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
27  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
28  libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
29  libpython3.6m.dylib           	0x000000010654097b fast_function + 411
30  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
31  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
32  libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
33  libpython3.6m.dylib           	0x0000000106540d6f _PyFunction_FastCallDict + 607
34  libpython3.6m.dylib           	0x0000000106459aa6 _PyObject_FastCallDict + 182
35  libpython3.6m.dylib           	0x0000000106459c3c _PyObject_Call_Prepend + 156
36  libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
37  libpython3.6m.dylib           	0x00000001064c548f slot_tp_init + 159
38  libpython3.6m.dylib           	0x00000001064c1224 type_call + 292
39  libpython3.6m.dylib           	0x0000000106459b31 _PyObject_FastCallDict + 321
40  libpython3.6m.dylib           	0x0000000106459f55 _PyObject_FastCallKeywords + 197
41  libpython3.6m.dylib           	0x000000010653f4f2 call_function + 466
42  libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
43  libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
44  libpython3.6m.dylib           	0x000000010654097b fast_function + 411
45  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
46  libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
47  libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
48  libpython3.6m.dylib           	0x000000010654097b fast_function + 411
49  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
50  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
51  libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
52  libpython3.6m.dylib           	0x0000000106535b37 PyEval_EvalCodeEx + 55
53  libpython3.6m.dylib           	0x0000000106487a0f function_call + 399
54  libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
55  libpython3.6m.dylib           	0x000000010653c5b0 _PyEval_EvalFrameDefault + 27184
56  libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
57  libpython3.6m.dylib           	0x000000010654097b fast_function + 411
58  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
59  libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
60  libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
61  libpython3.6m.dylib           	0x0000000106535b37 PyEval_EvalCodeEx + 55
62  libpython3.6m.dylib           	0x0000000106487a0f function_call + 399
63  libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
64  libpython3.6m.dylib           	0x000000010653c5b0 _PyEval_EvalFrameDefault + 27184
65  libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
66  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
67  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
68  libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
69  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
70  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
71  libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
72  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
73  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
74  libpython3.6m.dylib           	0x0000000106540f0b _PyFunction_FastCallDict + 1019
75  libpython3.6m.dylib           	0x0000000106459aa6 _PyObject_FastCallDict + 182
76  libpython3.6m.dylib           	0x0000000106459c3c _PyObject_Call_Prepend + 156
77  libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
78  libpython3.6m.dylib           	0x00000001064c548f slot_tp_init + 159
79  libpython3.6m.dylib           	0x00000001064c1224 type_call + 292
80  libpython3.6m.dylib           	0x0000000106459b31 _PyObject_FastCallDict + 321
81  libpython3.6m.dylib           	0x000000010653f4f2 call_function + 466
82  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
83  libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
84  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
85  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
86  libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
87  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
88  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
89  libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
90  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
91  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
92  libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
93  libpython3.6m.dylib           	0x000000010653f549 call_function + 553
94  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
95  libpython3.6m.dylib           	0x000000010647e2dc gen_send_ex + 252
96  libpython3.6m.dylib           	0x0000000106533bae builtin_next + 110
97  libpython3.6m.dylib           	0x00000001064ab6a4 _PyCFunction_FastCallDict + 180
98  libpython3.6m.dylib           	0x000000010653f57a call_function + 602
99  libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
100 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
101 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
102 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
103 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
104 libpython3.6m.dylib           	0x0000000106535b37 PyEval_EvalCodeEx + 55
105 libpython3.6m.dylib           	0x0000000106487a0f function_call + 399
106 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
107 libpython3.6m.dylib           	0x000000010653c5b0 _PyEval_EvalFrameDefault + 27184
108 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
109 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
110 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
111 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
112 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
113 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
114 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
115 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
116 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
117 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
118 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
119 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
120 libpython3.6m.dylib           	0x0000000106540d6f _PyFunction_FastCallDict + 607
121 libpython3.6m.dylib           	0x0000000106459aa6 _PyObject_FastCallDict + 182
122 libpython3.6m.dylib           	0x0000000106459c3c _PyObject_Call_Prepend + 156
123 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
124 libpython3.6m.dylib           	0x00000001064c4499 slot_tp_call + 153
125 libpython3.6m.dylib           	0x0000000106459b31 _PyObject_FastCallDict + 321
126 libpython3.6m.dylib           	0x0000000106459f55 _PyObject_FastCallKeywords + 197
127 libpython3.6m.dylib           	0x000000010653f4f2 call_function + 466
128 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
129 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
130 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
131 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
132 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
133 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
134 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
135 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
136 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
137 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
138 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
139 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
140 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
141 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
142 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
143 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
144 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
145 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
146 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
147 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
148 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
149 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
150 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
151 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
152 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
153 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
154 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
155 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
156 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
157 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
158 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
159 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
160 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
161 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
162 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
163 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
164 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
165 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
166 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
167 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
168 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
169 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
170 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
171 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
172 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
173 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
174 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
175 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
176 libpython3.6m.dylib           	0x0000000106535b37 PyEval_EvalCodeEx + 55
177 libpython3.6m.dylib           	0x0000000106487a0f function_call + 399
178 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
179 libpython3.6m.dylib           	0x000000010653c5b0 _PyEval_EvalFrameDefault + 27184
180 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
181 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
182 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
183 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
184 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
185 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
186 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
187 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
188 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
189 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
190 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
191 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
192 libpython3.6m.dylib           	0x0000000106540d6f _PyFunction_FastCallDict + 607
193 libpython3.6m.dylib           	0x0000000106459aa6 _PyObject_FastCallDict + 182
194 libpython3.6m.dylib           	0x0000000106459c3c _PyObject_Call_Prepend + 156
195 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
196 libpython3.6m.dylib           	0x00000001064c4499 slot_tp_call + 153
197 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
198 libpython3.6m.dylib           	0x000000010653c5b0 _PyEval_EvalFrameDefault + 27184
199 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
200 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
201 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
202 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
203 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
204 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
205 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
206 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
207 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
208 libpython3.6m.dylib           	0x0000000106535b37 PyEval_EvalCodeEx + 55
209 libpython3.6m.dylib           	0x0000000106487a0f function_call + 399
210 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
211 libpython3.6m.dylib           	0x000000010653c5b0 _PyEval_EvalFrameDefault + 27184
212 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
213 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
214 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
215 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
216 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
217 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
218 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
219 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
220 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
221 libpython3.6m.dylib           	0x0000000106535b37 PyEval_EvalCodeEx + 55
222 libpython3.6m.dylib           	0x0000000106487a0f function_call + 399
223 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
224 libpython3.6m.dylib           	0x000000010653c5b0 _PyEval_EvalFrameDefault + 27184
225 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
226 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
227 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
228 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
229 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
230 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
231 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
232 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
233 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
234 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
235 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
236 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
237 libpython3.6m.dylib           	0x0000000106540d6f _PyFunction_FastCallDict + 607
238 libpython3.6m.dylib           	0x0000000106459aa6 _PyObject_FastCallDict + 182
239 libpython3.6m.dylib           	0x0000000106459c3c _PyObject_Call_Prepend + 156
240 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
241 libpython3.6m.dylib           	0x00000001064c4499 slot_tp_call + 153
242 libpython3.6m.dylib           	0x0000000106459b31 _PyObject_FastCallDict + 321
243 libpython3.6m.dylib           	0x0000000106459f55 _PyObject_FastCallKeywords + 197
244 libpython3.6m.dylib           	0x000000010653f4f2 call_function + 466
245 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
246 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
247 libpython3.6m.dylib           	0x0000000106535b37 PyEval_EvalCodeEx + 55
248 libpython3.6m.dylib           	0x0000000106487a0f function_call + 399
249 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
250 libpython3.6m.dylib           	0x000000010653c5b0 _PyEval_EvalFrameDefault + 27184
251 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
252 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
253 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
254 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
255 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
256 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
257 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
258 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
259 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
260 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
261 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
262 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
263 libpython3.6m.dylib           	0x0000000106540d6f _PyFunction_FastCallDict + 607
264 libpython3.6m.dylib           	0x0000000106459aa6 _PyObject_FastCallDict + 182
265 libpython3.6m.dylib           	0x0000000106459c3c _PyObject_Call_Prepend + 156
266 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
267 libpython3.6m.dylib           	0x00000001064c4499 slot_tp_call + 153
268 libpython3.6m.dylib           	0x0000000106459b31 _PyObject_FastCallDict + 321
269 libpython3.6m.dylib           	0x0000000106459f55 _PyObject_FastCallKeywords + 197
270 libpython3.6m.dylib           	0x000000010653f4f2 call_function + 466
271 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
272 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
273 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
274 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
275 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
276 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
277 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
278 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
279 libpython3.6m.dylib           	0x0000000106535b37 PyEval_EvalCodeEx + 55
280 libpython3.6m.dylib           	0x0000000106487a0f function_call + 399
281 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
282 libpython3.6m.dylib           	0x000000010653c5b0 _PyEval_EvalFrameDefault + 27184
283 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
284 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
285 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
286 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
287 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
288 libpython3.6m.dylib           	0x000000010654097b fast_function + 411
289 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
290 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
291 libpython3.6m.dylib           	0x0000000106540a19 fast_function + 569
292 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
293 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
294 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
295 libpython3.6m.dylib           	0x0000000106540d6f _PyFunction_FastCallDict + 607
296 libpython3.6m.dylib           	0x0000000106459aa6 _PyObject_FastCallDict + 182
297 libpython3.6m.dylib           	0x0000000106459c3c _PyObject_Call_Prepend + 156
298 libpython3.6m.dylib           	0x00000001064598e5 PyObject_Call + 101
299 libpython3.6m.dylib           	0x00000001064c4499 slot_tp_call + 153
300 libpython3.6m.dylib           	0x0000000106459b31 _PyObject_FastCallDict + 321
301 libpython3.6m.dylib           	0x0000000106459f55 _PyObject_FastCallKeywords + 197
302 libpython3.6m.dylib           	0x000000010653f4f2 call_function + 466
303 libpython3.6m.dylib           	0x000000010653c438 _PyEval_EvalFrameDefault + 26808
304 libpython3.6m.dylib           	0x0000000106540ad9 fast_function + 761
305 libpython3.6m.dylib           	0x000000010653f549 call_function + 553
306 libpython3.6m.dylib           	0x000000010653c3a5 _PyEval_EvalFrameDefault + 26661
307 libpython3.6m.dylib           	0x0000000106540163 _PyEval_EvalCodeWithName + 2883
308 libpython3.6m.dylib           	0x0000000106535af0 PyEval_EvalCode + 48
309 libpython3.6m.dylib           	0x000000010657074e PyRun_FileExFlags + 174
310 libpython3.6m.dylib           	0x000000010656fc45 PyRun_SimpleFileExFlags + 277
311 libpython3.6m.dylib           	0x000000010658d80a Py_Main + 3866
312 python3.6                     	0x00000001061d9db8 main + 248
313 python3.6                     	0x00000001061d9cb4 start + 52

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000111f6f5c0  rcx: 0x00007ffee9a105b8  rdx: 0x0000000000000000
  rdi: 0x0000000000000203  rsi: 0x000000000000000b  rbp: 0x00007ffee9a105f0  rsp: 0x00007ffee9a105b8
   r8: 0x00007ffee9a10ab8   r9: 0x33bb6fc8d10fca0a  r10: 0x0000000111f6f66c  r11: 0x0000000000000287
  r12: 0x0000000000000203  r13: 0x0000000000000000  r14: 0x000000000000000b  r15: 0x000000000000002d
  rip: 0x00007fff6ac462c6  rfl: 0x0000000000000286  cr2: 0x0000000107fbac98
  
Logical CPU:     0
Error Code:      0x02000148
Trap Number:     133


Binary Images:
       0x1061d9000 -        0x1061d9ff7 +python3.6 (???) <35FF5575-D6AC-3DA6-B015-B42B69210AF7> /nix/*/python3.6
       0x1061de000 -        0x106362fff +CoreFoundation (0) <16A969D9-5137-3572-8A2E-4AD27F8E2A69> /nix/*/CoreFoundation.framework/Versions/A/CoreFoundation
       0x10644b000 -        0x10665aff7 +libpython3.6m.dylib (3.6) <78A76B4A-DDDF-3426-96F3-9E4708F9FA45> /nix/*/libpython3.6m.dylib
       0x10672f000 -        0x10672ffff +libSystem.B.dylib (1226.10.1) <3F5A1DEE-940A-365E-BC6D-312CF83AFCF1> /nix/*/libSystem.B.dylib
       0x106731000 -        0x106731fff +grp.cpython-36m-darwin.so (???) <42F483BE-8B8F-3BA6-B313-FD618A10CB25> /nix/*/grp.cpython-36m-darwin.so
       0x106735000 -        0x10677cffb +libncursesw.6.dylib (0) <8E490522-234B-37BD-AAE0-B11B86076995> /nix/*/libncursesw.6.dylib
       0x106793000 -        0x106976ff7 +libicucore.A.dylib (0) <CDC07E9B-217D-3EE2-9530-E557530AF481> /nix/*/libicucore.A.dylib
       0x106a6a000 -        0x106ad7ff7 +libcurl.4.dylib (0) <436D2AC4-CCEF-31DB-BFA4-D524313B5AC2> /nix/*/libcurl.4.dylib
       0x106aec000 -        0x106aecfff +_bisect.cpython-36m-darwin.so (???) <CF29A42C-F9FA-3F9B-A726-B40D582E213C> /nix/*/_bisect.cpython-36m-darwin.so
       0x106aef000 -        0x106c2cfff +libxml2.2.dylib (0) <09A7EBAA-06E5-3E0D-9B25-E149FF192BED> /nix/*/libxml2.2.dylib
       0x106c5d000 -        0x106c5efff +_random.cpython-36m-darwin.so (???) <EC7A5AEB-7F0F-3A81-9DB4-3E29F14C2B8E> /nix/*/_random.cpython-36m-darwin.so
       0x106c61000 -        0x106cddff7 +libc++.1.0.dylib (0) <C7A1C95D-2474-362F-A9C2-027706C00B56> /nix/*/libc++.1.0.dylib
       0x106d39000 -        0x106d58ff7 +libc++abi.dylib (0) <D716EE50-B468-385A-BE45-5D06E86BA151> /nix/*/libc++abi.dylib
       0x106d72000 -        0x106d72fff +libsystem_c.dylib (0) <C32D34C8-BA8B-3354-8D1C-B3CFC3111E8A> /nix/*/libsystem_c.dylib
       0x106d8a000 -        0x106d8afff +libsystem_kernel.dylib (0) <0550AE42-4BC3-3B1E-8C21-3D3E5486B4FE> /nix/*/libsystem_kernel.dylib
       0x106da7000 -        0x106da7fff +libSystem_internal.dylib (0) <393A2DB2-3E05-3B6E-8B26-043AAF9EE831> /nix/*/libSystem_internal.dylib
       0x106da9000 -        0x106daaff7 +_heapq.cpython-36m-darwin.so (???) <BC86CB15-974D-3908-B3E0-DE5F21E1AC78> /nix/*/_heapq.cpython-36m-darwin.so
       0x106daf000 -        0x106dccff7 +libnghttp2.14.dylib (0) <CE050852-0C1D-3198-9646-C2EFC0E5406F> /nix/*/libnghttp2.14.dylib
       0x106dd8000 -        0x106e07ff3 +libssh2.1.dylib (0) <3B2E5A9F-543B-3180-9DF3-1227D5FDE2DE> /nix/*/libssh2.1.dylib
       0x106e13000 -        0x106e71ff3 +libssl.1.1.dylib (0) <549B9F8D-6C27-36D2-90F2-B2D23DFEDE44> /nix/*/libssl.1.1.dylib
       0x106e9a000 -        0x10707e37b +libcrypto.1.1.dylib (0) <A632411B-2AB0-3553-ABF5-8FBCBF7E7C53> /nix/*/libcrypto.1.1.dylib
       0x107110000 -        0x107141ff7 +libgssapi_krb5.2.2.dylib (0) <A80FEF43-EB00-3F5F-A001-FB48744215AD> /nix/*/libgssapi_krb5.2.2.dylib
       0x107152000 -        0x107176ff3 +libresolv.9.dylib (0) <99B3A32A-295C-3078-8543-498FED1EDBCE> /nix/*/libresolv.9.dylib
       0x10717f000 -        0x107180fff +_bz2.cpython-36m-darwin.so (???) <A36D9617-BCC4-3B15-8325-278718DB9531> /nix/*/_bz2.cpython-36m-darwin.so
       0x107185000 -        0x107199ff3 +libz.dylib (0) <948CB931-36A0-3203-AE70-A077681EEE58> /nix/*/libz.dylib
       0x10719f000 -        0x10722dff7 +libkrb5.3.3.dylib (0) <54778E86-DE3C-3480-9256-3F0ECD9A370D> /nix/*/libkrb5.3.3.dylib
       0x107265000 -        0x107266fff +fcntl.cpython-36m-darwin.so (???) <A6551221-5D1E-3B4F-BE7C-A30A00CE4EF3> /nix/*/fcntl.cpython-36m-darwin.so
       0x10726b000 -        0x107292fff +libk5crypto.3.1.dylib (0) <AB4E33BD-FD3B-3265-9D13-4DB7BFC71AAF> /nix/*/libk5crypto.3.1.dylib
       0x10729a000 -        0x10729afff +_opcode.cpython-36m-darwin.so (???) <94BA3E1E-D3CD-3B58-8428-3E701B41093A> /nix/*/_opcode.cpython-36m-darwin.so
       0x10729d000 -        0x10729effb +libcom_err.3.0.dylib (0) <C8990D19-55DA-3411-8895-CC7D8C35138F> /nix/*/libcom_err.3.0.dylib
       0x1072a1000 -        0x1072a2fff +_posixsubprocess.cpython-36m-darwin.so (???) <047B8A3C-C916-3B38-8130-3154F509BEFF> /nix/*/_posixsubprocess.cpython-36m-darwin.so
       0x1072a7000 -        0x1072adffb +libkrb5support.1.1.dylib (0) <E4B7CAA7-2ED2-348E-9043-62DA461C7C91> /nix/*/libkrb5support.1.1.dylib
       0x10773a000 -        0x107740fff +_struct.cpython-36m-darwin.so (???) <5C4B2605-7ABA-3FB5-B0C8-B720DC8CE4A7> /nix/*/_struct.cpython-36m-darwin.so
       0x1077d0000 -        0x1077d4fff +zlib.cpython-36m-darwin.so (???) <085D2657-6491-3A68-98E8-F582D28211D0> /nix/*/zlib.cpython-36m-darwin.so
       0x1077d9000 -        0x1077e9fff +libbz2.1.dylib (0) <89006BA2-B7C7-352A-9ED8-72FC93F39E1F> /nix/*/libbz2.1.dylib
       0x10782c000 -        0x107830ff7 +_lzma.cpython-36m-darwin.so (???) <2265DBA0-CCC6-3AAE-8D32-183F691F676E> /nix/*/_lzma.cpython-36m-darwin.so
       0x107835000 -        0x107854fff +liblzma.5.dylib (0) <E5EE127A-B99F-3674-AC53-2053AADDD343> /nix/*/liblzma.5.dylib
       0x10785a000 -        0x107861ff7 +math.cpython-36m-darwin.so (???) <86DDDBD9-1155-3FC5-B875-1BCCB3009CC1> /nix/*/math.cpython-36m-darwin.so
       0x107866000 -        0x107869fff +_hashlib.cpython-36m-darwin.so (???) <574759B3-042A-3082-9C35-A0076E1CE1E5> /nix/*/_hashlib.cpython-36m-darwin.so
       0x10786d000 -        0x1078ccff7 +libssl.1.1.dylib (0) <68719DC9-69D4-3ABD-92A0-79FE627AEF9D> /nix/*/libssl.1.1.dylib
       0x1078f5000 -        0x107ae6c1f +libcrypto.1.1.dylib (0) <B7825AD6-BDE6-3186-A6AC-3D1293EB47EA> /nix/*/libcrypto.1.1.dylib
       0x107b76000 -        0x107b7cfff +_blake2.cpython-36m-darwin.so (???) <33957568-2523-3567-906D-665E2A08132B> /nix/*/_blake2.cpython-36m-darwin.so
       0x107b80000 -        0x107b91ff7 +_sha3.cpython-36m-darwin.so (???) <CC16A512-9E8C-3796-9941-33ACAA4A9E43> /nix/*/_sha3.cpython-36m-darwin.so
       0x107c6a000 -        0x107c6dff7 +select.cpython-36m-darwin.so (???) <7178C79B-738D-3DDA-A45D-D1DA3BEED3DF> /nix/*/select.cpython-36m-darwin.so
       0x107cf2000 -        0x107cf5fff +_csv.cpython-36m-darwin.so (???) <368596C0-BF25-3723-9809-D25BCA9B2EEB> /nix/*/_csv.cpython-36m-darwin.so
       0x107d3a000 -        0x107d3dfff +binascii.cpython-36m-darwin.so (???) <995E612B-0897-353A-9958-65FEA02032F8> /nix/*/binascii.cpython-36m-darwin.so
       0x107e41000 -        0x107e4bfff +_socket.cpython-36m-darwin.so (???) <F21DA00E-DFD5-34C0-8ACA-725927AA6D66> /nix/*/_socket.cpython-36m-darwin.so
       0x107e95000 -        0x107ea4ff7 +_datetime.cpython-36m-darwin.so (???) <503C48E6-2FE2-35AB-9A1A-AE4F7D7E81A9> /nix/*/_datetime.cpython-36m-darwin.so
       0x1081bd000 -        0x108200fff +_decimal.cpython-36m-darwin.so (???) <00FAD6BB-6338-380C-9E6F-B7BD99C47086> /nix/*/_decimal.cpython-36m-darwin.so
       0x108313000 -        0x10831aff7 +_json.cpython-36m-darwin.so (???) <41AE9698-8233-378F-A0BA-7AE9947FC245> /nix/*/_json.cpython-36m-darwin.so
       0x10835e000 -        0x108434fff +unicodedata.cpython-36m-darwin.so (???) <FB0AC214-5CC6-3565-BB5F-B60F046192F7> /nix/*/unicodedata.cpython-36m-darwin.so
       0x1084f9000 -        0x10850dfff +_pickle.cpython-36m-darwin.so (???) <5D4ADF61-DA1B-381C-9FD7-91B6561063B7> /nix/*/_pickle.cpython-36m-darwin.so
       0x108517000 -        0x108519fff +tracer.cpython-36m-darwin.so (0) <C1659AF7-3C88-3951-8824-DBADC13466DB> /nix/*/tracer.cpython-36m-darwin.so
       0x1085dd000 -        0x1085e4fff +array.cpython-36m-darwin.so (???) <FED1D7BF-4AB2-3D1A-AAF3-6F27AE2AE9BE> /nix/*/array.cpython-36m-darwin.so
       0x1086eb000 -        0x1086f9ff7 +_ssl.cpython-36m-darwin.so (???) <58C6A9A5-9083-3B51-B098-D0A86AEB38EE> /nix/*/_ssl.cpython-36m-darwin.so
       0x108746000 -        0x108747fff +_scproxy.cpython-36m-darwin.so (???) <2530E5AD-804C-3DBE-A53F-04EAF643B7CC> /nix/*/_scproxy.cpython-36m-darwin.so
       0x10874a000 -        0x108796ff3  com.apple.SystemConfiguration (1.12.2 - 1.12.2) <B35616CA-8780-34DB-89FE-A5CEEA47A90D> /nix/*/SystemConfiguration.framework/SystemConfiguration
       0x108917000 -        0x108918ff3 +_speedups.cpython-36m-darwin.so (0) <A256DCFA-2FFC-3C5D-9BC6-E202EA2B0949> /nix/*/_speedups.cpython-36m-darwin.so
       0x1089e5000 -        0x1089e6ff7 +_multiprocessing.cpython-36m-darwin.so (???) <BA3CD43B-A3E4-3A81-93A3-71CA828AB78F> /nix/*/_multiprocessing.cpython-36m-darwin.so
       0x108a29000 -        0x108a2eff7 +_asyncio.cpython-36m-darwin.so (???) <2D03A676-BE5C-30AA-9777-248D3DD3E784> /nix/*/_asyncio.cpython-36m-darwin.so
       0x108df9000 -        0x108dfaffb +cprocessors.cpython-36m-darwin.so (0) <692A51F8-F468-3281-A0FD-39C3952BB3D7> /nix/*/cprocessors.cpython-36m-darwin.so
       0x108dfd000 -        0x108dfdffb +cutils.cpython-36m-darwin.so (0) <8C6ABB63-7D01-3380-A6DC-47B3E74989CC> /nix/*/cutils.cpython-36m-darwin.so
       0x1090ee000 -        0x1090efffb +cresultproxy.cpython-36m-darwin.so (0) <396D6918-E57D-3603-8C08-C11D41A3A0C3> /nix/*/cresultproxy.cpython-36m-darwin.so
       0x1098d3000 -        0x1098e6ff7 +_ctypes.cpython-36m-darwin.so (???) <8AFA4D0C-7EA1-36D2-8874-472DFD0361D2> /nix/*/_ctypes.cpython-36m-darwin.so
       0x1098f1000 -        0x1098f6ff7 +libffi.6.dylib (0) <06D7A7A5-FB71-373F-A23F-9BF3B0DC2BC8> /nix/*/libffi.6.dylib
       0x109957000 -        0x109958ff3 +_constant_time.abi3.so (0) <4EF6F8C1-4952-3404-A608-E157533E1FF8> /nix/*/_constant_time.abi3.so
       0x10995b000 -        0x109977ff3 +_cffi_backend.cpython-36m-darwin.so (0) <52529F8B-0C8F-3760-B9F5-AAE33B8B069D> /nix/*/_cffi_backend.cpython-36m-darwin.so
       0x1099e8000 -        0x1099e9fff +_rjsmin.cpython-36m-darwin.so (0) <212A3869-4C24-377C-85B9-5601F020B8E7> /nix/*/_rjsmin.cpython-36m-darwin.so
       0x1099ec000 -        0x1099edfff +termios.cpython-36m-darwin.so (???) <22773E18-8F4E-353E-9443-484684932FED> /nix/*/termios.cpython-36m-darwin.so
       0x1099f1000 -        0x1099f2ffb +_padding.abi3.so (0) <F648E0C8-3CAA-39EB-B06D-38FEB4767B29> /nix/*/_padding.abi3.so
       0x109a85000 -        0x109ae8ffb +_openssl.abi3.so (0) <564479B8-33DC-3BAD-9826-D57D9E0C8198> /nix/*/_openssl.abi3.so
       0x109eae000 -        0x109ebeff7 +_hoedown.abi3.so (0) <4572C822-D79A-3338-92EF-C1361946612C> /nix/*/_hoedown.abi3.so
       0x10a1ae000 -        0x10a1cdfff +_psycopg.cpython-36m-darwin.so (0) <A4BBCD35-AF8E-3D24-9490-DFA856F5409B> /nix/*/_psycopg.cpython-36m-darwin.so
       0x10a1de000 -        0x10a214ffb +libpq.5.dylib (0) <A57F3AAE-D0B1-311C-8855-8A9866F2425A> /nix/*/libpq.5.dylib
       0x10a3e0000 -        0x10a3ecfff +pyexpat.cpython-36m-darwin.so (???) <BFF922CC-2485-3790-87AF-2C9D9C6760AA> /nix/*/pyexpat.cpython-36m-darwin.so
       0x10a3f3000 -        0x10a414ff7 +libexpat.1.dylib (0) <98357E18-8248-34D3-B2D1-19F487954805> /nix/*/libexpat.1.dylib
       0x111ecd000 -        0x111f3770f  dyld (655.1.1) <DFC3C4AF-6F97-3B34-B18D-7DCB23F2A83A> /usr/lib/dyld
    0x7fff65828000 -     0x7fff65829fff  com.apple.TrustEvaluationAgent (2.0 - 31.200.1) <15DF9C73-54E4-3C41-BCF4-378338C55FB4> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
    0x7fff67af2000 -     0x7fff67af3ffb  libSystem.B.dylib (1252.250.1) <B1006948-7AD0-3CA9-81E0-833F4DD6BFB4> /usr/lib/libSystem.B.dylib
    0x7fff67d35000 -     0x7fff67d88ff7  libc++.1.dylib (400.9.4) <9A60A190-6C34-339F-BB3D-AACE942009A4> /usr/lib/libc++.1.dylib
    0x7fff67d89000 -     0x7fff67d9eff7  libc++abi.dylib (400.17) <38C09CED-9090-3719-90F3-04A2749F5428> /usr/lib/libc++abi.dylib
    0x7fff681f4000 -     0x7fff682ecff7  libcrypto.35.dylib (22.260.1) <91C3D71A-4D1D-331D-89CC-67863DF10574> /usr/lib/libcrypto.35.dylib
    0x7fff69329000 -     0x7fff69aaefdf  libobjc.A.dylib (756.2) <7C312627-43CB-3234-9324-4DEA92D59F50> /usr/lib/libobjc.A.dylib
    0x7fff6a98e000 -     0x7fff6a992ff3  libcache.dylib (81) <1987D1E1-DB11-3291-B12A-EBD55848E02D> /usr/lib/system/libcache.dylib
    0x7fff6a993000 -     0x7fff6a99dff3  libcommonCrypto.dylib (60118.250.2) <1765BB6E-6784-3653-B16B-CB839721DC9A> /usr/lib/system/libcommonCrypto.dylib
    0x7fff6a99e000 -     0x7fff6a9a5ff7  libcompiler_rt.dylib (63.4) <5212BA7B-B7EA-37B4-AF6E-AC4F507EDFB8> /usr/lib/system/libcompiler_rt.dylib
    0x7fff6a9a6000 -     0x7fff6a9afff7  libcopyfile.dylib (146.250.1) <98CD00CD-9B91-3B5C-A9DB-842638050FA8> /usr/lib/system/libcopyfile.dylib
    0x7fff6a9b0000 -     0x7fff6aa34fc3  libcorecrypto.dylib (602.260.2) <01464D24-570C-3B83-9D18-467769E0FCDD> /usr/lib/system/libcorecrypto.dylib
    0x7fff6aabb000 -     0x7fff6aaf4ff7  libdispatch.dylib (1008.270.1) <97273678-E94C-3C8C-89F6-2E2020F4B43B> /usr/lib/system/libdispatch.dylib
    0x7fff6aaf5000 -     0x7fff6ab21ff7  libdyld.dylib (655.1.1) <002418CC-AD11-3D10-865B-015591D24E6C> /usr/lib/system/libdyld.dylib
    0x7fff6ab22000 -     0x7fff6ab22ffb  libkeymgr.dylib (30) <0D0F9CA2-8D5A-3273-8723-59987B5827F2> /usr/lib/system/libkeymgr.dylib
    0x7fff6ab30000 -     0x7fff6ab30ff7  liblaunch.dylib (1336.261.2) <2B07E27E-D404-3E98-9D28-BCA641E5C479> /usr/lib/system/liblaunch.dylib
    0x7fff6ab31000 -     0x7fff6ab36fff  libmacho.dylib (927.0.3) <A377D608-77AB-3F6E-90F0-B4F251A5C12F> /usr/lib/system/libmacho.dylib
    0x7fff6ab37000 -     0x7fff6ab39ffb  libquarantine.dylib (86.220.1) <6D0BC770-7348-3608-9254-F7FFBD347634> /usr/lib/system/libquarantine.dylib
    0x7fff6ab3a000 -     0x7fff6ab3bff7  libremovefile.dylib (45.200.2) <9FBEB2FF-EEBE-31BC-BCFC-C71F8D0E99B6> /usr/lib/system/libremovefile.dylib
    0x7fff6ab3c000 -     0x7fff6ab53ff3  libsystem_asl.dylib (356.200.4) <A62A7249-38B8-33FA-9875-F1852590796C> /usr/lib/system/libsystem_asl.dylib
    0x7fff6ab54000 -     0x7fff6ab54ff7  libsystem_blocks.dylib (73) <A453E8EE-860D-3CED-B5DC-BE54E9DB4348> /usr/lib/system/libsystem_blocks.dylib
    0x7fff6ab55000 -     0x7fff6abdcfff  libsystem_c.dylib (1272.250.1) <7EDACF78-2FA3-35B8-B051-D70475A35117> /usr/lib/system/libsystem_c.dylib
    0x7fff6abdd000 -     0x7fff6abe0ffb  libsystem_configuration.dylib (963.270.3) <2B4A836D-68A4-33E6-8D48-CD4486B03387> /usr/lib/system/libsystem_configuration.dylib
    0x7fff6abe1000 -     0x7fff6abe4ff7  libsystem_coreservices.dylib (66) <719F75A4-74C5-3BA6-A09E-0C5A3E5889D7> /usr/lib/system/libsystem_coreservices.dylib
    0x7fff6abe5000 -     0x7fff6abebfff  libsystem_darwin.dylib (1272.250.1) <EC9B39A5-9592-3577-8997-7DC721D20D8C> /usr/lib/system/libsystem_darwin.dylib
    0x7fff6abec000 -     0x7fff6abf2ff7  libsystem_dnssd.dylib (878.270.2) <E9A5ACCF-E35F-3909-AF0A-2A37CD217276> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff6abf3000 -     0x7fff6ac3effb  libsystem_info.dylib (517.200.9) <D09D5AE0-2FDC-3A6D-93EC-729F931B1457> /usr/lib/system/libsystem_info.dylib
    0x7fff6ac3f000 -     0x7fff6ac67ff7  libsystem_kernel.dylib (4903.271.2) <EA204E3C-870B-30DD-B4AF-D1BB66420D14> /usr/lib/system/libsystem_kernel.dylib
    0x7fff6ac68000 -     0x7fff6acb3ff7  libsystem_m.dylib (3158.200.7) <F19B6DB7-014F-3820-831F-389CCDA06EF6> /usr/lib/system/libsystem_m.dylib
    0x7fff6acb4000 -     0x7fff6acdefff  libsystem_malloc.dylib (166.270.1) <011F3AD0-8E6A-3A89-AE64-6E5F6840F30A> /usr/lib/system/libsystem_malloc.dylib
    0x7fff6acdf000 -     0x7fff6ace9ff7  libsystem_networkextension.dylib (767.250.2) <FF06F13A-AEFE-3A27-A073-910EF78AEA36> /usr/lib/system/libsystem_networkextension.dylib
    0x7fff6acea000 -     0x7fff6acf1fff  libsystem_notify.dylib (172.200.21) <145B5CFC-CF73-33CE-BD3D-E8DDE268FFDE> /usr/lib/system/libsystem_notify.dylib
    0x7fff6acf2000 -     0x7fff6acfbfef  libsystem_platform.dylib (177.270.1) <9D1FE5E4-EB7D-3B3F-A8D1-A96D9CF1348C> /usr/lib/system/libsystem_platform.dylib
    0x7fff6acfc000 -     0x7fff6ad06ff7  libsystem_pthread.dylib (330.250.2) <2D5C08FF-484F-3D59-9132-CE1DCB3F76D7> /usr/lib/system/libsystem_pthread.dylib
    0x7fff6ad07000 -     0x7fff6ad0aff7  libsystem_sandbox.dylib (851.270.1) <9494594B-5199-3186-82AB-5FF8BED6EE16> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff6ad0b000 -     0x7fff6ad0dff3  libsystem_secinit.dylib (30.260.2) <EF1EA47B-7B22-35E8-BD9B-F7003DCB96AE> /usr/lib/system/libsystem_secinit.dylib
    0x7fff6ad0e000 -     0x7fff6ad15ff3  libsystem_symptoms.dylib (820.267.1) <03F1C2DD-0F5A-3D9D-88F6-B26C0F94EB52> /usr/lib/system/libsystem_symptoms.dylib
    0x7fff6ad16000 -     0x7fff6ad2bfff  libsystem_trace.dylib (906.260.1) <FC761C3B-5434-3A52-912D-F1B15FAA8EB2> /usr/lib/system/libsystem_trace.dylib
    0x7fff6ad2c000 -     0x7fff6ad2cff7  libunc.dylib (30) <946AD970-D655-3526-AB11-F4FE52222E0B> /usr/lib/system/libunc.dylib
    0x7fff6ad2d000 -     0x7fff6ad32ffb  libunwind.dylib (35.4) <24A97A67-F017-3CFC-B0D0-6BD0224B1336> /usr/lib/system/libunwind.dylib
    0x7fff6ad33000 -     0x7fff6ad62fff  libxpc.dylib (1336.261.2) <7DEE2300-6D8E-3C00-9C63-E3E80D56B0C4> /usr/lib/system/libxpc.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 51493004
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=256.9M resident=0K(0%) swapped_out_or_unallocated=256.9M(100%)
Writable regions: Total=107.2M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=107.2M(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
Kernel Alloc Once                    8K        1 
MALLOC                            49.8M       35 
MALLOC guard page                   16K        4 
MALLOC_LARGE (reserved)            384K        3         reserved VM address space (unallocated)
STACK GUARD                       56.0M        1 
Stack                             8192K        1 
VM_ALLOCATE                       48.5M       51 
__DATA                            4412K      123 
__LINKEDIT                       226.7M       78 
__TEXT                            30.2M      117 
__UNICODE                          560K        1 
shared memory                       12K        3 
===========                     =======  ======= 
TOTAL                            424.8M      419 
TOTAL, minus reserved VM space   424.4M      419 

Today I disabled my workaround to ensure I still see the issue and noticed that something (maybe pytest--I was using 4.x at the time and now use 5.x) in my environment has shifted and the test run now prints helpful Python segfault messages and full stack traces. Here's an example:

segfault stack trace
Fatal Python error: Segmentation fault

Current thread 0x00000001121c05c0 (most recent call first):
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/socketserver.py", line 470 in server_bind
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/http/server.py", line 136 in server_bind
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/socketserver.py", line 456 in __init__
  File "/nix/store/ai2cvzkgzgjq4j38rwvgym81jj8vqs1r-python3.6-Werkzeug-0.12.2/lib/python3.6/site-packages/werkzeug/serving.py", line 504 in __init__
  File "/nix/store/ai2cvzkgzgjq4j38rwvgym81jj8vqs1r-python3.6-Werkzeug-0.12.2/lib/python3.6/site-packages/werkzeug/serving.py", line 587 in make_server
  File "/nix/store/ai2cvzkgzgjq4j38rwvgym81jj8vqs1r-python3.6-Werkzeug-0.12.2/lib/python3.6/site-packages/werkzeug/serving.py", line 699 in inner
  File "/nix/store/ai2cvzkgzgjq4j38rwvgym81jj8vqs1r-python3.6-Werkzeug-0.12.2/lib/python3.6/site-packages/werkzeug/serving.py", line 739 in run_simple
  File "/nix/store/2wsznll072jgsaqp3ypmd354s9yqw9vw-python3.6-Flask-0.12.2/lib/python3.6/site-packages/flask/app.py", line 841 in run
  File "/nix/store/dsdjvybj8bp9cpqw3hzl2fjd0gns0p8d-python3.6-pytest-flask-0.14.0/lib/python3.6/site-packages/pytest_flask/fixtures.py", line 67 in worker
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/multiprocessing/process.py", line 93 in run
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/multiprocessing/process.py", line 258 in _bootstrap
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/multiprocessing/popen_fork.py", line 73 in _launch
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/multiprocessing/popen_fork.py", line 19 in __init__
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/multiprocessing/context.py", line 277 in _Popen
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/multiprocessing/context.py", line 223 in _Popen
  File "/nix/store/ajn7df20f65rb00pjkayr82dppyszsn8-python3-3.6.9/lib/python3.6/multiprocessing/process.py", line 105 in start
  File "/nix/store/dsdjvybj8bp9cpqw3hzl2fjd0gns0p8d-python3.6-pytest-flask-0.14.0/lib/python3.6/site-packages/pytest_flask/fixtures.py", line 72 in start
  File "/Users/abathur/<intentionally snipped>/tests/conftest.py", line 963 in browser
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 775 in call_fixture_func
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 949 in pytest_fixture_setup
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 900 in execute
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 571 in _compute_fixture_value
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 490 in _get_active_fixturedef
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 880 in execute
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 571 in _compute_fixture_value
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 490 in _get_active_fixturedef
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 880 in execute
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 571 in _compute_fixture_value
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 490 in _get_active_fixturedef
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 474 in getfixturevalue
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 464 in _fillfixtures
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/fixtures.py", line 291 in fillfixtures
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/python.py", line 1427 in setup
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/runner.py", line 366 in prepare
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/runner.py", line 118 in pytest_runtest_setup
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/runner.py", line 201 in <lambda>
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/runner.py", line 229 in from_call
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/runner.py", line 201 in call_runtest_hook
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/runner.py", line 176 in call_and_report
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/runner.py", line 89 in runtestprotocol
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/runner.py", line 80 in pytest_runtest_protocol
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/main.py", line 256 in pytest_runtestloop
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/main.py", line 235 in _main
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/main.py", line 191 in wrap_session
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/main.py", line 228 in pytest_cmdline_main
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 86 in <lambda>
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/manager.py", line 92 in _hookexec
  File "/nix/store/njj7nw68w2kxf8z6d2s1b5zw8l2dzw3m-python3.6-pluggy-0.13.0/lib/python3.6/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/lib/python3.6/site-packages/_pytest/config/__init__.py", line 90 in main
  File "/nix/store/j44z35nkdkn527j7r93iajm0sv6h0678-python3.6-pytest-5.2.1/bin/.pytest-wrapped", line 11 in <module>

Workaround

At least in our case, threads proved a viable workaround. I achieved this by subclassing LiveServer and overriding the live_server fixture in our conftest:

from pytest_flask.fixtures import LiveServer, _rewrite_server_name
import socket
from threading import Thread

try:
    from urllib2 import URLError, urlopen
except ImportError:
    from urllib.error import URLError
    from urllib.request import urlopen

class PatchedLiveServer(LiveServer):
    def start(self):
        """Start application in a separate process."""
        self._process = Thread(
            target=self.app.run,
            kwargs=dict(
                host=self.host, port=self.port, use_reloader=False, threaded=False
            ),
            daemon=True,
        )
        self._process.start()

        # We must wait for the server to start listening with a maximum
        # timeout of 5 seconds.
        timeout = 5
        while timeout > 0:
            time.sleep(1)
            try:
                urlopen(self.url())
                timeout = 0
            except URLError:
                timeout -= 1

    def stop(self):
        # inherited stop will break (thread has no terminate, join may fail)
        pass

@pytest.fixture(scope="function")
def live_server(request, app, monkeypatch, pytestconfig):
    port = pytestconfig.getvalue("live_server_port")

    if port == 0:
        # Bind to an open port
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.bind(("", 0))
        port = s.getsockname()[1]
        s.close()

    host = pytestconfig.getvalue("live_server_host")

    # Explicitly set application ``SERVER_NAME`` for test suite
    # and restore original value on test teardown.
    server_name = app.config["SERVER_NAME"] or "localhost"
    monkeypatch.setitem(
        app.config, "SERVER_NAME", _rewrite_server_name(server_name, str(port))
    )

    clean_stop = request.config.getvalue("live_server_clean_stop")
    server = PatchedLiveServer(app, host, port, clean_stop)
    if request.config.getvalue("start_live_server"):
        server.start()

    request.addfinalizer(server.stop)
    return server

Testing errors when streaming

I currently have a problem with errors when I try to test a streaming endpoint, namely when I use the stream_with_context flask function/decorator to keep the context around, as I am streaming from a database which client is on current_app.

Essentially, the test passes, but then pytest-flask errors with a message about it having popped the wrong request context:
AssertionError: Popped wrong request context. (<RequestContext 'http://localhost/stream' [GET] of app> instead of <RequestContext 'http://localhost/' [GET] of app>)

Or at least I think it's pytest-flask.

I have a small gist that demonstrates the issue: https://gist.github.com/cknv/152d81ffcc4a74be491d, though it might be a little on the primitive side, but for me it does demonstrate the error. If you need some more information, I would of course be more than happy to provide it :)

For completeness sake, I am running python 3.5.

Any word from the maintainer?

Hi everyone,

As #72 and #58 shows, people are worried that we haven't had a release in 2 years and there are open PRs waiting to be merged.

Does anybody have other means to contact @vitalk?

Also, is anybody else willing to step up and help maintain pytest-flask? (pinging @steenzout as he has contributed with pytest-flask in the past).

Plugin does not loaded

Re #7 (comment)

Looks like a pytest-flask not loaded at all:

available fixtures: pytestconfig, app, recwarn, monkeypatch, capfd, capsys, tmpdir

Can you provide a head of your pytest stack trace? The list of loaded
plugins shows at the top, for example:

$ py.test tests/
test session starts
platform darwin -- Python 2.7.8 -- py-1.4.24 -- pytest-2.6.2
plugins: flask
collected 443 items

...

/cc @bonya

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.