semvec/pypi-packages huggingface dataset:
winpoll 0.20301.3
Implementation of `select.poll` on Microsoft Windows.
Requires Python: >=3.7
Keywords: poll, select.poll, WSAPoll, Windows polyfill, Windows ponyfill

Implementation of `select.poll` on Microsoft Windows.

- Pure Python; no C extensions (uses `ctypes.windll.Ws2_32`)
- Drop-in-compatible API
- Clean "ponyfill"; library does no monkeypatching
- Python 3.7+ compatible
- No dependencies


# Usage

## Alternative to `select.poll`

```python
try:
    from select import (
        POLLIN, POLLOUT, POLLERR, POLLHUP, POLLNVAL,
        poll
    )

except ImportError:
    # https://github.com/python/cpython/issues/60711
    from winpoll import (
        POLLIN, POLLOUT, POLLERR, POLLHUP, POLLNVAL,
        wsapoll as poll
    )
```

```python
p = poll()

p.register(sock1, POLLIN)
p.register(sock2, POLLIN | POLLOUT)
p.unregister(sock1)

for fd, events in p.poll(3):
    print(f"<socket.socket fd={fd}> is ready with {events}")
```

Like `select.poll`, `winpoll.wsapoll` objects acquire no special resources, thus
have no cleanup requirement (besides plain garbage collection).

## Alternative to `selectors.PollSelector`/`selectors.DefaultSelector`

```python
import sys
from selectors import (
    EVENT_READ, EVENT_WRITE,
    DefaultSelector, SelectSelector
)

if (DefaultSelector is SelectSelector) and (sys.platform == 'win32') and (sys.getwindowsversion() >= (10, 0, 19041)):
    # https://github.com/python/cpython/issues/60711
    from winpoll import WSAPollSelector as DefaultSelector
```

```python
s = DefaultSelector()

s.register(sock1, EVENT_READ)
s.register(sock2, EVENT_READ | EVENT_WRITE)
s.unregister(sock1)

for (sock, _fd, _eventmask, _data), events in s.select(3):
    print(f"{sock} is ready with {events}")
```


# Limitations / Bugs

- Does not work before Windows Vista.

  * Last affected OS: Windows XP ([EOL April 8, 2014](https://learn.microsoft.com/en-us/lifecycle/announcements/windows-xp-office-exchange-2003-end-of-support); not supported by Python 3.7+ anyway.)

- Outbound TCP connections don't correctly report failure-to-connect (`(POLLHUP | POLLERR | POLLWRNORM)`) before Windows 10 version 2004 ("May 2020 Update" / "20H1" / "OS Build 19041").

  * Last affected OS: Windows 10 version 1909 ([EOL May 10, 2022](https://learn.microsoft.com/en-us/lifecycle/announcements/windows-10-1909-enterprise-education-eos).)


# Installation

## Command-line

```cmd
pip install "winpoll ; sys_platform == 'win32'"
```

## `requirements.txt`

```ini
...
winpoll ; sys_platform == 'win32'
```

## `setup.py`
```py
...

setup(
    ...,
    install_requires: [
        ...,
        "winpoll ; sys_platform == 'win32'"
    ]
)
```

## `pyproject.toml`

```toml
[project]
...

dependencies = [
  ...,
  "winpoll ; sys_platform == 'win32'",
]
```
savepip 0.2.0
A tool to install and save clean package dependencies
Requires Python: >=3.6

# SavePip

A tool to intelligently install and save clean package dependencies for both pip and conda environments.

## Installation

```bash
pip install savepip
```

## Usage
```bash
# Install packages with pip
savepip install pandas numpy

# Install packages with conda
savepip -m conda numpy pandas

# Save current environment
savepip save

# Upgrade packages
savepip -u requests pandas

# Save to custom file
savepip -o custom_requirements.txt requests pandas
```

## Features

- **Smart Dependency Management**: Tracks installed packages in a memory file for future reference
- **Requirements.txt Preservation**: Maintains packages in requirements.txt even if not in memory
- **Selective Package Tracking**: Only includes packages explicitly installed with savepip or already in requirements.txt
- **Synchronization**: Automatically syncs memory with requirements.txt content
- **Clean Output**: Removes build hashes, development versions, and unnecessary information
- **Package Manager Support**: Works with both pip and conda environments
- **Alphabetical Sorting**: Dependencies are sorted alphabetically for readability

## How It Works

SavePip maintains a memory of installed packages in `.savepip/memory.json` and uses this to:

1. Track packages explicitly installed with savepip
2. Preserve packages already in requirements.txt
3. Update package versions when they change
4. Generate clean requirements files

Unlike `pip freeze`, savepip only includes packages you've specifically chosen to track, avoiding bloated requirements files with unnecessary dependencies.

## Category Management

SavePip supports organizing packages into categories, allowing you to manage different sets of dependencies for different purposes:

```bash
# Create a new category
savepip mk-category dev

# Switch to a category
savepip use-category dev

# Show current category
savepip cur-category

# List all categories
savepip ls-category

# Install packages to the current category
savepip install pytest coverage

# Save dependencies from specific categories
savepip save --categories dev,prod
```

This feature is useful for managing different types of dependencies (e.g., development, production, testing) within the same project.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Contribution

We welcome contributions! Feel free to submit issues or pull requests.