semvec/pypi-packages huggingface dataset:
mig3-client 0.5.9
Send test result to Mig3 service
License: MIT
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
Keywords: python3,migration-tool,mig3

# ![mig3-client](https://repository-images.githubusercontent.com/183148001/d7c73680-6eaf-11e9-88b4-269c8d788541)
## *mig3-client*: Submit your results to a mig3 service.

[![Codacy Quality Badge](https://api.codacy.com/project/badge/Grade/8fbaac0868ee4261915b7c48ba8ee881)](https://app.codacy.com/app/mverteuil/mig3?utm_source=github.com&utm_medium=referral&utm_content=mverteuil/mig3-client&utm_campaign=Badge_Grade_Dashboard)
[![Codacy Coverage Badge](https://api.codacy.com/project/badge/Coverage/fcd5f70f0c294c948c70910456661093)](https://www.codacy.com/app/mverteuil/mig3-client?utm_source=github.com&utm_medium=referral&utm_content=mverteuil/mig3-client&utm_campaign=Badge_Coverage)
[![Build Status](https://travis-ci.com/mverteuil/mig3-client.svg?branch=master)](https://travis-ci.com/mverteuil/mig3-client)
![Supported Python Versions](https://img.shields.io/pypi/pyversions/mig3-client.svg)
[![Project License](https://img.shields.io/pypi/l/mig3-client.svg?color=blue)](https://github.com/mverteuil/mig3-client/blob/master/LICENSE)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmverteuil%2Fmig3-client.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmverteuil%2Fmig3-client?ref=badge_shield)
![Project Status](https://img.shields.io/pypi/status/mig3-client.svg)
[![PyPI version](https://img.shields.io/pypi/v/mig3-client.svg)](https://badge.fury.io/py/mig3-client)
[![PyPI downloads](https://img.shields.io/pypi/dm/mig3-client.svg?color=darklime)](https://pypi.org/project/mig3-client/)
[![Manpower](https://img.shields.io/github/contributors/mverteuil/mig3-client.svg?color=red&label=manpower)](https://github.com/mverteuil/mig3-client/graphs/contributors)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmverteuil%2Fmig3-client.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmverteuil%2Fmig3-client?ref=badge_shield)

## See Also

-   [mig3](https://github.com/mverteuil/mig3): Detect regressions in your python3 migration!

## Basic setup

Install it:
```
$ pip install mig3-client
```

Run the application:
```
$ mig3 --help
```

## Developer setup

Install dependencies:
```
$ poetry install
```

To run the tests for the current environment:
```
$ poetry shell
$ py.test
```

To run the tests for all environments:
```
$ tox
```

## License

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmverteuil%2Fmig3-client.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmverteuil%2Fmig3-client?ref=badge_large)
corefoundationasyncio 0.0.1
CoreFoundation based selector and asyncio event loop
License: MIT

# CoreFoundation based selector and asyncio event loop

## asyncio event loop

On macOS X, Cocoa uses an event loop to dispatch events ([`NSRunLoop`](https://developer.apple.com/documentation/foundation/nsrunloop), which is a wrapper around [`CFRunLoop`](https://developer.apple.com/documentation/corefoundation/cfrunloop?language=objc)).

Python's [asyncio](https://docs.python.org/3/library/asyncio.html) module uses an event loop too to handle asynchronous events. On macOS X, it's based on [kqueue](https://docs.python.org/3/library/selectors.html#selectors.KqueueSelector).

A thread can only use a single event loop, that's why it's not possible to use both Cocoa and asyncio on the same thread. This module implements an asyncio compatible event loop on top of CFRunLoop. Thus it's possible to use Cocoa in conjunction with asyncio.
It uses internally PyObjC's [`runEventLoop`](https://pyobjc.readthedocs.io/en/latest/api/module-PyObjCTools.AppHelper.html) or [`runConsoleEventLoop`](https://pyobjc.readthedocs.io/en/latest/api/module-PyObjCTools.AppHelper.html)

Here is an example video of a simple Cocoa based GUI using `asyncio` and `async`/`await` to handle subprocesses and network calls:

[![Example video](https://img.youtube.com/vi/-Arl0-7y7so/0.jpg)](https://www.youtube.com/watch?v=-Arl0-7y7so)

The corresponding code is here: [tests/gui/guidemo.py](https://github.com/alberthier/corefoundationasyncio/blob/master/tests/gui/guidemo.py)

Setup:

```python
    loop = CoreFoundationEventLoop()
    asyncio.set_event_loop(loop)
    try:
        loop.run_forever()
    finally:
        loop.close()
```

`CoreFoundationEventLoop`'s constructor's first argument is a boolean. `True` for a console app, `False` (default) for a GUI app.
Additionnal arguments are then passed to [`PyObjCTools.AppHelper.runConsoleEventLoop`](https://pyobjc.readthedocs.io/en/latest/api/module-PyObjCTools.AppHelper.html) or [`PyObjCTools.AppHelper.runEventLoop`](https://pyobjc.readthedocs.io/en/latest/api/module-PyObjCTools.AppHelper.html)

## selector

This module also provides a [selector](https://docs.python.org/3/library/selectors.html) implementation based on [CFRunLoop](https://developer.apple.com/documentation/corefoundation/cfrunloop?language=objc). But his selector isn't compatible with Cocoa GUIs

## Installation

```shell
$ pip3 install corefoundationasyncio
```

This module depends on [pyobjc](https://pypi.org/project/pyobjc/)

## Contributing

Report issues [here](https://github.com/alberthier/corefoundationasyncio/issues)

Pull-requests welcome !

## License

This software is licensed under the [MIT](LICENSE) license