Compare commits

..

4048 Commits
v1.0.3 ... main

Author SHA1 Message Date
dependabot[bot]
dae7ef63b4 Bump https://github.com/astral-sh/ruff-pre-commit (#7616)
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.13) (push) Has been cancelled
Tests / build (macOS-latest, 3.14) (push) Has been cancelled
Tests / build (macOS-latest, 3.14t) (push) Has been cancelled
Tests / build (macOS-latest, 3.15-dev) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.13) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14t) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.15-dev) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.13) (push) Has been cancelled
Tests / build (windows-latest, 3.14) (push) Has been cancelled
Tests / build (windows-latest, 3.14t) (push) Has been cancelled
Tests / build (windows-latest, 3.15-dev) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
Tests / urllib3 1.x (push) Has been cancelled
Type Check / typecheck (3.10) (push) Has been cancelled
Type Check / typecheck (3.14) (push) Has been cancelled
GitHub Actions Security Analysis with zizmor 🌈 / zizmor (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.16.3 to 0.16.4
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.16.3...v0.16.4)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.16.4
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 12:15:52 -06:00
Nate Prewitt
5460f467b0 Update lock-issues.yml to latest dependencies (#7609) 2026-08-24 18:45:57 -06:00
dependabot[bot]
6af0b94158 Bump https://github.com/astral-sh/ruff-pre-commit (#7608)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.16.2 to 0.16.3
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.16.2...v0.16.3)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.16.3
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-24 11:33:15 -06:00
dependabot[bot]
8f8b212de8 Bump https://github.com/astral-sh/ruff-pre-commit (#7606)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.16.1 to 0.16.2
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.16.1...v0.16.2)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.16.2
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-17 13:03:13 -06:00
dependabot[bot]
8068356288 Bump https://github.com/astral-sh/ruff-pre-commit (#7603)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.16.0 to 0.16.1
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.16.0...v0.16.1)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.16.1
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 11:14:26 -05:00
dependabot[bot]
1f6589ec3a Bump https://github.com/astral-sh/ruff-pre-commit (#7598)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.22 to 0.16.0
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.22...v0.16.0)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.16.0
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-03 11:52:44 -06:00
dependabot[bot]
414f0513c3 Bump the actions group with 2 updates (#7596)
Bumps the actions group with 2 updates: [actions/setup-python](https://github.com/actions/setup-python) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action).


Updates `actions/setup-python` from 6.3.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](ece7cb06ca...5fda3b95a4)

Updates `zizmorcore/zizmor-action` from 0.5.2 to 0.6.0
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](71321a20a9...6599ee8b7a)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 11:25:09 -06:00
dependabot[bot]
ded32878c0 Bump https://github.com/astral-sh/ruff-pre-commit (#7597)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.21 to 0.15.22
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.21...v0.15.22)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.22
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 11:18:18 -06:00
dependabot[bot]
69f8484704 Bump the actions group with 3 updates (#7591)
Bumps the actions group with 3 updates: [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/autobuild](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `github/codeql-action/init` from 4.36.0 to 4.37.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](7211b7c807...99df26d4f1)

Updates `github/codeql-action/autobuild` from 4.36.0 to 4.37.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](7211b7c807...99df26d4f1)

Updates `github/codeql-action/analyze` from 4.36.0 to 4.37.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](7211b7c807...99df26d4f1)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: github/codeql-action/autobuild
  dependency-version: 4.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-20 12:41:16 -06:00
dependabot[bot]
b17c61b618 Bump https://github.com/astral-sh/ruff-pre-commit (#7590)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.20 to 0.15.21
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.20...v0.15.21)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.21
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-20 11:55:26 -06:00
dependabot[bot]
f361ead047 Bump https://github.com/astral-sh/ruff-pre-commit (#7562)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.18 to 0.15.20
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.18...v0.15.20)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.20
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-09 08:12:40 -07:00
Yamac
d38495c906 Fix link to AI Policy in CONTRIBUTING.md (#7576) 2026-07-09 08:10:39 -07:00
dependabot[bot]
4c800e9aea Bump actions/setup-python from 6.2.0 to 6.3.0 in the actions group (#7561)
Bumps the actions group with 1 update: [actions/setup-python](https://github.com/actions/setup-python).


Updates `actions/setup-python` from 6.2.0 to 6.3.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](a309ff8b42...ece7cb06ca)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 11:32:29 -06:00
dependabot[bot]
23953c0c87 Bump https://github.com/astral-sh/ruff-pre-commit (#7551)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.17 to 0.15.18
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.17...v0.15.18)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.18
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-29 10:37:19 -07:00
dependabot[bot]
4ed3d1b320 Bump actions/checkout from 6.0.2 to 7.0.0 in the actions group (#7540)
Bumps the actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 6.0.2 to 7.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](de0fac2e45...9c091bb21b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-24 15:47:15 -07:00
dependabot[bot]
d44b67eb55 Bump https://github.com/astral-sh/ruff-pre-commit (#7536)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.16 to 0.15.17
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.16...v0.15.17)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.17
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-24 15:40:29 -07:00
Nate Prewitt
74c56d5ffb Inline pre-commit linting (#7539) 2026-06-24 15:40:12 -07:00
dependabot[bot]
d64b9ad4bf Bump https://github.com/astral-sh/ruff-pre-commit (#7515)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.15 to 0.15.16
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.15...v0.15.16)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.16
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-15 11:12:28 -07:00
Nate Prewitt
6f66281a1d Add hasattr checks for remaining protocol isinstance checks (#7505) 2026-06-09 08:45:59 -07:00
Loïc Pernod
6f205ff422 Fix _encode_files detection for __getattr__-based file wrappers (#7502) 2026-06-08 13:52:51 -07:00
Joren Hammudoglu
661970d171 Disable commonly ignored Pyright linting rules (#7497) 2026-06-08 10:33:26 -07:00
dependabot[bot]
fbd0eb3732 Bump https://github.com/astral-sh/ruff-pre-commit (#7503)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.14 to 0.15.15
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.14...v0.15.15)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.15
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-08 10:04:24 -07:00
Joren Hammudoglu
1190afd14f Add type annotation for Request.hooks (#7498) 2026-06-04 14:43:21 -07:00
Joren Hammudoglu
e50e594529 Improve static typing of 3rd party imports (#7496)
* Add missing `typecheck` dependencies

* Fix static typing of `compat.chardet`

* Remove unused `# type: ignore` comments
2026-06-04 12:20:33 -05:00
dependabot[bot]
3be097d450 Bump https://github.com/astral-sh/ruff-pre-commit (#7493)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.12 to 0.15.14
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.12...v0.15.14)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.14
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-02 17:45:34 -07:00
dependabot[bot]
a634611dd1 Bump github/codeql-action from 4.35.1 to 4.36.0 in the actions group (#7492)
Bumps the actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.35.1 to 4.36.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](c10b8064de...7211b7c807)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-02 17:44:54 -07:00
Ian Stapleton Cordasco
c4367f231b Add AI Policy
The immense influx of low-quality pull requests, many of which are
duplicated tens of times, are creating unnecessary toil. As such, we now
need to spell out what used to be basic, decent, and reasonable open
source behaviour because many are just using LLMs to spam and reputation
farm instead of trying to make meaningful contributions.
2026-05-31 08:35:04 -05:00
aldbr
cd90742ed9 docs: indent continuation line in Session.get :param params: (#7460) 2026-05-18 08:02:35 -07:00
Nate Prewitt
6e83187b8f v2.34.2
Some checks failed
Publish to PyPI / Build dists (push) Has been cancelled
Publish to PyPI / Publish (push) Has been cancelled
Publish to PyPI / Publish to Test PyPI (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.13) (push) Has been cancelled
Tests / build (macOS-latest, 3.14) (push) Has been cancelled
Tests / build (macOS-latest, 3.14t) (push) Has been cancelled
Tests / build (macOS-latest, 3.15-dev) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.13) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14t) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.15-dev) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.13) (push) Has been cancelled
Tests / build (windows-latest, 3.14) (push) Has been cancelled
Tests / build (windows-latest, 3.14t) (push) Has been cancelled
Tests / build (windows-latest, 3.15-dev) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
Tests / urllib3 1.x (push) Has been cancelled
Type Check / typecheck (3.10) (push) Has been cancelled
Type Check / typecheck (3.14) (push) Has been cancelled
2026-05-14 12:21:52 -07:00
Nate Prewitt
84d10f0be8 Move Request.headers back to Mapping (#7441) 2026-05-14 09:16:25 -07:00
Nate Prewitt
b7b549b545 v2.34.1
Some checks failed
Publish to PyPI / Build dists (push) Has been cancelled
Publish to PyPI / Publish (push) Has been cancelled
Publish to PyPI / Publish to Test PyPI (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.13) (push) Has been cancelled
Tests / build (macOS-latest, 3.14) (push) Has been cancelled
Tests / build (macOS-latest, 3.14t) (push) Has been cancelled
Tests / build (macOS-latest, 3.15-dev) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.13) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14t) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.15-dev) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.13) (push) Has been cancelled
Tests / build (windows-latest, 3.14) (push) Has been cancelled
Tests / build (windows-latest, 3.14t) (push) Has been cancelled
Tests / build (windows-latest, 3.15-dev) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
Tests / urllib3 1.x (push) Has been cancelled
Type Check / typecheck (3.10) (push) Has been cancelled
Type Check / typecheck (3.14) (push) Has been cancelled
2026-05-13 12:17:24 -07:00
Nate Prewitt
e511bc7277 Fix mutability issues with headers input types (#7431) 2026-05-13 12:16:50 -07:00
Nate Prewitt
5691f59613 Update JsonType containers to read-based collections (#7436) 2026-05-13 08:43:16 -06:00
Nate Prewitt
2144213c30 Constrain Response.reason to str (#7437) 2026-05-13 08:42:42 -06:00
Kaeun Kim
6404f345e5 Fix prepare_body stream detection for __getattr__-based file wrappers (#7433)
---------

Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
2026-05-12 10:51:01 -07:00
Nate Prewitt
0b401c76b6 v2.34.0
Some checks failed
Publish to PyPI / Build dists (push) Has been cancelled
Publish to PyPI / Publish (push) Has been cancelled
Publish to PyPI / Publish to Test PyPI (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.13) (push) Has been cancelled
Tests / build (macOS-latest, 3.14) (push) Has been cancelled
Tests / build (macOS-latest, 3.14t) (push) Has been cancelled
Tests / build (macOS-latest, 3.15-dev) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.13) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14t) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.15-dev) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.13) (push) Has been cancelled
Tests / build (windows-latest, 3.14) (push) Has been cancelled
Tests / build (windows-latest, 3.14t) (push) Has been cancelled
Tests / build (windows-latest, 3.15-dev) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
Tests / urllib3 1.x (push) Has been cancelled
Type Check / typecheck (3.10) (push) Has been cancelled
Type Check / typecheck (3.14) (push) Has been cancelled
2026-05-11 12:24:57 -07:00
Nate Prewitt
86b378d3f6 Align Session.get parameters with requests.get (#7429) 2026-05-11 12:24:34 -07:00
Nate Prewitt
a4f9a5999b Port bpo-39057 to Requests (#7427) 2026-05-11 12:24:21 -07:00
Nate Prewitt
3816cfa1ab Parameterize SupportsItems to handle Mapping key invariance (#7426) 2026-05-11 10:33:17 -07:00
Sebastian Meyer
b684dcb9bb sessions: fix hooks type (#7425) 2026-05-11 09:14:13 -07:00
Nate Prewitt
dc9dbdfb34 Formalize 3.15 support (#7422) 2026-05-10 19:05:34 -07:00
Nate Prewitt
25340ebad0 Clear proxy env vars before every test run (#7423) 2026-05-10 19:05:15 -07:00
typhon8
fd628095d7 Preserve leading slashes in request path_url (#7315)
---------

Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
2026-05-10 14:41:25 -07:00
eggsort
e8d2c015ee docs: Fix missing hook output in docs example (#7421) 2026-05-09 12:51:50 -06:00
Nate Prewitt
eb173bc819 Add 3.14t support to CI (#7419) 2026-05-08 13:18:00 -07:00
Nate Prewitt
d60f4773b1 Cleanup remaining http:// reference URIs 2026-05-07 16:27:46 -06:00
Joshua Kothapalle
f64a0d782b docs: update stale Sphinx link in contributing guide 2026-05-07 16:27:46 -06:00
dependabot[bot]
04d750509b Bump https://github.com/astral-sh/ruff-pre-commit (#7411)
Bumps the pre-commit group with 1 update: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit).


Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.11 to 0.15.12
- [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases)
- [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.11...v0.15.12)

---
updated-dependencies:
- dependency-name: https://github.com/astral-sh/ruff-pre-commit
  dependency-version: 0.15.12
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-04 14:42:06 -07:00
Nate Prewitt
f7822f7c41 v2.34.0.dev1
Some checks failed
Lint code / lint (push) Has been cancelled
Publish to PyPI / Build dists (push) Has been cancelled
Publish to PyPI / Publish (push) Has been cancelled
Publish to PyPI / Publish to Test PyPI (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.13) (push) Has been cancelled
Tests / build (macOS-latest, 3.14) (push) Has been cancelled
Tests / build (macOS-latest, 3.15-dev) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.13) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.15-dev) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.13) (push) Has been cancelled
Tests / build (windows-latest, 3.14) (push) Has been cancelled
Tests / build (windows-latest, 3.15-dev) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
Tests / urllib3 1.x (push) Has been cancelled
Type Check / typecheck (3.10) (push) Has been cancelled
Type Check / typecheck (3.14) (push) Has been cancelled
2026-05-03 12:51:27 -07:00
Nate Prewitt
561e4b6889 Add inline types to Requests (#7272) 2026-05-03 12:38:48 -07:00
Nate Prewitt
8f6cda9969 Add tests for hasattr/getattr usage on LookupDict (#7401) 2026-04-30 10:05:37 -07:00
Dimitri Papadopoulos Orfanos
27e0981962 Fix remaining typos (#7395) 2026-04-30 07:35:13 -07:00
Dimitri Papadopoulos Orfanos
6ec76b4a36 Ruff rule UP038 has been removed (#7393) 2026-04-27 08:08:18 -07:00
dependabot[bot]
f43f750ee1 Bump https://github.com/astral-sh/ruff-pre-commit (#7390) 2026-04-24 08:19:25 -06:00
Nate Prewitt
9450dd51fb Create groups for GHA and pre-commit dependabot PRs (#7387) 2026-04-24 05:52:01 -05:00
Nate Prewitt
93bf5331a7 Update index.rst to match README info (#7386) 2026-04-23 13:53:48 -07:00
dependabot[bot]
79f4df84cf Bump pypa/gh-action-pypi-publish from 1.13.0 to 1.14.0 (#7378)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](ed0c53931b...cef221092e)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-version: 1.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 12:32:32 -07:00
Dejan SANADER
b294b08fe3 Consider urllib3 version has 3 numbers at most (#7375) (#7376) 2026-04-20 09:24:32 -07:00
Christian Clauss
5f3ff9b9e4 Fix typos discovered by codespell (#7371) 2026-04-19 11:34:20 -07:00
Nate Prewitt
514c1623fe Update README and remove extraneous images (#7366) 2026-04-15 11:30:57 -07:00
Chris Riches
d2f6bdecc8 Clarify decode_unicode behaviour in iter_{content,lines} docstrings (#7365) 2026-04-15 08:06:46 -07:00
Nate Prewitt
a044b020de Move DigestAuth hash algorithms to use usedforsecurity=False (#7310) 2026-04-15 07:56:38 -07:00
Nate Prewitt
16df2a0917 Move pytest pin to support 9.x series (#7364) 2026-04-14 20:04:46 -07:00
Nate Prewitt
fe2063be0c Don't hide navigation on mobile webpage (#7360) 2026-04-14 10:58:28 -07:00
Nate Prewitt
4b0b1a3e9f Update pre-commit versions (#7348)
* Update pre-commit versions

* Add dependabot entry for pre-commit

* Update pre-commit and ruff hooks
2026-04-11 19:05:37 -05:00
Nate Prewitt
185f587a78 Cleanup docs and add i18n wrappers (#7354) 2026-04-11 13:39:24 -06:00
Nate Prewitt
ef439eb779 Prevent Response self-reference in redirect history (#7328) 2026-04-05 08:31:02 -07:00
Nate Prewitt
cbce031327 Add Zizmor workflow and make initial updates 2026-03-31 21:28:16 -05:00
dependabot[bot]
6360477c52 Bump github/codeql-action from 4.34.1 to 4.35.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.34.1 to 4.35.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3869755554...c10b8064de)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 12:33:02 -06:00
Nate Prewitt
111d2b7779 v2.33.1
Some checks failed
Lint code / lint (push) Has been cancelled
Publish to PyPI / Build dists (push) Has been cancelled
Publish to PyPI / Publish (push) Has been cancelled
Publish to PyPI / Publish to Test PyPI (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.13) (push) Has been cancelled
Tests / build (macOS-latest, 3.14) (push) Has been cancelled
Tests / build (macOS-latest, 3.15-dev) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.13) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.15-dev) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.13) (push) Has been cancelled
Tests / build (windows-latest, 3.14) (push) Has been cancelled
Tests / build (windows-latest, 3.15-dev) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
Tests / urllib3 1.x (push) Has been cancelled
2026-03-30 09:07:00 -07:00
Nate Prewitt
f0198e6dfc Fix malformed value parsing for Content-Type (#7309) 2026-03-30 08:27:35 -07:00
Nate Prewitt
bc7dd0fc4d Fix cosmetic header validity parsing regex (#7308) 2026-03-30 08:24:49 -07:00
Nate Prewitt
4443b1a847 Fix unintended test extra (#7306) 2026-03-30 08:23:00 -07:00
Nate Prewitt
389eea58df Cleanup extracted file after extract_zipped_path test (#7305) 2026-03-30 08:21:38 -07:00
Frank Dana
7407309c8a Packaging: DRY out extras definition (#7277) 2026-03-29 21:07:31 -07:00
Nate Prewitt
bc04dfd6da v2.33.0
Some checks failed
Lint code / lint (push) Has been cancelled
Publish to PyPI / Build dists (push) Has been cancelled
Publish to PyPI / Publish (push) Has been cancelled
Publish to PyPI / Publish to Test PyPI (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.13) (push) Has been cancelled
Tests / build (macOS-latest, 3.14) (push) Has been cancelled
Tests / build (macOS-latest, 3.15-dev) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.13) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.15-dev) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.13) (push) Has been cancelled
Tests / build (windows-latest, 3.14) (push) Has been cancelled
Tests / build (windows-latest, 3.15-dev) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
Tests / urllib3 1.x (push) Has been cancelled
2026-03-25 08:06:17 -07:00
Nate Prewitt
66d21cb07b Merge commit from fork 2026-03-25 07:57:56 -07:00
Nate Prewitt
8b9bc8fc0f Move badges to top of README (#7293) 2026-03-25 05:18:38 +00:00
Nate Prewitt
e331a288f3 Remove unused extraction call (#7292) 2026-03-24 22:15:21 -07:00
rohan436
753fd08c5e docs: fix FAQ grammar in httplib2 example
Signed-off-by: rohan436 <rohan.santhoshkumar@googlemail.com>
2026-03-24 19:36:48 -06:00
Magsen (CD)
774a0b837a docs(socks): same block as other sections
strange formatting:
https://docs.python-requests.org/en/latest/user/advanced/#socks
2026-03-24 19:26:47 -06:00
dependabot[bot]
9c72a41bec Bump github/codeql-action from 4.33.0 to 4.34.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.33.0 to 4.34.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b1bff81932...3869755554)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.34.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-23 11:43:09 -06:00
dependabot[bot]
ebf7190679 Bump github/codeql-action from 4.32.0 to 4.33.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.0 to 4.33.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b20883b0cd...b1bff81932)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-19 12:44:23 -06:00
Dr Alex Mitre
0e4ae38f0c docs: exclude Response.is_permanent_redirect from API docs (#7244)
Hide the internal Response.is_permanent_redirect attribute from public API documentation.
2026-03-05 13:14:29 -07:00
Ethan Price
d568f47278 docs: clarify Quickstart POST example (#6960)
(fixes #6949)

---------

Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
2026-03-03 12:59:47 -07:00
Dan Blanchard
b2a1d33f57 Increase chardet upper limit to 8
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:46:41 -07:00
dependabot[bot]
392b01f26e Bump actions/download-artifact from 7.0.0 to 8.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](37930b1c2a...70fc10c6e5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 13:45:19 -07:00
dependabot[bot]
27f8b40d5c Bump actions/upload-artifact from 6.0.0 to 7.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](b7c566a772...bbbca2ddaa)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 13:33:25 -07:00
Amin Vakil
4bd79e3973 Increase chardet upper limit to 7 2026-02-22 16:02:37 -06:00
Nate Prewitt
da9113c046 Add CODEOWNERS file to repo (#7208) 2026-02-13 18:06:57 -06:00
Nate Prewitt
a2ce3d8ace Remove harden runner from publish workflow (#7207) 2026-02-13 16:48:20 -06:00
Nate Prewitt
5e7cb71cd7 Bump version to dev for test publish 2026-02-13 13:23:44 -07:00
Nate Prewitt
00600b38f4 Update publish workflow and add test pypi option 2026-02-13 13:23:44 -07:00
m0d3v
5f338446f9 Update docstring for Session.verify to include string support (#6859) (#6865)
---------

Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
2026-02-12 19:52:04 -07:00
Nate Prewitt
47914226c2 Fix empty netrc entry usage (#7205) 2026-02-12 19:07:05 -07:00
Nate Prewitt
1b40fdd004 Merge pull request #7200 from psf/dependabot/github_actions/step-security/harden-runner-2.14.2
Bump step-security/harden-runner from 2.13.0 to 2.14.2
2026-02-10 17:29:35 -07:00
dependabot[bot]
514b3f2345 Bump step-security/harden-runner from 2.13.0 to 2.14.2
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.0 to 2.14.2.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](ec9f2d5744...5ef0c079ce)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.14.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-11 00:23:00 +00:00
Nate Prewitt
dedee0f456 Merge pull request #7199 from psf/dependabot/github_actions/dessant/lock-threads-6.0.0
Bump dessant/lock-threads from 5.0.0 to 6.0.0
2026-02-10 17:22:16 -07:00
dependabot[bot]
7112775514 Bump dessant/lock-threads from 5.0.0 to 6.0.0
Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/dessant/lock-threads/releases)
- [Changelog](https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md)
- [Commits](d42e5f4980...7266a7ce5c)

---
updated-dependencies:
- dependency-name: dessant/lock-threads
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-10 23:59:55 +00:00
Nate Prewitt
733b2018a3 Update floors for certifi and urllib3 (#7189) 2026-02-10 16:36:31 -07:00
Nate Prewitt
0c2bbe7398 Drop support for Python 3.9 (#7196) 2026-02-06 08:02:46 -07:00
Nate Prewitt
32e26af3af Start testing Python 3.15 Alpha (#7195)
* Add optional 3.15-dev runners to test matrix

* Set PYO3_USE_ABI3_FORWARD_COMPATIBILITY for 3.15 builds
2026-02-04 19:01:16 -06:00
Nate Prewitt
421b8733cf Merge pull request #7101 from psf/dependabot/github_actions/github/codeql-action-4.31.6
Bump github/codeql-action from 4.30.8 to 4.31.6
2026-01-30 20:01:53 -07:00
dependabot[bot]
968863678b Bump github/codeql-action from 4.30.8 to 4.31.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.30.8 to 4.31.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f443b600d9...fe4161a26a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 20:00:02 -07:00
Nate Prewitt
0b950d8e97 Merge pull request #7100 from psf/dependabot/github_actions/actions/setup-python-6.1.0
Bump actions/setup-python from 6.0.0 to 6.1.0
2026-01-30 19:59:20 -07:00
dependabot[bot]
42eaeb4da8 Bump actions/setup-python from 6.0.0 to 6.1.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](e797f83bcb...83679a892e)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 19:53:54 -07:00
Nate Prewitt
49f8968867 Merge pull request #7092 from psf/dependabot/github_actions/actions/checkout-6.0.0
Bump actions/checkout from 5.0.0 to 6.0.0
2026-01-30 19:47:47 -07:00
dependabot[bot]
8e398336f8 Bump actions/checkout from 5.0.0 to 6.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08c6903cd8...1af3b93b68)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 19:46:03 -07:00
Nate Prewitt
5f33bddabd Merge pull request #7073 from psf/dependabot/github_actions/actions/download-artifact-6.0.0
Bump actions/download-artifact from 5.0.0 to 6.0.0
2026-01-30 19:45:13 -07:00
dependabot[bot]
ca78ca9611 Bump actions/download-artifact from 5.0.0 to 6.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](634f93cb29...018cc2cf5b)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 19:38:25 -07:00
Nate Prewitt
8e5ac8e0eb Merge pull request #7071 from psf/dependabot/github_actions/actions/upload-artifact-5.0.0
Bump actions/upload-artifact from 4.6.2 to 5.0.0
2026-01-30 19:36:42 -07:00
dependabot[bot]
6c88b6b09f Bump actions/upload-artifact from 4.6.2 to 5.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 5.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](ea165f8d65...330a01c490)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-31 02:31:13 +00:00
Nate Prewitt
cb2c800518 Migrate build system to PEP 517 (#7012) 2026-01-30 19:25:55 -07:00
Nate Prewitt
a389aaad45 Update maintainers in the AUTHORS.rst (#7191)
---------

Co-authored-by: Ian Stapleton Cordasco <graffatcolmingov@gmail.com>
2026-01-30 19:12:40 -07:00
Nate Prewitt
f8bec2f7ca Fix CI and build failures (#7190)
* Migrate linting from various tooling to Ruff

* Run ruff over codebase

* Drop support for pypy-3.10
2026-01-30 15:10:27 -06:00
Nate Prewitt
7029833289 Merge pull request #7042 from psf/dependabot/github_actions/github/codeql-action-4.30.8 2025-10-15 20:45:42 +09:00
dependabot[bot]
6e4134b204 Bump github/codeql-action from 3.30.0 to 4.30.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.0 to 4.30.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2d92b76c45...f443b600d9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.30.8
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 16:16:05 +00:00
Nate Prewitt
420d16bc7e Merge pull request #7026 from psf/dependabot/github_actions/actions/setup-python-6.0.0 2025-09-09 18:00:19 +09:00
dependabot[bot]
3c8decb92f Bump actions/setup-python from 5.6.0 to 6.0.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.6.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](a26af69be9...e797f83bcb)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 00:09:47 +00:00
Nate Prewitt
5a270e2a95 Merge pull request #7025 from psf/dependabot/github_actions/pypa/gh-action-pypi-publish-1.13.0 2025-09-09 09:08:49 +09:00
dependabot[bot]
7d8df1df57 Bump pypa/gh-action-pypi-publish from 1.12.4 to 1.13.0
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.12.4 to 1.13.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](76f52bc884...ed0c53931b)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-version: 1.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 16:18:37 +00:00
dependabot[bot]
1c49660b84 Bump github/codeql-action from 3.29.0 to 3.30.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.0 to 3.30.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ce28f5bb42...2d92b76c45)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-02 03:15:01 -05:00
Nate Prewitt
b25c87d7cb v2.32.5
Some checks failed
Lint code / lint (push) Has been cancelled
Publish to PyPI / Build dists (push) Has been cancelled
Publish to PyPI / provenance (push) Has been cancelled
Publish to PyPI / Publish (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.13) (push) Has been cancelled
Tests / build (macOS-latest, 3.14-dev) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.10) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.13) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.14-dev) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.13) (push) Has been cancelled
Tests / build (windows-latest, 3.14-dev) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.10) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
Tests / urllib3 1.x (push) Has been cancelled
2025-08-18 13:23:20 -07:00
Nate Prewitt
131e506079 Merge pull request #7010 from psf/dependabot/github_actions/actions/checkout-5.0.0
Bump actions/checkout from 4.2.0 to 5.0.0
2025-08-11 15:32:16 -07:00
dependabot[bot]
b336cb2bc6 Bump actions/checkout from 4.2.0 to 5.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.0 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.2.0...08c6903cd8c0fde910a37f88322edcfb5dd907a8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 22:15:22 +00:00
Grant Birkinbine
46e939b552 Update publish workflow to use artifact-id instead of name
Added artifact-id output to publish workflow and updated download-artifact action version to `v5.0.0`. Also hardens the workflow a bit by adding `persist-credentials: false` to the checkout step
2025-08-06 07:36:19 -05:00
Nate Prewitt
4b9c546aa3 Merge pull request #6999 from psf/dependabot/github_actions/step-security/harden-runner-2.13.0
Bump step-security/harden-runner from 2.12.0 to 2.13.0
2025-07-28 12:09:42 -07:00
dependabot[bot]
7618dbef01 Bump step-security/harden-runner from 2.12.0 to 2.13.0
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.12.0 to 2.13.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](0634a2670c...ec9f2d5744)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 19:01:25 +00:00
Nate Prewitt
2edca11103 Add support for Python 3.14 and drop support for Python 3.8 (#6993)
* Add testing for Python 3.14 preview build

* Add trove classifier for Python 3.14

* Remove support for Python 3.8
2025-07-25 14:42:15 -06:00
Abhishek Jha
fec96cd597 Update Makefile rules (#6996) 2025-07-18 10:24:31 -06:00
Quaylyn Rimer
d58d8aa2f4 docs: clarify timeout parameter uses seconds in Session.request (#6994) 2025-07-18 02:09:19 +00:00
dependabot[bot]
91a3eabd3d Bump github/codeql-action from 3.28.5 to 3.29.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.5 to 3.29.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f6091c0113...ce28f5bb42)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-16 14:10:36 -05:00
Nate Prewitt
90fee0876a Revert caching a default SSLContext (#6767) 2025-06-13 10:42:08 -06:00
AHMAD FAIZ
8ff173b186 Clarify error description in cloning instructions
This clarifies the error description in the 'Cloning the repository' section of the README. The current wording mentions 'an error about a bad commit', which is somewhat vague. I've updated it to 'an error about a bad commit timestamp', which more accurately describes the nature of the error referenced in issue #2690.
This small change improves the clarity of the documentation, helping users better understand the potential issue they might encounter when cloning the repository and why they need to use the specified Git flag.
2025-06-10 07:40:33 -05:00
Jonas Fonseca
3f07f990ac Fix typo in documentation for verify 2025-06-09 21:54:25 -05:00
Ian Stapleton Cordasco
e57b5bf05c Add Trusted Publishing Release Workflow
Rather than rely on manual releases from a developer laptop, let's use
tag pushes to trigger a workflow to publish artifacts to PyPI. This will
leverage trusted publishing and upload attestations as well.
2025-06-09 21:32:45 -05:00
Ian Stapleton Cordasco
021dc729f0 Polish up release tooling for last manual release
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.13) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.10) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.13) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.13) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.10) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
Tests / urllib3 1.x (push) Has been cancelled
2025-06-09 11:39:48 -05:00
Ian Stapleton Cordasco
821770e822 Bump version and add release notes for v2.32.4 2025-06-09 11:39:48 -05:00
Piotr Szlazak
59f8aa2adf Add netrc file search information to authentication documentation (#6876) 2025-06-08 12:47:55 -05:00
Arthur Woimbée
5b4b64c346 Add more tests to prevent regression of CVE 2024 47081
Remove workaround not needed since py38 for os.path.expanduser.
2025-06-05 09:55:33 -05:00
danigm
7bc45877a8 Add new test to check netrc auth leak (#6962)
This patch adds a new test that reproduces the security issue reported
here:
https://seclists.org/oss-sec/2025/q2/204

Doing a request to a malicious url with a prefix like "domain.com:@"
will use the "domain.com" netrc credentials in the request to other
domain.
2025-06-05 06:21:46 -05:00
Nate Prewitt
96ba401c12 Only use hostname to do netrc lookup instead of netloc 2025-06-04 10:39:25 -05:00
Nate Prewitt
7341690e84 Merge pull request #6951 from tswast/patch-1 2025-06-01 11:07:17 -07:00
Tim Sweña
6716d7c9f2 remove links 2025-06-01 09:03:51 -05:00
Ian Stapleton Cordasco
a7e1c745dc Update docs/conf.py
Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
2025-05-31 11:59:51 -05:00
Tim Sweña (Swast)
c799b8167a docs: fix dead links to kenreitz.org 2025-05-21 11:08:05 -05:00
Robin
c65c780849 Add two more tests exercising the adapter (#6936)
Closes #6935
2025-05-03 11:39:14 -05:00
Nate Prewitt
579cd9f233 Drop pypy 3.9 and add pypy 3.11 support 2025-05-01 21:54:57 -05:00
Nate Prewitt
c54d0347e2 Merge pull request #6939 from psf/dependabot/github_actions/actions/setup-python-5.6.0 2025-04-28 10:36:20 -07:00
dependabot[bot]
991f05dcd9 Bump actions/setup-python from 5.5.0 to 5.6.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.5.0 to 5.6.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](8d9ed9ac5c...a26af69be9)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 17:28:05 +00:00
Robin
4ce9520a1c Update lint workflow to ubuntu-24.04
Ubuntu 20.04 was the old default and is no longer supported by GitHub Actions
2025-04-23 07:44:05 -05:00
Ian Stapleton Cordasco
42a1dd640c Merge pull request #6924 from RichieB2B/rfc5280
Add key usage extension to test ca.crt
2025-04-15 21:46:50 -05:00
Nate Prewitt
c4c8e20289 Merge pull request #6925 from psf/dependabot/github_actions/actions/setup-python-5.5.0
Bump actions/setup-python from 5.4.0 to 5.5.0
2025-03-31 09:43:07 -07:00
dependabot[bot]
a5cb4284e1 Bump actions/setup-python from 5.4.0 to 5.5.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](42375524e2...8d9ed9ac5c)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 16:31:10 +00:00
Richard van den Berg
2019450b43 Add key usage extension to test ca.crt 2025-03-29 14:53:45 +01:00
Nate Prewitt
1764cc938e Merge pull request #6899 from duzhuoshanwai/main
Docs: Add quotes to prevent Zsh wildcard interpretation.
2025-02-20 10:43:13 -08:00
duzhuoshanwai
e946665c59 Update advanced.rst
Add quotes to prevent Zsh wildcard interpretation.
2025-02-19 10:05:28 +08:00
Ian Stapleton Cordasco
8ba805fa93 Merge pull request #6897 from cjwatson/fix-test-certificates
Add CA constraint to test CA
2025-02-17 06:40:19 -06:00
Colin Watson
9ebebdef98 Regenerate test certificates
Created using the following command with OpenSSL 3.4.0:

    for cert in expired mtls valid/server; do
        make -C tests/certs/$cert clean all
    done
2025-02-17 00:41:30 +00:00
Colin Watson
5074096613 Add CA constraint to test CA
Otherwise recent versions of OpenSSL reject it as an invalid CA
certificate (at least once the test certificates are regenerated).

Fixes: #6896
2025-02-17 00:39:07 +00:00
Nate Prewitt
1b7c37ef4e Merge pull request #6529 from anupam-arista/patch-1 2025-02-13 08:49:49 -08:00
anupam-arista
5d31ddbf7b Update src/requests/models.py
Co-authored-by: Ian Stapleton Cordasco <graffatcolmingov@gmail.com>
2025-02-12 17:58:07 +05:30
anupam-arista
a2fd25ff34 Update models.py 2025-02-11 21:28:59 +05:30
anupam-arista
d96f9982a2 Update src/requests/models.py
Co-authored-by: Ian Stapleton Cordasco <graffatcolmingov@gmail.com>
2025-02-11 21:25:29 +05:30
anupam-arista
b25f2b5ec2 Merge branch 'psf:main' into patch-1 2025-02-11 07:49:26 +05:30
Nate Prewitt
f761e74a4d Merge pull request #6880 from jakobheine/td/remove-urlrequired-from-docs
docs(exceptions): Remove unused exception URLRequired from documentation
2025-02-10 13:13:26 -08:00
Nate Prewitt
f2a6ae5e32 Merge pull request #6883 from psf/dependabot/github_actions/actions/setup-python-5.4.0
Bump actions/setup-python from 5.3.0 to 5.4.0
2025-02-03 08:58:57 -08:00
dependabot[bot]
11f63a330b Bump actions/setup-python from 5.3.0 to 5.4.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](0b93645e9f...42375524e2)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 16:27:40 +00:00
jakobheine
e361622fae docs(exceptions): Remove unused exception URLRequired from documentation
The documentation previously listed `requests.URLRequired` as a valid
exception, suggesting it would be raised for invalid URLs. However,
this exception has been dead code since commit ab27027 (2012) and is
never actually raised.

Instead, invalid URLs raise `MissingSchema`, `InvalidSchema`, or
`InvalidURL`, none of which were documented. This commit removes
`URLRequired` from the documentation to reflect the actual behavior
and prevent confusion.

Signed-off-by: jakobheine <me@jakobheine.de>
2025-02-01 19:42:06 +00:00
Nate Prewitt
fe0583ba49 Merge pull request #6875 from psf/dependabot/github_actions/github/codeql-action-3.28.5
Bump github/codeql-action from 3.27.0 to 3.28.5
2025-01-27 09:39:35 -08:00
dependabot[bot]
8c36da656d Bump github/codeql-action from 3.27.0 to 3.28.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.0 to 3.28.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](662472033e...f6091c0113)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 16:56:12 +00:00
anupam-arista
b653d80ded Merge branch 'psf:main' into patch-1 2024-12-13 05:08:45 +05:30
Ian Stapleton Cordasco
23540c93ca Merge pull request #6824 from psf/nateprewitt-patch-1
Remove old macOS runners
2024-11-10 10:18:36 -06:00
Nate Prewitt
ad959acfcf Remove old macOS runners 2024-11-09 22:50:30 -07:00
Nate Prewitt
a6cf27a77f Update vulnerability disclosure process (#6820)
* Update contact point for Vulnerability disclosures

* Fix RedHat Contact

* Point vulnerabilities.rst to our .SECURITY file
2024-11-02 13:13:02 -07:00
Nate Prewitt
ed0b1b5802 Merge pull request #6817 from psf/dependabot/github_actions/actions/setup-python-5.3.0
Bump actions/setup-python from 5.2.0 to 5.3.0
2024-10-28 10:24:23 -06:00
Nate Prewitt
1f16cffa43 Merge pull request #6818 from psf/dependabot/github_actions/github/codeql-action-3.27.0
Bump github/codeql-action from 3.26.0 to 3.27.0
2024-10-28 10:24:12 -06:00
dependabot[bot]
9787d0c09c Bump github/codeql-action from 3.26.0 to 3.27.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.0 to 3.27.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](eb055d739a...662472033e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 16:05:20 +00:00
dependabot[bot]
26664fa578 Bump actions/setup-python from 5.2.0 to 5.3.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](f677139bbe...0b93645e9f)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 16:05:11 +00:00
Nate Prewitt
7335bbf480 Merge pull request #6803 from psf/dependabot/github_actions/actions/checkout-4.2.0
Bump actions/checkout from 4.1.0 to 4.2.0
2024-09-30 10:32:21 -07:00
dependabot[bot]
0bff2d94e6 Bump actions/checkout from 4.1.0 to 4.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8ade135a41...d632683dd7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 16:34:20 +00:00
Ian Stapleton Cordasco
1ae6fc3137 Merge pull request #6802 from graingert/3.13
start testing on 3.13rc
2024-09-19 06:19:03 -05:00
Thomas Grainger
5984296b6a Update tox.ini 2024-09-18 19:40:02 +01:00
Thomas Grainger
f519bbae33 add trove classifier for 3.13 2024-09-18 19:14:19 +01:00
Thomas Grainger
314e7c9c70 upgrade to pytest-httpbin 2.1.0 final 2024-09-18 16:36:43 +01:00
Thomas Grainger
92f10cec5b upgrade to pytest-httpbin 2.1.0rc1 2024-09-18 15:04:53 +01:00
Thomas Grainger
83e67c4485 use allow-prereleases: true instead of 3.13-dev 2024-09-18 15:04:08 +01:00
Thomas Grainger
0f5ef1be8c Merge branch 'main' of github.com:psf/requests into 3.13 2024-09-18 15:03:08 +01:00
Nate Prewitt
f12ccbef6d Merge pull request #6797 from psf/dependabot/github_actions/actions/setup-python-5.2.0 2024-09-02 10:37:44 -07:00
dependabot[bot]
173890a48e Bump actions/setup-python from 5.1.0 to 5.2.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](82c7e631bb...f677139bbe)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 16:56:26 +00:00
Nate Prewitt
a3ce6f0075 Merge pull request #6787 from psf/dependabot/github_actions/github/codeql-action-3.26.0
Bump github/codeql-action from 3.25.0 to 3.26.0
2024-08-12 09:54:11 -07:00
dependabot[bot]
877892e67e Bump github/codeql-action from 3.25.0 to 3.26.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.0 to 3.26.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](df5a14dc28...eb055d739a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 16:23:16 +00:00
Nate Prewitt
79b74ef704 Merge pull request #6757 from nateprewitt/urllib-1.x-tests 2024-07-29 18:44:13 -07:00
Branch Vincent
15e1f17bb6 remove setuptools test command 2024-07-29 08:49:17 -05:00
Nate Prewitt
01353d3b4a Invert major version check 2024-07-23 04:28:03 -07:00
Nate Prewitt
4e383642a9 Add conditional string encoding based on urllib3 major version 2024-07-18 10:20:38 -07:00
Nate Prewitt
f8aa36b92d Test on urllib3 1.26.x 2024-07-01 18:08:04 -07:00
anupam-arista
06d2a38441 Merge branch 'psf:main' into patch-1 2024-07-01 10:46:41 +05:30
Nate Prewitt
0e322af877 v2.32.3
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.10) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.9) (push) Has been cancelled
Tests / build (macos-13, 3.8) (push) Has been cancelled
Tests / build (macos-13, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.9) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.10) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.9) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
2024-05-29 08:36:10 -07:00
Nate Prewitt
e188799322 Don't create default SSLContext if ssl module isn't present (#6724) 2024-05-29 08:23:39 -07:00
Nate Prewitt
145b539948 Merge pull request #6716 from sigmavirus24/bug/6715 2024-05-24 14:37:06 -07:00
Nate Prewitt
b1d73ddb50 Don't use default SSLContext with custom poolmanager kwargs 2024-05-24 11:38:10 -07:00
Nate Prewitt
6badbac6e0 Update HISTORY.md 2024-05-24 11:38:06 -07:00
Nate Prewitt
2e1452234d Start testing on 3.13 beta 2024-05-23 11:51:07 -07:00
Ian Stapleton Cordasco
a62a2d35d9 Allow for overriding of specific pool key params
This re-enables the use case of providing a custom SSLContext via a
Transport Adapter as broken in #6655 and reported in #6715

Closes #6715
2024-05-22 06:53:24 -05:00
Nate Prewitt
88dce9d854 v2.32.2
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.10) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.9) (push) Has been cancelled
Tests / build (macos-13, 3.8) (push) Has been cancelled
Tests / build (macos-13, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.9) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.10) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.9) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
2024-05-21 11:49:22 -07:00
Nate Prewitt
c98e4d133e Merge pull request #6710 from nateprewitt/api_rename
Move _get_connection to get_connection_with_tls_context
2024-05-21 09:41:18 -07:00
Nate Prewitt
92075b330a Add deprecation warning 2024-05-21 09:28:30 -07:00
Nate Prewitt
aa1461b68a Move _get_connection to get_connection_with_tls_context 2024-05-21 05:42:49 -07:00
Nate Prewitt
970e8cec98 v2.32.1
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.10) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.9) (push) Has been cancelled
Tests / build (macos-13, 3.8) (push) Has been cancelled
Tests / build (macos-13, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.9) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.10) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.9) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
2024-05-20 15:02:29 -07:00
Nate Prewitt
d6ebc4a2f1 v2.32.0
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.10) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.9) (push) Has been cancelled
Tests / build (macos-13, 3.8) (push) Has been cancelled
Tests / build (macos-13, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.9) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.10) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.9) (push) Has been cancelled
Tests / No Character Detection (push) Has been cancelled
2024-05-20 08:46:49 -07:00
agubelu
9a40d12778 Avoid reloading root certificates to improve concurrent performance (#6667) 2024-05-15 14:07:26 -06:00
Ian Stapleton Cordasco
0c030f78d2 Merge pull request #6702 from nateprewitt/no_char_detection
Allow optional char detection dependencies in post-packaging
2024-05-14 19:15:19 -05:00
Nate Prewitt
555b870eb1 Allow character detection dependencies to be optional in post-packaging steps 2024-05-14 15:26:04 -07:00
Ian Stapleton Cordasco
d6dded3f00 Merge pull request #6700 from franekmagiera/update-redirect-to-invalid-uri-test
Use an invalid URI that will not cause httpbin to throw 500
2024-05-12 16:33:47 -05:00
franekmagiera
bf24b7d8d1 Use an invalid URI that will not cause httpbin to throw 500 2024-05-12 22:08:24 +02:00
Nate Prewitt
2d5f54779a Pin 3.8 and 3.9 runners back to macos-13 (#6688) 2024-04-23 10:50:19 -07:00
Nate Prewitt
f1bb07d39b Merge pull request #6687 from psf/dependabot/github_actions/github/codeql-action-3.25.0
Bump github/codeql-action from 3.24.0 to 3.25.0
2024-04-15 11:01:39 -06:00
dependabot[bot]
60047ade64 Bump github/codeql-action from 3.24.0 to 3.25.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e8893c57a1...df5a14dc28)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-15 16:40:35 +00:00
Ian Stapleton Cordasco
31ebb8102c Merge pull request #6682 from frenzymadness/pytest8
Fix compatibility with pytest 8
2024-04-11 14:49:35 -05:00
Lumir Balhar
cc23d1c644 Fix compatibility with pytest 8
`pytest.warns(None)` has been deprecated in pytest 7.0.0
and it's no longer working in pytest 8.

Resolves: https://github.com/psf/requests/issues/6679
2024-04-11 21:10:36 +02:00
Nate Prewitt
0790ea4250 Merge pull request #6680 from mbeijen/rfc9110
Add rfc9110 HTTP status code names
2024-04-11 07:10:57 -07:00
Michiel W. Beijen
e45b428960 Add rfc9110 HTTP status code names
RFC 9110 _HTTP Semantics_ obsoletes some earlier RFCs which defined HTTP
1.1. It adds some status codes that were previously only used for
WebDAV to HTTP _proper_ after making the names somewhat more generic.

See https://www.rfc-editor.org/rfc/rfc9110.html#name-changes-from-rfc-7231

This commit adds the http status code names from that RFC.
2024-04-08 21:48:24 +02:00
Nate Prewitt
2a438c27b5 Merge pull request #6677 from psf/dependabot/github_actions/actions/setup-python-5.1.0
Bump actions/setup-python from 5.0.0 to 5.1.0
2024-04-01 10:36:47 -07:00
dependabot[bot]
2daa7b52a7 Bump actions/setup-python from 5.0.0 to 5.1.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](0a5c615913...82c7e631bb)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 17:00:20 +00:00
Ian Stapleton Cordasco
8dd3b26bf5 Merge pull request #6302 from flysee/main
Fix the proxy_bypass_registry function all returning true in some cases.
2024-03-18 16:38:16 -05:00
flysee
13d892bdbe Additional should_bypass_proxies function test cases 2024-03-18 22:33:17 +08:00
flysee
1604e20fc8 Fix the proxy_bypass_registry function all returning true in some cases. 2024-03-18 15:36:36 +08:00
Ian Stapleton Cordasco
eeafb6ab3a Merge pull request #6662 from sigmavirus24/fix-tls-floppy
Add local TLS server
2024-03-14 06:25:24 -05:00
Ian Stapleton Cordasco
a94e9b5308 Add local TLS server
This also adds certificates for testing purposes and files to make it
easy to generate/regenerate them.

This also replaces an existing test of how we utilize our pool manager
such that we don't connect to badssl.com

Finally, this adds additional context parameters for our pool manager to
account for mTLS certificates used by clients to authenticate to a
server.
2024-03-14 06:06:22 -05:00
Ian Stapleton Cordasco
a58d7f2ffb Merge pull request #6655 from sigmavirus24/fix-tls-floppy
Use TLS settings in selecting connection pool
2024-03-11 06:21:59 -05:00
Ian Stapleton Cordasco
c0813a2d91 Use TLS settings in selecting connection pool
Previously, if someone made a request with `verify=False` then made a
request where they expected verification to be enabled to the same host,
they would potentially reuse a connection where TLS had not been
verified.

This fixes that issue.
2024-03-06 11:28:13 -06:00
Ian Stapleton Cordasco
eea3bbf9ac Merge pull request #6562 from amkarn258/issue-6223
every chardet package maps to requests.packages.chardet.* package respectively
2024-02-23 06:26:38 -06:00
Ian Stapleton Cordasco
f3f2611d83 Merge pull request #6583 from EFord36/fix-broken-links
Fix broken links in docs
2024-02-23 05:30:46 -06:00
Elliot Ford
a0e79bad05 update broken rfc link
ietf seems appropriate here - it's used elsewhere in the requets docs in
several places.
2024-02-23 10:26:21 +00:00
Elliot Ford
0a7f662aa7 Make example URL format a literal rather than an actual link
The rendered docs 'auto-link' this, which might encourage users to click
the link, even though it doesn't go anywhere.
2024-02-23 10:26:21 +00:00
Elliot Ford
5f1c3c22ff remove section with broken link to survey 2024-02-23 10:26:21 +00:00
Elliot Ford
541aa80ca3 update urllib3 docs link 2024-02-23 10:26:21 +00:00
Elliot Ford
d3b3399ece update authors github link
Update account link for original author which has changed.
2024-02-23 10:25:50 +00:00
Elliot Ford
0ec2780c29 update broken github pagination link 2024-02-23 10:25:50 +00:00
Ian Stapleton Cordasco
b8be93a721 Merge pull request #6589 from bruceadams/super_len_str_utf-8
Enhance `super_len` to count encoded bytes for str
2024-02-22 18:53:25 -06:00
Ian Stapleton Cordasco
3587a5f869 Merge pull request #6644 from sigmavirus24/bug/6643
Trim excess leading path separators
2024-02-22 18:49:42 -06:00
Ian Stapleton Cordasco
60389df6d6 Trim excess leading path separators
A URL with excess leading / (path-separator)s would cause urllib3 to
attempt to reparse the request-uri as a full URI with a host and port.
This bypasses that logic in ConnectionPool.urlopen by replacing these
leading /s with just a single /.

Closes #6643
2024-02-22 18:36:44 -06:00
Nate Prewitt
382fc2c0c6 Merge pull request #6629 from Tarty/fix-6628-jsondecode-error-not-deserializable
Fix #6628 - JSONDecodeError are not deserializable
2024-02-22 12:27:37 -08:00
Nate Prewitt
7a13c041db Merge pull request #6642 from nateprewitt/drop_python_37
Drop support for CPython 3.7
2024-02-20 15:44:43 -08:00
Nate Prewitt
58cea7a728 Drop support for CPython 3.7 2024-02-20 15:37:46 -08:00
Ian Stapleton Cordasco
9439fad038 Merge pull request #6641 from nateprewitt/fix_ci
Fix CI
2024-02-20 17:32:57 -06:00
Nate Prewitt
8fa4302322 Update Sphinx to work with latest readthedocs requirements 2024-02-20 15:04:38 -08:00
Nate Prewitt
28855fd43a Update supported copies of PyPy
Dropped support for pypy-3.7 and pypy-3.8 which are no longer maintained by upstream.
Added support for pypy-3.10.
2024-02-20 13:58:26 -08:00
Nate Prewitt
5fc10bf1f5 Fix httpbin pin for test suite 2024-02-20 13:37:25 -08:00
Ian Stapleton Cordasco
46c1a3d8c8 Merge pull request #6640 from nateprewitt/community_docs_cleanup
Cleanup defunct links from community docs page
2024-02-20 14:04:33 -06:00
Nate Prewitt
6106a63eb6 Cleanup defunct links from community docs page 2024-02-20 11:58:35 -08:00
Ian Stapleton Cordasco
4f3f189d6b Merge pull request #6632 from psf/dependabot/github_actions/github/codeql-action-3.24.0
Bump github/codeql-action from 3.23.0 to 3.24.0
2024-02-05 20:54:26 -06:00
dependabot[bot]
a5a0e4b587 Bump github/codeql-action from 3.23.0 to 3.24.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.23.0 to 3.24.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e5f05b81d5...e8893c57a1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 16:38:01 +00:00
Thomas Dehghani
3ff3ff21dd Fix #6628 - JSONDecodeError are not deserializable
requests.exceptions.JSONDecodeError are not deserializable: calling
`pickle.dumps` followed by `pickle.loads` will trigger an error.

This is particularly a problem in a process pool, as an attempt to
decode json on an invalid json document will result in the entire
process pool crashing.

This is due to the MRO of the `requests.exceptions.JSONDecodeError`
class: the `__reduce__` method called when pickling an instance is not
the one from the JSON library parent: two out of three args expected
for instantiation will be dropped, and the instance can't be
deserialised.

By specifying in the class which parent `__reduce__` method should be
called, the bug is fixed as all args are carried over in the resulting
pickled bytes.
2024-01-31 17:13:53 +01:00
Ian Stapleton Cordasco
96b22fa18c Merge pull request #6619 from psf/dependabot/github_actions/github/codeql-action-3.23.0
Bump github/codeql-action from 3.22.11 to 3.23.0
2024-01-08 11:56:01 -06:00
dependabot[bot]
b0e6c9bf85 Bump github/codeql-action from 3.22.11 to 3.23.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.22.11 to 3.23.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b374143c11...e5f05b81d5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 17:01:37 +00:00
Ian Stapleton Cordasco
72eccc8dd8 Merge pull request #6612 from miketheman/fix-docs-urls
docs: specify sphinx dirhtml builder, use references instead of absolutes
2023-12-23 12:33:48 -06:00
Mike Fiedler
25939d8784 add myself
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2023-12-23 18:15:33 +00:00
Mike Fiedler
bfba9dc68c docs: replace concrete URLs with references
Any development links will now refer back to the generated docs.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2023-12-23 18:09:55 +00:00
Mike Fiedler
f23346a9b8 Revert "Merge pull request #6605 from jaikishpai/fix-#6604"
This reverts commit 1396eb6f7a, reversing
changes made to e4c821a247.
2023-12-23 17:36:34 +00:00
Ian Stapleton Cordasco
f3f9784419 Merge pull request #6613 from miketheman/add-socks-label
docs: add label to socks heading
2023-12-23 11:24:56 -06:00
Mike Fiedler
b5bd0f14cc docs: add label to socks heading
When trying to link via intersphinx, a label must be used.
Otherwise a full URL is required, which is less desirable.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2023-12-23 17:17:34 +00:00
Mike Fiedler
242d3113c0 docs: specify sphinx dirhtml builder
With the requirement of a configuration file, the default builder
of `dirhtml` that RTD used to use is no longer specified.
This leads to URLs ending in `.html` now, which
breaks other exisitng references.

Refs: #6603
Refs: https://docs.readthedocs.io/en/stable/config-file/v2.html#sphinx-builder
Refs: https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.dirhtml.DirectoryHTMLBuilder

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2023-12-23 16:16:50 +00:00
Nate Prewitt
1396eb6f7a Merge pull request #6605 from jaikishpai/fix-#6604
fix for ##6604
2023-12-19 22:17:55 -08:00
Nate Prewitt
e4c821a247 Merge pull request #6607 from psf/dependabot/github_actions/github/codeql-action-3.22.11
Bump github/codeql-action from 2.22.1 to 3.22.11
2023-12-18 09:30:42 -08:00
dependabot[bot]
421b1f1757 Bump github/codeql-action from 2.22.1 to 3.22.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.1 to 3.22.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](fdcae64e14...b374143c11)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 16:39:47 +00:00
Jaikish Pai
1447bccc05 fix for ##6604 2023-12-17 22:34:30 +01:00
Ian Stapleton Cordasco
3b5978fc5d Merge pull request #6592 from atatuzuner61/bug/6584
"TOO_EARLY" type definition for status code 425
2023-12-16 14:24:02 -06:00
Ian Stapleton Cordasco
1ddf014f47 Merge pull request #6600 from MestreLion/MestreLion-connection-timeout-note
Add note on connection timeout being larger than specified. Fix #5773
2023-12-16 07:30:18 -06:00
Ian Stapleton Cordasco
92f9e431c9 Update docs/user/advanced.rst
Add note about wall clock too
2023-12-16 07:29:50 -06:00
Ian Stapleton Cordasco
951dd15fa6 Update docs/user/advanced.rst
fix indentation for note so it renders properly
2023-12-16 07:26:23 -06:00
Ian Stapleton Cordasco
51d0d83eaf Merge pull request #6603 from nsoranzo/rtd_config
Add now mandatory readthedocs config file
2023-12-16 07:24:37 -06:00
Nicola Soranzo
c7c2ebf1a7 Add now mandatory readthedocs config file
Docs builds currently fail with:

```
Problem in your project's configuration. No default configuration file found at repository's root. See https://docs.readthedocs.io/en/stable/config-file/
```

See e.g. https://readthedocs.org/projects/requests/builds/22842479/
2023-12-15 20:59:56 +00:00
Rodrigo Silva
a64f32ba45 Add note on connection timeout being larger than specified. Fix #5773
On servers with multiple IPs, such as IPv4 and IPv6, `urllib3` tries each address sequentially until one successfully connects, using the specified timeout for _each_ attempt, leading to a total connection timeout that is a _multiple_ of the requested time.
2023-12-13 10:05:12 -03:00
Nate Prewitt
a25fde6989 Merge pull request #6599 from psf/dependabot/github_actions/actions/setup-python-5.0.0 2023-12-11 08:11:07 -08:00
dependabot[bot]
ba67dc8dcc Bump actions/setup-python from 4.7.0 to 5.0.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.0 to 5.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](61a6322f88...0a5c615913)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 16:07:15 +00:00
Nate Prewitt
769bc3ae5c Merge pull request #6596 from psf/fix-autoclose-automtaion
Update close-issues.yml
2023-12-01 09:18:02 -08:00
Ian Stapleton Cordasco
d6ffd868ee Update close-issues.yml
I noticed the auto-labeling was working but not the auto-closing. Looking at recent actions runs I see that we need to specify the token even if we're not giving our own special token. See https://github.com/psf/requests/actions/runs/7057701782/job/19211845073#step:2:13 for additional context, namely

```
 gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable. Example:
  env:
    GH_TOKEN: ${{ github.token }}
```
2023-12-01 08:05:59 -06:00
Bruce Adams
3fd309a5c1 Enhance super_len to count encoded bytes for str
This fixes issue #6586
2023-11-29 15:42:57 -05:00
Ata Tuzuner
ec84f2c539 Fixes to test 2023-11-29 12:27:18 -05:00
Ata Tuzuner
889910c77a Added tests for status code 425 definitions. 2023-11-29 12:24:15 -05:00
Ata Tuzuner
b37878d340 Too early definition added to 425 status code type 2023-11-28 18:12:22 -05:00
Bruce Adams
f6707042d8 Unit test for string containing multi-byte UTF-8
There are two tests here. One demonstrating existing, correct
behavior for `data=bytes`, and another, failing, test for the case
where `data=string` and the string contains multi-byte UTF-8.
2023-11-27 17:27:43 -05:00
Ian Stapleton Cordasco
0b4d494192 Merge pull request #6581 from EFord36/typo-fix
fix docstring typo: a -> as
2023-11-22 09:10:47 -06:00
Elliot Ford
15849947ec fix docstring typo: a -> as 2023-11-22 11:34:04 +00:00
Ian Stapleton Cordasco
c6de5a14e5 Merge pull request #6580 from psf/dependabot/github_actions/dessant/lock-threads-5.0.0
Bump dessant/lock-threads from 4.0.1 to 5.0.0
2023-11-20 10:37:07 -06:00
dependabot[bot]
e66a07b286 Bump dessant/lock-threads from 4.0.1 to 5.0.0
Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 4.0.1 to 5.0.0.
- [Release notes](https://github.com/dessant/lock-threads/releases)
- [Changelog](https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md)
- [Commits](be8aa5be94...d42e5f4980)

---
updated-dependencies:
- dependency-name: dessant/lock-threads
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 16:28:17 +00:00
Nate Prewitt
9e98a8749a Merge pull request #6574 from msea1/matthew/fix_space 2023-11-15 23:44:49 -08:00
Matthew Carruth
c32b046243 Fix missing space in error message 2023-11-15 17:00:28 -08:00
mayank
89cde235be checkstyle 2023-11-04 23:20:21 +05:30
amkarn258
d7490c9d2d Update src/requests/packages.py
Co-authored-by: Ian Stapleton Cordasco <graffatcolmingov@gmail.com>
2023-10-31 22:36:39 +05:30
mayank
e9b1217cff added handling for chardet and charset_normalizer imports 2023-10-31 20:37:59 +05:30
mayank
ad761abcdd every chardet package maps to requests.packages.chardet.* package respectively 2023-10-31 00:50:10 +05:30
Nate Prewitt
839a8edec3 Merge pull request #6552 from swims-hjkl/issue/test_header_validation
#6551  - assert statements for test test_header_validation
2023-10-17 23:08:52 -07:00
sumedhrao7
a8e9c1b436 added assert statements into tests/test_requests/test_header_validation in regards to the issue #6551 2023-10-18 07:40:50 +05:30
Nate Prewitt
b55bb15c35 Merge pull request #6527 from sigmavirus24/update-templates
Autoclose specific issue templates
2023-10-11 09:29:20 -07:00
Ian Stapleton Cordasco
8187768622 Update close-issues.yml
Remove references to GITHUB_TOKEN/MY_TOKEN
2023-10-11 08:19:57 -05:00
Ian Stapleton Cordasco
f75b9504fc Update close comment
Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
2023-10-11 08:19:14 -05:00
Nate Prewitt
8199a2b389 Merge pull request #6548 from psf/dependabot/github_actions/github/codeql-action-2.22.1
Bump github/codeql-action from 2.21.3 to 2.22.1
2023-10-09 09:49:28 -07:00
dependabot[bot]
42a3b5cce8 Bump github/codeql-action from 2.21.3 to 2.22.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.3 to 2.22.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5b6282e01c...fdcae64e14)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 16:29:55 +00:00
Nate Prewitt
f5a7aefc2d Fix urllib3 pin in setup.cfg (#6545) 2023-10-06 16:34:24 -06:00
Nate Prewitt
ee93fac6b2 Merge pull request #6538 from psf/dependabot/github_actions/actions/checkout-4.1.0
Bump actions/checkout from 4.0.0 to 4.1.0
2023-09-25 11:30:05 -07:00
dependabot[bot]
a775435c4b Bump actions/checkout from 4.0.0 to 4.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](3df4ab11eb...8ade135a41)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 16:28:35 +00:00
anupam-arista
12862617df Update models.Response.json docstring clearer 2023-09-14 14:29:37 +05:30
Ian Stapleton Cordasco
6c8d9b1d0f Autoclose specific issue templates
We spend a fair amount of time closing issues because people don't read
the template closely or understand what they're being told. Let's take
advantage of being able to auto-label an issue based on the template and
then trigger a workflow to auto-magically close the issue with a message
and lock the issue.
2023-09-13 09:33:58 -05:00
Ian Stapleton Cordasco
881281250f Merge pull request #6519 from psf/dependabot/github_actions/actions/checkout-4.0.0
Bump actions/checkout from 3.6.0 to 4.0.0
2023-09-04 19:17:08 -05:00
dependabot[bot]
29fc8d1e93 Bump actions/checkout from 3.6.0 to 4.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](f43a0e5ff2...3df4ab11eb)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 16:21:27 +00:00
Ian Stapleton Cordasco
8b560ecb24 Merge pull request #6517 from jnhyperion/remove-pytest-ini
Remove pytest.ini in MANIFEST.in since it does not exist anymore
2023-08-29 09:27:10 -05:00
Johnny.H
4585a7fbda remove pytest.ini since it does not exist anymore 2023-08-29 13:41:49 +08:00
Ian Stapleton Cordasco
16dc70df34 Merge pull request #6516 from psf/dependabot/github_actions/actions/checkout-3.6.0
Bump actions/checkout from 3.5.3 to 3.6.0
2023-08-28 14:05:56 -05:00
dependabot[bot]
bea231b033 Bump actions/checkout from 3.5.3 to 3.6.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](c85c95e3d7...f43a0e5ff2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 16:12:37 +00:00
13steinj
2ee5b0b01c Fix documentation monthly download badge (#6508) 2023-08-18 11:01:26 -06:00
Jonas Schell
89f0eb91b3 fix monthly download badge (#6507) 2023-08-16 08:16:53 -07:00
Nate Prewitt
005571d118 Remove pytest-mock requirement (#6505) 2023-08-13 16:08:21 -07:00
Nate Prewitt
d63e94f552 Move to src directory (#6506) 2023-08-13 14:46:13 -07:00
Nate Prewitt
e9fa2e2da3 Add 3.12 classifier and tox configuration (#6503) 2023-08-13 12:56:18 -07:00
Nate Prewitt
678fca8423 Upgrade to httpbin 0.10.0 (#6496) 2023-08-13 09:56:53 -07:00
Nate Prewitt
d8152769ce Merge pull request #6501 from psf/dependabot/github_actions/actions/checkout-3.5.3 2023-08-12 13:15:39 -07:00
Nate Prewitt
9ff1a25ef5 Merge pull request #6502 from psf/dependabot/github_actions/github/codeql-action-2.21.3
Bump github/codeql-action from 1.1.39 to 2.21.3
2023-08-12 12:50:52 -07:00
dependabot[bot]
4bd06cd325 Bump actions/checkout from 2.7.0 to 3.5.3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.7.0 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.7.0...c85c95e3d7251135ab7dc9ce3241c5835cc595a9)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-12 19:37:22 +00:00
Nate Prewitt
09a241f59e Merge pull request #6500 from psf/dependabot/github_actions/actions/setup-python-4.7.0
Bump actions/setup-python from 2.3.4 to 4.7.0
2023-08-12 12:36:48 -07:00
Nate Prewitt
6ad493650c Merge pull request #6499 from psf/dependabot/github_actions/dessant/lock-threads-4.0.1
Bump dessant/lock-threads from 3.0.0 to 4.0.1
2023-08-12 12:24:59 -07:00
dependabot[bot]
9acca90bf6 Bump github/codeql-action from 1.1.39 to 2.21.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.1.39 to 2.21.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](231aa2c8a8...5b6282e01c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-12 19:03:30 +00:00
dependabot[bot]
c7933453cf Bump actions/setup-python from 2.3.4 to 4.7.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.3.4 to 4.7.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2.3.4...61a6322f88396a6271a6ee3565807d608ecaddd1)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-12 19:03:22 +00:00
dependabot[bot]
ea49261a27 Bump dessant/lock-threads from 3.0.0 to 4.0.1
Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 3.0.0 to 4.0.1.
- [Release notes](https://github.com/dessant/lock-threads/releases)
- [Changelog](https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md)
- [Commits](e460dfeb36...be8aa5be94)

---
updated-dependencies:
- dependency-name: dessant/lock-threads
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-12 19:03:17 +00:00
Nate Prewitt
8112fcc7be Pre commit update (#6498) 2023-08-12 12:03:10 -07:00
Nate Prewitt
2c193bda0c Pin GHA workflows and add dependabot to keep them up to date (#6497) 2023-08-12 12:02:58 -07:00
Ian Stapleton Cordasco
34a64bc65e Merge pull request #6266 from elprimato/spdx-conform-license
Change to SPDX conform license string
2023-08-12 13:51:42 -05:00
Nate Prewitt
9b6c62e235 Merge branch 'main' into spdx-conform-license 2023-08-12 11:37:15 -07:00
Joren Vrancken
cb7fcd7ebd Specify that Session.headers needs to be set to a OrderedDict in Header Ordering docs (#6475) 2023-08-12 10:53:36 -07:00
Calle Svensson
aa4cc78627 Add note about adapter prefix match to docs (#6465) 2023-07-29 21:05:44 -07:00
Kevin Kirsche
dfe46c1b7f refactor: prefer dictionary comphrension to loop (#6187) 2023-07-29 18:55:18 -07:00
Alexandre Erwin Ittner
2ecdb68561 Update reference to "cookielib" to "cookiejar" in documentation (#6214) 2023-07-29 18:50:43 -07:00
cpzt
fecf3dc472 add docstring parameter hooks (#6456) 2023-07-29 18:01:42 -07:00
Matthew Armand
cdbc2e2715 Add an Example for automatic retries to the Advanced Usage docs (#6258)
- While Requests doesn't automatically retry failures, this ability is a very common advanced use case in real world applications.
- Although there's a mention of this ability on the HTTPAdapter class docs, it's a bit buried and not very specific.
- It makes sense then to have an Example in the HTTPAdapter section of the Advanced Usage docs with a basic template for how this can be accomplished with Requests.
2023-07-03 13:38:22 -07:00
Boris Verkhovskiy
22db55a889 Fix doc typo (#6467) 2023-06-26 11:09:23 -06:00
Nate Prewitt
6e5b15d542 Fix linting issues 2023-05-22 09:36:22 -06:00
Nate Prewitt
147c8511dd v2.31.0
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.12-dev) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.8) (push) Has been cancelled
Tests / build (macOS-latest, pypy-3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.12-dev) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.8) (push) Has been cancelled
Tests / build (ubuntu-22.04, pypy-3.9) (push) Has been cancelled
Tests / build (ubuntu-latest, pypy-3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.12-dev) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.8) (push) Has been cancelled
Tests / build (windows-latest, pypy-3.9) (push) Has been cancelled
2023-05-22 09:10:32 -06:00
Nate Prewitt
74ea7cf7a6 Merge pull request from GHSA-j8r2-6x86-q33q 2023-05-22 09:08:57 -06:00
Thomas Grainger
3022253346 test on pypy 3.8 and pypy 3.9 on windows and macos (#6424) 2023-05-15 09:04:21 -06:00
Thomas Grainger
b639e66c81 test on py3.12 (#6448)
* test on py3.12

* update to pytest-httpbin==2.0.0
2023-05-13 08:10:56 -06:00
Syed Saifullah
d3d504436e Fixed a small typo (#6452) 2023-05-09 10:55:33 -06:00
Nate Prewitt
2ad18e0e10 v2.30.0
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (false, ubuntu-latest, pypy-3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.9) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2023-05-03 09:39:44 -06:00
Quentin Pradet
f2629e9e3c Remove strict parameter (#6434) 2023-04-28 13:17:10 -06:00
Nate Prewitt
87d63de873 v2.29.0
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (false, ubuntu-latest, pypy-3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-22.04, 3.9) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2023-04-26 09:19:11 -06:00
Thomas Grainger
51716c4ef3 enable the warnings plugin (#6416) 2023-04-22 18:00:22 -06:00
Thomas Grainger
a7da1ab349 try on ubuntu 22.04 (#6418) 2023-04-22 17:53:09 -06:00
Thomas Grainger
dfc3e24338 pin cryptography<40 on pypy 3.7 (#6421)
* pin cryptography<40 on pypy 3.7
2023-04-22 17:41:27 -06:00
Levi
26bea1e498 Use urllib3 native chunking ability (#6226)
* Fix #3844 
* Use urllib for chunked 

---------

Co-authored-by: James Pickering <james.pickering@xml-solutions.com>
Co-authored-by: Leon Verrall <LVerrall@slb.com>
2023-04-22 17:32:51 -06:00
Seth Michael Larson
7f694b79e1 Allow str/bytes subclasses to be used as header parts 2023-03-03 14:39:02 -06:00
Yifang Zhu
e90852d20c Make json doc strings consistent (#6368) 2023-03-02 21:32:49 -08:00
Nate Prewitt
ec78348c4b Upgrade lint.yml action (#6370) 2023-03-02 20:45:27 -08:00
Boris Verkhovskiy
46188256ee Response.raw.read() returns bytes (#6365) 2023-02-27 08:31:15 -07:00
Quentin Pradet
15585909c3 Support missing SNIMissingWarning in tests (#6336) 2023-01-21 01:44:33 -07:00
Matthew Feickert
16a17a3ca7 fix: Remove '<4' from python_requires (#6333)
* As discussed in https://discuss.python.org/t/use-of-less-than-next-major-version-e-g-4-in-python-requires-setup-py/1066
  and other places by the PyPA, use of upper bounds with python_requires
  for future versions of Python is unintended use of python_requires and
  actively discouraged.
2023-01-18 22:37:24 -07:00
Nate Prewitt
61c324da43 v2.28.2
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (false, ubuntu-latest, pypy-3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.11) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.9) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2023-01-12 09:16:09 -07:00
Ashish Kurmi
eb07385b02 ci: add minimum GitHub token permissions for workflows (#6236)
Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>
2023-01-11 15:06:53 -07:00
Bruno Alla
2745db131a Switch to Python 3.11 final on CI and add to tox file (#6325) 2023-01-06 11:32:31 -07:00
ch-iv
ec553c275f Update flake8 repo and version (#6317) 2022-12-25 21:24:16 -07:00
Ian Stapleton Cordasco
ac3be98b19 Merge pull request #6291 from oliviacrain/docs/git-clone-protocol
Replace git protocol URL in docs with an HTTPS URL
2022-11-21 16:06:01 -06:00
Olivia Crain
192083576d Replace git protocol URL in docs with an HTTPS URL 2022-11-21 14:01:02 -06:00
Volker Schaus
53a0562331 change to SPDX conform license string 2022-10-23 18:35:43 +00:00
Ian Stapleton Cordasco
1e62a3ec18 Merge pull request #6262 from winmorre/docs-update/#6260
JSONDecodeError included in the documentation
2022-10-21 11:37:47 -05:00
reeko234
7908ad3af9 JSONDecodeError included in the documentation #6260 2022-10-21 07:42:58 +00:00
deedy5
c57f1f0ca1 Allow charset normalizer >=2 and <4 (#6261) 2022-10-20 12:26:18 -06:00
Ian Stapleton Cordasco
7104ad4b13 Merge pull request #6234 from jaap3/patch-1
Fix CURL_CA_BUNDLE override example
2022-09-09 14:10:14 -05:00
Jaap Roes
da246958b4 Fix CURL_CA_BUNDLE override example
Promote REQUESTS_CA_BUNDLE as it is looked at first
2022-09-07 09:48:59 +02:00
David Cain
177dd90f18 Remove Python 2 mention on chardet behavior (#6204) 2022-07-27 09:22:21 -08:00
Miloslav Pojman
786255613b Remove Python 2 mention from tox (#6200) 2022-07-20 17:13:36 -06:00
Sergey Lyapustin
bda7f0171f Fixed warnings message to suggest using secure protocol. (#6188) 2022-06-29 12:41:49 -06:00
Nate Prewitt
4d394574f5 v2.28.1
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (false, ubuntu-latest, pypy-3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11-dev) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.11-dev) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.9) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11-dev) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2022-06-29 09:09:11 -06:00
Kevin Kirsche
16b418b44a Use yield from instead of looping yield (#6170) 2022-06-28 20:08:26 -06:00
Lumír 'Frenzy' Balhar
0e28c8f1dc Allow charset normalizer >=2 and <3 (#6169) 2022-06-28 20:01:42 -06:00
Wong Hoi Sing Edison
73793ce43e Update Dependency with chardet>=3.0.2,<6 (#6179)
https://github.com/chardet/chardet/releases/tag/5.0.0 was released on
2022-06-25 with remove of Python 3.6 support, which also align with our
Python > 3.6 requirement.

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2022-06-27 20:25:58 -06:00
Nate Prewitt
da9996fe4d v2.28.0
Some checks failed
Lint code / lint (push) Has been cancelled
Tests / build (false, ubuntu-latest, pypy-3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.11-dev) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.11-dev) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.9) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.11-dev) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2022-06-09 08:42:10 -06:00
Nate Prewitt
1dcf3b7122 Add GitHub action to automate linting (#6157) 2022-06-08 13:11:11 -06:00
Nate Prewitt
e36f34597c Add valdation for header name (#6154) 2022-06-08 12:03:56 -06:00
Nate Prewitt
60865f21ae Run 3.11 CI on all platforms (#6155) 2022-06-08 10:12:53 -06:00
Olivier Gayot
3af2f456d8 Fix output of test_lowlevel tests in case of timeout (#6136)
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-06-08 10:02:42 -06:00
Nate Prewitt
0f358eabe6 Reduce lock thread runs to daily (#6150) 2022-06-01 11:51:04 -06:00
Nate Prewitt
210095fd08 Tolerate bad registry entries in Windows proxy settings (#6149) 2022-06-01 11:36:26 -06:00
Nate Prewitt
a5e7169e75 Cleanup the docs sidebar (#6144) 2022-05-26 12:45:57 -07:00
davidshivaji
79f2ec3acc Grammar fix (#6133) 2022-05-13 10:36:13 -06:00
Mickaël Schoentgen
cb233a101d Fix several ResourceWarnings in test_requests.py (#4766) 2022-05-10 19:04:17 -06:00
Nate Prewitt
40956723f2 Add .git-blame-ignore-revs 2022-04-29 15:39:22 -06:00
Nate Prewitt
2a6f290bc0 Add automatic code formatting to Requests (#6095) 2022-04-29 13:16:58 -06:00
Nate Prewitt
2d5517682b Fix inconsistent exception for JSONDecode error (#6097)
When calling .json() it was possible to raise a
requests.exceptions.JSONDecodeError or ValueError
depending on whether the encoding is set.
2022-03-28 12:51:27 -06:00
Nate Prewitt
8bce583b95 Farewell, sweet Concorde!
Formally removing any remaining vestiges of Python 2 from Requests.
We'll also leave behind Python 3.6 while we're at it.
2022-03-25 10:50:33 -06:00
Ian Stapleton Cordasco
79f60274f7 Merge pull request #6074 from nateprewitt/curl_ca_bundle
Fix environment CA Bundle resolution
2022-02-26 07:39:28 -06:00
Nate Prewitt
79c4a017fe Fix environment CA Bundle resolution 2022-02-25 11:25:20 -07:00
Ian Stapleton Cordasco
5e749546a2 Merge pull request #6068 from nateprewitt/sess_prox_warn
Reword proxies section and add warning
2022-02-19 17:04:06 -06:00
Ian Stapleton Cordasco
3eed0512a6 Merge pull request #6069 from nateprewitt/jinja_fix
Pin markupsafe for older versions of Jinja2
2022-02-19 07:34:48 -06:00
Nate Prewitt
3ed60078e2 Fix jinja 2022-02-18 18:33:43 -07:00
Nate Prewitt
15fde024f2 Reword proxies section and add warning 2022-02-18 18:18:23 -07:00
Nate Prewitt
95f4567336 Wrap urllib3's SSLError as requests' SSLError (#6057) 2022-02-05 11:56:05 -07:00
Nate Prewitt
7ae38876b1 Merge pull request #5978 from sha016/all-proxy-docs
Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
2022-02-02 11:03:26 -07:00
Seth Michael Larson
2c20474bfe Update advanced.rst 2022-02-02 11:56:27 -06:00
Chavithra
24dfbfde55 Update quickstart.rst : fixing brotlicffi link (#6044) 2022-01-17 11:30:24 -07:00
chyzzqo2
fa1b0a367a Initialize JsonDecodeError before initializing IOError (#6036)
That way we get the formated error message

Co-authored-by: Peter <cHYzZQo@netflix.com>
2022-01-13 08:42:49 -07:00
Ian Stapleton Cordasco
d15a3b6e2e Merge pull request #6042 from nateprewitt/lock_thread_spam
Disable lock-threads on forks
2022-01-11 11:42:00 -06:00
Nate Prewitt
48676caf57 Disable lock-threads on forks 2022-01-11 08:24:39 -07:00
Nate Prewitt
d718e75383 Start testing on 3.11 dev branch (#6037) 2022-01-07 12:07:31 -07:00
Marwan
620ed4fc52 Move socks testing requirement into requirements-dev.txt (#6035) 2022-01-06 10:57:59 -07:00
Nate Prewitt
31a89d9c84 v2.27.1
Some checks failed
Tests / build (macOS-latest, 2.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.6) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-18.04, 2.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.6) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-latest, pypy-3.7) (push) Has been cancelled
Tests / build (ubuntu-latest, pypy3) (push) Has been cancelled
Tests / build (windows-latest, 2.7) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.6) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2022-01-05 08:35:04 -07:00
Ian Stapleton Cordasco
8fa9724398 Merge pull request #6028 from nateprewitt/prox_auth_fix
Fix auth parsing for proxies
2022-01-04 10:04:25 -06:00
Nate Prewitt
38f3f8ecb9 Fix auth parsing for proxies
Co-authored-by: adamp01 <@adamp01>
2022-01-04 08:27:23 -07:00
Nate Prewitt
0192aac241 v2.27.0
Some checks failed
Tests / build (macOS-latest, 2.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.10) (push) Has been cancelled
Tests / build (macOS-latest, 3.6) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-18.04, 2.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.10) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.6) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-latest, pypy-3.7) (push) Has been cancelled
Tests / build (ubuntu-latest, pypy3) (push) Has been cancelled
Tests / build (windows-latest, 2.7) (push) Has been cancelled
Tests / build (windows-latest, 3.10) (push) Has been cancelled
Tests / build (windows-latest, 3.6) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2022-01-03 07:59:10 -07:00
Nate Prewitt
e50dc12b0f Fix doc link 2022-01-02 22:20:40 -07:00
Nate Prewitt
17e6e27a93 General cleanup for 2.27.0 2021-12-29 16:29:09 -06:00
Greg Dubicki
ab38e2c726 Make the data vs json parameters more clear (#5382)
As https://stackoverflow.com/q/26685248/2693875 question
and answer popularity shows that there is a lot of people who
do not understand the distinction.
2021-12-29 10:46:21 -07:00
Nate Prewitt
77d1e9aa3e Merge pull request #5894 from dbaxa/do-not-re-build-proxies-when-proxies-have-been-provided
Prevent unnecessary should_bypass_proxies checks in rebuild_proxies
2021-12-29 10:06:05 -07:00
Ian Stapleton Cordasco
b0829a8690 Merge pull request #6020 from nateprewitt/pypy_37
Update 3.10-dev to 3.10 and add pypy-3.7 in CI
2021-12-29 07:32:11 -06:00
Ian Stapleton Cordasco
28d537dde3 Merge pull request #5917 from nateprewitt/proxy_scheme_unknown_fix
Move from urlparse to parse_url for prepending schemes
2021-12-29 07:31:40 -06:00
Nate Prewitt
86bbee71b2 Update 3.10-dev to 3.10 and add pypy-3.7 2021-12-28 22:28:30 -07:00
Nate Prewitt
0d5347e628 Only compute should_bypass_proxies if needed
Co-authored-by: David Black <dblack@atlassian.com>
2021-12-28 22:10:51 -07:00
Nate Prewitt
ef59aa0227 Move from urlparse to parse_url for prepending schemes 2021-12-28 21:12:00 -07:00
Ian Stapleton Cordasco
d09659997c Merge pull request #5414 from mondeja/5367
Raise InvalidUrl if host starts with '.' character.
2021-12-28 19:39:36 -06:00
Ian Stapleton Cordasco
2b06a952a9 Merge pull request #6017 from nateprewitt/schema2scheme
Fix erroneous use of 'schema' instead of 'scheme'
2021-12-28 19:39:08 -06:00
Ian Stapleton Cordasco
e2064a2c05 Merge pull request #6018 from nateprewitt/basic_auth_update
Update basic auth example
2021-12-28 19:38:35 -06:00
Nate Prewitt
401e17bbdc Update basic auth example 2021-12-28 18:07:01 -07:00
Nate Prewitt
4246792b81 Fix erroneous use of 'schema' instead of 'scheme' 2021-12-28 17:32:48 -07:00
Álvaro Mondéjar
658c10e84a Raise InvalidURL if hosts starts with '.' as was reported at #5367. 2021-12-28 14:24:24 -07:00
Abhinav Vashisth
39d0fdd909 Update README.md (#5998) 2021-12-05 02:52:10 -08:00
Ian Stapleton Cordasco
c193d9742e Merge pull request #5993 from davisagli/tox-parallel
Run tox in parallel using -p instead of detox
2021-11-30 08:07:59 -06:00
David Glick
8e764f355d Run tox in parallel using -p instead of detox 2021-11-29 22:20:47 -05:00
Nate Prewitt
7556ea4213 Merge pull request #5391 from hodbn/fix-5274
Send only one Host header in chunked request
2021-11-29 07:58:31 -08:00
David Hotham
2d2447e210 Catch AttributeError in utils.super_len (#5239)
* Catch AttributeError in utils.super_len

This allows it to handle files obtained via `Tarfile.extractfile()`.
2021-11-28 12:04:49 -08:00
Ian Stapleton Cordasco
e77dd8de6e Merge pull request #5990 from mgorny/trustme-test-dep
Skip the test requiring trustme when it is not available
2021-11-27 19:20:17 -06:00
Michał Górny
55da533a87 Defer the trustme import until inside the fixture
Move the trustme import from global scope into the nosan_server fixture
in order to make it possible to deselect the test via command-line
when trustme is not available.
2021-11-27 18:47:56 +01:00
Nate Prewitt
99b3b49241 Refactor rebuild_proxies to allow proxy resolution (#5924)
without stripping Proxy-Authorization header
2021-11-24 13:21:01 -06:00
sha016
e2fa8d3654 mention all_proxy env variable in Proxies section 2021-11-13 20:58:30 -06:00
Alan Yee
590350f8d0 Update Bug_report.md (#5965)
Add some highlighting and comment out the instructions so that the submitter can see it but it is not displayed in the GitHub issue
2021-10-21 11:06:33 -07:00
Nate Prewitt
9dd6e47b5b Add doc build requirements for RTD (#5956) 2021-10-09 15:03:33 -07:00
Борис Верховский
94f9f7357e Don't mention pip as the reason for supporting py2 (#5940) 2021-09-21 16:22:12 -07:00
Kevin Kirsche
fc106ab586 fix minor typos (#5934) 2021-09-15 06:43:12 -05:00
Ian Stapleton Cordasco
1e5fad7433 Update lock-issues.yml (#5930)
Run this hourly. I'm not seeing any effects, let's see if
running it more frequently will allow it to avoid the GitHub ratelimit

https://github.com/dessant/lock-threads#why-are-only-some-issues-and-pull-requests-processed
2021-09-07 17:00:31 -07:00
Nate Prewitt
248122a697 Add support for 3.10 (#5928) 2021-09-03 19:03:15 -07:00
Nate Prewitt
9572d6a299 General doc updates (#5923) 2021-09-02 08:53:46 -07:00
Nate Prewitt
4ab2550d66 Add test for default chunked Host header 2021-09-02 01:53:34 -07:00
hodbn
6fbfca90b6 Send only one Host header in chunked request
Closes #5274
2021-09-02 00:53:08 -07:00
Ben Li-Sauerwine
aae78010e9 Time out requests' tests after 10 minutes. (#5916) 2021-08-27 11:49:51 -07:00
Nate Prewitt
10968357a1 Appropriately handle urllib3's InvalidHeader exception (#5914) 2021-08-26 20:11:30 -05:00
Nate Prewitt
b351e906b6 Update codeql branch target (#5913) 2021-08-26 05:58:35 -05:00
Nate Prewitt
70a13e2a26 Fix syntax error in lock action (#5912) 2021-08-25 18:04:43 -07:00
Ian Stapleton Cordasco
8ea90a5ce7 Shorten the window before we lock threads
Per Nate's recommendation, let's lock things after 90 days rather than
360
2021-08-25 11:44:57 -07:00
Ian Stapleton Cordasco
7adb8686ac Add thread locker workflow (#5909) 2021-08-25 13:21:35 -05:00
Борис Верховский
827b87b9be Formatting (#5910) 2021-08-25 09:48:30 -07:00
Ben Li-Sauerwine
2d30aeb7c6 Add a test which verifies that ChunkedEncodingError is emitted if an invalid Transfer-Encoding: chunked response is returned. (#5906) 2021-08-24 19:00:17 -07:00
Israel Tsadok
b0e025ade7 Fix broken link to adapters essay (#5899) 2021-08-03 22:58:51 -07:00
Thomas Lam
d8829f9f24 Fix extract_zipped_paths infinite loop when provided invalid unc path (#5851) 2021-08-02 19:40:34 -05:00
Michał Górny
b227e3cb82 Fix creating non-listening sockets in tests on some platforms (#5890)
Fix the listen() invocation for the test server not to pass a backlog
value of zero.  The value of zero means no backlog which effectively
means that the socket can not accept any connections.  This does not
matter for the majority of platforms since the value is only advisory
and the platform tends to go with a bigger backlog anyway.  However,
a few platforms (e.g. alpha or riscv Linux) do take the value literally,
and therefore the tests fail since they are unable to connect to
the server.
2021-07-28 11:23:08 -05:00
Steve Berdy
db575eeedc Fix inconsistent exception type in response.json() method (#5856) 2021-07-26 08:56:44 -07:00
Jeremy Cline
941a77f2b8 docs: Update the Red Hat vulnerabilities contact (#5881) 2021-07-19 09:44:02 -07:00
Egor
a3d54b83f7 Update advanced.rst (#5821)
* Update advanced.rst

* remove confusing euphemism
2021-07-18 05:59:37 -05:00
Steve Berdy
a5b45edf2f Update api.rst (#5877) 2021-07-16 11:06:42 -07:00
Nate Prewitt
a1a6a549a0 v2.26.0
Some checks failed
Tests / build (macOS-latest, 2.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.6) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-18.04, 2.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.6) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-latest, pypy3) (push) Has been cancelled
Tests / build (windows-latest, 2.7) (push) Has been cancelled
Tests / build (windows-latest, 3.6) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2021-07-13 07:52:02 -07:00
Quentin Pradet
e253eba5ed Stop abusing pytest-httpbin to test commonName support
pytest-httpbin<1.0 ships with a server certificate with a commonName but
no subjectAltName. urllib3 2.0 will stop supporting those in the future,
so we want to upgrade pytest-httpbin.

Unfortunately, `test_https_warnings` was relying on this broken
certificate. With this change, we use `trustme` to create a broken
certificate specifically for this test, so that we can upgrade
pytest-httpbin and make sure that other tests relying on httpbin TLS
support will continue to work with urllib3 2.0.
2021-07-12 09:44:43 -05:00
Nate Prewitt
f6c0619d89 Disable requests[security] and remove 3.5 support references 2021-07-09 12:40:55 -07:00
Naor Livne
33cf965f72 Allow idna 3.x to be installed on Python 3.x
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
2021-07-07 08:25:20 -05:00
Дилян Палаузов
5351469472 Add support for brotli decoding (#5783)
* Add support for Brotli decoding

When the brotli or brotlicffi packages are installed,
urllib3.util.make_headers() inserts ',br' in the Accept-Encoding header
and decodes br from the answers.

* Create the default Accept-Encoding header once

* Preserve the previous delimiter behavior

* Update prose in quickstart.rst

Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
2021-07-07 08:16:28 -05:00
Bernát Gábor
24630743ce Avoid zip extract racing condition by using read+write instead extract (#5707)
Extract also creates the folder hierarchy, however we do not need that,
the file itself being extracted to a temporary folder is good enough.
Instead we read the content of the zip and then write it. The write is
not locked but it's OK to update the same file multiple times given the
update operation will not alter the content of the file. By not creating
the folder hierarchy (default via extract) we no longer can run into the
problem of two parallel extracts both trying to create the folder
hierarchy without exists ok flag, and one must fail.

Resolves #5223.

Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
2021-07-06 19:14:51 -05:00
Ash Berlin-Taylor
2ed84f55b2 Switch LGPL'd chardet for MIT licensed charset_normalizer (#5797)
Although using the (non-vendored) chardet library is fine for requests
itself, but using a LGPL dependency the story is a lot less clear
for downstream projects, particularly ones that might like to bundle
requests (and thus chardet) in to a single binary -- think something
similar to what docker-compose is doing. By including an LGPL'd module
it is no longer clear if the resulting artefact must also be LGPL'd.

By changing out this dependency for one under MIT we remove all
license ambiguity.

As an "escape hatch" I have made the code so that it will use chardet
first if it is installed, but we no longer depend upon it directly,
although there is a new extra added, `requests[lgpl]`. This should
minimize the impact to users, and give them an escape hatch if
charset_normalizer turns out to be not as good. (In my non-exhaustive
tests it detects the same encoding as chartdet in every case I threw at
it)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2021-07-06 18:55:02 -05:00
TAHRI Ahmed R
33d448eb21 Pin Flask to <2.0 to fix the test suite
httpbin does not limit Flask version and the 2.0 release has broken compatibility with our test suite
2021-07-06 15:39:50 -05:00
Francois Marier
1466ad713c Fix GitHub links (#5835)
All of these links now redirect to a repo under a different GitHub
user account.
2021-05-31 21:23:54 -07:00
Mark Bell
f6d43b03fb Updated to new be-cordial-or-be-on-your-way URL and CoC now references Python Community CoC (#5811)
* Updated references to new be-cordial-or-be-on-your-way URL.

* CoC now references Python Community Code of Conduct
2021-05-07 11:54:37 -05:00
tallalnparis4ev
05a1a21593 Throw value error when serializing JSON object with NaN value (#5810)
* disallow nan values in json serialize

* test nan value in json post

* added exception for invalid json in request

* use invalid json exception

* invalid json test
2021-05-06 13:18:58 -05:00
Coco Mishra
c45a4dfe6b grammar fix (#5791) 2021-04-11 11:25:49 -05:00
Hans96
2c2138e811 Update setup.py (#5780)
Removed `import re` as unnecessary import
2021-03-19 17:09:29 -05:00
laggardkernel
c267415882 Remove call to set default value for allow_redirects
The call to kwargs.setdefault was redundant and unnecessary as the lower-level session defaults to true.
2021-03-19 11:44:19 -05:00
Ian Stapleton Cordasco
5433656878 Merge pull request #5777 from cclauss/patch-1
quickstart.rst: r.json() can raise JSONDecodeError on Py3
2021-03-18 09:36:34 -05:00
Christian Clauss
f79d1ef42f Also update requests.models.Response 2021-03-18 13:19:28 +01:00
Christian Clauss
4193b95db0 simplejson.JSONDecodeError may be raised on Py2 and Py3 2021-03-18 12:27:02 +01:00
Christian Clauss
06462a6e79 quickstart.rst: r.json() can raise JSONDecodeError on Py3
% `python2 -c "import requests ; requests.get('https://github.com').json()"`
% `python3 -c "import requests ; requests.get('https://github.com').json()"`
2021-03-18 10:06:14 +01:00
Andrew M. White
913880c45a Fix typo 2021-02-24 10:19:48 -07:00
Ian Stapleton Cordasco
bdc00eb097 Merge pull request #5755 from pdmccormick/master
Provide directions for cloning repository despite malformed commits
2021-02-17 15:37:02 -06:00
Peter David McCormick
ef6ceffc1c Provide directions for cloning repository despite malformed commits 2021-02-17 15:38:48 -05:00
Ian Stapleton Cordasco
8c211a96cd Merge pull request #5681 from mateusduboli/5677
5677: Rebuild proxies on Session#send
2021-01-24 16:59:46 -06:00
XiaojueGuan
74b7280049 Fix typo request -> requests 2021-01-22 07:41:39 -06:00
Ian Stapleton Cordasco
083aa67a0d Merge pull request #5723 from bbodenmiller/patch-2
Format c_rehash
2021-01-20 08:58:35 -06:00
Ben Bodenmiller
f6072f1e14 Format c_rehash 2021-01-19 17:27:56 -08:00
Nate Prewitt
c2b307dbef v2.25.1
Some checks failed
Tests / build (macOS-latest, 2.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.5) (push) Has been cancelled
Tests / build (macOS-latest, 3.6) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-18.04, 2.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.5) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.6) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.7) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.8) (push) Has been cancelled
Tests / build (ubuntu-18.04, 3.9) (push) Has been cancelled
Tests / build (ubuntu-latest, pypy3) (push) Has been cancelled
Tests / build (windows-latest, 2.7) (push) Has been cancelled
Tests / build (windows-latest, 3.5) (push) Has been cancelled
Tests / build (windows-latest, 3.6) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2020-12-16 11:34:26 -08:00
Shouro
6de4f104cd Change docs title to requests.sessions 2020-12-14 17:49:49 -06:00
Nate Prewitt
b223291693 Merge pull request #5688 from dan-blanchard/patch-1
Upgrade to chardet 4.x
2020-12-14 09:29:10 -08:00
Dan Blanchard
516f84f490 Upgrade to chardet 4.x 2020-12-11 10:31:38 -05:00
Ernest W. Durbin III
d3e0f73354 Update sponsorship link
PSF relaunched new sponsorship program and the URL has changed.
2020-12-09 08:03:57 -06:00
Mateus Dubiela Oliveira
60ea7f0c2d #5677: Rebuild proxies on Session#send 2020-12-08 18:37:18 +01:00
Ian Stapleton Cordasco
5035827ba4 Merge pull request #5670 from smarie/pr_proxy_conf_helper_and_doc
Proxy related doc updates
2020-12-04 13:38:17 -06:00
Ian Stapleton Cordasco
589c454733 Merge pull request #5673 from jjmaldonis/master
updated `get_encoding_from_headers` to return utf-8 if the content type is set to application/json
2020-11-29 12:19:15 -06:00
jason
5855dd711f updated get_encoding_from_headers to return utf-8 if the content type is set to application/json, following RFC 4627.
fixes #5667
2020-11-29 11:51:41 -06:00
Kaartic Sivaraam
d0359c9460 Fix broken link 2020-11-28 12:21:02 -06:00
Sylvain MARIE
f02a80cbe8 Updated proxies documentation 2020-11-27 17:44:13 +01:00
Sylvain MARIE
d1ca591c0f Revert "New helper method set_http_proxy in Session to set proxies in a more user friendly way"
This reverts commit 4b66260c
2020-11-27 17:05:17 +01:00
Sylvain MARIE
2fddbe3606 Updated proxies documentation 2020-11-27 11:51:47 +01:00
Sylvain MARIE
4b66260cb7 New helper method set_http_proxy in Session to set proxies in a more user friendly way 2020-11-27 11:51:16 +01:00
Nate Prewitt
9ce669e3ae Merge pull request #5663 from hugovk/patch-1
Pin GHA to Ubuntu 18.04
2020-11-18 08:32:02 -08:00
Hugo van Kemenade
0514dea6fc Pin GHA to Ubuntu 18.04
`ubuntu-latest` points to 18.04 and will soon flip to 20.04.

However tests currently fail on 20.04, so let's explicitly pin to 18.04 for now.
2020-11-18 09:00:23 +02:00
Nate Prewitt
962c8986ca Merge pull request #5594 from icfly2/patch-1
Update advanced.rst
2020-11-16 17:31:39 -08:00
Ian Stapleton Cordasco
28cc1d237b Merge pull request #5659 from nateprewitt/contrib_cleanup
Remove reference to development philosophy
2020-11-16 13:19:05 -06:00
Nate Prewitt
78fdf4dd92 Remove reference to development philosophy 2020-11-16 10:44:31 -08:00
Nate Prewitt
03957eb1c2 v2.25.0
Some checks failed
Tests / build (macOS-latest, 2.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.5) (push) Has been cancelled
Tests / build (macOS-latest, 3.6) (push) Has been cancelled
Tests / build (macOS-latest, 3.7) (push) Has been cancelled
Tests / build (macOS-latest, 3.8) (push) Has been cancelled
Tests / build (macOS-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-latest, 2.7) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.5) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.6) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.7) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.8) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / build (ubuntu-latest, pypy3) (push) Has been cancelled
Tests / build (windows-latest, 2.7) (push) Has been cancelled
Tests / build (windows-latest, 3.5) (push) Has been cancelled
Tests / build (windows-latest, 3.6) (push) Has been cancelled
Tests / build (windows-latest, 3.7) (push) Has been cancelled
Tests / build (windows-latest, 3.8) (push) Has been cancelled
Tests / build (windows-latest, 3.9) (push) Has been cancelled
2020-11-11 11:55:50 -08:00
Nate Prewitt
320a10d142 Remove Pipfile/Pipfile.lock 2020-11-11 10:29:13 -08:00
Nate Prewitt
9cd2d33489 Move CI to Github Actions 2020-11-11 10:29:13 -08:00
Nate Prewitt
2f70990cd3 Merge pull request #5643 from tarmath/netrc
Respect the NETRC environment variable
2020-11-01 08:52:01 -08:00
Mathieu Pichette
ba543713d3 Respect the NETRC environment variable 2020-10-31 21:01:30 -07:00
Ian Stapleton Cordasco
1431502331 Merge pull request #5614 from smstong/master
small typo corrected.
2020-10-05 13:15:43 -05:00
Jonathan
4840d4a376 small typo corrected.
a small typo was corrected.
2020-10-04 20:45:07 -04:00
Ian Stapleton Cordasco
4f6c018715 Merge pull request #5611 from psf/add-codescanning
Create codeql-analysis.yml
2020-10-02 17:10:53 -05:00
Ian Stapleton Cordasco
d09c0e0f24 Update codeql-analysis.yml
Remove proposed/3.0.0 branch, only ever run against Python sans matrix option
2020-10-02 14:06:24 -05:00
Ian Stapleton Cordasco
941ac53ba0 Create codeql-analysis.yml 2020-10-01 09:19:34 -05:00
Ian Stapleton Cordasco
799a97d360 Merge pull request #5608 from abdullahselek/master
Add official Python 3.8 support on Appveyor
2020-09-30 15:35:12 -05:00
Abdullah Selek
ae6144599a Add official Python 3.8 support on Appveyor 2020-09-30 20:52:35 +01:00
Ae-Mc
333fa8d3f2 Remove reading HISTORY.md in setup.py 2020-09-29 10:36:31 -05:00
Ruben
c3280d7844 Update advanced.rst
replaced reference to requests-async with httpx the replacement project
2020-09-23 13:19:29 +02:00
Martin
967a05bfff Update renamed GitHub handle 2020-09-11 10:36:21 -05:00
Nate Prewitt
1f7c88880b Merge pull request #5570 from ajorg-aws/master
Apply the Apache-2.0 license correctly
2020-08-27 11:09:01 -07:00
Andrew Jorgensen
22b5a39098 Apply the Apache-2.0 license correctly
This follows instructions from the Apache Foundation. It also ensures
that the license will be correctly detected by license scanning tools.

Note that by adding a NOTICE file triggers Section 4.d of the license,
which is usually intended by users of the license.

The text that was in the LICENSE file before this change is intended
(by the authors of the license) to be used as a file header, and not as
a full license notice for a project, but it is commonly used this way,
so I would of course understand if this change is rejected.
2020-08-27 09:44:27 -07:00
Sagar Giri
2a7832b5b0 Update index.rst
Update misleading text about python support
2020-08-25 17:50:13 -07:00
Nate Prewitt
48237afd9d updating doc links and formatting 2020-08-18 15:13:59 -07:00
Seth Michael Larson
0b01355870 Pin more helpful links to sidebar 2020-08-18 15:13:59 -07:00
Seth Michael Larson
43ed689d97 Trim release section, add back Twitter support 2020-08-18 15:13:59 -07:00
Seth Michael Larson
551a0bf0df Recommend Pip, remove todo/philo docs, pare down support avenues 2020-08-18 15:13:59 -07:00
Seth Michael Larson
0830062100 Remove images, analytics, 'keep up to date' 2020-08-18 15:13:59 -07:00
Seth Michael Larson
533c384b87 Make README markdown compatible 2020-08-18 15:13:59 -07:00
Matt Silverlock
02eb5a2cd3 Document the dangers of using verify=False 2020-08-16 21:31:05 -05:00
Ben Bodenmiller
2d39c0db05 Docs: list CURL_CA_BUNDLE as supported (#5509)
* Docs: list CURL_CA_BUNDLE as supported
2020-07-23 21:57:30 -07:00
Nate Prewitt
1b41763472 cleanup advanced docs header 2020-06-26 10:51:20 -08:00
Nate Prewitt
8149e9fe54 Merge pull request #5505 from ollien/prepared-requests-docs-correction
Clarify that PreparedRequests should not be manually created
2020-06-19 09:04:21 -07:00
Nick Krichevsky
9cae7be94f Clarify that PreparedRequests should not be manually created
Closes #5504
2020-06-18 22:06:41 -04:00
Kartik Chugh
1ca1c52e69 Google App Engine (#5475)
* Continuity: Google App Engine
2020-06-17 13:09:34 -07:00
Nate Prewitt
0797c61fd5 v2.24.0 2020-06-17 08:50:25 -07:00
Nate Prewitt
daa2b297a3 updating usage information 2020-06-17 08:50:25 -07:00
Nate Prewitt
7c71982260 Merge pull request #5496 from dbaxa/optimise-prepare-body
Avoid an unnecessary computation of the length of data for non-stream requests (which determine content-length based upon body content).
2020-06-17 08:21:38 -07:00
David Black
71a05cf289 Avoid an unnecessary computation of the length of data for non-stream requests (which determines content-length based upon body content). 2020-06-16 20:53:07 +10:00
Bharat Raghunathan
737dd0c3c6 Update number of dependents on requests (#5495)
* Update dependents on requests
2020-06-15 12:56:07 -07:00
Kevin Kirsche
8ac5929ae1 Fix typo in README (#5468) 2020-06-15 08:23:17 -07:00
Nate Prewitt
2b3436e0e7 Merge pull request #5492 from dbaxa/avoid-calling-resolve_redirects-whe-not-following-redirects
Remove what appears to be an un-needed call to self.resolve_redirects when not following redirects as part of creating a request's history.
2020-06-15 07:44:38 -07:00
David Black
fa2dbe9a91 Remove what appears to be an un-needed call to self.resolve_redirects when not following redirects as part of creating a request's history. 2020-06-15 20:16:47 +10:00
Thomas Grainger
9ed5db8ed2 fix raise_for_status docstring (#5293)
the exception isn't stored it's created new each call
2020-05-08 22:08:51 -07:00
Miro Hrončok
427e8eb1e7 Fix test_conflicting_post_params to work on pytest 5 (#5305)
The non-contextmanager form of pytest.raises was removed in pytest 5.
http://doc.pytest.org/en/latest/deprecations.html#raises-warns-with-a-string-as-the-second-argument

It was used here to support Python < 2.7, but that is no longer needed.
https://github.com/psf/requests/pull/1503#issuecomment-22333666

Fixes https://github.com/psf/requests/issues/5304
2020-05-08 21:58:03 -07:00
Seth Michael Larson
251f73f65d Add changelog entry for pyOpenSSL change 2020-05-01 16:33:51 -07:00
Seth Michael Larson
db47b9b4a0 Don't use pyOpenSSL unless no SNI is detected 2020-05-01 16:33:51 -07:00
Nate Prewitt
bfb93d4b7d update bleach security vulnerability 2020-04-03 14:39:06 -07:00
Nate Prewitt
9ea85109a5 fixing rst markup 2020-04-03 14:31:44 -07:00
Dustin Rodrigues
c577eb8d5f fix README typo 2020-04-03 13:59:17 -07:00
Alessio Izzo
bebf5250b0 Remove explicit unicode literal in README.md and doc (#5336)
* [remove] remove "u" prefix in README and documentation examples
2020-03-25 12:44:51 -07:00
Seth Michael Larson
2758124a13 Also update GitHub's Security Disclosure document (#5370) 2020-02-27 21:33:09 -06:00
Nate Prewitt
4fc7f4a255 Update disclosure contact info (#5369) 2020-02-27 12:05:07 -06:00
Nate Prewitt
65989ddfe9 changing of the guard
Thanks for everything Ian. Welcome Seth!
2020-02-26 20:47:28 -08:00
Nate Prewitt
0a760ff025 updating pipfile.lock for bleach security issue (#5364) 2020-02-26 20:21:47 -08:00
Redowan Delowar
ca6f9af5db Normalize exception docstrings (#5338) 2020-02-23 11:56:46 -06:00
Nate Prewitt
b7c6aba848 v2.23.0 2020-02-19 10:44:27 -08:00
Nate Prewitt
fd13816d01 Revert "Fix for response with UTF-8 BOM #4976"
This reverts commit 19cff44ec1.
This reverts commit 9e27326d68.
This reverts commit f507a3ef12.
2020-02-18 18:56:39 -06:00
Nate Prewitt
24bcb9eab6 Revert "Use urllib for chunked requests"
This reverts commit 2da7fe0858.
2020-02-18 18:56:39 -06:00
Nate Prewitt
b15056d1d3 Revert "#4965 fix: Accessing response.content twice removes forgets read error."
This reverts commit bd10047244.

This reverts commit d91fe00983.
2020-02-18 18:56:39 -06:00
Ned Batchelder
80011a7917 Remove an obsolete attribute from __attrs__
The extra attribute in __attrs__ makes an unpickled session have one more attribute than the original.  Removing it makes the original and the unpickled be identical.
2020-02-18 09:17:21 -08:00
Chris Withers
c46f55bd48 Limit dependencies to major instead of minor (#5342) 2020-02-18 08:58:27 -06:00
Alexander Zhukov
e11302018b Fix the syntax highlighting in the example (#5276)
Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
2020-02-17 23:19:38 -08:00
Nate Prewitt
23f6faa7cd Merge pull request #5346 from stock1218/master
Update pipenv links in README and installation guide.
2020-02-17 21:44:33 -08:00
John Samuels
ae0a497b0c Update link to pipenv in installation guide. 2020-02-17 21:47:34 +00:00
John Samuels
b1631b03bc Update link to pipenv in README. 2020-02-17 21:46:26 +00:00
Nate Prewitt
a9906536ee Merge pull request #5326 from nawatts/intersphinx-mapping-config
Fix intersphinx_mapping config for Python standard library
2020-01-31 14:24:52 -10:00
Nick Watts
d5c4cac0f4 Fix intersphinx_mapping config for Python standard library 2020-01-25 18:19:22 -05:00
Nate Prewitt
7b565d886c Merge pull request #5325 from nawatts/install-pip-link
Change link for pip installation instructions
2020-01-25 10:19:34 -08:00
Nick Watts
7138d8b0e3 Change link for pip installation instructions 2020-01-25 12:09:10 -05:00
johnthagen
9b95b4e7b4 Add PyPy3 to Travis test suite (#5193) 2020-01-21 11:00:51 -06:00
Hugo van Kemenade
d2f65af033 Move community files under .github/ (#5206) 2020-01-19 09:41:09 -06:00
Sumana Harihareswara
a9ee0eef5a Add Python 2 support entry in FAQ (#5303)
* Add Python 2 support entry in FAQ

Fixes: #5211

Signed-off-by: Sumana Harihareswara <sh@changeset.nyc>

* Adding Python 3 recommendation

Co-authored-by: Nate Prewitt <nate.prewitt@gmail.com>
2020-01-09 09:55:20 -08:00
John Kooker
782e94d141 Update example code in README.md (#5292)
Show the current project description.
2020-01-09 09:26:42 -08:00
Nate Prewitt
ad18d14573 Merge pull request #5306 from hugovk/update-python-versions-in-faq
Update supported Python versions
2020-01-09 09:06:47 -08:00
Hugo
f462eecf48 Update supported Python versions 2020-01-06 11:24:02 +02:00
Nate Prewitt
eedd674628 Merge pull request #5250 from MasterOdin/patch-1
Fix link to requests-threads in community/recommended doc
2019-11-22 18:50:54 -08:00
Matthew Peveler
4a540ff5f1 Fix link to requests-threads on community/recommended 2019-10-30 16:15:13 -03:00
Sorin Sbarnea
d2590ee46c Change documentation website to requests.readthedocs.io (#5236)
Fixes: #5212
2019-10-24 20:02:55 -07:00
Charles Reid
4cd95aa496 update translation links from http -> https (#5237) 2019-10-24 19:46:04 -07:00
Nate Prewitt
56fd46f9bf Merge pull request #5243 from hugovk/test-3.8-final
Test on Python 3.8 final
2019-10-24 19:32:25 -07:00
Hugo
2ff8106d62 Test on Python 3.8 final 2019-10-22 18:40:03 +03:00
Ernest W. Durbin III
fab1fd10d0 Merge pull request #5216 from Leetcore/patch-1
documentation link fixed
2019-09-30 05:52:29 -04:00
Alex K
74b72ce426 documentation link fixed
websites is down, link to requests.readthedocs.io
2019-09-29 18:10:59 +02:00
Hugo
6e05165a29 Test on Python 3.8 beta 2019-09-26 15:06:29 -07:00
Hugo
0178903841 Xenial is now the default 2019-09-26 15:06:29 -07:00
☿ Kenneth Reitz
0d180a5cbb Merge pull request #5208 from psf/partII
Part II: The Principle of Polarity
2019-09-23 16:08:40 -04:00
☿ Kenneth Reitz
8345819b70 Update README.md 2019-09-23 14:31:19 -04:00
☿ Kenneth Reitz
5f824fb019 Update README.md 2019-09-23 14:30:16 -04:00
☿ Kenneth Reitz
1311c96eae Update README.md 2019-09-23 14:29:35 -04:00
☿ Kenneth Reitz
c4c60864f8 Update README.md 2019-09-23 14:28:52 -04:00
Kenneth Reitz
e8a9bd7415 The Principle of Polarity
Everything is dual; Everything has poles; Everything has its pair of opposites; Like and unlike are the same; Opposites are identical in nature, but different in degree; Extremes meet; All truths, are but half-truths; All paradoxes may be reconciled.
2019-09-23 14:17:08 -04:00
Kenneth Reitz
729fd3cf42 Revert "deepmind"
This reverts commit 14c323492a.
2019-09-23 14:07:17 -04:00
Kenneth Reitz
1d3787a0ea AUTHORS.rst 2019-09-23 14:07:01 -04:00
Nate Prewitt
0357b0724b Merge pull request #5195 from lzutao/patch-1
Fix formatting of status code example
2019-09-19 08:32:13 -07:00
Nate Prewitt
189fea7a11 Merge pull request #5197 from 5uper5hoot/patch-1
Fix misspelling
2019-09-19 08:29:29 -07:00
Nate Prewitt
a5f4f3c9a3 resolve more-itertools py2.7 issues
more-itertools is a transitive testing dependency that no longer supports
python2.7. In order to keep the test suite going, we're pinning under
6.0.0 (the breaking version) until we have better syntax in pipfile.
2019-09-19 08:17:21 -07:00
Nate Prewitt
e08981ee46 updating project url 2019-09-19 07:52:28 -07:00
Nate Prewitt
afb508f6a7 removing duplicate entry 2019-09-19 07:42:23 -07:00
Nate Prewitt
09fd857eb1 Revert "Add trusted domains"
This reverts commit fbe48fbb7c.
2019-09-19 07:42:23 -07:00
☿ Kenneth Reitz
1462917951 Update README.md 2019-09-18 19:24:42 -04:00
Peter Schutt
2962c236c9 Fix misspelling
Just noticed a small typo!
2019-09-18 21:09:22 +10:00
Kenneth Reitz
9d4fd3c968 Update README.md 2019-09-18 05:47:48 -04:00
Kenneth Reitz
12640ec242 Merge branch 'master' of github.com:psf/requests 2019-09-18 05:41:40 -04:00
Kenneth Reitz
5cb55a84a7 squash! 2019-09-18 05:41:33 -04:00
Kenneth Reitz
2cb3abea55 Update README.md 2019-09-18 05:41:05 -04:00
Kenneth Reitz
38d9a4f65f Merge branch 'master' of github.com:psf/requests 2019-09-18 05:40:25 -04:00
Kenneth Reitz
fbc5ed552e psf 2019-09-18 05:40:18 -04:00
Kenneth Reitz
5099688bfc Update README.md 2019-09-18 05:38:32 -04:00
Kenneth Reitz
4cd65385f8 Update README.md 2019-09-18 05:38:12 -04:00
Kenneth Reitz
87f9a58d45 Update README.md 2019-09-18 05:37:47 -04:00
Kenneth Reitz
9369b5a37a kr 2019-09-18 05:37:03 -04:00
Kenneth Reitz
23fe729356 Merge branch 'master' of github.com:psf/requests 2019-09-18 05:33:21 -04:00
Kenneth Reitz
1a7d1406cb cleanups 2019-09-18 05:33:15 -04:00
Kenneth Reitz
92b88fcffb Update README.md 2019-09-18 05:26:27 -04:00
Kenneth Reitz
ac851d8ac3 Merge branch 'master' of github.com:psf/requests 2019-09-18 05:26:03 -04:00
Kenneth Reitz
a025522d08 flourish 2019-09-18 05:25:59 -04:00
Kenneth Reitz
a3735e2517 Update README.md 2019-09-18 05:10:42 -04:00
Kenneth Reitz
06826504da Merge branch 'master' of github.com:psf/requests 2019-09-18 05:10:10 -04:00
Kenneth Reitz
14c323492a deepmind 2019-09-18 05:10:03 -04:00
Kenneth Reitz
c196511934 Update README.md 2019-09-18 05:02:36 -04:00
Kenneth Reitz
a9860c4fae Update README.md 2019-09-18 05:02:07 -04:00
Kenneth Reitz
f82382588f Update README.md 2019-09-18 05:01:17 -04:00
Kenneth Reitz
72176ab9ac Update README.md 2019-09-18 04:59:40 -04:00
Kenneth Reitz
eb2c14889f Update README.md 2019-09-18 04:59:26 -04:00
Kenneth Reitz
cfdd00f3a3 Update README.md 2019-09-18 04:57:16 -04:00
Kenneth Reitz
b15bccf35e Update README.md 2019-09-18 04:56:18 -04:00
Kenneth Reitz
f348d51818 Update README.md 2019-09-18 04:56:04 -04:00
Kenneth Reitz
dc1526f85d Update README.md 2019-09-18 04:55:34 -04:00
Kenneth Reitz
c21c039ec8 Update FUNDING.yml 2019-09-18 04:54:31 -04:00
Kenneth Reitz
49acab8033 Update FUNDING.yml 2019-09-18 04:54:20 -04:00
Kenneth Reitz
0f71067f64 Update README.md 2019-09-18 04:52:39 -04:00
Kenneth Reitz
9f35ebd795 Update README.md 2019-09-18 04:52:22 -04:00
Kenneth Reitz
de1c200dff Update README.md 2019-09-18 04:51:58 -04:00
Kenneth Reitz
458496d43e Update README.md 2019-09-18 04:51:23 -04:00
Kenneth Reitz
446911b853 Update README.md 2019-09-18 04:51:10 -04:00
Kenneth Reitz
3ed0f8fba0 Update README.md 2019-09-18 04:50:39 -04:00
Kenneth Reitz
d66ffdbb2b Update README.md 2019-09-18 04:49:57 -04:00
Kenneth Reitz
99197c2058 Update README.md 2019-09-18 04:49:43 -04:00
Kenneth Reitz
179f943300 Update README.md 2019-09-18 04:48:05 -04:00
Kenneth Reitz
75f062dcef Update README.md 2019-09-18 04:47:36 -04:00
Kenneth Reitz
a7944ba94f Update README.md 2019-09-18 04:46:49 -04:00
Kenneth Reitz
cf77263ad4 Update README.md 2019-09-18 04:45:14 -04:00
Kenneth Reitz
af85e68f1f Update README.md 2019-09-18 04:44:37 -04:00
Kenneth Reitz
536b583bc9 Update README.md 2019-09-18 04:44:26 -04:00
Kenneth Reitz
0f1251bc13 Update README.md 2019-09-18 04:43:41 -04:00
Kenneth Reitz
a29be8f9cc Update LICENSE 2019-09-18 04:42:26 -04:00
Kenneth Reitz
ac9f0d7c97 Update README.md 2019-09-18 04:40:07 -04:00
Kenneth Reitz
be2fe0c6af Update README.md 2019-09-18 04:39:30 -04:00
Kenneth Reitz
abe22b1da6 Update README.md 2019-09-18 04:39:17 -04:00
Kenneth Reitz
e11caeb39f Update README.md 2019-09-18 04:38:51 -04:00
Kenneth Reitz
30a16088c4 Update README.md 2019-09-18 04:37:53 -04:00
Kenneth Reitz
6831d2d8e4 Merge branch 'master' of github.com:psf/requests 2019-09-18 04:35:36 -04:00
Kenneth Reitz
a5bcc9c46e pngsquash 2019-09-18 04:35:29 -04:00
Kenneth Reitz
186dcee8a0 Update README.md 2019-09-18 04:31:58 -04:00
Kenneth Reitz
caf91bd175 Update README.md 2019-09-18 04:29:05 -04:00
Kenneth Reitz
80562c9f83 Update README.md 2019-09-18 04:28:47 -04:00
Kenneth Reitz
2256fd2bc4 Update README.md 2019-09-18 04:28:32 -04:00
Kenneth Reitz
316f748226 Update README.md 2019-09-18 04:28:17 -04:00
Kenneth Reitz
c6ab21c103 Update README.md 2019-09-18 04:27:19 -04:00
Kenneth Reitz
1d41e8dc97 Update README.md 2019-09-18 04:27:06 -04:00
Kenneth Reitz
80c7cbd46e Update README.md 2019-09-18 04:26:52 -04:00
Kenneth Reitz
775813aae7 Update README.md 2019-09-18 04:26:38 -04:00
Kenneth Reitz
cbccc5f07e Update README.md 2019-09-18 04:26:00 -04:00
Kenneth Reitz
26466b54ad Merge branch 'master' of github.com:psf/requests 2019-09-18 04:25:21 -04:00
Kenneth Reitz
042ccfcf99 license 2019-09-18 04:25:17 -04:00
Kenneth Reitz
24e46d0303 Update README.md 2019-09-18 04:21:16 -04:00
Kenneth Reitz
70cc902f5e Update README.md 2019-09-18 04:19:56 -04:00
Kenneth Reitz
091604455a Update README.md 2019-09-18 04:19:37 -04:00
Kenneth Reitz
b639f17705 Update README.md 2019-09-18 04:18:41 -04:00
Kenneth Reitz
33f41b8a13 Update README.md 2019-09-18 04:18:03 -04:00
Kenneth Reitz
73a65941ad Update README.md 2019-09-18 04:17:42 -04:00
Kenneth Reitz
2e992817d4 Update README.md 2019-09-18 04:17:04 -04:00
Kenneth Reitz
0f9bcfb86c Update README.md 2019-09-18 04:14:44 -04:00
Kenneth Reitz
fcde69193a Update README.md 2019-09-18 04:14:21 -04:00
Kenneth Reitz
b08073a7c3 Update README.md 2019-09-18 04:12:57 -04:00
Kenneth Reitz
e1eb569751 Update README.md 2019-09-18 04:12:00 -04:00
Kenneth Reitz
8d09a80a16 Update README.md 2019-09-18 04:11:31 -04:00
Kenneth Reitz
8074cc8bf5 Update README.md 2019-09-18 04:08:42 -04:00
Kenneth Reitz
8e19074296 Update README.md 2019-09-18 04:07:44 -04:00
Kenneth Reitz
30c128ade9 Update README.md 2019-09-18 04:05:51 -04:00
Kenneth Reitz
65a73bd0f7 Update README.md 2019-09-18 04:01:56 -04:00
Kenneth Reitz
e63d846b15 Update README.md 2019-09-18 03:59:35 -04:00
Kenneth Reitz
d6db3901cb Update README.md 2019-09-18 03:57:15 -04:00
Kenneth Reitz
355e288940 Update README.md 2019-09-18 03:56:27 -04:00
Kenneth Reitz
a08c421f7c Update README.md 2019-09-18 03:55:43 -04:00
Kenneth Reitz
e35ace77bf Update README.md 2019-09-18 03:55:23 -04:00
Kenneth Reitz
f3b62442be Update README.md 2019-09-18 03:54:03 -04:00
Kenneth Reitz
846c37c29d Update README.md 2019-09-18 03:53:50 -04:00
Kenneth Reitz
570dc15b52 Update README.md 2019-09-18 03:52:51 -04:00
Kenneth Reitz
4a87d1e62f Update README.md 2019-09-18 03:52:36 -04:00
Kenneth Reitz
2d3b68cf1e Update README.md 2019-09-18 03:51:22 -04:00
Kenneth Reitz
31a6e696bb Update README.md 2019-09-18 03:51:03 -04:00
Kenneth Reitz
33e402b21f Update README.md 2019-09-18 03:48:48 -04:00
Kenneth Reitz
60cffb076b Update README.md 2019-09-18 03:48:25 -04:00
Kenneth Reitz
bdc92c795f Update README.md 2019-09-18 03:41:20 -04:00
Kenneth Reitz
426a1c0120 Update README.md 2019-09-18 03:40:05 -04:00
Kenneth Reitz
bc8fa9c246 Update README.md 2019-09-18 03:39:46 -04:00
Kenneth Reitz
be7cbe1353 Update README.md 2019-09-18 03:38:46 -04:00
Kenneth Reitz
9ba6c5e638 Update README.md 2019-09-18 03:37:59 -04:00
Kenneth Reitz
762042260b Update README.md 2019-09-18 03:37:29 -04:00
Kenneth Reitz
2abe57458d Update README.md 2019-09-18 03:37:21 -04:00
Kenneth Reitz
e40a3d6094 Update README.md 2019-09-18 03:35:33 -04:00
Kenneth Reitz
c2479aeac7 logo 2019-09-18 03:34:08 -04:00
Kenneth Reitz
7ce4691289 Merge branch 'master' of github.com:psf/requests 2019-09-18 03:32:27 -04:00
Kenneth Reitz
c5d9e1216e resize 2019-09-18 03:32:18 -04:00
Kenneth Reitz
863542529d Update README.md 2019-09-18 03:31:48 -04:00
Kenneth Reitz
8072d4fda8 Update README.md 2019-09-18 03:31:23 -04:00
Kenneth Reitz
e820ac7c40 Update README.md 2019-09-18 03:30:45 -04:00
Kenneth Reitz
720f1ce61d Update README.md 2019-09-18 03:29:25 -04:00
Kenneth Reitz
6d37433c0e Merge branch 'master' of github.com:psf/requests 2019-09-18 03:28:44 -04:00
Kenneth Reitz
969783702d flower of life 2019-09-18 03:28:35 -04:00
Kenneth Reitz
6fbbbc8c9e Update README.md 2019-09-18 03:26:17 -04:00
Kenneth Reitz
26b104ecb9 Update README.md 2019-09-18 03:25:58 -04:00
Kenneth Reitz
3f21a2d62e shoes and cars 2019-09-18 03:25:21 -04:00
Kenneth Reitz
42926b5731 Merge branch 'master' of github.com:psf/requests 2019-09-18 03:22:03 -04:00
Kenneth Reitz
a7e2da804c flourish 2019-09-18 03:21:34 -04:00
Kenneth Reitz
2416c2dd47 Update README.md 2019-09-18 03:20:31 -04:00
Kenneth Reitz
b44d6fdf49 Update README.md 2019-09-18 03:20:10 -04:00
Kenneth Reitz
0859c01b16 flourish 2019-09-18 03:19:23 -04:00
Kenneth Reitz
c198cc0b2e Update README.md 2019-09-18 03:17:40 -04:00
Kenneth Reitz
4b9e5d0ef3 Update README.md 2019-09-18 03:17:21 -04:00
Kenneth Reitz
9b51d7c4f2 Update README.md 2019-09-18 03:17:05 -04:00
Kenneth Reitz
6b89c8752a Update README.md 2019-09-18 03:16:49 -04:00
Kenneth Reitz
59dac47346 Update README.md 2019-09-18 03:15:04 -04:00
Kenneth Reitz
bb2ae009bc Update README.md 2019-09-18 03:14:40 -04:00
Kenneth Reitz
11982c1f9f Update README.md 2019-09-18 03:14:26 -04:00
Kenneth Reitz
36cc7bbfc3 Update README.md 2019-09-18 03:12:31 -04:00
Kenneth Reitz
d675d83b1d Update README.md 2019-09-18 03:12:12 -04:00
Kenneth Reitz
4d2875da11 Update README.md 2019-09-18 03:11:56 -04:00
Kenneth Reitz
687ff0eb36 Update README.md 2019-09-18 03:11:34 -04:00
Kenneth Reitz
c51a9efa2b Update README.md 2019-09-18 03:10:41 -04:00
Kenneth Reitz
c386eebcf8 Update README.md 2019-09-18 03:10:21 -04:00
Kenneth Reitz
3423b51748 Update README.md 2019-09-18 03:10:00 -04:00
Kenneth Reitz
3ff2995c1d Update README.md 2019-09-18 03:09:42 -04:00
Kenneth Reitz
e231de6ddc Update README.md 2019-09-18 03:05:16 -04:00
Kenneth Reitz
54cefc901c Update README.md 2019-09-18 03:04:51 -04:00
Kenneth Reitz
2bc6aeb64e Update README.md 2019-09-18 03:03:12 -04:00
Kenneth Reitz
7c71cb9643 Update README.md 2019-09-18 03:02:29 -04:00
Kenneth Reitz
e0359b2725 Update README.md 2019-09-18 02:54:15 -04:00
Kenneth Reitz
25d1ffda8c Update README.md 2019-09-18 02:53:30 -04:00
Kenneth Reitz
537ac3cf22 Update README.md 2019-09-18 02:52:51 -04:00
Kenneth Reitz
5477208835 Update README.md 2019-09-18 02:52:15 -04:00
Kenneth Reitz
0b2517465d Update README.md 2019-09-18 02:51:37 -04:00
Kenneth Reitz
1c19e6148f Update README.md 2019-09-18 02:51:10 -04:00
Kenneth Reitz
55d3d8b3b2 Update README.md 2019-09-18 02:50:59 -04:00
Kenneth Reitz
5f3b95992b Update README.md 2019-09-18 02:49:42 -04:00
Kenneth Reitz
3e012c16c3 Update README.md 2019-09-18 02:49:15 -04:00
Kenneth Reitz
c13ccd11f6 Update README.md 2019-09-18 02:48:45 -04:00
Kenneth Reitz
266d17c4de Update README.md 2019-09-18 02:43:58 -04:00
Kenneth Reitz
6b639bbc08 Update README.md 2019-09-18 02:43:41 -04:00
Kenneth Reitz
6c322457a2 pipfile / lock 2019-09-18 02:42:55 -04:00
Kenneth Reitz
5090ba79ac Create .nojekyll 2019-09-18 02:39:15 -04:00
Kenneth Reitz
da13fec6ce Create SECURITY.md 2019-09-18 02:37:03 -04:00
Kenneth Reitz
d7018e6d61 Create FUNDING.yml 2019-09-18 02:34:01 -04:00
lzutao
39b3dcf7d9 Fix formatting of status code example 2019-09-17 19:34:36 +07:00
Kenneth Reitz
3d968ff34d Update index.rst 2019-08-26 10:35:52 -04:00
Kenneth Reitz
b6b90f4d9b Update sidebarintro.html 2019-08-20 19:02:36 -04:00
Kenneth Reitz
913adced21 Update sidebarlogo.html 2019-08-20 19:02:23 -04:00
Nate Prewitt
e320f9e467 Merge pull request #5171 from MFStapert/patch-2
Fix typo
2019-08-20 10:28:48 -07:00
Marijn Stapert
4070bcf1b9 Fix typo 2019-08-20 19:25:03 +02:00
Kenneth Reitz
3c01cd7080 Update README.md 2019-08-20 01:02:03 -04:00
Kenneth Reitz
bc81ee3af4 Update setup.py 2019-08-20 01:01:06 -04:00
Kenneth Reitz
b1d584e899 Update index.rst 2019-08-20 00:58:49 -04:00
Kenneth Reitz
b98be047f2 Update README.md 2019-08-20 00:58:07 -04:00
Kenneth Reitz
ced3779126 Update README.md 2019-08-20 00:57:58 -04:00
Kenneth Reitz
bedb1cd38f Update README.md 2019-08-20 00:57:46 -04:00
Kenneth Reitz
d258b20eba Delete sponsors.rst 2019-08-20 00:57:00 -04:00
Kenneth Reitz
e2fce5e60c Update index.rst 2019-08-20 00:56:45 -04:00
Kenneth Reitz
72ca1b7e31 Update index.rst 2019-08-20 00:55:57 -04:00
Kenneth Reitz
7f3ce7eaac Update sidebarlogo.html 2019-08-20 00:55:22 -04:00
Kenneth Reitz
b248328eb3 Update sidebarintro.html 2019-08-20 00:54:28 -04:00
Kenneth Reitz
10e5f874c7 Update sidebarintro.html 2019-08-20 00:54:00 -04:00
Kenneth Reitz
7f2513fb81 Update index.rst 2019-08-20 00:50:22 -04:00
Kenneth Reitz
04b5c83701 Update index.rst 2019-08-20 00:50:07 -04:00
Kenneth Reitz
1f9ec06e22 Update index.rst 2019-08-20 00:49:18 -04:00
Kenneth Reitz
00fa902c7d Update README.md 2019-08-20 00:47:05 -04:00
Kenneth Reitz
3393232304 Update README.md 2019-08-20 00:46:57 -04:00
Kenneth Reitz
d41fba6347 Update README.md 2019-08-20 00:46:47 -04:00
Kenneth Reitz
7ca0e86a67 Update README.md 2019-08-20 00:45:53 -04:00
Kenneth Reitz
428f7a2759 Merge pull request #5076 from myrheimb/patch-1
Possible fix for #4945?
2019-08-20 00:38:21 -04:00
Kenneth Reitz
a71e2240df Merge pull request #4976 from eduardomourar/feature/strip-utf8-bom
Fix for response with UTF-8 BOM
2019-08-20 00:26:59 -04:00
Kenneth Reitz
4bce5a0bc5 Merge branch 'master' into feature/strip-utf8-bom 2019-08-20 00:26:51 -04:00
Kenneth Reitz
3e7d0a873f Merge pull request #4987 from aless10/master
[fix] fix failing doctests in requests/*
2019-08-20 00:25:50 -04:00
Kenneth Reitz
df918c066f Merge branch 'master' into master 2019-08-20 00:25:37 -04:00
Kenneth Reitz
ada50499a0 Merge pull request #4996 from sblondon/master
Add link to user-agent documentation
2019-08-20 00:24:08 -04:00
Kenneth Reitz
82c744b59c Merge pull request #4983 from jaketreacher/2949-trusted-domain
Add trusted domains
2019-08-20 00:23:52 -04:00
Kenneth Reitz
bbc3d43522 Merge pull request #4922 from jdufresne/ordered
Remove unnecessary compat shim for OrderedDict
2019-08-20 00:22:32 -04:00
Kenneth Reitz
8086ffdbbf Merge pull request #4999 from greysteil/add-project-urls
Add project URLs with links to source code and docs
2019-08-20 00:21:31 -04:00
Kenneth Reitz
5eb7337494 Merge pull request #4978 from sayzlim/master
Fix double image request
2019-08-20 00:21:12 -04:00
Kenneth Reitz
48e1a3359e Merge branch 'master' into master 2019-08-20 00:21:04 -04:00
Kenneth Reitz
1b450d2038 Merge pull request #5018 from hugovk/rm-2.6
Remove duplicate config
2019-08-20 00:17:54 -04:00
Kenneth Reitz
67a7b2e833 Merge pull request #5087 from LuckyDenis/master
#4965 Fix
2019-08-20 00:16:35 -04:00
Kenneth Reitz
42c5a4f622 Merge pull request #5128 from lmvlmv/urllibfix
Use urllib for chunked requests
2019-08-20 00:15:44 -04:00
Kenneth Reitz
11ed88bcb2 Merge pull request #5105 from alanyee/patch-1
Update sessions.py
2019-08-20 00:14:36 -04:00
Kenneth Reitz
0fe6653eab Merge pull request #5049 from hroncok/pytest4
Support pytest 4
2019-08-20 00:12:58 -04:00
Kenneth Reitz
dd15e52840 Merge pull request #5119 from alanyee/patch-1
Update sessions.py
2019-08-20 00:11:22 -04:00
Kenneth Reitz
9bc49b5960 Merge branch 'master' into patch-1 2019-08-20 00:11:02 -04:00
Nate Prewitt
d79024f246 Merge pull request #5160 from OrangutanGaming/change-github
Updated references to previous requests/requests GitHub path
2019-08-19 15:57:15 -07:00
Nihaal
9cdf294107 Updated references to previous requests/requests GitHub path 2019-08-19 21:33:18 +01:00
Nate Prewitt
9f55e4bc09 Merge pull request #5164 from dschaller/patch-1
fix codecov logo in readme
2019-08-19 10:55:40 -07:00
Nate Prewitt
bf582192b8 Merge pull request #5167 from aadibajpai/patch-1
[IMPROVEMENT] Update monthly download count
2019-08-19 10:54:31 -07:00
Aadi Bajpai
408e576d33 Update README.md with download count
https://pepy.tech/project/requests
2019-08-19 22:13:41 +05:30
Derek
7d57e8ec55 fix codecov logo in readme 2019-08-15 18:47:10 -07:00
Denis Belavin
e8ff4897fe Merge branch 'master' into master 2019-08-14 21:12:19 +03:00
Dull Bananas
a4c18cd733 Add missing backtick (#5145) 2019-07-29 09:06:11 -07:00
sblondon
07005b0ffc Merge branch 'master' into master 2019-07-25 18:07:21 +02:00
lmvlmv
989f702742 Merge branch 'master' into urllibfix 2019-07-25 10:49:24 +01:00
Alessio Izzo
a0d58026e0 Merge branch 'master' into master 2019-07-24 12:42:40 +02:00
Denis Belavin
3922dcf2a1 Merge branch 'master' into master 2019-07-23 21:36:37 +03:00
Kenneth Reitz
589a822567 Merge pull request #5141 from minho42/Fix-typos
Fix typos
2019-07-23 12:53:21 -04:00
lmvlmv
e8c9acc8a2 Merge branch 'master' into urllibfix 2019-07-23 09:31:00 +01:00
Kenneth Reitz
9a2e5df000 Merge pull request #5142 from dullbananas/master
Improve docs
2019-07-20 23:57:00 -04:00
Dull Bananas
c79d61b953 List valid methods for request() 2019-07-20 15:32:04 -07:00
Dull Bananas
f9ac75cab1 Fix GitHub profile link 2019-07-20 09:31:39 -07:00
Dull Bananas
ebd3e36ad5 Add 'Dull Bananas' to AUTHORS 2019-07-20 09:29:50 -07:00
Dull Bananas
50daf9c005 Add .eggs dir to .gitignore 2019-07-20 09:23:52 -07:00
Dull Bananas
fb7efcf3f1 Add example of good code below example of bad code 2019-07-20 09:17:54 -07:00
Min ho Kim
5f576ad22f Fix typos 2019-07-20 01:46:08 +10:00
kobayashi
0b6c110a5c Merge pull request #5127 from Unit03/head-allow-redirects-docstring
Document that `request.head` defaults `allow_redirects` to `False`
2019-07-11 20:18:42 -04:00
Leon Verrall
2da7fe0858 Use urllib for chunked requests 2019-07-02 10:17:33 +01:00
Jacek Kołodziej
c8d8b4b513 Document that request.head defaults allow_redirects to False
Related: kennethreitz/requests#4274
2019-07-01 21:41:38 +02:00
Alan Yee
45c2e679e0 Update sessions.py
Use `.format()` over `%` given PEP 3101
2019-06-24 10:12:38 -07:00
aless10
27b24f974f Merge branch 'master' of https://github.com/kennethreitz/requests 2019-06-13 22:48:08 +02:00
Denis Belavin
6296df90b9 Merge branch 'master' into master 2019-06-13 10:18:55 +03:00
Nate Prewitt
4983a9bde3 Merge pull request #5108 from atombrella/python34
Removed py34 from tox.ini.
2019-06-03 07:01:03 -07:00
Mads Jensen
2e4329d153 Removed py34 from tox.ini. 2019-06-03 08:45:48 +02:00
Alan Yee
47cb8bae1a Update sessions.py
-Made removing a key-value pair more modular
-Remove unneeeded return statement
2019-05-29 11:49:44 -07:00
aless10
d889b98eae Merge branch 'master' of https://github.com/kennethreitz/requests 2019-05-24 20:40:22 +02:00
Miro Hrončok
dc75b3ca0b Support pytest 4
Fixes https://github.com/kennethreitz/requests/issues/5048

See https://docs.pytest.org/en/latest/deprecations.html#marks-in-pytest-mark-parametrize
2019-05-24 00:02:43 +02:00
Denis Belavin
0becdca7e3 Merge branch 'master' into master 2019-05-20 21:00:14 +03:00
Buğra İşgüzar
6f81e78dfe Merge pull request #5099 from petar-iv/password-no-print
Print the type of the password instead of the password itself
2019-05-20 18:35:41 +03:00
Denis Belavin
9c3c755abe Merge branch 'master' into master 2019-05-20 10:12:35 +03:00
petar-iv
d88240ba44 Print the type of the password instead of the password itself 2019-05-20 09:57:11 +03:00
aless10
6d2a5072ca [add] add NORMALIZE_WHITESPACE and ELLIPSIS to pytest.ini and remove them from requests/__init__.py 2019-05-19 16:25:52 +02:00
aless10
96ff7ca31f Merge branch 'master' of https://github.com/aless10/requests 2019-05-19 16:21:40 +02:00
aless10
2e633471f1 Merge branch 'master' of https://github.com/kennethreitz/requests 2019-05-19 16:20:40 +02:00
aless10
67a0e90b6b [change] change doctest based on LuckyDenis suggestion 2019-05-19 16:20:11 +02:00
Alessio Izzo
4a59cd0950 Merge branch 'master' into master 2019-05-19 16:08:55 +02:00
Hugo
be295ba4d4 Simplify config 2019-05-16 18:36:45 +03:00
Hugo
d36f391957 Merge branch 'master' into rm-2.6 2019-05-16 18:31:37 +03:00
Frost Ming
a79a63390b Merge pull request #5088 from zurbrugc/master
Linked a GitHub tutorial regarding pull requests in README
2019-05-16 13:20:45 +08:00
Frost Ming
86760daf23 Merge branch 'master' into master 2019-05-16 13:14:08 +08:00
Frost Ming
8e26bfd86d Merge pull request #5092 from kennethreitz/urllib1.25
v2.22.0
2019-05-16 13:12:48 +08:00
Nate Prewitt
aeda65bbe5 v2.22.0 2019-05-15 12:51:39 -07:00
Nate Prewitt
68e581f1b5 drop 3.4 support 2019-05-15 12:51:31 -07:00
Nate Prewitt
a91905d78e adjust pytest pins to fix testing infra 2019-05-15 12:51:23 -07:00
zurbrugc
44256ffe7c Linked how to make a pull requests in README
This makes it easier for users new to GitHub to learn how to make a pull request.
2019-05-14 11:25:16 -07:00
zurbrugc
4803716715 Merge pull request #1 from kennethreitz/master
Updating my fork with the original
2019-05-14 11:21:30 -07:00
Белавин Денис
bd10047244 #4965 fix: Accessing response.content twice removes forgets read error. 2019-05-14 12:11:56 +03:00
Белавин Денис
d91fe00983 #4965 fix-draw: Accessing response.content twice removes forgets read error. 2019-05-13 17:18:42 +03:00
Kenneth Reitz
b18f765774 Merge pull request #5054 from imikay/patch-1
Add import statement to README example
2019-05-09 17:38:19 -04:00
Kenneth Reitz
b5b8c038a7 Merge pull request #5082 from zurbrugc/master
Linked contribution information in README
2019-05-09 17:37:32 -04:00
zurbrugc
a694ab5c00 Linked contribution information in README
For potential contributors who are new to GitHub and prefer to learn via structured processes, linking the Contributor's Guide and development philosophy documents in the README will make it easier for them to find this information. This will increase the quality of their contributions and make them more comfortable contributing to the project.
2019-05-09 11:33:01 -07:00
Kenneth Reitz
e52932c427 Update index.rst 2019-05-06 07:48:07 -04:00
Kenneth Reitz
1f9425ca53 Update README.md 2019-05-06 07:41:34 -04:00
Buğra İşgüzar
b4f76878fe Merge branch 'master' into patch-1 2019-05-02 00:30:04 +03:00
Bjørnar Myrheim
a310b5ab34 Possible fix for #4945?
Could the missing colon on line 612 be the reason for the missing reference in the docs as described in issue #4945?
2019-04-30 18:37:11 +02:00
Kenneth Reitz
e73a6c52d2 Merge pull request #5034 from tomchristie/patch-1
Add `requests-async` link to "non-blocking" docs.
2019-04-27 09:13:43 -04:00
Kenneth Reitz
e3c3c0a8fe Merge pull request #5062 from alexwlchan/patch-1
docs: Correct the spelling of "maintenance"
2019-04-27 09:12:09 -04:00
Alex Chan
faafb5a043 docs: Correct the spelling of "maintenance" 2019-04-25 08:19:20 +01:00
Alessio Izzo
663aa1162b Merge branch 'master' into master 2019-04-23 19:18:02 +02:00
Kenneth Reitz
d22d219d34 Merge pull request #5066 from s-pace/doc/update
[doc website] Add a nice search experience
2019-04-23 08:23:57 -04:00
s-pace
74289f420c feat: add search to the main introduction page 2019-04-23 07:47:33 +02:00
s-pace
749419ad0c feat: add search to every documentation pages 2019-04-23 07:47:08 +02:00
Kenneth Reitz
7f438416e4 less is more 2019-04-20 08:22:04 -04:00
Kenneth Reitz
5d06354734 fix 2019-04-20 08:21:21 -04:00
Kenneth Reitz
2d120e32db fix 2019-04-20 08:19:49 -04:00
Kenneth Reitz
69856f3052 requests 3.0 intentions 2019-04-20 08:09:43 -04:00
Ian Gao
37011aaa3f Add import statement
Should add this import statement to make it more user friendly, especially for the beginners in Python.
2019-04-11 19:03:15 +08:00
Alessio Izzo
8b773a4fed [remove] remove invalid field in docete
Remove 'Connection': 'close' field in 'headers'
2019-04-07 13:36:34 +02:00
Alessio Izzo
c19c394ac1 Merge branch 'master' into master 2019-04-07 13:24:09 +02:00
Kenneth Reitz
9742da7f91 Update sidebarlogo.html 2019-03-28 23:52:07 -04:00
Kenneth Reitz
76a89c3c9b Update sidebarintro.html 2019-03-28 23:51:53 -04:00
Tom Christie
6f6d0164a9 Add requests-async link to "non-blocking" docs.
Links to https://github.com/encode/requests-async for an asyncio non-blocking option.
2019-03-27 10:09:19 +00:00
Alessio Izzo
aa21dbe7fc Merge branch 'master' into master 2019-03-26 16:24:43 +01:00
Hugo
a7969c5c42 Remove old Python 2.6 check and duplicate config 2019-03-10 17:08:09 +02:00
Kenneth Reitz
a345b776fb update copyright year 2019-02-28 12:03:44 -05:00
Kenneth Reitz
63e7748fe5 programming quiz 2019-02-28 11:47:41 -05:00
Kenneth Reitz
f2409648ac programming quiz 2019-02-28 11:46:27 -05:00
Grey Baker
7d7d9ebacf Add project URLs with links to source code and docs 2019-02-23 13:24:52 +00:00
sblondon
248211453d Add link to user-agent documentation
So the user has a pointer to the documentation about the searched topic.
2019-02-22 11:04:07 +01:00
aless10
fd926e74c3 [change] change description in __init__ module. Now it is the same as master 2019-02-17 19:45:32 +01:00
aless10
177f4dd2a4 [fix] fix failing doctests in requests/*
[add] add --doctest-modules in pytest.ini file as addopts
[add] add myself to AUTHORS
2019-02-17 19:06:01 +01:00
Jake Treacher
fbe48fbb7c Add trusted domains 2019-02-15 10:40:24 +08:00
Sayz Lim
5add08fc84 Fix double image request
Use official framework for the "custom" ad design integration.
2019-02-12 20:24:58 +07:00
Eduardo Rodrigues
19cff44ec1 fix response with utf8 bom 2019-02-09 22:14:22 +01:00
Eduardo Rodrigues
9e27326d68 add failing tests for bom 2019-02-09 22:00:32 +01:00
Eduardo Rodrigues
f507a3ef12 add utf8 with bom to test 2019-02-09 11:56:06 +01:00
Ian Stapleton Cordasco
c9309e4c59 Merge pull request #4960 from andrewbonney/master
docs: correct error in 'merge_environment_settings' usage

Closes #4959
2019-02-04 09:22:40 -06:00
Andrew Bonney
827bbe2a7e docs: correct error in 'merge_environment_settings' usage
Resolves #4959
2019-02-04 13:28:12 +00:00
Ian Stapleton Cordasco
64bde6582d Merge pull request #4940 from sloria/patch-2
Remove sudo: from .travis.yml
2019-01-21 12:50:27 -06:00
Ian Stapleton Cordasco
334be4d272 Merge branch 'master' into patch-2 2019-01-21 07:59:29 -06:00
Ian Stapleton Cordasco
67a9ed47ae Merge pull request #4915 from sethmlarson/patch-1
Normalize percent-encoded bytes before comparison
2019-01-21 07:58:32 -06:00
Seth Michael Larson
28208392cd revert lock change 2019-01-19 10:57:12 -06:00
Seth Michael Larson
5734f4fc4a Force pipenv to use the lockfile 2019-01-19 10:51:12 -06:00
Seth Michael Larson
4c320ac3a2 Lock pytest to <4.1 2019-01-19 10:34:58 -06:00
Steven Loria
b49547f135 Remove sudo: from .travis.yml
TravisCI has migrated their infrastructure: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2019-01-16 20:59:14 -05:00
Seth M. Larson
f1e48f4d0d Merge branch 'master' into patch-1 2019-01-16 18:47:10 +00:00
Nate Prewitt
f37daf2500 Merge pull request #4936 from ofek/patch-2
Fix typo
2019-01-12 15:54:21 -08:00
Ofek Lev
6dd410ff17 Fix typo 2019-01-12 18:33:00 -05:00
Jon Dufresne
2aab9a9a39 Remove internal use of unnecessary compat shim for OrderedDict
The shim is the same on both Python 2 & 3. It is always
collections.OrderedDict. Avoid the indirection and import from Python
stdlib instead.

Keep requests.compat.OrderedDict for backwards compatibility. Some
packages import this.
2018-12-29 12:05:33 -05:00
Seth M. Larson
ad9400ecfe Normalize percent-encoded bytes before comparison 2018-12-23 15:50:16 -06:00
Nate Prewitt
5c1f72e80a Merge pull request #4910 from moy/master
get(), request(): fix documentation of 'params'
2018-12-13 13:34:10 -08:00
Matthieu Moy
c4d76800e8 get(), request(): fix documentation of 'params'
'params' is sent to the query string, not the body.
2018-12-13 15:57:00 +01:00
Nate Prewitt
c452e3b92d Merge pull request #4901 from requests/v2.21.0
v2.21.0
2018-12-10 07:36:33 -08:00
Nate Prewitt
5a1e738ea9 v2.21.0 2018-12-09 22:13:32 -08:00
Alex Gaynor
8761e9736f Bumped maximum version of idna 2018-12-09 21:41:14 -08:00
Nate Prewitt
abe950cfd3 Revert "Set up Azure Pipelines for Linux and Windows"
This reverts commit e4974c7ff5.
2018-12-09 20:45:06 -08:00
Nate Prewitt
c35f34263a Merge pull request #4898 from requests/revert_azure
revert azure pipeline changes
2018-12-09 20:31:09 -08:00
Nate Prewitt
0dd4752598 revert azure pipeline changes
Reverting commits:
fc9dfac
bc3eddc
d911f27
3da2f10
ce52825
398d110
c15d2b6
086655e
2018-12-09 20:19:10 -08:00
Kenneth Reitz
57d7284c1a Merge pull request #4874 from kaylangan/patch-1
Add build badge for Azure Pipelines
2018-11-14 10:33:06 -05:00
Kayla Ngan
fc9dfac2b9 Add build badge for Azure Pipelines
Not sure if you want to add a build badge since you didn't have one before. But if you do, here's yours for Azure Pipelines.
2018-11-14 10:27:16 -05:00
Kenneth Reitz
bc3eddc6ed Delete settings.json 2018-11-13 07:53:16 -05:00
Kenneth Reitz
d911f27868 Delete install.ps1 2018-11-13 07:52:59 -05:00
Kenneth Reitz
3da2f10290 Delete .travis.yml 2018-11-13 07:52:48 -05:00
Kenneth Reitz
5e0ebc9b9f Merge pull request #4867 from jdufresne/extra
Simplify tox.ini
2018-11-13 07:52:06 -05:00
Kenneth Reitz
75e2dd3094 Merge pull request #4868 from jdufresne/tox-py37
Add Python 3.7 to tox test matrix
2018-11-13 07:51:36 -05:00
Kenneth Reitz
9533df1f0b Merge pull request #4870 from requests/kennethreitz-patch-1
Delete appveyor.yml
2018-11-13 07:51:25 -05:00
Kenneth Reitz
ce52825d12 fix coverage 2018-11-13 07:48:59 -05:00
Kenneth Reitz
398d1105b4 fix coverage 2018-11-13 07:48:48 -05:00
Kenneth Reitz
c15d2b6949 Delete appveyor.yml 2018-11-13 07:27:42 -05:00
Kenneth Reitz
7d4fc04a6f Merge pull request #4869 from kaylangan/master
Set up CI with Azure Pipelines
2018-11-13 07:11:50 -05:00
Kayla Ngan
086655e4fc Unify Linux and Windows 2018-11-12 13:37:50 -05:00
Jon Dufresne
779fd6e7f3 Add Python 3.7 to tox test matrix 2018-11-11 12:01:41 -08:00
Jon Dufresne
af63554106 Simplify tox.ini
Tox installs the package to the virtualenv by default. PySocks is
already included in test_requirements. Don't need to install these
explicitly.
2018-11-11 11:54:25 -08:00
Nate Prewitt
bedd9284c9 Merge pull request #4861 from altendky/patch-1
Set iter_lines() decode_unicode default to False
2018-11-09 12:44:34 -08:00
Kayla Ngan
e4974c7ff5 Set up Azure Pipelines for Linux and Windows 2018-11-09 15:20:08 -05:00
Kyle Altendorf
36412c5ae7 Merge branch 'master' into patch-1 2018-11-09 14:09:08 -05:00
Nate Prewitt
6cfbe1aedd v2.20.1 2018-11-08 09:14:10 -08:00
Kyle Altendorf
a7aa86a933 Set iter_lines() decode_unicode default to False
The docs just read a bit strange with `decode_unicode=None` as opposed to `False`.
2018-11-06 12:35:39 -05:00
Nate Prewitt
c501ec986d Merge pull request #4853 from mainanick/master
Incorrect ValueError Message on ~requests.utils.from_key_val_list comments
2018-10-29 23:13:56 -07:00
Maina Nick
045b706b37 Merge pull request #2 from requests/master
Syncing fork to the original repository
2018-10-29 22:55:03 +03:00
unknown
ccbffe5a53 Incorrect ValueError Message 2018-10-29 22:53:02 +03:00
Ian Stapleton Cordasco
eaab47f033 Merge pull request #4851 from requests/default_port_handling
proper handling for default ports in auth stripping
2018-10-29 07:48:36 -05:00
Nate Prewitt
ea9436a5d6 proper handling for default ports in auth stripping 2018-10-28 23:29:04 -07:00
Maina Nick
3a831be413 Merge pull request #1 from requests/master
Syncing fork to the original repository
2018-10-28 14:20:07 +03:00
Nate Prewitt
7c812e919b Merge pull request #4839 from rabdill/patch-1
Reverting redirect examples back to intended URLs
2018-10-20 16:36:09 -07:00
Rich Abdill
5fdc25b029 Reverting redirect examples back to intended URLs
A find/replace from a few weeks ago made the redirection sample not demonstrate redirection anymore
2018-10-20 16:55:48 -05:00
Nate Prewitt
d2962f1d55 update maintainer contact info 2018-10-18 09:03:51 -07:00
Nate Prewitt
edf7731e66 update vulnerability information 2018-10-18 09:00:12 -07:00
Nate Prewitt
a1f4e62aa4 fix broken HISTORY.md reference 2018-10-18 08:58:48 -07:00
Nate Prewitt
75bdc998e2 Merge pull request #4835 from requests/2.20.0
v2.20.0
2018-10-18 08:44:49 -07:00
Nate Prewitt
bd840450c0 v2.20.0 2018-10-17 22:32:22 -07:00
Nate Prewitt
7fd9267b3b remove final remnants from 2.6 2018-10-17 00:18:51 -07:00
Hugo Osvaldo Barrera
6ae8a21892 Add myself to AUTHORS
(Or rather, just update my email)
2018-10-16 20:34:56 -07:00
Hugo Osvaldo Barrera
89ab030cdb Use comprehensions whenever possible 2018-10-16 20:34:22 -07:00
Nate Prewitt
2c6a8426ae Merge pull request #4827 from webmaven/patch-1
CVE URLs update: www sub-subdomain no longer valid
2018-10-16 09:33:08 -07:00
Michael R. Bernstein
30be889651 CVE URLs update: www sub-subdomain no longer valid 2018-10-16 10:10:30 -06:00
Nate Prewitt
a6cd380c64 Merge pull request #4765 from requests/encapsulate_urllib3_exc
wrap url parsing exceptions from urllib3's PoolManager
2018-09-30 20:23:57 -06:00
Nate Prewitt
bbdbcc8f05 wrap url parsing exceptions from urllib3's PoolManager 2018-09-30 18:36:05 -06:00
Nate Prewitt
ff0c325014 Merge pull request #4805 from jdufresne/https
Prefer https:// for URLs throughout project
2018-09-30 18:27:23 -06:00
Jon Dufresne
b0ad2499c8 Prefer https:// for URLs throughout project 2018-09-30 17:14:40 -05:00
Jon Dufresne
8f20b7dc8f Remove dead link to unixstickers.com
The link does not link Requests stickers as the text suggests.
2018-09-30 14:03:59 -06:00
Nate Prewitt
207e83f6b6 Merge pull request #4802 from schafezp/patch-1
Update README.md to fix typo
2018-09-21 09:27:12 -07:00
Zachary Schafer
b3c8bb7bef Update README.md to fix typo
I noticed "Rquests" was used at the top of the readme instead of "Requests". If that was intentional then ignore this change.
2018-09-21 12:22:53 -04:00
Kenneth Reitz
d26f6314ab Update index.rst 2018-09-17 06:42:52 -04:00
Kenneth Reitz
dcf5617a5e Update index.rst 2018-09-17 06:42:21 -04:00
Kenneth Reitz
76cf1fa214 Update index.rst 2018-09-17 06:41:41 -04:00
Kenneth Reitz
05dd0b88a1 Update index.rst 2018-09-17 06:40:47 -04:00
Kenneth Reitz
3f024ff774 Update index.rst 2018-09-17 06:40:26 -04:00
Kenneth Reitz
cb1bd313e1 Update MANIFEST.in 2018-09-17 06:07:08 -04:00
Kenneth Reitz
efc4ea6ed7 Delete HISTORY.rst 2018-09-17 06:06:47 -04:00
Kenneth Reitz
5251882a03 history 2018-09-17 06:06:08 -04:00
Kenneth Reitz
02a5d7ba68 Update MANIFEST.in 2018-09-17 06:05:18 -04:00
Kenneth Reitz
eea96f94d9 Update setup.py 2018-09-17 06:05:03 -04:00
Kenneth Reitz
9866277c03 Delete README.rst 2018-09-17 06:03:42 -04:00
Kenneth Reitz
7675468068 Update README.md 2018-09-17 06:03:22 -04:00
Kenneth Reitz
fdcb717cf7 Merge branch 'master' of github.com:requests/requests 2018-09-17 06:00:56 -04:00
Kenneth Reitz
4e7e2707e3 readme 2018-09-17 05:59:57 -04:00
Kenneth Reitz
86914e2dda Update README.rst 2018-09-17 05:56:15 -04:00
Nate Prewitt
52473da631 Merge pull request #4791 from juozasget/patch-1
Tuple test_requirements was too long, PEP8
2018-09-15 21:44:26 +08:00
juozasget
b9dfc95cf2 Tuple test_requirements was too long, PEP8
Broken a long line into multiple lines inside tuple parenthesis.
2018-09-15 13:26:59 +03:00
Nate Prewitt
c292cabd1f Merge pull request #4787 from vinayak-mehta/patch-1
Fix broken essay link
2018-09-15 08:08:44 +08:00
Vinayak Mehta
5ef429efe3 Fix broken essay link 2018-09-15 03:43:30 +05:30
Nate Prewitt
c45d7c49ea Merge pull request #4718 from bmerry/fix-4716
Strip Authorization header whenever root URL changes
2018-09-14 20:08:04 +08:00
Bruce Merry
857e9b7ac2 Rework authorization stripping logic as discussed
The exception for http->https upgrade now requires the standard HTTP(S)
ports to be used, either implicitly (no port specified) or explicitly.
2018-09-14 10:44:43 +02:00
Bruce Merry
3331e2aecd Strip Authorization header whenever root URL changes
Previously the header was stripped only if the hostname changed, but in
an https -> http redirect that can leak the credentials on the wire
(#4716). Based on with RFC 7235 section 2.2, the header is now stripped
if the "canonical root URL" (scheme+authority) has changed, by checking
scheme, hostname and port.
2018-09-14 10:44:43 +02:00
Nate Prewitt
dd754d13de Merge pull request #4785 from alexwlchan/encounterd-of-the-third-kind
Fix a typo in a test docstring
2018-09-12 22:57:31 -07:00
Alex Chan
d1fab0b60c Fix a typo in a test docstring 2018-09-13 06:26:59 +01:00
Kenneth Reitz
8472dbd134 Merge pull request #4782 from sayzlim/master
Fix CSS error
2018-09-10 16:02:00 -04:00
Sayz Lim
0fc171091d Fix CSS error
Human error, I shouldn’t have moved the CTA.
2018-09-11 02:59:03 +07:00
Kenneth Reitz
15029e3b16 Merge pull request #4781 from sayzlim/master
Adjust padding and button placements
2018-09-10 15:35:07 -04:00
Sayz Lim
f18f12bcbc Merge branch 'master' of https://github.com/sayzlim/requests 2018-09-11 00:11:44 +07:00
Sayz Lim
ddbeb3025b Adjust padding and button placements
Move the CTA button so the version doesn’t overlap with it. Make the expanded ad more compact to take less vertical space.
2018-09-11 00:11:38 +07:00
Kenneth Reitz
0755c4cf1b Merge branch 'master' of github.com:requests/requests 2018-09-10 11:07:28 -04:00
Kenneth Reitz
e7cce354c1 ad by 2018-09-10 11:07:20 -04:00
Kenneth Reitz
6e8c27e5a8 Merge pull request #4780 from sayzlim/master
Correct fixed footer width
2018-09-10 11:06:14 -04:00
Kenneth Reitz
16f0280c31 Merge branch 'master' into master 2018-09-10 11:06:03 -04:00
Kenneth Reitz
79e28b7f03 Merge branch 'master' of github.com:requests/requests 2018-09-10 11:05:14 -04:00
Sayz Lim
c3ec370e2d Merge branch 'master' into master 2018-09-10 22:05:13 +07:00
Kenneth Reitz
e976ea839b no more stickers :-/ 2018-09-10 11:04:40 -04:00
Sayz Lim
08b6a78883 Correct fixed footer width 2018-09-10 21:52:30 +07:00
Kenneth Reitz
2072888e28 Merge pull request #4779 from sayzlim/master
Integrate Native CPC by BuySellAds
2018-09-10 10:49:30 -04:00
Sayz Lim
2297d33403 Integrate Native CPC by BuySellAds
Replacing Carbon zone key with the direct key and install CPC ad unit on the site.
2018-09-10 21:45:35 +07:00
Kenneth Reitz
a559d62f17 Revert "updates to docs"
This reverts commit f4818b2010.
2018-09-10 06:29:01 -04:00
Kenneth Reitz
f4818b2010 updates to docs 2018-09-10 06:26:52 -04:00
Kenneth Reitz
33b41c7880 updates 2018-08-29 03:29:14 -04:00
Kenneth Reitz
704abf1332 updates 2018-08-29 03:28:33 -04:00
Nate Prewitt
9cfd292da3 Merge pull request #4723 from kalefranz/fix-no_proxy-file-url
Fix assumed hostname when using a 'file' URI scheme adapter
2018-08-13 09:54:33 -07:00
Kale Franz
8023a01dba Fix assumed hostname when using a 'file' URI scheme adapter 2018-08-13 11:28:35 -05:00
Nate Prewitt
dffd5d435e Merge pull request #4678 from jdufresne/intersphinx
In docs, use intersphinx to link to Python documentation
2018-08-11 20:34:59 -07:00
Jon Dufresne
5aa6a9b654 In docs, use intersphinx to link to Python documentation
The intersphinx extension can generate automatic links to the
documentation of objects in other projects. It was already used for
urllib3. For complete details on intersphinx, see:

http://www.sphinx-doc.org/en/master/ext/intersphinx.html
2018-08-11 17:31:43 -07:00
Nate Prewitt
922aa406b5 updating HISTORY.rst 2018-08-11 12:54:21 -07:00
Nate Prewitt
489f58ced5 represent classifiers as list instead of tuple 2018-08-06 23:04:50 -07:00
Jon Dufresne
c8f3add5ed Update all documentation to show Python 3.7 is supported
Official support was added in 6686ac1730.
2018-08-02 10:55:40 -07:00
Nate Prewitt
285ab5b06b Merge pull request #4755 from dohvis/patch-1
Add return type on cookies.py
2018-08-02 10:53:43 -07:00
Dohyeon Kim
72d96a67ef Add return type on cookies.py
http://docs.python-requests.org/en/master/api/#api-cookies
2018-08-01 17:21:03 +09:00
Nate Prewitt
e4d214dd76 Merge pull request #4749 from derlin/master
make content-type's charset information case-insensitive
2018-07-24 09:42:27 -07:00
Lucy Linder
907c927d60 make content-type's charset information case-insensitive
see issue https://github.com/requests/requests/issues/4748 for more information
2018-07-24 18:13:50 +02:00
Eric Brown
6686ac1730 Add official Python 3.7 support (#4717)
* Add official Python 3.7 support

Python 3.7 was just released [1]. This is a small change to
enable support in requests.

Signed-off-by: Eric Brown <browne@vmware.com>
2018-07-24 07:44:37 -07:00
Nate Prewitt
8e43d34d1f Merge pull request #4701 from akaihola/4700-multivalued-list-form-encoded
Documentation and tests for form-encoded multivalued elements as lists
2018-07-20 09:56:28 -07:00
Antti Kaihola
9c92f757e6 Rolled multi-value form examples in documentation into one (#4700)
As suggested by @nateprewitt
2018-07-20 10:30:31 +03:00
Antti Kaihola
87fb312534 Add myself to the authors list 2018-07-20 10:30:31 +03:00
Antti Kaihola
9a8eb131c9 Documentation for multivalued form-encoded element as a list (#4700) 2018-07-20 10:30:31 +03:00
Antti Kaihola
691e9520ed Add test for multivalued form-encoded element as a list (#4700) 2018-07-20 10:30:31 +03:00
Steven M. Vascellaro
4d51e6d201 Remove unused httpbin parameters
httpbin is used to mock HTTP endpoints. In these methods, the parameter
goes unused.
2018-07-17 19:39:18 -07:00
Nate Prewitt
5aeec8b661 Merge pull request #4739 from moy/doc-list-of-tuples
Document that params and data can be list of tuples everywhere
2018-07-17 15:16:02 -07:00
Matthieu Moy
c008bf3883 Document that 'params' can also be a list of tuples
Like we just did for 'data', 'params' follows the same processing and
can also be a list of tuples.
2018-07-17 18:55:55 +02:00
Matthieu Moy
2d1b4482c5 Document that 'data' can be a list of tuples everywhere
The documentation for the 'data' parameter of various functions was
inconsistant. The low-level function, used by every convenience API,
internally uses RequestEncodingMixin._encode_params which accepts list
of tuples as well as dictionaries, hence every function taking a data
parameter also accepts a list of tuple.

Keep the documentation short, but provide a link to Request for
details.
2018-07-17 18:45:43 +02:00
Kenneth Reitz
f6e13ccfc4 Update MANIFEST.in 2018-07-12 14:16:01 -04:00
Ian Stapleton Cordasco
4499401a55 Merge pull request #4728 from yan12125/patch-1
Fix an invalid escape sequence
2018-07-09 07:19:50 -05:00
Chih-Hsuan Yen
b1a360c2f1 Fix an invalid escape sequence 2018-07-09 01:10:00 +08:00
Nate Prewitt
ef88b9faa6 Merge pull request #4713 from Stevoisiak/fix-docstring-param
Misspelled 'proxy' parameter in docstring
2018-06-26 13:32:32 -07:00
Steven M. Vascellaro
5d90638281 Misspelled 'proxy' parameter in docstring
The 'proxy' parameter was misspelled as 'proxies' in the docstring.
2018-06-26 14:58:18 -04:00
Nate Prewitt
9fc639d030 Merge pull request #4710 from Stevoisiak/remove-unused-sessions
Remove unused session variables
2018-06-26 09:50:40 -07:00
Steven M. Vascellaro
28da72b616 Remove unused session variables
Removed local session variables that go unused during testing.
2018-06-26 12:34:15 -04:00
Kenneth Reitz
943a5c8e89 Merge pull request #4709 from Stevoisiak/update-twitter-max-characters
Update max Twitter characters to 280
2018-06-25 14:11:39 -04:00
Steven M. Vascellaro
0c036feb89 Update max Twitter characters to 280
Twitter expanded the maximum character count per tweet from 140 to 280 in November 2017.
2018-06-25 12:56:14 -04:00
Kenneth Reitz
d79187143f Merge pull request #4708 from Stevoisiak/stack-overflow-typo
Change "StackOverflow" to "Stack Overflow"
2018-06-25 11:48:05 -04:00
Steven M. Vascellaro
3e4efeeb89 Change "StackOverflow" to "Stack Overflow"
Add a missing space when referring to "Stack Overflow".
2018-06-25 11:39:07 -04:00
Nate Prewitt
cd97ce90ba Merge pull request #4685 from Stevoisiak/patch-2
Note that session() should not be used
2018-06-21 12:09:06 -07:00
Steven M. Vascellaro
1c13c5e6f3 Document that requests.session() is depreciated
Adds a docstring note that `requests.session()` is depreciated. Users should
use `requests.Session()` in versions released after Requests v1.0.
2018-06-21 09:46:16 -04:00
Nate Prewitt
883caaf145 v2.19.1 2018-06-14 06:26:27 -07:00
Ian Stapleton Cordasco
2530323faf Merge pull request #4683 from martindurant/docstrings_for_optimize
Do not alter status_codes docstring if it is None
2018-06-13 10:24:45 -05:00
Martin Durant
8031ec76b8 Do not alter status_codes docstring if it is None
With PYTHONOPTIMIZE=2, the current code breaks with TypeError.
2018-06-12 17:52:50 -04:00
Nate Prewitt
991e8b76b7 v2.19.0
* Updated HISTORY.rst.
* Moved version pin for idna to allow recent 2.7 release.
* Updated version warning for urllib3 to allow 1.23.
* Updated metadata dunders in __version__.py.
* Removed Python 2.6 trove classifier.
* Removed Python 2.6 reference from README.rst.
2018-06-12 07:38:10 -07:00
Raymond Hettinger
7e297ed95b Separate collections from collections.abc 2018-06-11 22:14:59 -07:00
Laurent Bachelier
10915e3b0d Add a public method to get the cookie policy 2018-06-11 22:13:07 -07:00
Laurent Bachelier
ace0c200f4 Add cookie policy related tests 2018-06-11 22:13:07 -07:00
Laurent Bachelier
3ef49272f2 Copy cookie policy when copying a CookieJar
Without it, the cookie policy would get lost while making a request.
That would be invisible to the user if the default cookie policy wasn't
changed, of course.
2018-06-11 22:13:07 -07:00
Nate Prewitt
d1aeb7ea8c Merge pull request #4672 from requests/remove_2.6_refs
remove references to 2.6 support in documentation
2018-06-11 07:13:13 -07:00
Nate Prewitt
de64f0f23f port pyopenssl fix from urllib3 2018-06-10 14:49:13 -07:00
Nate Prewitt
bc46de58e6 remove references to 2.6 support in documentation 2018-06-10 14:48:59 -07:00
Nate Prewitt
16fd7e03a9 Merge pull request #4676 from jdufresne/doc-py3
Update Python 2 doc links to Python 3
2018-06-10 08:37:08 -07:00
Jon Dufresne
35a1874912 Update Python 2 doc links to Python 3
The Python 3 docs are better maintained and are the future of Python
development.
2018-06-09 20:29:41 -07:00
Nate Prewitt
d98f881118 Merge pull request #4669 from michael-k/patch-1
Allow urllib3 1.23
2018-06-05 06:35:08 -07:00
Michael
ac944b7439 Allow urllib3 1.23
https://github.com/urllib3/urllib3/blob/1.23/CHANGES.rst#123-2018-06-04
2018-06-05 12:06:03 +00:00
Ian Stapleton Cordasco
00fd4c8eb4 Merge pull request #4661 from ofek/patch-2
Response.content minor perf improvement
2018-05-26 19:00:25 -05:00
Ofek Lev
c1b828bc95 Response.content minor perf improvement 2018-05-26 18:20:27 -04:00
Nate Prewitt
fe8290b3d0 updating HISTORY.rst 2018-05-17 13:56:17 -07:00
Rajiv Mayani
8546a15587 The library raises NoneType error when file-pointer (fp) resolves to None.
>>> from requests import post
>>> r = post("https://example.com", files={"file-name": None})

However, when a param value or json field is None they are not included in the request body.

>>> from requests import get
>>> r = get("https://example.com", params={"file-name": None})
>>> r.request.url

This commit makes the beahviour consistent for files.
2018-05-17 13:56:17 -07:00
Ian Stapleton Cordasco
5f09f0ca7e Merge pull request #4631 from pradyunsg/patch-1
Add long_description_content_type to setup.py
2018-05-17 09:34:06 -05:00
Ian Stapleton Cordasco
8bffd3da5f Merge branch 'master' into patch-1 2018-05-17 09:12:26 -05:00
Nate Prewitt
9b5071cdb6 Merge pull request #4648 from requests/update_lock_file
bring Pipfile.lock up to date with current constraints
2018-05-16 12:31:48 -07:00
Nate Prewitt
c6db87978f bring Pipfile.lock up to date with current constraints 2018-05-16 07:39:43 -07:00
Nate Prewitt
f3fc892b90 bring HISTORY.rst up to date with recent changes 2018-05-16 07:35:44 -07:00
Ian Stapleton Cordasco
161acb6a50 Merge pull request #4410 from linuxlizard/master
Add SHA-256 and SHA-512 digest auth algorithms
2018-05-16 09:06:57 -05:00
Ian Stapleton Cordasco
371ee7cbec Merge branch 'master' into master 2018-05-16 08:46:26 -05:00
Ian Stapleton Cordasco
80e2637a83 Merge pull request #4647 from requests/appveyor_test
fix appveyor
2018-05-16 08:14:37 -05:00
Nate Prewitt
9055b33f6f install Requests separately on appveyor to fix builds 2018-05-15 23:06:43 -07:00
Nate Prewitt
9616f82905 Merge pull request #4625 from nicktimko/patch-1
Certifi.io broken
2018-05-14 09:22:10 -07:00
Nick Timkovich
919c168cdb Certifi.io broken
http://certifi.io/ -> https://certifiio.readthedocs.io/
2018-05-14 09:55:33 -05:00
Kenneth Reitz
adceafd79d Update issue templates 2018-05-13 16:51:44 -04:00
Kenneth Reitz
e02effb774 Merge pull request #4632 from mingrammer/update-license
Update license copyright to 2018
2018-05-13 13:30:57 -04:00
Julien Prigent
60a5a393d8 Add a comment about lowercase env. variables precedence over uppercase 2018-05-13 06:15:56 -07:00
Kenneth Reitz
9e1d8edcb7 Merge branch 'master' into update-license 2018-05-12 17:10:24 -04:00
Ian Stapleton Cordasco
1e8a3142d2 Merge pull request #4634 from vshih/patch-1
Spelling.
2018-05-08 06:12:32 -05:00
Victor Shih
71e402fe40 Spelling. 2018-05-07 10:51:53 -07:00
Pradyun Gedam
048c926b46 README is in ReST 2018-05-07 00:23:38 +05:30
mingrammer
41c455182b Update license copyright to 2018 2018-05-05 09:57:14 +09:00
Pradyun Gedam
5f306dbe99 Add long_description_content_type to setup.py
See:
- https://packaging.python.org/guides/making-a-pypi-friendly-readme/
- https://pypi.org/p/requests/
2018-05-04 16:43:25 +05:30
Nate Prewitt
239ee19431 Merge pull request #4612 from Obeyed/patch-1
update json param's description to avoid confusion
2018-04-30 08:00:19 -07:00
Elias Obeid
75c57985b0 update json param's description to avoid confusion
- the Request class doesn't accept JSON, but a JSON serializable object
2018-04-30 16:50:23 +02:00
Ian Stapleton Cordasco
11b82ca87c Merge pull request #4620 from requests/appveyor_fix
fix windows builds
2018-04-29 18:56:09 -05:00
Nate Prewitt
cd1278ef99 fix windows builds
Appveyor isn't able to replace the running executable. We'll run it
from inside the interpreter to fix build issues.
2018-04-29 10:27:20 -07:00
Ian Stapleton Cordasco
2de907ad77 Merge pull request #4596 from jdufresne/pypi
Update all pypi.python.org URLs to pypi.org
2018-04-19 05:41:37 -05:00
Jon Dufresne
165804b25e Update all pypi.python.org URLs to pypi.org
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
2018-04-18 20:28:19 -07:00
Nate Prewitt
b66908e7b6 Merge pull request #4547 from Saraislet/json-kwarg-docs
add comment about json parameter changing content-type
2018-03-16 12:42:55 -07:00
Hackbright Student
35af0b077f add comment about json parameter changing content-type 2018-03-16 12:34:24 -07:00
Kenneth Reitz
8246b82a16 niteo
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-13 11:28:31 -04:00
Kenneth Reitz
cd6eb30b20 party time
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 17:11:08 -04:00
Kenneth Reitz
e203d50e10 every day 2018-03-12 17:07:37 -04:00
Kenneth Reitz
b920c6e3f8 no hr
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 17:05:01 -04:00
Kenneth Reitz
6576370b7b cleanup
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 17:04:31 -04:00
Kenneth Reitz
85e536f7eb reorder
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 17:04:14 -04:00
Kenneth Reitz
130773a2d3 sidebar updates
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 17:02:06 -04:00
Kenneth Reitz
87872b9587 sponsored by™ 2018-03-12 16:59:11 -04:00
Kenneth Reitz
3de173e1c9 🍰 2018-03-12 16:54:00 -04:00
Kenneth Reitz
b5eacad638 patron sponsors
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 13:50:12 -04:00
Kenneth Reitz
b1ba9173d0 linode
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-12 13:48:12 -04:00
Kenneth Reitz
ee58368c9f typo
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-09 17:02:15 -05:00
Kenneth Reitz
cf0b8ed291 azure
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-09 16:50:13 -05:00
Kenneth Reitz
280c8b2a72 azure
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-09 16:47:27 -05:00
Kenneth Reitz
16b56d822e twilio!
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-09 11:07:37 -05:00
Kenneth Reitz
742610c6b9 linode
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 16:15:31 -05:00
Kenneth Reitz
eb692cb1e1 hiring
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:57:33 -05:00
Kenneth Reitz
f9a9233058 slack improvements
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:56:40 -05:00
Kenneth Reitz
9de992e22c sign off
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:43:27 -05:00
Kenneth Reitz
c063938abb individuals
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:42:17 -05:00
Kenneth Reitz
667367d6b9 better formatting
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:38:55 -05:00
Kenneth Reitz
8ce2fd2557 change order
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:36:29 -05:00
Kenneth Reitz
d8cc045a2e contact
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:35:39 -05:00
Kenneth Reitz
dc10a5dadd sponsors
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:34:07 -05:00
Kenneth Reitz
bf32936955 cleanup
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:33:26 -05:00
Kenneth Reitz
05b1401795 links
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:32:18 -05:00
Kenneth Reitz
873e8914c1 some
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:31:18 -05:00
Kenneth Reitz
c55258792b cleanup
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:30:33 -05:00
Kenneth Reitz
afad1aab14 community
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:28:55 -05:00
Kenneth Reitz
d05840d34d sponsors
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:28:41 -05:00
Kenneth Reitz
3323e65e96 track fundraiser on personal site
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 15:11:59 -05:00
Kenneth Reitz
74cf6fc38e \o/
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 09:19:28 -05:00
Kenneth Reitz
d91b70bd29 512
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-08 06:29:53 -05:00
Kenneth Reitz
5daa6cc63c $253
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 20:06:13 -05:00
Kenneth Reitz
0730b231ec $203
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 20:02:12 -05:00
Kenneth Reitz
77aa42943e more info
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 19:42:03 -05:00
Kenneth Reitz
b98027af9e donations
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 19:41:24 -05:00
Kenneth Reitz
8ce2c1a182 one time
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 19:27:15 -05:00
Kenneth Reitz
327a54d29d sidebar
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 19:24:45 -05:00
Kenneth Reitz
38a1947957 $10
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 19:11:45 -05:00
Kenneth Reitz
f8ade96762 sidebar
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 18:52:24 -05:00
Kenneth Reitz
665bb2a687 fix
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 18:49:49 -05:00
Kenneth Reitz
f21fd19ac5 goals
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 18:44:36 -05:00
Kenneth Reitz
f51c489d38 fix
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:41:09 -05:00
Kenneth Reitz
773eeff1a2 authors
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:40:38 -05:00
Kenneth Reitz
ac0a7ed152 fix
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:38:05 -05:00
Kenneth Reitz
a4f313a0e5 development
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:36:35 -05:00
Kenneth Reitz
8ca453a8d7 white
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:35:21 -05:00
Kenneth Reitz
c436165a2d gitignore
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:34:04 -05:00
Kenneth Reitz
97b28fdf7f top bar
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:33:51 -05:00
Kenneth Reitz
40f4b984ef index
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:18:27 -05:00
Kenneth Reitz
529c423fb5 support for Requests 3.0
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:15:59 -05:00
Kenneth Reitz
e292f302b7 different form
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 17:01:50 -05:00
Kenneth Reitz
c95b63736d links
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 16:56:58 -05:00
Kenneth Reitz
2d357f9c3b cleanup
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 16:55:18 -05:00
Kenneth Reitz
7fb1d70b86 fix fix fix
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 16:54:40 -05:00
Kenneth Reitz
c78c5002b5 important
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 16:51:30 -05:00
Kenneth Reitz
d123e9fe78 fix broken things
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 16:48:44 -05:00
Kenneth Reitz
8ad24ad430 experiment
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-07 16:44:57 -05:00
David Poole
85ec7d759e Merge branch 'master' into master 2018-03-05 09:07:12 -07:00
Kenneth Reitz
4ea09e49f7 .org
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-02-27 10:19:31 -05:00
Kenneth Reitz
06e788e253 <li><a href="http://html.python-requests.com/">Requests-HTML</a></li>
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-02-27 09:18:00 -05:00
Kenneth Reitz
27aad3666c Merge branch 'master' of github.com:requests/requests 2018-02-27 08:44:37 -05:00
Kenneth Reitz
44dbf8cf40 updated copyright year
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-02-27 08:44:29 -05:00
Kenneth Reitz
6e76aaea45 nike
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-02-22 08:34:32 -05:00
Jon Dufresne
265ef609d5 Remove remaining references to removed, vendored packages (#4499)
As the vendored packages were removing in version 2.16, all remaining
doc references should be replaced with newer practices.
2018-02-17 08:15:54 -06:00
Nate Prewitt
cafa3c16c2 Merge pull request #4497 from jdufresne/docs-certfi
Clarify docs that Requests always uses certs from certifi
2018-02-15 17:56:00 -08:00
Jon Dufresne
9c0db92249 Clarify docs that Requests always uses certs from certifi
Since commit 0d7de6430e, certifi is always
used for certificates. Certify became a hard dependency of the package
in 628633143d.

Now update the docs to clarify that Request will always use certificates
from certifi.
2018-02-14 05:47:34 -08:00
Kenneth Reitz
3c1d36b827 Merge branch 'master' of github.com:requests/requests
# Conflicts:
#	docs/_templates/sidebarintro.html
#	docs/_templates/sidebarlogo.html

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-02-12 09:43:07 -05:00
Kenneth Reitz
3cd87fac5d new sidebar link
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-02-12 09:42:09 -05:00
Semen Zhydenko
22120d423e Fix typos
nonexistant -> nonexistent
neccessary -> necessary
2018-02-07 18:25:22 -06:00
Nate Prewitt
654da610e1 Merge pull request #4498 from jdufresne/ws
Trim trialing white space throughout the project
2018-02-05 08:37:19 -08:00
Jon Dufresne
e8205c0131 Trim trialing white space throughout the project
Many editors clean up trailing white space on save. By removing it all
in one go, it helps keep future diffs cleaner by avoiding spurious white
space changes on unrelated lines.
2018-02-05 06:23:53 -08:00
Ian Stapleton Cordasco
8da118dfeb Merge pull request #4493 from nateprewitt/3.7_testing
Start testing 3.7
2018-02-03 08:43:31 -06:00
Ian Stapleton Cordasco
d69c068ac2 Merge branch 'master' into 3.7_testing 2018-02-03 08:33:55 -06:00
Ian Stapleton Cordasco
3ad14bb54e Merge pull request #4496 from lolatravel/pass_send_kwargs_to_add_headers
Pass kwargs from adapter send call to add_headers, per documentation
2018-02-03 07:40:44 -06:00
Jonathan Elliott Blum
8e040523a4 pass kwargs from send call to add_headers, per documentation 2018-02-02 13:10:16 -05:00
Nate Prewitt
99533b0f0f start testing 3.7 2018-01-26 03:01:22 -08:00
Nate Prewitt
512066488e updating history 2018-01-21 11:06:33 -08:00
Nate Prewitt
d2e1130603 Merge pull request #4452 from nateprewitt/append_fragment_on_redirect
append previous url fragment on redirect
2018-01-21 10:41:46 -08:00
Nate Prewitt
f60324a3de append previous url fragment on redirect 2018-01-21 09:55:45 -08:00
Ian Stapleton Cordasco
f89c325fbe Merge pull request #4439 from nkonin/fix/certifi-broken-link
Fix broken link to Certifi
2018-01-21 08:36:31 -06:00
Ian Stapleton Cordasco
d55b81b964 Merge branch 'master' into fix/certifi-broken-link 2018-01-21 08:12:19 -06:00
Kenneth Reitz
6a74c70a3a merge 2018-01-20 09:02:15 -05:00
Kenneth Reitz
599a8f11f8 sidebar 2018-01-20 09:01:50 -05:00
Никита Конин
0813c865ee Fix broken link to Certifi 2018-01-18 20:14:33 +03:00
Ian Stapleton Cordasco
07372dc058 Merge pull request #4427 from ddormer/4275-use-hostname-not-netloc
Use hostname not netloc
2018-01-16 08:07:26 -06:00
Darren Dormer
2255c34a65 Fix DNS resolution by using hostname instead of netloc and strip username and password when comparing against proxy bypass items. 2018-01-16 10:18:06 +01:00
Nate Prewitt
020f96577f Merge pull request #4459 from jdufresne/pyreq
Pass python_requires argument to setuptools
2018-01-12 20:06:59 -08:00
Jon Dufresne
7cefa939f5 Pass python_requires argument to setuptools
Helps pip decide what version of the library to install.

https://packaging.python.org/tutorials/distributing-packages/#python-requires

> If your project only runs on certain Python versions, setting the
> python_requires argument to the appropriate PEP 440 version specifier
> string will prevent pip from installing the project on other Python
> versions.

https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords

> python_requires
>
> A string corresponding to a version specifier (as defined in PEP 440)
> for the Python version, used to specify the Requires-Python defined in
> PEP 345.
2018-01-12 16:39:10 -08:00
Ian Stapleton Cordasco
b9d8e00cbc Merge pull request #4460 from jdufresne/py33
Remove unsupported Python 3.3 from tox.ini
2018-01-11 08:41:08 -06:00
Jon Dufresne
620a5391c3 Remove unsupported Python 3.3 from tox.ini
Python 3.3 is not a supported version so don't test it.
2018-01-10 18:37:22 -08:00
Nate Prewitt
c98e30b5cb Merge pull request #4451 from jdufresne/https
Prefer https over http for links in the documentation
2018-01-06 15:22:59 -08:00
Jon Dufresne
030dcce20c Prefer https over http for links in the documentation
- Fixed Read the Docs links
- Fixed GitHub links
- Fixed PyPI links
2018-01-06 11:23:50 -08:00
Ian Stapleton Cordasco
3dc84cde5b Merge pull request #4442 from DemetriosBairaktaris/master
Reduce overall memory usage by removing cgi dependency and writing a protected function
2018-01-04 16:32:39 -06:00
dbairaktaris1
e0ab287317 added more to test scenarios 2018-01-04 10:59:47 -06:00
dbairaktaris1
7deee699ad slice function removed 2018-01-04 10:48:17 -06:00
dbairaktaris1
cb0914407b Continue to refactor, remove list comprehension, add double quotes test case. 2018-01-04 10:30:50 -06:00
dbairaktaris1
80a790443e implement changes after code review 2018-01-03 23:41:41 -06:00
dbairaktaris1
071796d83f implement changes after code review 2018-01-03 23:40:08 -06:00
dbairaktaris1
1988d9cf72 Move nested function up to module level and rename. Add more tests for function. 2018-01-01 14:20:55 -06:00
dbairaktaris1
2dc51c887f added versions back 2018-01-01 00:43:13 -06:00
dbairaktaris1
19cfec28a8 CI 2017-12-31 22:18:19 -06:00
dbairaktaris1
cef0830419 clean 2017-12-31 15:02:39 -06:00
dbairaktaris1
d8666e1906 Reduce overall memory usage of Requests module by removing cgi module dependency in utils.py. Instead wrote a nested function to parse header and return content type and params. 2017-12-31 14:46:15 -06:00
David Poole
efacb9e312 Merge branch 'master' into master 2017-11-29 07:13:07 -07:00
David Poole
1e46cbb4f0 add test for HTTP Digest auth algorithms SHA-256 and SHA-512 2017-11-29 07:10:57 -07:00
Cory Benfield
24092b11d7 Merge pull request #4380 from afedchin/win10
utils: winreg module may not exist like on windows universal platform.
2017-11-27 20:39:15 +00:00
Anton Fedchin
351ec982bb update changelog 2017-11-25 17:21:59 +03:00
Anton Fedchin
714c9dc967 utils: winreg module may not exist like on windows universal platform. 2017-11-25 17:21:59 +03:00
Cory Benfield
d1fb1a29ab Merge pull request #4394 from zaneb/document-status_codes
Add documentation for available status codes
2017-11-23 20:19:12 +00:00
Cory Benfield
c2507013ab Merge branch 'master' into document-status_codes 2017-11-22 20:41:46 +00:00
Nate Prewitt
e68ef0ecad Merge pull request #4368 from danielroseman/patch-1
Clarify behaviour of `json` parameter.
2017-11-22 07:56:09 -08:00
Zane Bitter
19919b44c4 Add documentation for available status codes
There was no way to determine what actual names were available outside
of looking at the source code. They were not listed in the documentation
or accessible through the interactive help.

In addition, doing `pydoc requests.status_codes` displayed some pretty
unhelpful information - the utf-8 encoding string was included in the
module name, there was no description, and internal variables used for
initialisation leaked into the module scope:

    DATA
        code = 511
        codes = <lookup 'status_codes'>
        title = 'network_authentication'
        titles = ('network_authentication_required', 'network_auth', ...

This change prevents the internal variables from leaking, adds a
docstring (which has the side-effect of correcting the module name), and
appends information on the allowed status code names to the docstring
when the module is initialised.

The improved module documentation is then used in the API documentation
to provide another easy reference to the complete list of status codes.
2017-11-21 16:11:34 -05:00
Daniel Roseman
39446def39 Clarify behaviour of json parameter.
`json` is ignored if `data` or `files` is not empty.
2017-11-21 13:40:59 +00:00
Mingyuan Xia
acd2645444 #4373, fix possible winreg value type difference (#4377)
* #4373, fix possible winreg value type difference

* add a test for ProxyOverride and ProxyEnable on win32

* add tests for winreg key ProxyEnable with two possible types

* fixing AppVeyor failures
2017-11-20 20:01:04 +00:00
Ian Stapleton Cordasco
e4fc3539b4 Merge pull request #4390 from alexwlchan/ok-docs
[docs; tiny] Clarify that Response.ok will *only* return True/False
2017-11-20 07:18:00 -06:00
Alex Chan
775cde0914 Clarify that Response.ok will *only* return True/False 2017-11-20 09:16:35 +00:00
David Poole
a31531fb9c Merge branch 'master' into master 2017-11-19 08:45:25 -07:00
Cory Benfield
c3f2553114 Merge pull request #4387 from dave-shawley/clarify-docs
Clarify raw response reading in the quickstart.
2017-11-18 09:44:29 +00:00
Dave Shawley
7cc3d8dc6a docs/quickstart: clarify raw response reading. 2017-11-17 16:37:08 -05:00
Ian Stapleton Cordasco
6d69f944a4 Merge pull request #4384 from taleinat/quickstart_doc_http_to_html
Correct HTTP -> HTML in quickstart doc
2017-11-16 10:01:45 -06:00
Tal Einat
7f08ad3b6c Corrent HTTP -> HTML in quickstart doc 2017-11-16 09:59:00 +02:00
Nate Prewitt
d55de2d391 Merge pull request #4356 from nehaljwani/fix-4353
Check if host is invalid for proxy
2017-11-15 14:16:33 -08:00
Nehal J Wani
9a8a826f22 Check if host is invalid for proxy
According to RFC3986, the authority section can be empty for a given URL,
however, for a proxy URL, it shouldn't be. This patch adds a check to verify
that the parsed URL will have a valid host before creating the proxy manager.

Fixes #4353
2017-11-15 08:58:54 -05:00
David Poole
1dbaddd75e for RFC-7616 add SHA-256 and SHA-512 2017-11-08 18:32:59 -07:00
Cory Benfield
234f80af88 Merge pull request #4371 from Twistbioscience/zipfile_compat
support extraction of certificate bundle from a zip archive
2017-11-06 21:08:45 +00:00
Arthur Vigil
c86b09b3c6 support extraction of certificate bundle from a zip archive 2017-11-05 12:14:17 -08:00
Nate Prewitt
81b63419cb Merge pull request #4352 from alexwlchan/hooks-on-sessions
Add something to the docs about hooks on Session()
2017-10-24 11:50:03 -07:00
Alex Chan
c5ed41e00a Add an example of two hooks 2017-10-24 07:27:55 +01:00
Alex Chan
40c5a8b0c2 Clarify that a Session can have multiple hooks 2017-10-23 13:25:46 +01:00
Alex Chan
87f3b0a559 Switch to using dict literals, it's 2017 2017-10-23 13:25:31 +01:00
Alex Chan
2c4849defe Add something to the docs about hooks on Session() 2017-10-23 08:30:35 +01:00
Nate Prewitt
c4c031fc5c Merge pull request #4342 from jdufresne/wheel-license
Include license file in the generated wheel package
2017-10-21 16:53:01 -07:00
Jon Dufresne
1595e43812 Include license file in the generated wheel package
The wheel package format supports including the license file. This is
done using the [metadata] section in the setup.cfg file. For additional
information on this feature, see:

https://wheel.readthedocs.io/en/stable/index.html#including-the-license-in-the-generated-wheel-file
2017-10-21 16:39:48 -07:00
Cory Benfield
8982efa9e4 Merge pull request #4349 from alvarogzp/patch-1
Fix case-insensitive comparison in Session.get_adapter
2017-10-21 06:26:31 -07:00
Alvaro Gutierrez Perez
2afc1cb37b Merge branch 'master' into patch-1 2017-10-21 03:24:55 +02:00
Cory Benfield
db9da3e0d2 Merge pull request #4316 from methane/no-platform
Avoid importing platform
2017-10-19 17:47:40 -07:00
INADA Naoki
a05aac7007 avoid import platform
platform module is relatively large: it takes about 5ms to import
2017-10-20 02:49:22 +09:00
Alvaro Gutierrez Perez
d165b18b6e Split test in two better-defined tests 2017-10-19 17:04:48 +02:00
Alvaro Gutierrez Perez
e11989e8ec Add test for Session.get_adapter() prefix matching 2017-10-19 16:50:13 +02:00
Alvaro Gutierrez Perez
af88af64e6 Add test for Session.get_adapter() case-insensitivity 2017-10-19 16:50:13 +02:00
Alvaro Gutierrez Perez
d3f14af44d Fix case-insensitive comparison in get_adapter()
While trying to get the prefix for an url, the url was lowered before comparing but the prefix not, so if it contains non-lowercase characters (eg. https://api.example.com/sOmE_WeiRD_pReFIX/), it won't match.
2017-10-18 19:27:06 +02:00
Nate Prewitt
54ad3d6dcc Merge pull request #4343 from jdufresne/classifier
Add missing trove classifier to document Python2 support
2017-10-16 01:21:19 -07:00
Jon Dufresne
c14bd018ad Add missing trove classifier to document Python2 support 2017-10-15 19:48:10 -07:00
Nate Prewitt
e86df6e0eb Merge pull request #4341 from hugovk/patch-1
Python 3.7 not officially supported yet
2017-10-15 13:35:52 -07:00
Hugo
ec5804c706 Python 3.3 has already been dropped (#4231) 2017-10-15 20:04:51 +03:00
Hugo
4316af7ae8 Python 3.7 not officially supported yet 2017-10-15 19:52:19 +03:00
Cory Benfield
8c4f78448a Merge pull request #4332 from PrimordialHelios/pyopenssl-warning
Warn about possible slowness on older versions of pyOpenSSL
2017-10-14 08:41:02 -07:00
Taylor Rose
15054aa390 Warn user about possible slowdown when using cryptography version <
1.3.4
2017-10-14 09:00:58 -04:00
Kenneth Reitz
9713289e74 Merge branch 'master' of github.com:requests/requests 2017-09-25 11:04:47 -04:00
Kenneth Reitz
e6afc37be5 new pipfile with new syntax
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-25 11:04:38 -04:00
Ian Stapleton Cordasco
5eb0811ef8 Merge pull request #4305 from sigmavirus24/fix-pypi-display
Fix the invalid restructured text in HISTORY file
2017-09-23 16:21:48 -05:00
Ian Stapleton Cordasco
40c8bcf70c Fix the invalid restructured text in HISTORY file
This was breaking the display of our long_description on PyPI.
2017-09-23 15:54:14 -05:00
Kenneth Reitz
0eb9a4c161 stickers
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-19 13:23:15 -04:00
Kenneth Reitz
cda429aa5d Merge pull request #4295 from requests/pipenv
pipfile (work in progress)
2017-09-17 11:58:46 -04:00
Kenneth Reitz
28ae74dbad update tests
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-17 11:46:33 -04:00
Kenneth Reitz
a9d05f06cd remove requirements.txt
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-17 11:39:53 -04:00
Kenneth Reitz
d552132464 run coverage w/ pipenv
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-17 11:36:54 -04:00
Kenneth Reitz
c3ecb825c4 don't test on 2.6
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-17 11:30:26 -04:00
Kenneth Reitz
70a4ae744c pip install pipenv
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-17 11:26:22 -04:00
Kenneth Reitz
4c300c2067 pipfile
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-17 11:24:05 -04:00
Kenneth Reitz
fdb9b753b4 Update authors.rst 2017-09-05 11:31:16 -04:00
Kenneth Reitz
4bda7b66e7 Update updates.rst 2017-09-04 16:21:57 -04:00
Kenneth Reitz
068d8863d1 Update support.rst 2017-09-04 16:21:04 -04:00
Kenneth Reitz
c49f3643ae Update release-process.rst 2017-09-04 16:20:03 -04:00
Kenneth Reitz
328cff252d Update out-there.rst 2017-09-04 16:19:36 -04:00
Kenneth Reitz
c57bd07a34 Update faq.rst 2017-09-04 16:19:01 -04:00
Kenneth Reitz
0d82afa0c3 Update recommended.rst 2017-09-04 16:18:00 -04:00
Kenneth Reitz
18e37c9368 Update todo.rst 2017-09-04 16:14:48 -04:00
Kenneth Reitz
389da34fc9 Update philosophy.rst 2017-09-04 16:14:07 -04:00
Kenneth Reitz
8ef20d5c36 Update contributing.rst 2017-09-04 16:13:08 -04:00
Kenneth Reitz
e63d481a7a Update authors.rst 2017-09-04 16:12:38 -04:00
Kenneth Reitz
f3eeb38542 Update vulnerabilities.rst 2017-09-04 16:11:52 -04:00
Kenneth Reitz
afaaae185c Update authentication.rst 2017-09-04 16:10:49 -04:00
Kenneth Reitz
8af65a1eca Update quickstart.rst 2017-09-04 16:09:51 -04:00
Kenneth Reitz
c04b044b30 Update advanced.rst 2017-09-04 16:09:08 -04:00
Kenneth Reitz
530198e0c0 Update install.rst 2017-09-04 16:08:22 -04:00
Kenneth Reitz
8c57515696 Update intro.rst 2017-09-04 16:05:57 -04:00
Kenneth Reitz
175452a6b6 Update index.rst 2017-09-04 16:04:07 -04:00
Kenneth Reitz
e35c829b59 Update index.rst 2017-09-04 16:03:49 -04:00
Kenneth Reitz
1ad51b0a41 Update index.rst 2017-09-04 15:55:53 -04:00
Kenneth Reitz
8be8105c42 Update advanced.rst 2017-09-04 15:53:26 -04:00
Kenneth Reitz
49ec082a77 Update recommended.rst 2017-09-04 15:50:38 -04:00
Kenneth Reitz
0488c640e2 Update index.rst 2017-09-04 15:46:47 -04:00
Kenneth Reitz
8371b56d0f Delete extensions.rst 2017-09-04 15:46:24 -04:00
Kenneth Reitz
830c18e4f9 Update index.rst 2017-09-04 15:45:28 -04:00
Kenneth Reitz
2c438cacd1 Create extensions.rst 2017-09-04 15:44:57 -04:00
Kenneth Reitz
9c8ae76928 Update index.rst 2017-09-04 15:40:02 -04:00
Kenneth Reitz
d5a05469f1 Update README.rst 2017-09-04 15:38:13 -04:00
Kenneth Reitz
e22e3a5059 Update README.rst 2017-09-04 15:37:24 -04:00
Kenneth Reitz
054ad4aa67 Update README.rst 2017-09-04 12:59:01 -04:00
Kenneth Reitz
b9638ec7be taste 2017-09-01 13:10:52 -04:00
Kenneth Reitz
940c1246e0 taste 2017-09-01 13:10:29 -04:00
Kenneth Reitz
e0e5b2e3aa Update philosophy.rst 2017-08-29 16:16:52 -04:00
Kenneth Reitz
96b9a3f0fc Update setup.py 2017-08-28 12:25:26 -04:00
Cory Benfield
657e44ad9a Merge pull request #4265 from PascalVA/patch-2
fixed syntax for code block for prepared requests
2017-08-28 10:39:26 +01:00
Pascal Van Acker
ac9a3e5320 fixed syntax for code block for prepared requests 2017-08-28 11:14:05 +02:00
Cory Benfield
6b21682712 Merge pull request #4264 from PascalVA/patch-1
Add environment info to prepared requests docs
2017-08-28 10:08:07 +01:00
Pascal Van Acker
785c733415 Add environment info to prepared requests
When using prepared requests, the environment is not taken into account. This should be reflected in the documentation.
2017-08-28 10:58:44 +02:00
Kenneth Reitz
369be8afd0 pretty little note
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-08-28 02:01:36 -04:00
Kenneth Reitz
572d2f4534 Python 2 Death Sentence™
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-08-28 01:50:35 -04:00
Kenneth Reitz
7e20b9193a Update index.rst 2017-08-28 01:33:45 -04:00
Kenneth Reitz
ad1aff52a0 Update index.rst 2017-08-28 01:33:32 -04:00
Kenneth Reitz
3a6dec9827 Update index.rst 2017-08-28 01:29:29 -04:00
Kenneth Reitz
3cceee3459 Update install.rst 2017-08-27 23:16:32 -04:00
Kenneth Reitz
dd57439fa5 Update README.rst 2017-08-27 23:13:50 -04:00
Cory Benfield
f09e462165 Merge pull request #4261 from Lukasa/fix-broken-tests
Pin to httpbin 0.5.0.
2017-08-27 14:00:37 +01:00
Cory Benfield
3a2ea9deba Pin to httpbin 0.5.0 2017-08-27 08:54:01 +01:00
Kenneth Reitz
5dcbdb50fc docs update 2017-08-25 22:12:34 -04:00
Kenneth Reitz
8ad09b68ea coinbin.org 2017-08-25 22:02:03 -04:00
Kenneth Reitz
88dc33522d Merge branch 'master' of https://github.com/requests/requests 2017-08-20 20:56:54 -04:00
Kenneth Reitz
e5666b93cf btc
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-08-20 20:56:48 -04:00
Cory Benfield
554a210f88 Merge pull request #4245 from remram44/fix-headers-links
Fix parse_header_links on empty header
2017-08-17 20:34:06 +01:00
Remi Rampin
8e411d0f99 Add test case for empty Link: header 2017-08-17 12:56:45 -04:00
Remi Rampin
7d190ef010 Add entry in HISTORY.rst 2017-08-17 12:56:38 -04:00
Remi Rampin
965ada6f66 Fix parse_header_links on empty header 2017-08-16 22:10:20 -04:00
Cory Benfield
af9dd61fcb Prepare for new release 2017-08-15 14:24:20 +01:00
Cory Benfield
a3d7cf3f27 v2.18.4 2017-08-15 14:22:52 +01:00
Cory Benfield
3c5ecfc9f5 Merge pull request #4240 from mgasvoda/master
Adding header name to exception
2017-08-12 15:41:27 +01:00
mgasvoda
d528106876 Adding record to history 2017-08-12 10:23:45 -04:00
mgasvoda
cbc7c2d1c9 Modifying tests to include header name info 2017-08-11 17:18:58 -04:00
mgasvoda
e36083b89c Adding space after colon 2017-08-11 16:19:43 -04:00
mgasvoda
308343508b Removing trailing whitespace 2017-08-11 16:14:13 -04:00
mgasvoda
ba21d14976 Improving message formatting 2017-08-11 16:12:36 -04:00
mgasvoda
cee8fae65e Adding header name to exception
Adds the name of the header to the invalid header exception raised on TypeError.
2017-08-11 15:37:57 -04:00
Kenneth Reitz
1c2022cf86 Merge pull request #4231 from Lukasa/drop-3.3-support
Drop Python 3.3 support.
2017-08-10 14:03:36 -04:00
Kenneth Reitz
8480cf937a Merge pull request #4237 from robinske/doc-import
Adds import statement to front page of docs for clarity and quicker start up
2017-08-10 14:02:57 -04:00
Kelley Robinson
f6952a9b8d Merge branch 'master' into doc-import 2017-08-10 10:33:22 -07:00
kelley
d758f0cf97 Adds import statement to front page of docs for clarity and quicker start up 2017-08-10 10:23:43 -07:00
Cory Benfield
c31a450c55 Remove references to 3.3 from the docs 2017-08-09 19:40:52 +01:00
Cory Benfield
0a2dc74ecb Drop Python 3.3 support 2017-08-09 19:03:04 +01:00
Cory Benfield
f78a57936b Merge pull request #4229 from NikosVlagoidis/issue#3863
Fixes issue #3863
2017-08-09 18:56:40 +01:00
NikosVlagoidis
218978601f Fix issue #3863 2017-08-09 20:18:43 +03:00
NikosVlagoidis
cb9620780f Update advanced.rst 2017-08-09 18:52:26 +03:00
Nikolaos Vlagoidis
963c78853f Fixes issue #3863 2017-08-09 15:38:45 +03:00
Kenneth Reitz
b670b61d54 Update AUTHORS.rst 2017-08-08 19:16:39 -04:00
Cory Benfield
9ec2005d9f Merge pull request #4223 from Lukasa/widen-idna-pin
Allow IDNA 2.6
2017-08-08 15:42:54 +01:00
Cory Benfield
f4ddf00c36 Allow IDNA 2.6 2017-08-08 13:32:15 +01:00
Cory Benfield
248f122970 Merge pull request #4217 from nikolas/patch-1
fix typo in changelog
2017-08-02 15:38:46 +01:00
Nik Nyby
be8ce365ab fix typo in changelog 2017-08-02 10:26:41 -04:00
Cory Benfield
3393dc8221 Prepare changelog for next release 2017-08-02 14:24:02 +01:00
Cory Benfield
7c67c4adf9 v2.18.3 2017-08-02 14:22:44 +01:00
Ian Stapleton Cordasco
2a4dd64fb4 Merge pull request #4210 from Lukasa/sslerror
Make sure we raise SSLError.
2017-07-29 06:27:17 -05:00
Cory Benfield
9e0fb37fff Changelog for #4209 2017-07-29 12:13:55 +01:00
Cory Benfield
4f49f6b3ed Correctly raise SSLError from urllib3. 2017-07-29 12:12:11 +01:00
Cory Benfield
8b3f20ca91 Add failing test for #4209 2017-07-29 12:09:04 +01:00
Nate Prewitt
fdf426125b Merge pull request #4182 from alexwlchan/idna-version
Add idna version info to requests.help
2017-07-27 14:54:09 -06:00
Alex Chan
d6b57c6fb2 Changelog entry 2017-07-27 21:33:44 +01:00
Alex Chan
39b121d791 Add idna version info to requests.help 2017-07-27 21:33:42 +01:00
Nate Prewitt
12c7456789 Merge pull request #4174 from alex/patch-2
Removed legacy fallback for python3.2
2017-07-27 09:51:33 -06:00
Alex Gaynor
2629c0906e Merge branch 'master' into patch-2 2017-07-27 11:19:32 -04:00
Cory Benfield
205755834d Merge pull request #4207 from markjszy/master
remove legacy super() call
2017-07-27 05:40:03 +01:00
Mark Szymanski
e2f5a135c3 remove legacy super() call 2017-07-26 19:21:45 -05:00
Cory Benfield
8de858f0de Merge pull request #4206 from jvanasco/feature-redirects
some docs on request redirect detection
2017-07-26 20:57:22 +01:00
jonathan vanasco
667896c557 some docs on request redirect detection 2017-07-26 15:32:07 -04:00
Cory Benfield
2b6f1e6236 Merge pull request #4204 from browniebroke/patch-1
Correct urllib3 compatibility comment
2017-07-26 11:03:57 +01:00
Bruno Alla
b77c1a3deb Correct urllib3 compatibility comment
So that it's in line with the code. I saw the warning raised recently and had to dive into the code for exact compatibility, but I stopped after reading the comment rather than the code. 
Maybe a better solution would be to surface the supported versions in the warning, but I see it was changed recently in https://github.com/requests/requests/pull/4144/
2017-07-26 10:23:01 +01:00
Cory Benfield
9e8d403a21 Prepare changelog for next release 2017-07-25 16:23:50 +01:00
Cory Benfield
6cc891fd32 v2.18.2 2017-07-25 16:21:48 +01:00
Cory Benfield
49c44a0c08 Merge pull request #4198 from andportnoy/patch-1
redundant comma
2017-07-21 07:05:10 +01:00
Andrey Portnoy
c6e18b04e3 redundant comma 2017-07-20 20:49:24 -07:00
Ian Stapleton Cordasco
c10b8384e4 Merge pull request #4196 from Lukasa/require-next-urllib3
Allow urllib3 1.22
2017-07-20 06:52:11 -05:00
Cory Benfield
8d1228cd19 Allow urllib3 1.22 2017-07-20 10:08:50 +01:00
Cory Benfield
8e227aeb89 Merge pull request #4195 from requests/requests/sessions-mount-docstring-clarity
Use 'prefix' instead of 'key' in session docstring
2017-07-20 09:13:06 +01:00
Alex Muller
d8c2fdf92f Use 'prefix' instead of 'key' in session docstring
This commit makes the API docs more clear. The 'key' is an
implementation detail.
2017-07-20 10:06:34 +02:00
Cory Benfield
cada19b300 Merge pull request #4192 from koobs/patch-2
Add requirements.txt to MANIFEST.in
2017-07-15 07:39:01 +01:00
Kubilay Kocak
c6a80640d1 Add requirements.txt to MANIFEST.in 2017-07-15 14:44:57 +10:00
Kenneth Reitz
649efc8c9b Merge branch 'master' of github.com:kennethreitz/requests 2017-07-06 17:57:37 -04:00
Kenneth Reitz
14176d1d63 no more stickers 2017-07-06 17:57:28 -04:00
Cory Benfield
1ea4e21958 Merge pull request #4183 from requests/fix_help_ssl_check
Fix help ssl check
2017-07-04 09:16:02 +01:00
Nate Prewitt
51feabbc27 test ssl version check functions as expected in python 2.6 2017-07-04 00:33:16 -06:00
Nate Prewitt
f6e07bb27f fix OPENSSL_VERSION_NUMBER check on Python2.6's ssl module 2017-07-03 17:21:56 -06:00
Alex Gaynor
c054a722bb Removed legacy fallback for python3.2 2017-06-25 12:51:15 -04:00
Kenneth Reitz
bbeb1c32d2 Merge branch 'master' of github.com:kennethreitz/requests 2017-06-16 18:31:19 -04:00
Kenneth Reitz
1263b8660d stickers 2017-06-16 18:30:39 -04:00
Cory Benfield
2fde9ee407 Setup HISTORY for next release 2017-06-14 18:52:03 +01:00
Cory Benfield
51de61f914 v2.18.1 2017-06-14 18:50:53 +01:00
Cory Benfield
dd13b13479 Prepare for next release cycle 2017-06-14 16:45:03 +01:00
Cory Benfield
d93b37cee7 Prepare v2.18.0 2017-06-14 16:43:40 +01:00
Kenneth Reitz
a5b8f8d40a Merge branch 'master' of github.com:kennethreitz/requests 2017-06-11 18:10:11 -04:00
Kenneth Reitz
a8972a5bd2 attempt new ads 2017-06-11 18:10:05 -04:00
Cory Benfield
bb4326c676 Merge pull request #4152 from felixonmars/patch-1
Fix a typo: paramters -> parameters
2017-06-11 18:34:36 +01:00
Felix Yan
a0f0258eee Fix a typo: paramters -> parameters 2017-06-12 01:27:11 +08:00
Cory Benfield
c5901ac893 Merge pull request #4151 from mayhewj/remove-exec
Remove exec permission from files that shouldn't have it
2017-06-11 10:26:51 +01:00
Justin Mayhew
c6a6347156 Remove exec permission from files that shouldn't have it 2017-06-10 20:38:45 -03:00
Cory Benfield
132040cc03 Merge pull request #4134 from mlcrazy/master
Raise exceptions in utils.set_environ
2017-06-09 19:34:56 +01:00
mlcrazy
613f61d77c Merge remote-tracking branch 'upstream/master' 2017-06-09 14:32:27 -04:00
mlcrazy
edcc894a2e Adds to AUTHORS 2017-06-09 14:29:28 -04:00
mlcrazy
761e39b443 Adds changelog entry for #4134 2017-06-09 14:16:32 -04:00
mlcrazy
1d7fd6c8b3 Fixes error swallowing in set_environ 2017-06-09 14:10:47 -04:00
Kenneth Reitz
b3d138e0fd Merge pull request #4140 from Lukasa/issue/4138
Clearer makefile for building README.
2017-06-09 13:30:56 -04:00
Kenneth Reitz
8a8b71f786 Merge branch 'master' into issue/4138 2017-06-09 13:27:02 -04:00
Cory Benfield
2872f17ab8 Merge pull request #4145 from gaojiuli/patch-1
typo
2017-06-09 10:04:40 +01:00
JiuLi Gao
22d12b0501 typo 2017-06-09 16:56:14 +08:00
Nate Prewitt
13eb907c48 Merge pull request #4144 from nateprewitt/move_compat_to_warn
Convert version compatibility checks to warnings
2017-06-08 19:40:07 -06:00
Nate Prewitt
d8e2367809 convert version compatibility checks to warning 2017-06-08 15:21:25 -06:00
Cory Benfield
f8ccc60498 Clearer makefile for building README 2017-06-07 13:50:00 +01:00
Cory Benfield
4f1b17c9c1 Merge pull request #4137 from edmorley/response-context-manager
Allow Requests.Response to be used as a context manager
2017-06-07 08:51:41 +01:00
Ed Morley
4847f5b8cd Allow Requests.Response to be used as a context manager
This saves having to wrap the call to requests with
`contextlib.closing()`, allowing it to be used directly in a
`with` statement, like so:

```
with requests.get('http://httpbin.org/get', stream=True) as r:
    # Do things with the response here.
```

Fixes #4136.
2017-06-06 23:30:47 +01:00
Kenneth Reitz
40ce8144d1 Merge pull request #4135 from edmorley/gitignore-pytest-cache
Add the pytest .cache/ directory to .gitignore
2017-06-06 18:00:38 -04:00
Ed Morley
5a616ee980 Add the pytest .cache/ directory to .gitignore
For example, when a pytest run fails, it saves failure metadata to:
`.cache/v/cache/lastfailed`
2017-06-06 22:44:22 +01:00
Nate Prewitt
b6ee4b2156 Merge pull request #4129 from felixonmars/fix-typo
Fix a typo: verison -> version
2017-06-05 22:07:28 -06:00
Felix Yan
0abb69b1cb Fix a typo: verison -> version 2017-06-06 12:01:41 +08:00
Cory Benfield
56971482af Merge pull request #4114 from cyberjacob/master
Catch error if multiprocessing is not available or is unable to determine the number of CPUs
2017-05-30 13:54:31 +01:00
Jacob Mansfield
98bbf8d170 Catch error if multiprocessing is not available or is unable to determine the number of CPUs 2017-05-30 13:47:55 +01:00
Cory Benfield
d3a4d06238 Begin dev section of README 2017-05-30 11:49:05 +01:00
Kenneth Reitz
152faa2a0f change development philosophy docs to reflect reality 2017-05-29 23:46:50 -04:00
Kenneth Reitz
e41c2c2d96 remove note about cacerts.pem 2017-05-29 23:43:53 -04:00
Kenneth Reitz
3ca2722802 improve development instructions 2017-05-29 23:41:48 -04:00
Kenneth Reitz
310d7f8a9b update development documentation 2017-05-29 23:40:44 -04:00
Kenneth Reitz
01f982da50 remove "are you crazy?" section 2017-05-29 23:38:48 -04:00
Kenneth Reitz
ba509635a3 fix sidebars 2017-05-29 23:36:50 -04:00
Kenneth Reitz
008ab18a77 improve installation docs 2017-05-29 23:33:51 -04:00
Kenneth Reitz
67831abaaf improve install docs 2017-05-29 23:33:25 -04:00
Kenneth Reitz
0f57faba70 fix github stars 2017-05-29 23:26:50 -04:00
Kenneth Reitz
35f2e55308 improve installation instructions 2017-05-29 23:26:15 -04:00
Kenneth Reitz
77ae596e8b Merge branch 'master' of github.com:kennethreitz/requests 2017-05-29 23:25:31 -04:00
Kenneth Reitz
84114419a0 improve install documentation syntax 2017-05-29 23:25:21 -04:00
Kenneth Reitz
500fe3ee03 Merge pull request #4108 from requests/flake8-improvements
flake8 improvements
2017-05-29 23:08:03 -04:00
Kenneth Reitz
d78ec90e7b cleanup utils.py 2017-05-29 23:04:45 -04:00
Kenneth Reitz
04ed1e5122 cleanup sessions.py 2017-05-29 23:02:23 -04:00
Kenneth Reitz
33619268f9 cleanup models.py 2017-05-29 23:00:09 -04:00
Kenneth Reitz
e5894e99b7 improve flake8 help.py 2017-05-29 22:58:01 -04:00
Kenneth Reitz
6495190b00 cleanup help.py (flake8) 2017-05-29 22:55:08 -04:00
Kenneth Reitz
5b363d1a57 improve line continuations for flake8 2017-05-29 22:54:23 -04:00
Kenneth Reitz
f6a4ab02da fix empty lines for flake8 2017-05-29 22:44:33 -04:00
Kenneth Reitz
5fa4e74d61 fix flake8 indent error 2017-05-29 22:43:12 -04:00
Kenneth Reitz
7fc48b099e ignore undefined names in flake8 2017-05-29 22:41:51 -04:00
Kenneth Reitz
3fa02a1336 flake8 ignore lambda expressions 2017-05-29 22:41:07 -04:00
Kenneth Reitz
e55d3d0658 fix spaces in api.py 2017-05-29 22:40:37 -04:00
Kenneth Reitz
7c3861a322 fix flake8 for EOF in __init__.py 2017-05-29 22:40:09 -04:00
Kenneth Reitz
7c2618eb82 flake8: import statement improvements 2017-05-29 22:37:43 -04:00
Kenneth Reitz
4e1bbe1288 ignore line continuations for flake8 2017-05-29 22:35:33 -04:00
Kenneth Reitz
cfc3db06cf ignore import statements for flake8 2017-05-29 22:34:32 -04:00
Kenneth Reitz
5091c15bd7 v2.17.3 2017-05-29 17:54:15 -04:00
Kenneth Reitz
dcb8277975 v2.17.2 2017-05-29 17:52:03 -04:00
Kenneth Reitz
412e3a20a9 2.17.1 2017-05-29 17:52:03 -04:00
Kenneth Reitz
17084cd6d8 Merge pull request #4106 from silverlogic/master
Fix requests.packages not having package attributes
2017-05-29 17:31:49 -04:00
Ryan Pineo
1278ecdf71 Fix requests.packages not having package attributes
Fixes #4104
2017-05-29 17:27:10 -04:00
Kenneth Reitz
2d763c90ae v2.17.1 2017-05-29 15:59:00 -04:00
Kenneth Reitz
db076c098e Merge pull request #4103 from untitaker/issue4102
Preserve identity of unbundled deps
2017-05-29 15:45:39 -04:00
Markus Unterwaditzer
588e8f7f64 Preserve identity of unbundled deps
Fix #4102
2017-05-29 21:41:59 +02:00
Kenneth Reitz
593cd18202 Merge branch 'master' of github.com:kennethreitz/requests 2017-05-29 14:28:23 -04:00
Kenneth Reitz
2daf1cbad9 fix manifest file 2017-05-29 14:28:17 -04:00
Kenneth Reitz
71d8f289b0 Update index.rst 2017-05-29 13:28:54 -04:00
Kenneth Reitz
44c9b7e93b Update README.rst 2017-05-29 13:28:18 -04:00
Kenneth Reitz
916d171f2b Merge branch 'master' of github.com:kennethreitz/requests 2017-05-29 13:17:57 -04:00
Kenneth Reitz
3857431159 v2.17.0 2017-05-29 13:17:49 -04:00
Kenneth Reitz
4ad4670583 Merge pull request #4099 from requests/requests-namespace
Requests namespace
2017-05-29 13:15:20 -04:00
Kenneth Reitz
68076a7f81 Merge pull request #4100 from bcongdon/remove-redirect-cache
Remove session redirect cache
2017-05-29 13:14:42 -04:00
Benjamin Congdon
86f8cb8a35 Remove session redirect cache 2017-05-29 09:53:24 -07:00
Kenneth Reitz
7f14db17c8 new requests namespace 2017-05-29 12:11:43 -04:00
Kenneth Reitz
14c1102e0f new installation location 2017-05-29 12:08:28 -04:00
Kenneth Reitz
c77911ca0f Merge pull request #4094 from kennethreitz/flake8
Flake8
2017-05-29 01:53:26 -04:00
Kenneth Reitz
5a2e5af3a4 try junit 2017-05-29 01:51:06 -04:00
Kenneth Reitz
31fc69ec0d empty commit 2017-05-29 01:39:42 -04:00
Kenneth Reitz
88b435e7e8 only flake8 the right directory 2017-05-29 01:36:00 -04:00
Kenneth Reitz
60226cc25c empty commit 2017-05-29 01:32:26 -04:00
Kenneth Reitz
8ddba4662d no piping to a file 2017-05-28 22:06:04 -04:00
Kenneth Reitz
cd2beaf04a flake8report.txt 2017-05-28 21:54:13 -04:00
Kenneth Reitz
58501d1ec7 docutils 2017-05-28 21:43:29 -04:00
Kenneth Reitz
beccd21146 bunk change 2017-05-28 21:42:09 -04:00
Kenneth Reitz
0622b5c54e flake8 2017-05-28 21:38:27 -04:00
Kenneth Reitz
821774cf47 Update requirements.txt 2017-05-28 21:29:35 -04:00
Kenneth Reitz
78349914c8 Merge pull request #4086 from kennethreitz/travis2
try this travis file
2017-05-28 11:38:51 -07:00
Kenneth Reitz
2ccecf6dbd skip for now 2017-05-28 13:05:09 -04:00
Kenneth Reitz
8af1d9331f fix 2017-05-28 13:03:26 -04:00
Kenneth Reitz
ef34a85378 better ci file 2017-05-28 12:55:59 -04:00
Kenneth Reitz
55014bcc48 try this travis file 2017-05-28 12:51:27 -04:00
Kenneth Reitz
303eca03f3 no more pipenv 2017-05-28 12:37:34 -04:00
Kenneth Reitz
e02eb69fcc that doesn't work on windows 2017-05-28 12:33:56 -04:00
Kenneth Reitz
2936a77678 speed up appveyor 2017-05-28 12:30:58 -04:00
Kenneth Reitz
e6e3589c36 number of cores for travis 2017-05-28 12:14:27 -04:00
Kenneth Reitz
c3a00771e3 todo 2017-05-28 00:43:54 -04:00
Kenneth Reitz
16c8241a81 v2.16.5 2017-05-28 00:35:36 -04:00
Kenneth Reitz
1dfa631dae updates to travis ci 2017-05-27 23:54:53 -04:00
Kenneth Reitz
1fa168eea4 tox.ini 2017-05-27 23:52:44 -04:00
Kenneth Reitz
8b5fa606ec improvements to help utility 2017-05-27 23:51:22 -04:00
Kenneth Reitz
148ab30d70 Merge pull request #4083 from kennethreitz/faster-ci
faster ci (test)
2017-05-27 20:37:37 -07:00
Kenneth Reitz
8d0c2537ee better comments 2017-05-27 23:34:56 -04:00
Kenneth Reitz
458008653c detox 2017-05-27 23:33:13 -04:00
Kenneth Reitz
679d368e3e setup.py improvements 2017-05-27 23:27:38 -04:00
Kenneth Reitz
7384fe71d6 let's see what this breaks 2017-05-27 23:22:49 -04:00
Kenneth Reitz
94331723d1 try again 2017-05-27 23:19:59 -04:00
Kenneth Reitz
b565b79858 skip that 2017-05-27 23:14:06 -04:00
Kenneth Reitz
a00d14a61f pytest 2017-05-27 23:11:01 -04:00
Kenneth Reitz
dc70edf17d try this 2017-05-27 23:09:38 -04:00
Kenneth Reitz
68fda6bcf2 see if that fixes things 2017-05-27 23:07:24 -04:00
Kenneth Reitz
141ce93445 test 2017-05-27 23:04:12 -04:00
Kenneth Reitz
6abe1ff933 update 2017-05-27 23:02:45 -04:00
Kenneth Reitz
3d425ac191 try this 2017-05-27 23:00:30 -04:00
Kenneth Reitz
0ff28d7421 faster 2017-05-27 22:57:45 -04:00
Kenneth Reitz
2758b8b0f0 improve speed of travis-ci 2017-05-27 22:56:43 -04:00
Kenneth Reitz
6746b2540d faster 2017-05-27 22:55:22 -04:00
Kenneth Reitz
03944f4cd6 restore old behavior 2017-05-27 20:33:32 -04:00
Kenneth Reitz
4a28ffcfe9 try this 2017-05-27 20:28:30 -04:00
Kenneth Reitz
b6d51d9f2b change test configuration 2017-05-27 20:25:11 -04:00
Kenneth Reitz
2edb553036 so frustrating 2017-05-27 20:23:02 -04:00
Kenneth Reitz
cffa0effe0 remove pytest-mock 2017-05-27 20:21:29 -04:00
Kenneth Reitz
76a66c41d6 final attempt 2017-05-27 20:19:42 -04:00
Kenneth Reitz
19a1379ff5 >=2.7 2017-05-27 20:17:33 -04:00
Kenneth Reitz
057689bb8a grr 2017-05-27 20:16:32 -04:00
Kenneth Reitz
88f28325c9 pytest 2017-05-27 20:15:17 -04:00
Kenneth Reitz
62afdabb30 blah 2017-05-27 20:11:04 -04:00
Kenneth Reitz
2468058fea better requirements 2017-05-27 20:09:58 -04:00
Kenneth Reitz
e4d8571080 concurrency in coverage report 2017-05-27 20:08:08 -04:00
Kenneth Reitz
048997daa0 better requirements 2017-05-27 20:07:35 -04:00
Kenneth Reitz
c166c4f5d4 remove circle.yml 2017-05-27 20:01:08 -04:00
Kenneth Reitz
f4b488b7f8 try removing that 2017-05-27 19:59:19 -04:00
Kenneth Reitz
cd4c701186 xdist 2017-05-27 19:57:40 -04:00
Kenneth Reitz
8e93b100da lets give this a try 2017-05-27 19:44:54 -04:00
Kenneth Reitz
276024b170 fix tests 2017-05-27 19:33:40 -04:00
Kenneth Reitz
6af910610f omg 2017-05-27 19:31:31 -04:00
Kenneth Reitz
1d76cb3572 cleanup tests (make them faster) 2017-05-27 19:30:13 -04:00
Kenneth Reitz
03e5f5daf3 socks needed for tests 2017-05-27 19:16:16 -04:00
Kenneth Reitz
b9a004a22b improvements 2017-05-27 17:25:44 -04:00
Kenneth Reitz
2e67c86075 merge 2017-05-27 17:24:06 -04:00
Kenneth Reitz
f0fb5034fc better headings 2017-05-27 17:14:10 -04:00
Kenneth Reitz
b0c19226c6 simplify 2017-05-27 17:12:50 -04:00
Kenneth Reitz
4e06345988 issue template 2017-05-27 17:09:52 -04:00
Kenneth Reitz
892fbe09f6 issue template 2017-05-27 17:08:50 -04:00
Kenneth Reitz
46a4e731da issue template 2017-05-27 17:07:30 -04:00
Kenneth Reitz
46a930941a issue template 2017-05-27 17:06:37 -04:00
Kenneth Reitz
c6827de846 better template 2017-05-27 17:03:17 -04:00
Kenneth Reitz
5c65f6d01e issue template 2017-05-27 17:01:09 -04:00
Kenneth Reitz
7ce5ca853d Merge pull request #4079 from kennethreitz/help
$ python -m requests.help
2017-05-27 13:58:19 -07:00
Kenneth Reitz
0ae8524e3b v2.16.4 2017-05-27 16:57:50 -04:00
Kenneth Reitz
bf4a813304 rename information/info 2017-05-27 16:50:51 -04:00
Kenneth Reitz
6d082ea972 add info about chardet and urllib3 2017-05-27 16:49:48 -04:00
Kenneth Reitz
f180980b28 Merge branch 'master' into bug-report-info 2017-05-27 13:41:54 -07:00
Kenneth Reitz
a44284c045 cleanup version.py 2017-05-27 12:41:11 -04:00
Kenneth Reitz
c1f32f68f6 v2.16.3 2017-05-27 12:20:34 -04:00
Kenneth Reitz
4c155de9fd test entrypoints 2017-05-27 11:06:53 -04:00
Kenneth Reitz
03dd91093b pep8 fix 2017-05-27 10:57:46 -04:00
Kenneth Reitz
d42556a936 2.16.2 2017-05-27 10:53:02 -04:00
Kenneth Reitz
103718847a v2.16.2 2017-05-27 10:52:47 -04:00
Kenneth Reitz
28666e5d3a vastly simpify making packages available for backwards compatibility 2017-05-27 10:49:57 -04:00
Kenneth Reitz
ecaa10543f fix setup.py 2017-05-27 10:33:10 -04:00
Kenneth Reitz
908c3b01ee restore packages to setup.py 2017-05-27 10:32:56 -04:00
Kenneth Reitz
c952e9e4e0 addded import stubs for urllib3 2017-05-27 10:29:00 -04:00
Kenneth Reitz
cceceecb68 fix history 2017-05-27 10:11:18 -04:00
Kenneth Reitz
e9ca4b39b4 more history 2017-05-27 10:09:57 -04:00
Kenneth Reitz
7962c12451 more history notes 2017-05-27 10:09:03 -04:00
Kenneth Reitz
f687e9f3d8 history 2017-05-27 09:58:37 -04:00
Kenneth Reitz
dc24bc3217 Merge branch 'master' of github.com:kennethreitz/requests 2017-05-27 09:37:17 -04:00
Kenneth Reitz
267ec2f9c3 restore package namespace 2017-05-27 09:37:09 -04:00
Kenneth Reitz
18c8924f14 better checking for urllib3 2017-05-27 09:37:02 -04:00
Kenneth Reitz
413f2a557c Update index.rst 2017-05-27 00:29:54 -04:00
Kenneth Reitz
04faf59f49 Update README.rst 2017-05-27 00:28:48 -04:00
Kenneth Reitz
bcd0e170ac requirements 2017-05-26 23:37:08 -04:00
Kenneth Reitz
a6c3a0ca72 Merge pull request #4067 from kennethreitz/deps
Deps (work in progress)
2017-05-26 20:33:28 -07:00
Kenneth Reitz
d2713412e5 v2.16.0 2017-05-26 23:24:42 -04:00
Kenneth Reitz
2b34880e2f sanity checks upon boot 2017-05-26 23:22:03 -04:00
Kenneth Reitz
de035b56f9 delete notice 2017-05-26 23:08:00 -04:00
Kenneth Reitz
1f6de03baf cleanup certs.py 2017-05-26 23:02:55 -04:00
Kenneth Reitz
0d7de6430e update certs 2017-05-26 22:58:59 -04:00
Kenneth Reitz
a00b7e4b25 no more certs file 2017-05-26 22:58:10 -04:00
Kenneth Reitz
c49ce5ae0b fix 2017-05-26 22:56:43 -04:00
Kenneth Reitz
6d3d5e59c9 fix models.py 2017-05-26 22:55:55 -04:00
Kenneth Reitz
af52bf795e remove bunk tests 2017-05-26 22:55:44 -04:00
Kenneth Reitz
f5f3e696ab fix makefile 2017-05-26 22:53:47 -04:00
Kenneth Reitz
47f170bb35 fix __init__.py 2017-05-26 22:53:28 -04:00
Kenneth Reitz
168109f13c fix adapters.py 2017-05-26 22:52:29 -04:00
Kenneth Reitz
8a2014e265 fix compat.py 2017-05-26 22:51:40 -04:00
Kenneth Reitz
1d31b36148 fix exceptions.py 2017-05-26 22:50:43 -04:00
Kenneth Reitz
6c41633cfd fix models.py 2017-05-26 22:50:13 -04:00
Kenneth Reitz
6ef7298466 fix sessions.py 2017-05-26 22:49:43 -04:00
Kenneth Reitz
818daff12a more test removal of old imports 2017-05-26 22:48:58 -04:00
Kenneth Reitz
0bb200515c remove test imports from packages 2017-05-26 22:48:01 -04:00
Kenneth Reitz
628633143d require certifi 2017-05-26 22:46:46 -04:00
Kenneth Reitz
1ea27b3564 add install_requires 2017-05-26 22:44:56 -04:00
Kenneth Reitz
8e17600ef6 delete packages 2017-05-26 22:44:48 -04:00
Kenneth Reitz
282b01a7c9 new release 2017-05-26 22:13:29 -04:00
Kenneth Reitz
e1539ac8ff everyone makes mistakes :P 2017-05-26 22:12:38 -04:00
Kenneth Reitz
8c2a36140b fix for python 3 2017-05-26 22:08:46 -04:00
Kenneth Reitz
60b9fb17af too much 2017-05-26 21:48:35 -04:00
Kenneth Reitz
0aee483497 fix setup.py 2017-05-26 21:43:03 -04:00
Kenneth Reitz
bf53ace6f8 v2.15.0 2017-05-26 21:38:23 -04:00
Kenneth Reitz
4c3d307eb9 Merge pull request #4052 from hile/master
Fix regression in API caused by commit 85400d8d6751071ef78f042d1efa72…
2017-05-26 18:34:30 -07:00
Kenneth Reitz
380d130245 Merge pull request #4066 from kennethreitz/next
API improvements
2017-05-26 18:33:28 -07:00
Kenneth Reitz
c3367d1854 remove Request.send(session) 2017-05-26 21:28:52 -04:00
Kenneth Reitz
a7239aab84 feedback from @sigmavirus42 2017-05-26 21:23:55 -04:00
Kenneth Reitz
dfd667df96 who wrote this shit 2017-05-26 21:17:13 -04:00
Kenneth Reitz
f41560c5d4 fix the tests 2017-05-26 21:15:58 -04:00
Kenneth Reitz
ce64cce14e API improvements 2017-05-26 21:07:37 -04:00
Kenneth Reitz
60041f5169 Create CODE_OF_CONDUCT.md 2017-05-26 20:32:06 -04:00
Kenneth Reitz
14d6fa1472 __version__.py 2017-05-25 20:07:38 -04:00
Kenneth Reitz
64efd9cfe0 yay i knew i wasn't crazy 2017-05-25 20:07:23 -04:00
Kenneth Reitz
1001bc671a fix imports 2017-05-25 19:58:44 -04:00
Kenneth Reitz
733ff4b8a4 Merge branch 'master' of github.com:kennethreitz/requests 2017-05-25 19:52:31 -04:00
Kenneth Reitz
296c215762 __version__ 2017-05-25 19:52:17 -04:00
Kenneth Reitz
cc7b3ee7ed Merge pull request #4064 from sigmavirus24/fix-rtfd
Avoid breaking people using requests.__version__
2017-05-25 16:46:08 -07:00
Ian Cordasco
e038aad3cc Avoid breaking people using requests.__version__
Using __version__ as a module breaks users who expect
requests.__version__ to be the version string.
2017-05-25 18:44:30 -05:00
Kenneth Reitz
4f8f4b5fb3 Merge pull request #4063 from kennethreitz/version
fix rtd
2017-05-25 16:24:02 -07:00
Kenneth Reitz
ce882a2eae fix rtd 2017-05-25 19:07:48 -04:00
Kenneth Reitz
f581dc95a9 Merge pull request #4059 from kennethreitz/version
__version__.py
2017-05-25 09:39:43 -07:00
Kenneth Reitz
7abfd92aea take a page out of @sigmavirus42's book 2017-05-25 11:46:12 -04:00
Kenneth Reitz
9fbfd22f6b take a page out of @sigmavirus42's book 2017-05-25 11:46:00 -04:00
Kenneth Reitz
e634ab73b2 better '' 2017-05-25 11:33:04 -04:00
Kenneth Reitz
3e32356716 __version__.py 2017-05-25 11:31:38 -04:00
Kenneth Reitz
539302a17d Update README.rst 2017-05-25 10:47:13 -04:00
Cory Benfield
037108178c Merge pull request #4056 from Lukasa/pytest-httpbin-fix
Disable pytest messing with warnings.
2017-05-24 10:46:11 -07:00
Cory Benfield
f3d310b299 Turns out @kennethreitz suprise-broke the CI 2017-05-24 10:20:07 -07:00
Cory Benfield
874bca97cb Disable pytest messing with warnings.
We may be able to remove this if pytest resolves pytest-dev/pytest#2430
2017-05-24 10:04:56 -07:00
Kenneth Reitz
dbb67a1310 Update __init__.py 2017-05-24 08:50:22 -07:00
Ilkka Tuohela
a9470fe31f Fix regression in API caused by commit 85400d8d67
- The added optional parameter changes API and should default to None

    This utility call is used by for example requestbuilder package directly
    which breaks because it passes only one argument to the function as it
    used to be.
2017-05-24 08:47:46 +03:00
Kenneth Reitz
0ba21a79c4 progress 2017-05-22 16:08:01 -07:00
Kenneth Reitz
66293b830a progress 2017-05-22 15:38:17 -07:00
Kenneth Reitz
6fb9b1ce53 fix lack of taste
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-05-21 23:25:18 -07:00
Kenneth Reitz
2772413f3d Update index.rst 2017-05-21 08:25:50 -07:00
Cory Benfield
ba63e50ecd Merge pull request #4041 from jdufresne/bdist_wheel
Add setup.cfg to declare wheel as universal
2017-05-20 08:11:11 -07:00
Jon Dufresne
2c71f2d520 Add setup.cfg to declare wheel as universal
As the project is pure Python, a built wheel should always be universal,
so define in the project globally. Can remove --universal command from
Makefile.

See:

http://pythonwheels.com/
2017-05-20 07:39:09 -07:00
Cory Benfield
fb3f2a030f Merge branch 'kaptajnen-master' 2017-05-18 09:05:03 -07:00
Jonas Laursen
00c6ad58b7 Simplify fix for #4025 2017-05-18 09:04:34 -07:00
Jonas Laursen
af66521381 Fix #4025 2017-05-18 09:04:34 -07:00
Ian Cordasco
a8bfa82801 Merge pull request #4026 from floppym/sdist-tests
Include tests in sdist tarball
2017-05-18 09:50:40 -05:00
Ian Cordasco
6ab6a18ab2 Merge pull request #4033 from Lukasa/issue/4030
Test that the readme renders in CI.
2017-05-17 20:41:00 -05:00
Ian Cordasco
570c4c83a5 Amend the syntax for skipping the readme check 2017-05-17 20:06:42 -05:00
Cory Benfield
e2142a1e54 Alex said this would work 2017-05-17 18:02:28 -07:00
Ian Cordasco
52a2efa2ae Avoid verifying the README.rst on Python 2.6
readme-render does not appear to support Python 2.6. This causes tests to fail
on Travis' 2.6 environment.
2017-05-17 19:54:31 -05:00
Ian Cordasco
f88e573c18 Merge branch 'master' into issue/4030 2017-05-17 19:36:49 -05:00
Cory Benfield
da29295369 Merge pull request #4036 from nateprewitt/pin_sphinx
Pin sphinx
2017-05-17 15:47:48 -07:00
Nate Prewitt
dbdbffd7f5 Stop creating Pipfile.lock on every make.
Pipenv used to require the file to be locked on each individual platform,
but as of v4.0.0, that is no longer necessary. Removing the forced call
to lock will speed up builds in CI.
2017-05-17 13:21:11 -07:00
Nate Prewitt
a3f2972c4f Temporarily cap Sphinx at 1.5.5 for Python 2.6 compatibility 2017-05-17 13:20:19 -07:00
Cory Benfield
1553770014 Fixup broken changelog 2017-05-17 10:54:06 -07:00
Cory Benfield
37ef88885c Test the readme in travis 2017-05-17 10:46:05 -07:00
Cory Benfield
2cb07872fe Add a makefile target for testing the readme 2017-05-17 10:44:14 -07:00
Mike Gilbert
2667c772b9 Include tests in sdist tarball
Fixes: https://github.com/kennethreitz/requests/issues/4024
2017-05-16 18:59:23 -04:00
Cory Benfield
0280a18b53 Merge pull request #4015 from nateprewitt/update_manifest
remove old test_requests.py listing from MANIFEST.in
2017-05-10 20:04:03 +01:00
Nate Prewitt
f4b90827b0 remove old test_requests.py listing from MANIFEST.in 2017-05-10 09:58:22 -06:00
Cory Benfield
e4693eba4f v2.14.2 2017-05-10 15:04:22 +01:00
Cory Benfield
2e496c3e1d Merge pull request #4014 from Lukasa/even-more-compat
Remove range operators from markers.
2017-05-10 15:02:54 +01:00
Cory Benfield
f3f4c3e20a Remove range operators from markers 2017-05-10 14:19:46 +01:00
Cory Benfield
3618f3f68e v2.14.1 2017-05-09 19:58:39 +01:00
Cory Benfield
f909314652 Changelog for v2.14.1 2017-05-09 19:58:15 +01:00
Cory Benfield
636082fa8f Merge pull request #4007 from Lukasa/use-more-comaptible-marker
Use sys_platform instead of platform_system
2017-05-09 19:55:56 +01:00
Cory Benfield
800a074b5d Use sys_platform instead of platform_system
This is more compatible as a marker and so will break fewer people.
2017-05-09 19:10:31 +01:00
Cory Benfield
508d47dc6e v2.14.0 2017-05-09 16:44:27 +01:00
Cory Benfield
bf1a2a4e39 Merge pull request #4004 from Lukasa/prepare-2.14
Prepare for 2.14 release.
2017-05-09 16:42:02 +01:00
Cory Benfield
ddada2d750 We no longer downcase some hosts. 2017-05-09 10:08:06 +01:00
Cory Benfield
074c4a32d8 Update certifi to 2017.4.17 2017-05-09 09:37:52 +01:00
Cory Benfield
debc5de6d4 Update idna to v2.5 2017-05-09 09:36:27 +01:00
Cory Benfield
4bad52caa2 Update chardet to v3.0.2 2017-05-09 09:34:51 +01:00
Cory Benfield
d49f3e258c Update urllib3 to v1.21.1 2017-05-09 09:21:08 +01:00
Cory Benfield
823519d45c Bring changelog up to date. 2017-05-09 09:18:18 +01:00
Kenneth Reitz
f8189eda10 Merge pull request #4001 from bowlofeggs/seconds
Specify that the timeout parameter is in seconds.
2017-05-07 00:07:02 -04:00
Randy Barlow
3d813c9a7a Specify that the timeout parameter is in seconds.
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
2017-05-06 21:25:50 -04:00
Kenneth Reitz
379025a1bc Update README.rst 2017-05-05 12:54:20 -04:00
Kenneth Reitz
176ba43869 Update README.rst 2017-05-05 12:53:17 -04:00
Kenneth Reitz
7ae662dec9 reddit 2017-05-04 11:59:36 -04:00
Cory Benfield
216aee441d Merge pull request #3979 from schlamar/bypass-proxy
improve proxy bypass on Windows
2017-05-04 15:18:30 +01:00
schlamar
5c389cf3f5 update changelog 2017-05-04 15:31:54 +02:00
schlamar
1c38e1f5f6 proxy bypass on Windows without DNS lookups 2017-05-04 10:44:47 +02:00
schlamar
4f34446b36 test proxy bypass with config from registry 2017-05-04 07:46:59 +02:00
schlamar
724fd44b97 revert 8e6e47af and c121b98c 2017-05-04 07:46:59 +02:00
Kenneth Reitz
26ab951300 Update index.rst 2017-05-03 13:26:15 -04:00
Kenneth Reitz
eae38b8d13 Merge pull request #3988 from Lukasa/fix-appveyor
[WIP] Fix up appveyor testing.
2017-05-03 13:25:25 -04:00
Cory Benfield
fcc3b7d7b1 Document the minor changes made 2017-05-03 15:28:39 +01:00
Cory Benfield
d89f8c0d70 Fix up Appveyor testing 2017-05-03 13:19:46 +01:00
Thomas Grainger
8db8a7d82d configure sudo: false on travis 2017-05-03 09:23:02 +01:00
Cory Benfield
84099eea9f Merge pull request #3991 from chrisgavin/unused-imports
Remove some unused imports.
2017-04-26 13:09:34 +01:00
Chris Gavin
19ba9f1097 Remove some unused imports. 2017-04-25 22:10:01 +01:00
Kenneth Reitz
44106f18b7 Update AUTHORS.rst 2017-04-25 11:06:38 -04:00
Kenneth Reitz
d0a072e15d Merge pull request #3983 from Lukasa/appveyor
Add appveyor testing of Requests.
2017-04-24 12:49:25 -04:00
Cory Benfield
fae7530a17 Add Python 3.6 2017-04-24 08:22:56 +01:00
Cory Benfield
8d6f7e6854 Add appveyor testing of Requests 2017-04-21 12:07:27 +01:00
Cory Benfield
f6c58ec582 Merge pull request #3982 from graingert/travis-sudo-false
configure sudo: false on travis
2017-04-21 11:54:33 +01:00
Thomas Grainger
047056c150 configure sudo: false on travis 2017-04-21 11:37:38 +01:00
Cory Benfield
52a3526a99 Merge pull request #3981 from graingert/cache-pip
enable travis pip cache
2017-04-21 11:32:41 +01:00
Thomas Grainger
af383b3968 enable travis pip cache 2017-04-21 11:21:59 +01:00
Cory Benfield
524627ef21 Merge pull request #3978 from graingert/remove-seemingly-redundant-pyflakes-references
remove seemingly redundant pyflakes references
2017-04-20 09:44:19 -04:00
Thomas Grainger
fcb272cc36 remove seemingly redundant pyflakes references 2017-04-20 13:23:56 +01:00
Cory Benfield
b8674db246 Merge pull request #3969 from shmuelamar/master
fix handle of non-ascii location on redirects issue #3888
2017-04-18 12:20:22 -04:00
shmuelamar
722b1dae96 fix handle of non-ascii location on redirects 2017-04-18 00:08:59 +03:00
Cory Benfield
fd7dcd2785 Merge pull request #3963 from shmuelamar/master
fix unicode decode error on py2 when handling redirect without scheme
2017-04-14 16:13:49 -04:00
shmuelamar
a3e597c171 fix unicode decode error on py2 when handling redirect without scheme 2017-04-14 16:20:27 +03:00
Cory Benfield
84a6040762 Merge pull request #3958 from Xuanwo/typo-fix
Fix a typo in utils
2017-04-08 14:18:43 +01:00
Xuanwo
1cd173a82c Fix a typo in utils
Signed-off-by: Xuanwo <xuanwo.cn@gmail.com>
2017-04-08 20:56:28 +08:00
Cory Benfield
f061fb7e28 Merge pull request #3956 from rubendura/master
Fixes DeprecationWarnings in Python 3.6 due to invalid escape sequences
2017-04-05 16:29:41 +01:00
Ruben Dura Tari
ead8fba84b Fixes DeprecationWarnings in Python 3.6 due to invalid escape sequences. Fixes #3954 2017-04-05 15:51:58 +01:00
Cory Benfield
342096a3b9 Merge pull request #3943 from leo-b/timeout
HTTPAdapter.send() timeout defaults
2017-04-03 16:45:11 +01:00
Alexander 'Leo' Bergolth
1be6a17edc oops! import Timeout as Urllib3Timeout 2017-04-03 16:49:46 +02:00
Alexander 'Leo' Bergolth
28768b945c use @pytest.mark.parametrize 2017-04-03 16:32:38 +02:00
Alexander 'Leo' Bergolth
93cb1ca763 add some tests for passing in Timeout objects 2017-04-02 15:20:29 +02:00
Cory Benfield
1be8e19403 Merge pull request #3952 from tonybaloney/master
Small help in docs to indicate client side authentication
2017-04-02 11:41:53 +01:00
Anthony Shaw
a63ae02e34 Update sessions.py
Update docstring for the session init to explain what the cert kwarg types are for.
2017-04-02 20:29:48 +10:00
Anthony Shaw
3cb7539981 Update advanced.rst
break client side certificates out into a sub header
2017-04-02 20:21:37 +10:00
Alexander 'Leo' Bergolth
4c13678587 remove change for timeout=None 2017-03-30 16:20:39 +02:00
Alexander 'Leo' Bergolth
1e7ae063ce whitespace 2017-03-29 18:20:11 +02:00
Alexander 'Leo' Bergolth
fe58c6fdd6 small rearrangement 2017-03-29 18:01:18 +02:00
Alexander 'Leo' Bergolth
a180db963f allow urllib3 Timeout objects as timeout parameter for HTTPAdapter.send()
omit timeout argument when calling urlopen on the connection. this allows setting a default timeout at connection pool level:
adapter.poolmanager.connection_pool_kw['timeout'] = urllib3.Timeout(...)
2017-03-29 16:53:28 +02:00
Ian Cordasco
567e12bfb8 Add debugging submodule for bug reporters
The suggested usage in a bug report would be

    python -c 'from requests import _bug; _bug.print_information()'

This should generate most of the information we tend to ask for
repeatedly from bug reporters.
2017-03-23 07:22:55 -05:00
Cory Benfield
993cbf5741 Merge pull request #3927 from bagerard/raise_IOError_invalid_certificate_files
Raise IOError when providing an invalid path to a CA bundle or …
2017-03-22 20:41:07 +00:00
Bastien Gérard
4207867aaf PR review fixes:
- used httpbin_secure for tests
- updated docstring related to `verify` param"
- used TLS acronym instead of SSL
2017-03-22 21:28:38 +01:00
Bastien Gérard
42ec8b08f2 #3927 fixes based on review 2017-03-22 21:28:38 +01:00
Bastien Gérard
7d8b87c37f #3926 raise IOError when providing an invalid path to a CA bundle or certificate files 2017-03-22 21:28:38 +01:00
Kenneth Reitz
b60c5a5ed4 Merge branch 'master' of github.com:kennethreitz/requests 2017-03-19 21:14:17 -04:00
Kenneth Reitz
1cb759a9d9 roman numberals 2017-03-19 21:14:08 -04:00
Cory Benfield
552ab7a064 Merge pull request #3922 from bgschiller/patch-1
Change apostrophe placement in advanced.rst
2017-03-14 15:40:49 +00:00
Brian Schiller
e0ba82949b Change apostrophe placement in advanced.rst
See Rule2a on http://www.grammarbook.com/punctuation/apostro.asp
2017-03-14 10:09:41 -05:00
Cory Benfield
29085e7d95 Merge pull request #3920 from dufferzafar/patch-1
Update README.rst - add 'of'
2017-03-09 08:16:31 +00:00
Shadab Zafar
4acdb99752 Update README.rst 2017-03-09 12:49:52 +05:30
Cory Benfield
c43fefa7ed Merge pull request #3913 from StyXman/patch-1
Add mention to list of tuples as data param.
2017-03-07 09:43:26 +00:00
Marcos Dione
2e9e944bc1 Removed sentence as suggested.
Fair enough...
2017-03-07 10:34:21 +01:00
Marcos Dione
16f6e25176 Add mention to list od tuples as data param.
`requests.request` accepts list of tuples in the `data` param, but thereś no mention of it in the docs.
2017-03-07 10:26:51 +01:00
Cory Benfield
62bd9247ba Merge pull request #3909 from sigmavirus24/updates-for-3885
Update implementation of TimedCache object
2017-03-04 15:27:45 +00:00
Ian Cordasco
8e6e47af43 Update implementation of TimedCache object
There were some odd decisions made about the implementation of some of
the required methods for MuttableMapping in the TimedCache object. This
cleans those up and makes the implementation, ever so slightly, easier
to read.

See also #3885
2017-03-04 09:03:03 -06:00
Kenneth Reitz
41a33f2e86 Update README.rst 2017-03-02 17:31:38 -08:00
Cory Benfield
3e0d78fdaf Merge pull request #3901 from nedbat/master
Smaller logo
2017-03-01 20:05:13 +00:00
Ned Batchelder
eca8351491 Smaller logo 2017-03-01 14:52:34 -05:00
Gary Wu
21972c4601 fix #3902 Add proposed documentation change for post data 2017-03-01 13:04:11 -06:00
Cory Benfield
3f3df8b5ff Merge pull request #3900 from lutzhorn/master
fixed #3894 by mentioning form-encoding of dict
2017-03-01 15:30:36 +00:00
Lutz Horn
3d22f9f5ab fixed #3894 by mentioning form-encoding of dict
The optional `data` parameter will be form-encoded, if a dictionary is provided.
2017-03-01 16:00:08 +01:00
Victor Pfautz
2aaf6ac038 Fixed some typos (#3892)
* Fixed some typos
2017-02-27 16:25:10 +00:00
Cory Benfield
45a2977e1b Merge pull request #3885 from davidfontenot/cache_proxy_bypass
Cache proxy bypass
2017-02-27 08:56:43 +00:00
David Fontenot
c121b98c4e wrapped proxy_bypass() with cache lookup
Used to alleviate long gethostbyaddr calls
Made new TimedCache and decorator to wrap
a function with a cache
* Entries looked up older than a minute (default amount)
are evicted.
* When full, evicts the oldest entry
2017-02-23 14:04:16 -08:00
Ian Cordasco
d6f4818c0b Merge pull request #3877 from sigmavirus24/update-docstring
Correct docstring for Response.ok
2017-02-16 07:37:18 -06:00
Ian Cordasco
8e049bd9eb Update docstrings for Response.__{bool,nonzero}__
Like the docstring added to Response.ok these were misleading and
vaguely incorrect. Better to be explicit than implicit.
2017-02-16 07:21:15 -06:00
Ian Cordasco
7a281e74ec Correct docstring for Response.ok 2017-02-16 07:15:37 -06:00
Cory Benfield
e674aa1c8c Merge pull request #3876 from mislavcimpersak/hotfix/response_ok_docstring
added docstring for response.ok property
2017-02-16 09:30:11 +00:00
Mislav Cimperšak
3664682539 added docstring for response.ok property 2017-02-16 10:06:28 +01:00
Kenneth Reitz
655f0edbb4 better testimonials 2017-02-14 17:00:17 -05:00
Ian Cordasco
2414fa82c8 Merge pull request #3873 from nateprewitt/super_len_fix
properly handled failed seek
2017-02-14 09:43:19 -06:00
Nate Prewitt
f47aff68f1 properly handled failed seek 2017-02-14 07:45:41 -07:00
Kenneth Reitz
90f3842ed6 edmsynths 2017-02-12 02:18:50 -05:00
Kenneth Reitz
6cbebf782a fixes 2017-02-11 15:17:27 -05:00
Kenneth Reitz
f2fe735846 fixes 2017-02-11 15:16:09 -05:00
Kenneth Reitz
e7b7574cfe hhg2p 2017-02-11 15:14:47 -05:00
Kenneth Reitz
6bd6249051 Merge pull request #3865 from JohnVillalovos/master
Allow use of 'no_proxy' in the proxies argument
2017-02-10 15:50:10 -06:00
Kenneth Reitz
453397965b Merge pull request #3846 from jvanasco/feature-pluggable_handling
initial attempt at `get_redirect_target`
2017-02-10 15:46:13 -06:00
jonathan vanasco
70f31a3166 * initial attempt at get_redirect_target
* removing the `i` from the redirect detection while-loop
2017-02-10 13:53:23 -05:00
John L. Villalovos
85400d8d67 Allow use of 'no_proxy' in the proxies argument
Add the ability to add 'no_proxy' and a value to the 'proxies'
dictionary argument.

https://github.com/kennethreitz/requests/issues/2817

Closes gh-2817
2017-02-10 09:41:54 -08:00
Cory Benfield
ad65b0cb19 Merge pull request #3862 from mattkohl/master
Updated docs for Pipenv
2017-02-10 12:19:01 +00:00
mattkohl
57659e5987 Removed duplicate key in Pipfile 2017-02-10 11:46:59 +00:00
mattkohl
c134388a43 Removed requirements.txt from MANIFEST.in 2017-02-10 10:51:14 +00:00
mattkohl
b41bb9ecb2 Added name & github link 2017-02-10 10:48:15 +00:00
mattkohl
a3e671d717 Updated test instructions for Pipenv 2017-02-10 10:47:40 +00:00
mattkohl
7b190acf82 Updated Pipfile to reflect version specs in setup.py; added Sphinx 2017-02-10 10:46:35 +00:00
mattkohl
a0b97253c2 Removed docs-init (depended on missing docs/requirements.txt) 2017-02-10 10:45:06 +00:00
Kenneth Reitz
84749f08bc Update README.rst 2017-02-09 21:31:38 -05:00
Kenneth Reitz
e63dd1a66b Update README.rst 2017-02-09 21:31:14 -05:00
Ian Cordasco
0bea453913 Merge pull request #3857 from Lukasa/params-docs
Say that we use a dictionary of strings.
2017-02-08 06:05:50 -06:00
Cory Benfield
08ce652b8b Say that we use a dictionary of strings. 2017-02-08 11:54:32 +00:00
Cory Benfield
5c68b8f227 Merge pull request #3853 from StyXman/500-small-head
Do not convert /o\ into /O\
2017-02-07 16:04:24 +00:00
Marcos Dione
571d2c2cd7 Fix syntax error
I can only wonder how I managed to write it like that...
2017-02-07 16:57:17 +01:00
Marcos Dione
b00d8bf474 Proper version, no bugs, shorter. 2017-02-06 21:44:28 +01:00
Marcos Dione
593734b770 do not convert /o\ into /O\ 2017-02-06 17:27:16 +01:00
Cory Benfield
af4052b020 Merge pull request #3851 from nateprewitt/remove_pin
remove pin
2017-02-03 17:21:13 +00:00
Nate Prewitt
f521a25970 remove pin 2017-02-03 09:29:13 -07:00
Kenneth Reitz
62176a1ca7 2017 2017-02-02 16:12:33 -05:00
Kenneth Reitz
f278344e01 updated pipfile 2017-02-02 16:12:29 -05:00
Kenneth Reitz
c2c523ba9e docs 2017-02-02 15:22:01 -05:00
Kenneth Reitz
abaeeb8807 improved sidebar 2017-02-02 15:19:31 -05:00
Kenneth Reitz
6bd091ca70 improved homepage 2017-02-02 15:18:24 -05:00
Kenneth Reitz
260763a83d better say thanks icon 2017-02-02 15:06:54 -05:00
Kenneth Reitz
5ac53c69c7 11,000,000! 2017-02-02 14:09:31 -05:00
Kenneth Reitz
8c6e9388e7 Merge branch 'master' of github.com:kennethreitz/requests 2017-02-02 14:06:07 -05:00
Kenneth Reitz
036b5d34fd better sidebar for docs 2017-02-02 14:05:07 -05:00
Cory Benfield
f4a3aa42b6 Merge pull request #3841 from TetraEtc/happy-new
Update Copyright in LICENSE to 2017
2017-01-31 08:54:28 +00:00
TetraEtc
1a4ba6c833 Update LICENSE 2017-01-31 13:03:12 +10:00
Cory Benfield
e84086ac86 Merge pull request #3835 from mmedal/master
Only send HTTPDigestAuth on 4xx challenges
2017-01-29 09:15:35 +01:00
Matthew Medal
8a58427d8a Only send HTTPDigestAuth on 4xx challenges
Resolves: #3772
2017-01-27 12:56:50 -08:00
Cory Benfield
d3c97dda11 Merge pull request #3836 from nateprewitt/pin_pipenv
pin pipenv until kennethreitz/pipenv#90 is resolved
2017-01-27 20:55:06 +00:00
Nate Prewitt
808e4c62dc pin pipenv until kennethreitz/pipenv#90 is resolved 2017-01-27 13:42:22 -07:00
Cory Benfield
23057dbc22 Merge pull request #3832 from nateprewitt/master
fixing codecov with pipenv
2017-01-25 15:40:30 +00:00
Nate Prewitt
795106c188 fixing codecov with pipenv 2017-01-24 21:29:22 -07:00
Kenneth Reitz
b92058b6fe empty commit 2017-01-24 23:08:27 -05:00
Kenneth Reitz
1da52c04d4 attempted fix for travis 2017-01-24 23:04:25 -05:00
Kenneth Reitz
cf07efa534 give up 2017-01-24 22:51:24 -05:00
Kenneth Reitz
9e681a4a9f fix makefle 2017-01-24 21:22:16 -05:00
Kenneth Reitz
efa030eae3 proper pipfile.lock 2017-01-24 21:13:18 -05:00
Kenneth Reitz
c008465d24 pypi/simple 2017-01-24 21:09:21 -05:00
Kenneth Reitz
7cad64ac5a use proper names 2017-01-24 21:02:06 -05:00
Kenneth Reitz
014ec0eb26 Merge remote-tracking branch 'origin/master' 2017-01-24 20:59:59 -05:00
Kenneth Reitz
600ee2bf2b updated lockfile 2017-01-24 20:59:26 -05:00
Kenneth Reitz
d291202db0 Merge pull request #3830 from nateprewitt/fixing_pipfile_source
Fixing Pipfile source
2017-01-24 20:57:59 -05:00
Nate Prewitt
9a2a316f08 updating Pipfile.lock 2017-01-24 16:05:46 -07:00
Nate Prewitt
b12272d7d1 updating Pipfile source to a useable pypi endpoint 2017-01-24 16:05:33 -07:00
Kenneth Reitz
fee0e94a76 empty commit 2017-01-24 13:27:38 -05:00
Cory Benfield
fc54869da0 Merge pull request #3828 from sigmavirus24/blacklist-pipenv
Blacklist known bad version of pipenv
2017-01-24 13:13:52 +00:00
Ian Cordasco
6a415a02cf Blacklist known bad version of pipenv
We pinned pipenv to release v2.13.0 but in reality, we could have just
blacklisted the known bad version. For future us, we now blacklist it.
2017-01-24 07:05:30 -06:00
Cory Benfield
e3f89bf23c Merge pull request #3827 from sigmavirus24/release/2.13
Release v2.13.0
2017-01-24 12:52:22 +00:00
Ian Cordasco
32548e2bb6 Pin pipenv to fix CI 2017-01-24 06:45:29 -06:00
Ian Cordasco
b2289cd2d5 Bump version for 2.13.0
Add release notes for 2.13.0
2017-01-24 06:32:12 -06:00
Ian Cordasco
4d00d47a5a Use twine for publishing Requests 2017-01-24 06:22:58 -06:00
Ian Cordasco
af1b542e20 Update idna to v2.2.0 2017-01-24 06:20:44 -06:00
Ian Cordasco
b5704a63ca Update urllib3 to 1.20.0
Further, fix the Makefile to pull urllib3 from the release branch.
git-describe works based on the most recent commit but all of the
nearest commits in the graph for urllib3 are on the release branch
(since the release branch is never merged back to master).
2017-01-24 06:16:54 -06:00
Kenneth Reitz
df56f38bb4 Update README.rst 2017-01-22 17:44:28 -05:00
Kenneth Reitz
304e4cb5ee Update README.rst 2017-01-22 17:42:04 -05:00
Kenneth Reitz
c7a4819c84 Update README.rst 2017-01-22 17:38:21 -05:00
Kenneth Reitz
e32e7108d0 trying this 2017-01-22 00:44:04 -05:00
Kenneth Reitz
97b5bc21d1 fix broken tests 2017-01-21 21:41:16 -05:00
Kenneth Reitz
ed9004f30e no need for this anymore! 2017-01-21 21:36:00 -05:00
Kenneth Reitz
ab3c21cf96 empty commit 2017-01-21 21:32:27 -05:00
Kenneth Reitz
9c67691b90 empty commit 2017-01-21 21:28:50 -05:00
Kenneth Reitz
03d96aa9f7 empty commit 2017-01-21 21:19:25 -05:00
Kenneth Reitz
5b801847c4 empty commit 2017-01-21 21:12:03 -05:00
Kenneth Reitz
8f6e990066 empty commit 2017-01-21 21:09:29 -05:00
Kenneth Reitz
5eb2df1acf empty commit 2017-01-21 21:06:29 -05:00
Kenneth Reitz
62b014560a use git 2017-01-21 21:03:46 -05:00
Kenneth Reitz
73018f40a3 empty commit 2017-01-21 20:57:48 -05:00
Kenneth Reitz
358bb766d0 empty commit 2017-01-21 20:53:21 -05:00
Kenneth Reitz
2a2dd1389b empty commit 2017-01-21 20:50:20 -05:00
Kenneth Reitz
8ae576193c empty commit 2017-01-21 20:45:04 -05:00
Kenneth Reitz
c619bea722 empty commit 2017-01-21 20:45:00 -05:00
Kenneth Reitz
c6973d31ca last attempt 2017-01-21 20:27:33 -05:00
Kenneth Reitz
0938c9e985 one more time 2017-01-21 20:22:29 -05:00
Kenneth Reitz
bb6f5a1d93 --global 2017-01-21 20:12:15 -05:00
Kenneth Reitz
efe0608cdd empty commit 2017-01-21 20:08:36 -05:00
Kenneth Reitz
0ad2792873 trying again 2017-01-21 19:47:39 -05:00
Kenneth Reitz
c00783cd86 let's see if this works 2017-01-21 19:45:44 -05:00
Cory Benfield
4c53915a21 Merge pull request #3789 from moin18/3780
3780: Lazy load idna library
2017-01-19 09:19:00 +00:00
Cory Benfield
5dcc039457 v2.12.5 2017-01-18 12:41:46 +00:00
Cory Benfield
4ada39841b Merge pull request #3823 from Lukasa/changes-2.13.5
Prepare changelog for 2.12.5
2017-01-18 12:41:04 +00:00
Cory Benfield
219d9a7297 Prepare changelog for 2.12.5 2017-01-18 12:23:41 +00:00
Kenneth Reitz
160d364503 RIP Readability 2017-01-17 18:10:25 -05:00
Kenneth Reitz
8344b0b409 link to twitter 2017-01-17 18:09:47 -05:00
Kenneth Reitz
5259966547 yes 3.7 too 2017-01-17 18:09:09 -05:00
Kenneth Reitz
84ee1d4a42 yes, 3.7 too 2017-01-17 18:08:36 -05:00
Kenneth Reitz
23ac7256ea Update README.rst 2017-01-17 18:07:10 -05:00
Kenneth Reitz
52b5ed18c1 cleanup makefile 2017-01-17 18:03:23 -05:00
Kenneth Reitz
a68f7169a5 omit coverage packages 2017-01-17 17:56:19 -05:00
Kenneth Reitz
65fb2a50c8 further fix the build 2017-01-17 17:48:36 -05:00
Kenneth Reitz
d374a182d9 fixing build 2017-01-17 17:44:22 -05:00
Kenneth Reitz
115b438e6a typo 2017-01-17 17:37:21 -05:00
Kenneth Reitz
96fbe9e8c9 get codecov to work 2017-01-17 17:34:33 -05:00
Kenneth Reitz
a1d058c6b1 empty commit 2017-01-17 17:15:50 -05:00
Moin
fae3f92c34 lazily load idna library 2017-01-17 20:34:15 +05:30
Cory Benfield
580b45dd3c Merge pull request #3812 from inglesp/patch-1
Add default value of allow_redirects to docs
2017-01-12 17:12:53 +00:00
Peter Inglesby
2432dd6208 Add default value of allow_redirects to docs 2017-01-12 17:00:42 +00:00
Cory Benfield
e2bd1f9100 Merge pull request #3809 from JungWinter/master
Remove unused module from tests
2017-01-11 09:49:59 +00:00
winterJ
e8c0a99cb1 Remove unused module 2017-01-11 18:20:52 +09:00
Cory Benfield
1c69fc2108 Merge pull request #3804 from ncoghlan/patch-1
Improve discoverability of OAuth 2 support
2017-01-10 08:31:58 +00:00
Nick Coghlan
775d19ee05 Explicitly mention OpenID Connect
OAuth 2 is the authentication protocol underpinning OpenID Connect.

Mention that explicitly for the benefit of folks looking for information on using
requests with OpenID Connect that don't yet know that OAuth 2 is the
relevant underlying authentication protocol.
2017-01-10 15:31:20 +10:00
Nick Coghlan
4942b40496 Improve discoverability of OAuth 2 support
The previous summary gave the impression that requests-oauthlib only supports
OAuth 1.

This updates makes it clear that it also supports OAuth 2, and links directly to the
use case specific authentication flow guides.
2017-01-10 15:17:08 +10:00
Kenneth Reitz
ba7101e2cd Update .travis.yml 2017-01-08 23:13:47 -05:00
Kenneth Reitz
a43845e729 Merge pull request #3801 from andriisoldatenko/add-python-36
Added python 3.6.0
2017-01-08 23:13:04 -05:00
Andrii Soldatenko
2bcaff99ea Added python 3.6.0 2017-01-09 00:40:32 +02:00
Kenneth Reitz
57933d4d45 Merge pull request #3796 from nateprewitt/https_doc_fix
updating https demo urls
2017-01-05 01:17:22 -05:00
Nate Prewitt
f5c5536916 updating https demo urls 2017-01-04 15:23:23 -07:00
Cory Benfield
edf09ada17 Merge pull request #3795 from AdamWill/tests-require-pytest-mock
Require pytest-mock for the tests
2016-12-30 18:14:59 +00:00
Adam Williamson
33b29be8cf Require pytest-mock for the tests
test_requests.py `test_session_close_proxy_clear` uses the
`mocker` fixture, which is provided by pytest-mock.
2016-12-30 09:40:12 -08:00
Cory Benfield
b9d282b6b7 Merge pull request #3791 from evgen231/master
Fixed detection of utf-32-be by BOM.
2016-12-29 09:41:23 +00:00
Герасименко Евгений
0cb6ddaecf Fixed tests for python 2.x. 2016-12-29 10:30:56 +07:00
Герасименко Евгений
1c34ac3ae6 Fixed detection of utf-32-be by BOM. 2016-12-29 10:21:32 +07:00
Kenneth Reitz
8e0a532cad wonder when 3.6 will be available on travis 2016-12-23 13:08:52 -05:00
John Dingee
5aa6661587 fix urllib3 documentation link (#3785) 2016-12-21 13:08:45 -05:00
Marcin Płonka
bc8b29099e updating idna.uts46data from upstream project (#3781)
* updating idna.uts46data from upstream project

* removing redundant find/sed in idna update

* Revert "updating idna.uts46data from upstream project"

This reverts commit 0150cee7057dbdcefa1a2fbe2e8617ad0cba5216.
2016-12-21 10:59:34 -05:00
Kenneth Reitz
c3fb8e020b we support python 3.6 2016-12-20 13:25:30 -05:00
Kenneth Reitz
789f21807d python 2.6 compatibiliby 2016-12-20 13:16:14 -05:00
Kenneth Reitz
ba6e948835 skipping pypy for now 2016-12-20 13:10:45 -05:00
Kenneth Reitz
ddde5cd85b travis and saythanks icons in readme 2016-12-20 12:54:00 -05:00
Kenneth Reitz
5a280a11bc we don't support python 3.2 2016-12-20 12:50:22 -05:00
Kenneth Reitz
daebd6b807 empty commit 2016-12-20 12:47:39 -05:00
Kenneth Reitz
e127ecab3f add pypy to travis.yml 2016-12-20 12:42:52 -05:00
Kenneth Reitz
30bcd55fb9 basic travis.yml file 2016-12-20 12:41:47 -05:00
Cory Benfield
1285f576ae v2.12.4 2016-12-14 11:37:52 +00:00
Cory Benfield
9726f5314e Merge pull request #3766 from nateprewitt/1979_test_401
testing HTTPDigestAuth hooks
2016-12-14 09:41:11 +00:00
Nate Prewitt
1da1213561 add socket tests for 401 redirect and 401 failure 2016-12-13 14:43:16 -07:00
Cory Benfield
4683f16990 Merge pull request #3760 from sigmavirus24/deprecation-warning
Add deprecation warnings for 3.0
2016-12-09 14:48:42 +00:00
Ian Cordasco
fae6701478 Add deprecation warnings for 3.0
Add extra test parameter for basic auth encoding
2016-12-09 08:43:54 -06:00
Cory Benfield
449d74842d Merge pull request #3758 from nateprewitt/3753_allow_non_string_params_basic_auth
adding string casting for non-bytes values
2016-12-09 08:45:14 +00:00
Nate Prewitt
576b447a37 adding string casting for non-bytes values 2016-12-08 21:13:14 -07:00
Cory Benfield
11a86a5651 Merge pull request #3754 from nateprewitt/3066_auth_and_data
test auth doesn't generate incorrect http headers
2016-12-08 09:05:12 +00:00
Nate Prewitt
13716728e7 minor doc string cleanup 2016-12-04 12:11:09 -07:00
Casey Davidson
14d71fd41a Test chunked upload doesn't set content length 2016-12-04 12:01:07 -07:00
Casey Davidson
2d2c831d07 Add tests to verify that correct 'Content-Length' or 'Transfer-Encoding' headers are being set in PreparedRequest. 2016-12-04 12:00:57 -07:00
Cory Benfield
c398ab0e7d v2.12.3 2016-12-01 10:48:35 +00:00
Cory Benfield
7d2dfa8684 Merge pull request #3738 from Lukasa/revert-exclusion-patch
Revert "Restrict URL preparation to HTTP/HTTPS"
2016-12-01 10:45:25 +00:00
Cory Benfield
6f659a4179 Tests for our URL handling. 2016-11-30 21:45:09 +00:00
Cory Benfield
402a55b647 Revert "Restrict URL preparation to HTTP/HTTPS"
This reverts commit 34af72c87d.
2016-11-30 21:19:31 +00:00
Cory Benfield
ca15d48087 v2.12.2 2016-11-30 12:38:26 +00:00
Cory Benfield
5c4549493b Merge pull request #3695 from nateprewitt/idna_bypass
idna bypass
2016-11-25 13:18:01 +00:00
Cory Benfield
36c9c8c3de Merge pull request #3718 from nsoranzo/master
Make Response.content() return None for an empty response
2016-11-24 13:35:37 +00:00
Nicola Soranzo
f897be58bf Make Response.content return None if raw is None
Add test.
2016-11-24 12:54:26 +00:00
Kenneth Reitz
dfad00a6e8 Update README.rst 2016-11-23 20:10:44 -05:00
Kenneth Reitz
d5e050da85 Update README.rst 2016-11-23 20:10:04 -05:00
Kenneth Reitz
1ec08bedd4 links 2016-11-23 20:00:33 -05:00
Kenneth Reitz
724ae1274e new logo :D
https://kennethreitz.org/tattoos
2016-11-23 19:58:18 -05:00
Nicola Soranzo
4f428228d7 Make Response.content() return None if status_code is None
Fix #3698.
2016-11-23 21:15:07 +00:00
Cory Benfield
ccabcf1fca Merge pull request #3717 from nateprewitt/streaming_docs
streaming doc clarification
2016-11-23 10:17:31 +00:00
Nate Prewitt
4f9d0e0455 streaming doc clarification 2016-11-21 14:17:28 -07:00
Cory Benfield
b9f1c448f7 Merge pull request #3673 from klimenko-forks/auth-unicode
Enable unicode in basic http auth
2016-11-21 19:27:39 +00:00
Cory Benfield
22ec73d71a Merge pull request #3713 from tiran/strict_http_protocol_check
Restrict URL preparation to HTTP/HTTPS
2016-11-21 19:13:56 +00:00
Dmitry Klimenko
005f93fd0f added new test, original test restored 2016-11-21 21:42:44 +03:00
Christian Heimes
34af72c87d Restrict URL preparation to HTTP/HTTPS
Requests treats all URLs starting with the string 'http' as HTTP URLs.
Preparation with IDNA breaks non-standard URIs like http+unix. Requests
now prepares only URLs with prefix http:// and https://.

Signed-off-by: Christian Heimes <christian@python.org>
2016-11-21 18:46:57 +01:00
Nate Prewitt
a83685ce00 modifying IDNA encoding check to allow fallback 2016-11-21 08:22:42 -07:00
Nate Prewitt
264f5bd5e1 adding unicode_is_ascii utility function 2016-11-21 08:22:41 -07:00
Nate Prewitt
d52e9b8c80 updated tests with IDNA encoded and IPv6 urls 2016-11-21 08:22:37 -07:00
Kenneth Reitz
268672ab33 Update sidebarlogo.html 2016-11-20 22:49:17 -05:00
Kenneth Reitz
3b956495c1 Update sidebarintro.html 2016-11-20 22:48:43 -05:00
Dmitry Klimenko
3b84be3c99 changed behavior of basic-http-auth test 2016-11-18 20:39:55 +03:00
Dmitry Klimenko
e15280e49d fixed: httpbin with unicode auth 2016-11-18 19:04:51 +03:00
Dmitry Klimenko
55dea233ce fixed some error 2016-11-18 15:19:43 +03:00
Dmitry Klimenko
4f0efdb77e unicode test for _basic_auth_str 2016-11-18 13:31:31 +03:00
Dmitry Klimenko
7c4821231f Fixed: httpbin doesn't support bytes 2016-11-18 13:14:08 +03:00
Dmitry Klimenko
bf3e960e15 fixed usage unicode string 2016-11-17 23:13:03 +03:00
Cory Benfield
53d4a1feee Merge pull request #3704 from afeld/patch-1
clarify that the `chunk_size` is optional when streaming to a file
2016-11-17 17:27:47 +00:00
Aidan Feldman
ed3ba3dbb8 correct backtick formatting 2016-11-17 12:26:19 -05:00
Dmitry Klimenko
37bde4b638 added unicode auth test 2016-11-17 20:22:32 +03:00
Aidan Feldman
5562c0f097 clarify that the chunk_size is optional when streaming to a file 2016-11-17 12:21:58 -05:00
Dmitry Klimenko
2185fac626 remove extra import 2016-11-17 19:52:13 +03:00
Dmitry Klimenko
329a5cfdd4 Order of type check 2016-11-17 19:50:53 +03:00
Kenneth Reitz
5b66b364a7 Merge pull request #3703 from kennethreitz/revert-3700-master
Revert "Adding 'import requests' to readme code snippet."
2016-11-17 10:53:38 -05:00
Kenneth Reitz
5f4d0d08de Revert "Adding 'import requests' to readme code snippet." 2016-11-17 10:53:33 -05:00
Rakib Hasan
7e138f945e Adding 'import requests' to readme code snippet. (#3700)
* added import requests to small demo
2016-11-17 08:23:57 +00:00
Cory Benfield
1e198f9115 Merge pull request #3697 from hussaintamboli/master
Fixed issue #3696. Added a test for it as well.
2016-11-16 18:32:59 +00:00
Hussain
be8b13e89b Added myself to AUTHORS 2016-11-16 23:33:42 +05:30
Hussain
0d7de50dbd Just lstrip instead of strip because trailing whitespace already works. 2016-11-16 23:26:48 +05:30
Hussain
248d3e9f0f Fixed issue #3696. Added a test for it as well. 2016-11-16 22:48:45 +05:30
Cory Benfield
eb39a557bd v2.12.1 2016-11-16 10:44:29 +00:00
Cory Benfield
e7a6893282 Merge pull request #3694 from Lukasa/prepare-1.19.1
Prepare 2.12.1
2016-11-16 10:44:02 +00:00
Cory Benfield
c2688bbf27 Add changelog for 1.19.1 2016-11-16 10:35:14 +00:00
Cory Benfield
e1b5e19c78 Update bundled urllib3 to 1.19.1 2016-11-16 10:34:08 +00:00
Cory Benfield
7f2a4151f7 Merge pull request #3693 from Lukasa/setuptools-extra
Change setuptools extra for secure extra.
2016-11-16 10:33:47 +00:00
Cory Benfield
9ec3478469 Change setuptools extra for new secure extra. 2016-11-16 10:31:39 +00:00
Cory Benfield
341f288449 Merge pull request #3691 from Cleod9/readme-typo-domain-arg
Fixes small readme typo - site => domain
2016-11-16 08:39:06 +00:00
Cory Benfield
3ea3324434 Merge pull request #3690 from galgeek/clarify-allow_redirects
Clarify allow_redirects
2016-11-16 08:38:33 +00:00
Greg McLeod
b4d843bad2 Fixed readme typo - 'site' should be 'domain' 2016-11-15 22:27:45 -05:00
Barbara Miller
eaf9a688c5 Clarify allow_redirects
Make consistent with quickstart doc.
2016-11-15 18:59:05 -08:00
Cory Benfield
9a0a6cab55 Merge pull request #3688 from nateprewitt/release-docs-fix
spelling fix for release-process.rst
2016-11-15 20:30:21 +00:00
Nate Prewitt
87b7914bb2 spelling fix for release-process 2016-11-15 13:11:58 -07:00
Cory Benfield
512a78173a Merge pull request #3684 from nateprewitt/fixing_url_tests_without_method
Add method to url tests
2016-11-15 17:51:42 +00:00
Nate Prewitt
5bb01fbfe8 adding method to url tests 2016-11-15 10:46:10 -07:00
Cory Benfield
362da46e9a v2.12.0 2016-11-15 10:30:17 +00:00
Cory Benfield
2d211d59a0 Fix tests for new urllib3 exception text. 2016-11-15 10:22:38 +00:00
Cory Benfield
72d69d7b62 Update certifi certs to 2016.09.26 2016-11-15 10:11:58 +00:00
Cory Benfield
99fa7becf2 Update urllib3 to 1.19 2016-11-15 10:09:11 +00:00
Cory Benfield
e2408fce9d Merge pull request #3679 from mlissner/patch-2
Amplifies the timeout warning in the docs.
2016-11-14 17:58:13 +00:00
Mike Lissner
cfb7fd8f28 Amplifies the timeout warning in the docs.
Partially addresses #3070.
2016-11-14 09:57:08 -08:00
Cory Benfield
33bd38be15 Merge pull request #3678 from nateprewitt/3675_streaming_docs
decoding fix for Streaming Requests docs
2016-11-14 16:55:33 +00:00
Nate Prewitt
d81ad06c64 documentation on encoding fallback for streaming 2016-11-14 09:52:40 -07:00
Nate Prewitt
71b8941f0e adding decoding requirement for Python 3 2016-11-14 09:43:19 -07:00
Dmitry Klimenko
e514920e19 Unable unicode in basic http auth
Fixed the issue with unicode characters in basic http auth
2016-11-12 01:39:37 +03:00
Kenneth Reitz
70f1f8ed35 Merge pull request #3671 from chris-martin/json-ValueError
Document that Response.json() may raise ValueError
2016-11-10 18:18:16 -05:00
Chris Martin
a49c387b7a Document that Response.json() may raise ValueError 2016-11-10 16:26:07 -05:00
Cory Benfield
d24da4a953 Merge pull request #3489 from nateprewitt/1558_pickling_prepared_request
adding in pickling tests for PreparedRequest
2016-11-10 17:26:47 +00:00
Nate Prewitt
340902153f updating pickling tests for PreparedRequest 2016-11-04 10:56:13 -06:00
Cory Benfield
80634b2fad Merge pull request #3666 from hootnot/doc-patch
documentation line added for consistency with the post method
2016-11-03 10:39:47 +00:00
Cory Benfield
f72684e13c Merge pull request #3655 from nateprewitt/tzickel_post_redirect_w_streamable
Rewind readable body before POST redirect
2016-11-03 10:31:04 +00:00
hootnot
623d9e7878 documentation line added for consistency with the post method 2016-11-03 11:10:59 +01:00
Cory Benfield
87e40d116f Merge pull request #3663 from nateprewitt/fix_cookiejar_from_dict_docs_path
fix path for cookiejar_from_dict in api.rst
2016-11-03 10:06:53 +00:00
Nate Prewitt
b5ca0c8d58 correct module for cookiejar_from_dict in docs 2016-11-02 14:59:08 -06:00
Nate Prewitt
522d37c959 update 307 tests to check body content 2016-11-02 12:04:44 -06:00
tzickel
38dd089c5f Test case for requests getting stuck on post redirect with seekable stream 2016-11-02 12:03:19 -06:00
Nate Prewitt
9849c27b70 test _body_position and rewind_body 2016-11-02 10:12:22 -06:00
Nate Prewitt
40402cd0dd adding rewind for re-POST bodies 2016-11-02 09:56:56 -06:00
Cory Benfield
bf19750c0a Merge pull request #3660 from pawelmhm/proxy_empty_pass
[httpAdapter] allow empty password in proxy credentials
2016-10-31 13:59:16 +00:00
Pawel Miech
c97a530638 [httpAdapter] allow empty password in proxy credentials
fixes #3659
2016-10-31 14:42:01 +01:00
Cory Benfield
7eaa5ee37f Merge pull request #3658 from elzapp/patch-1
Formatted the example to fix the color highlighting
2016-10-31 08:53:04 +00:00
Bård Aase
388e949e83 Formatted the example to fix the color highlighting 2016-10-31 09:09:16 +01:00
Cory Benfield
595a409a18 Merge pull request #3627 from nateprewitt/remove_update_call
remove RequestsCookieJar specific update call
2016-10-27 20:53:18 +01:00
Nate Prewitt
390a499e81 test different CookieJar types for add_dict_to_cookiejar 2016-10-27 13:22:45 -06:00
Nate Prewitt
dfd85f2099 make add_dict_to_cookiejar cookielib.CookieJar compatible 2016-10-27 13:17:41 -06:00
Ian Cordasco
9deb603dc3 Merge pull request #3652 from gardiac2002/master
The data= parameter barfs on all dictionary-like objects that don't subclass dict itself #3649
2016-10-27 11:51:29 -05:00
Philipp Konrad
548a03acef requests.post checked data parameters for type like dict.
Changed the type check to Mapping.
2016-10-27 17:57:09 +02:00
Cory Benfield
50486cf2be Merge pull request #3620 from Lukasa/better-idna
Better support for internationalized domain names.
2016-10-21 13:09:04 +01:00
Cory Benfield
d14401f799 Merge pull request #3631 from lovedboy/master
little modification  in consume_socket_content
2016-10-21 09:58:30 +01:00
lovedboy
d587533446 little modification in consume_socket_content 2016-10-21 16:55:58 +08:00
Cory Benfield
83fcabc5bd Merge pull request #3625 from mie00/tellioerror
fix issue when the file-like object raises an IOError with tell
2016-10-21 08:20:37 +01:00
Cory Benfield
e7f5bd634d Check in updated idna. 2016-10-19 13:19:50 +01:00
Cory Benfield
41b4658738 Further complicate the makefile to rewrite imports 2016-10-19 13:19:37 +01:00
Mohamed Elawadi
f5b5c293b9 fix issue when the file-like object raises an IOError with tell 2016-10-18 11:09:25 +02:00
Ian Cordasco
b8f4c7c7ff Merge pull request #3621 from Lukasa/fix-packaging
Add a missing backport.
2016-10-14 11:38:33 -05:00
Ian Cordasco
c13e313f5a Merge pull request #3622 from Lukasa/better-makefile
Update makefile to only ship tagged releases.
2016-10-14 11:38:17 -05:00
Cory Benfield
8dd51d22fc Enable UTS46 mode. 2016-10-14 15:13:37 +01:00
Cory Benfield
ae82300073 We only ship tagged releases now. 2016-10-14 11:06:25 +01:00
Cory Benfield
f19d30a670 Seems like we're missing a backport here. 2016-10-14 10:58:26 +01:00
Cory Benfield
110684ea02 Changelog entry for better IDNA. 2016-10-14 10:54:55 +01:00
Cory Benfield
9337b4d95d Basic tests for internationalized domain names. 2016-10-14 10:53:15 +01:00
Cory Benfield
49b69b57db Various packaging requirements for idna 2016-10-14 10:21:24 +01:00
Cory Benfield
27812eb902 Use IDNA2008 to encode hosts. 2016-10-14 10:17:52 +01:00
Cory Benfield
35056b1de6 Add license for idna package. 2016-10-14 10:12:16 +01:00
Cory Benfield
3c680cc1c6 Vendor idna v2.1 2016-10-14 10:10:54 +01:00
Cory Benfield
dfb4ef7be0 Add makefile to get latest idna release. 2016-10-14 10:10:17 +01:00
Ian Cordasco
8f37cf79c3 Merge pull request #3617 from Lukasa/jeremycline
Note that @jeremycline is now our contact.
2016-10-13 09:08:10 -05:00
Cory Benfield
45478d5be1 Note @jeremycline is now our contact. 2016-10-13 13:28:19 +01:00
Cory Benfield
d0f7a51dd8 Merge branch 'TetraEtc-docs-custom-verbs' 2016-10-12 11:11:17 +01:00
Cory Benfield
02ab1ba5bd Let's use capitals. 2016-10-12 11:11:05 +01:00
Stewart Polley
341bed9e17 Add Documentation for custom methods 2016-10-08 06:22:07 +10:00
Ian Cordasco
7322a09379 Merge pull request #3607 from frankier/dont-swallow-attributeerror
Remove error swallowing exception catching of AttributeError
2016-09-30 07:17:17 -05:00
Frankie Robertson
327512f5ef Remove error swallowing exception catching of AttributeError 2016-09-29 23:07:16 +09:00
Cory Benfield
022e23c977 Merge pull request #3606 from bbamsch/httpbinTestFix
Issue #3597 - Rework Bytestring Host Test to use PyTest Httpbin
2016-09-29 08:09:22 +01:00
Brian Bamsch
5c15fffaca Rework Bytestring Host Test to use PyTest Httpbin 2016-09-28 20:48:27 -07:00
Cory Benfield
1ac56f1343 Merge pull request #3604 from iamprakashom/master
fixes broken link on documentation page
2016-09-28 12:32:53 +01:00
Om Prakash
ed0570bc2b updates authors
updates AUTHORS for #3603
2016-09-28 16:38:51 +05:30
Om Prakash
06920cc266 fixes broken link on documentation page
Issue #3603
2016-09-28 16:34:02 +05:30
Cory Benfield
5eabcb7a2f Merge pull request #3598 from bbamsch/bytestringHostFix
Issue #3597 - Avoid bytestring/str hodgepodge when resolving cookie from Request URL
2016-09-28 08:56:38 +01:00
Brian Bamsch
087aeacee5 Change module of internal references to to_native_str() 2016-09-27 20:41:21 -07:00
Brian Bamsch
3ac70defff Update Comments & Magic Strings 2016-09-27 20:41:17 -07:00
Cory Benfield
9a0b392dee Merge pull request #3600 from frewsxcv/patch-1
Indicate shell command in HISTORY is code-like.
2016-09-27 08:06:27 +01:00
Brian Bamsch
f002b73026 Move to_native_string to _internal_utils.py to avoid circular dependency 2016-09-26 21:41:01 -07:00
Corey Farwell
ae83352bbd Indicate shell command in README is code-like. 2016-09-26 16:21:07 -04:00
Brian Bamsch
2af059797a Adjust patch to utilize requests utility functions
Use the utility class provided by requests to do native string
transformation rather than recreating the wheel.
2016-09-26 09:14:51 -07:00
Brian Bamsch
550dc19099 Add line to AUTHORS
Credit where credit is due 😄
2016-09-25 22:22:33 -07:00
Brian Bamsch
01e405c611 Add patch to avoid bytestring/str hodgepodge
When patching Host header into URL, verify that host type matches
urlparse return type before putting it all back together
2016-09-25 22:18:45 -07:00
Brian Bamsch
b28531f4bb Add test for request when Host header is bytestring
Request should successfully set cookie in response, fail if cookie fails
to set as will occur in current state when cookie set tries lookup of
domain
2016-09-25 22:10:57 -07:00
Cory Benfield
439451c3d4 Merge pull request #3591 from nateprewitt/3579_cookie_merge
Fix RequestsCookieJar specific update call
2016-09-23 10:32:51 +01:00
Ian Cordasco
9407d697c8 Merge pull request #3545 from nateprewitt/new_prepare_content_length
removing redundant logic from prepare_content_length
2016-09-22 07:49:57 -05:00
Nate Prewitt
31b35ab838 removing redundant logic from prepare_content_length 2016-09-21 16:37:28 -06:00
Nate Prewitt
08a158f486 converting update call to merge_cookies call for cookielib compatibility 2016-09-20 12:20:00 -06:00
Ian Cordasco
ddf7df9b00 Merge pull request #3576 from nateprewitt/3557_revert_and_fix_encoding
Fix encoding issue in test_response_reason_unicode_fallback
2016-09-20 09:48:40 -05:00
Cory Benfield
c12122970a Merge pull request #3580 from rbcarson/idna-thread-embedded-3578
Add workaround to avoid implicit import of encodings.idna. Fixes #3578.
2016-09-17 08:18:59 +01:00
Carson Lam
d7227fbb7e Add workaround to avoid implicit import of encodings.idna. 2016-09-17 00:12:36 -07:00
Cory Benfield
5524472cc7 Merge pull request #3535 from nateprewitt/3339_avoid_getvalues
avoid use of getvalues in super_len
2016-09-14 08:10:28 +01:00
Nate Prewitt
39e8c0d96f reverting 3357 and comparing properly encoded strings 2016-09-13 22:51:28 -06:00
Cory Benfield
2041adbe4d Merge pull request #3557 from sigmavirus24/fix-failing-test
Fix how we test fallback to latin-1 reason encoding
2016-09-06 15:58:02 +01:00
Ian Cordasco
42d4eaf6ea Fix how we test fallback to latin-1 reason encoding
This was terribly broken and found while merging master into proposed/3.0.0
2016-09-06 09:55:37 -05:00
Ian Cordasco
87f96936fe Merge pull request #3554 from nateprewitt/3538_fallback_to_ISO_8591_1
ISO-8859-1 fallback for reason decoding
2016-09-05 18:15:06 -05:00
Nate Prewitt
2e1086f5b4 adding comment 2016-09-05 14:17:46 -06:00
Ian Cordasco
39b3477726 Merge pull request #3552 from Trodis/master
pysocks 1.5.7 blacklisting, due to IPv6 problems
2016-09-05 11:47:13 -05:00
Ferhat
dedf9064c6 pysocks 1.5.7 blacklisting, due to IPv6 problems 2016-09-05 18:28:57 +02:00
Nate Prewitt
cd056cd621 adding ISO-8859-1 fallback for reason decoding 2016-09-02 11:37:48 -06:00
Cory Benfield
58d855e193 Merge pull request #3541 from RichieB2B/ncsc-nl/docufix
Specify self.cert is used for SSL client certificates
2016-08-26 10:02:21 -04:00
Richard van den Berg
80f304fd30 Specify self.cert is used for SSL client certificates 2016-08-26 15:17:31 +02:00
Cory Benfield
889f855581 Merge pull request #3539 from RichieB2B/ncsc-nl/docufix
Add persistent examples
2016-08-26 09:16:54 -04:00
Richard van den Berg
2cd05271be Add persistent examples 2016-08-26 09:43:11 +02:00
Nate Prewitt
f5c59743e7 adding tests for super_len conditional flow 2016-08-25 16:56:01 -06:00
Nate Prewitt
99364b6b0b removing use of seek to set total_length 2016-08-24 15:06:53 -06:00
Skipper Seabold
8873a09097 Fall back to streaming 2016-08-24 09:59:33 -06:00
Skipper Seabold
d4965a4ec6 Python 2 compatibility 2016-08-24 09:59:33 -06:00
Skipper Seabold
af7729f64a Use seek from end rather than getvalue 2016-08-24 09:59:28 -06:00
Cory Benfield
52b15f811f Merge pull request #3530 from shellhead/mixed-proxy-bug
Fixed another scheme proxy over "all" priority issue
2016-08-23 07:54:35 -04:00
Michael Hunsinger
7c80222afa Fixed another scheme proxy over "all" priority 2016-08-22 21:01:13 -06:00
Cory Benfield
3314259185 Merge pull request #3526 from shellhead/mixed-proxy-bug
Fixed bug to give scheme proxy priority over "all"
2016-08-21 18:17:31 -04:00
Michael Hunsinger
77b068bb9e Fixed bug to give scheme proxy priority over "all" 2016-08-21 10:59:33 -06:00
Keyan Pishdadian
647ed5b6de Add pickle test with hooks 2016-08-19 14:38:33 -06:00
Keyan Pishdadian
117813ee2e Add prepared request pickling tests 2016-08-19 14:37:26 -06:00
Cory Benfield
d3567aacc9 Merge pull request #3510 from nateprewitt/add_close_passthrough
adding passthrough in close() for non-urllib3-like Responses
2016-08-18 09:28:20 +01:00
Kenneth Reitz
33501c7ae8 Merge pull request #3520 from Brausepaul/master
Adding notes about Requests' timeout behavior
2016-08-17 17:30:27 -04:00
Kenneth Reitz
532756803d v2.11.1 2016-08-17 16:03:38 -04:00
Maik
b5fac31688 Changes to documentation based on comments and correction of list of authors. 2016-08-17 22:03:18 +02:00
Kenneth Reitz
04fdf1a25a Merge pull request #3514 from Lukasa/prepare-2.11.1
Prepare for 2.11.1 bugfix release.
2016-08-17 16:01:58 -04:00
Maik Himstedt
b26606cc3c Adding notes about Request's timeout behavior. 2016-08-17 20:27:00 +02:00
Brausepaul
13bc52f82c Merge pull request #1 from kennethreitz/master
Updating fork with updates from original repo
2016-08-17 19:24:02 +02:00
Kenneth Reitz
b9648bad19 Update index.rst 2016-08-15 15:36:41 -04:00
Kenneth Reitz
786fb19a6d Merge pull request #3513 from nateprewitt/doc_updates
doc updates
2016-08-15 13:52:56 -04:00
Cory Benfield
ab1a6a4d00 Prepare changelog for 2.11.1. 2016-08-15 10:05:37 +01:00
Nate Prewitt
1435cf5aff docs updates 2016-08-14 20:56:52 -06:00
Cory Benfield
f12166acb6 Merge pull request #3511 from forrestchang/master
fix grammer mistakes in Quickstart
2016-08-13 09:42:25 +01:00
Jiayuan Zhang
00f83fb0c6 fix grammer mistakes in Quickstart 2016-08-13 10:19:10 +08:00
Nate Prewitt
59f12c9669 adding passthrough in close() for non-urllib3-like Responses 2016-08-12 10:54:41 -06:00
Ian Cordasco
f5ff345c35 Merge pull request #3493 from nateprewitt/3490_drop_headers
#3490 removing Content-Type and Transfer-Encoding headers on redirect
2016-08-12 06:24:36 -05:00
Nate Prewitt
4d5091c287 building Response manually 2016-08-11 14:54:26 -06:00
Nate Prewitt
e50c61bc86 removing Content-Type and Transfer-Encoding headers on redirect 2016-08-11 10:58:20 -06:00
Kenneth Reitz
c1d7d23b74 Merge pull request #3492 from nateprewitt/update_HISTORY
updating HISTORY
2016-08-09 17:16:37 -04:00
Nate Prewitt
10bc2f05d3 updating HISTORY 2016-08-09 15:12:34 -06:00
Cory Benfield
e4b7040530 Merge pull request #3487 from drpoggi/patch-1
Update README.rst
2016-08-09 16:40:20 +01:00
David Poggi
1e253cd0b3 Update README.rst 2016-08-09 11:14:40 -04:00
Cory Benfield
5e4abfa3a2 Merge pull request #3486 from nateprewitt/3481_revert_3362
reverting 3362
2016-08-09 14:52:22 +01:00
Nate Prewitt
d7f56ba938 reverting 3362 2016-08-09 07:36:39 -06:00
Cory Benfield
5259b37451 Merge pull request #3484 from scop/rtypes
Document bunch of return types
2016-08-09 11:42:45 +01:00
Ville Skyttä
542fbbc67f Document bunch of return types 2016-08-09 13:32:56 +03:00
Kenneth Reitz
931397829e Update index.rst 2016-08-08 23:01:48 -04:00
Kenneth Reitz
64c9451657 Merge pull request #3480 from drpoggi/patch-1
Clarify Python versions supported by requests
2016-08-08 23:00:55 -04:00
David Poggi
5f7b8ab0a7 Update index.rst 2016-08-08 22:58:26 -04:00
David Poggi
33a74f1787 Update index.rst
Range formatting update.
2016-08-08 22:57:05 -04:00
David Poggi
bab4aa0fbf Clarify Python versions supported by requests 2016-08-08 22:49:35 -04:00
Kenneth Reitz
57e7a308b0 Update HISTORY.rst 2016-08-08 17:35:40 -04:00
Kenneth Reitz
a2e41ba1f1 v2.11.0 2016-08-08 11:06:58 -04:00
Kenneth Reitz
05d90b9379 Merge pull request #3475 from Lukasa/prepare-2.11
Prepare for 2.11 release.
2016-08-08 11:05:02 -04:00
Cory Benfield
d7700bebeb Oh yeah, we updated urllib3 too. 2016-08-08 13:37:37 +01:00
Cory Benfield
c6eea58081 Changelog for 2.11 2016-08-08 13:37:09 +01:00
Cory Benfield
7bf67b4101 Update urllib3 to 1.16 2016-08-08 13:21:06 +01:00
Cory Benfield
cf7fdb901c Merge pull request #3469 from roselma/patch-1
Add a bit about RequestsCookieJar to Cookies section
2016-08-03 21:04:58 +01:00
Michael
07b7872df8 Add a bit about RequestsCookieJar to Cookies section 2016-08-03 13:03:34 -07:00
Cory Benfield
be12b27d71 Merge pull request #3462 from sigmavirus24/bug/3461
Close and then release the connection
2016-07-30 18:18:14 +01:00
Ian Cordasco
c69e3eed31 Close and then release the connection
urllib3 closes the underlying connection when we call
urllib3.Response.close but does not release it back to the connection
pool. This can cause issues when users have a blocking connection pool
configured and connections are not readily returned to the pool.

Since the underlying connection is closed, we should be able to safely
return the connection to the connection pool, so to fix this issue we
merely need to not return after closing the response.

Closes gh-3461
2016-07-30 07:16:18 -05:00
Ian Cordasco
f40764c01b Merge pull request #3441 from scop/spelling
Spelling fixes
2016-07-26 07:26:18 -05:00
Ville Skyttä
5453b88f8f Spelling fixes 2016-07-26 15:24:29 +03:00
Kenneth Reitz
fb01456061 Merge pull request #3429 from nateprewitt/docstring_cleanup
Docstring cleanup
2016-07-20 18:38:38 -04:00
Nate Prewitt
b7809acb47 making class and function docstrings consistent 2016-07-20 11:43:47 -06:00
Kenneth Reitz
4285bac3fd Merge pull request #3428 from nateprewitt/pep8_fixes
adding in pep8 fixes
2016-07-20 12:47:00 -04:00
Nate Prewitt
2d4a89f5dc adding in pep8 fixes 2016-07-20 10:30:08 -06:00
Nate Prewitt
15a3869006 making module docstrings and coding comments consistent 2016-07-19 14:51:14 -06:00
Cory Benfield
75d72ca4ea Merge pull request #3415 from nateprewitt/test_cleanup
removing redundant test
2016-07-15 08:07:44 +01:00
Nate Prewitt
d262df99bf removing redundant test 2016-07-14 21:53:10 -06:00
Cory Benfield
d7fc5d5296 Merge pull request #3402 from HarrisonJackson/remove-extra-warnings-import
Remove duplicate import warnings
2016-07-14 17:59:51 +01:00
Harrison Jackson
5a3aeedd18 Remove duplicate import warnings 2016-07-14 09:47:27 -06:00
Cory Benfield
6e54fd607f Merge pull request #3401 from Zeusw/patch-1
in python3.x not have StringIO
2016-07-14 08:57:49 +01:00
Zeusw
cf938420f8 in python3.x not have StringIO
I think, should such an amendment.
2016-07-14 10:40:32 +08:00
Cory Benfield
425962cb13 Merge pull request #3390 from nateprewitt/3386_header_value_type
Defining header value type requirements and tests
2016-07-07 17:20:03 +01:00
Ian Cordasco
5d9b9ffab4 Merge pull request #3388 from nateprewitt/header_doc_update
updating documentation to reflect decision of #3386
2016-07-07 09:56:08 -05:00
Nate Prewitt
1cb3b797fe updating documentation to reflect decision of #3386 2016-07-07 07:44:20 -06:00
Nate Prewitt
be31a90906 Defining header value type requirements and tests 2016-07-05 17:32:05 -06:00
Andrii Kostenko
7700ecae14 Support responses like HTTP/1.1 404 Unicode chars (#3385) 2016-07-05 09:01:19 -05:00
Nate Prewitt
71050e9ab9 adding in slice_length fix and test for chunk_size=None (#3370) 2016-07-02 15:56:20 -05:00
Cory Benfield
bd9e8f2271 Merge pull request #3366 from nateprewitt/2947-no-returns-in-header
check for headers containing return characters
2016-07-02 20:32:17 +01:00
Nate Prewitt
2669ab797c check and test for headers containing return characters or leading whitespace 2016-07-02 13:10:47 -06:00
Cory Benfield
ebadf81723 Merge pull request #3382 from nateprewitt/iter_content_docstring
updating iter_content docstring to match functionality
2016-07-02 19:10:20 +01:00
Nate Prewitt
0c08ca7154 updating docstring to match functionality 2016-07-02 08:43:23 -06:00
Joy Zheng
0bcf634135 Allow None value for chunk_size again (#3368) 2016-06-30 19:11:01 -05:00
Nate Prewitt
92fe51c0af adding asserted_encoding check on None type encoding to match text() behavior (#3362) 2016-06-28 14:22:00 -05:00
Cory Benfield
36453b95b1 Merge pull request #3365 from nateprewitt/3364_chunking_is_int
added in type check for chunk_size
2016-06-28 08:33:29 +01:00
Nate Prewitt
cf3c99890d added in type check for chunk_size 2016-06-27 19:58:15 -06:00
Cory Benfield
1f681d8843 Merge pull request #3358 from petedmarsh/master
Update list of supported Python versions in todo.rst
2016-06-21 19:53:19 +01:00
Peter Marsh
8484144c67 Update list of supported Python versions in todo.rst 2016-06-21 19:50:11 +01:00
Kenneth Reitz
771ecd7efd Merge pull request #3236 from eriol/xfail-test
Use xfail marker for a test expected to fail without Internet connection
2016-06-20 22:17:23 -04:00
John Vandenberg
400d27f982 Test security warnings (#3289)
Verify that the expected warnings are emitted
with SubjectAltNameWarning emitted on all environments
due to the https server provided by httpbin_secure.
2016-06-17 08:00:05 -05:00
Kenneth Reitz
e12ee9407c Merge pull request #3297 from davidfischer/http-error-specifics
Note how HTTPErrors are raised
2016-06-08 23:57:44 -07:00
Kenneth Reitz
6c9a0eff04 compensate for lack of taste 2016-06-09 00:38:53 -04:00
Kenneth Reitz
7d0a94d8c6 Merge pull request #3298 from davidfischer/appengine-notes
Update a note on AppEngine
2016-06-08 19:49:06 -07:00
David Fischer
6f5b6bd4c4 Update a note on AppEngine 2016-06-08 19:31:32 -07:00
David Fischer
277d4a41ad Note how HTTPErrors are raised 2016-06-08 18:19:10 -07:00
Cory Benfield
7a404cf4ec Document header ordering. (#3295) 2016-06-08 11:44:33 -05:00
Kenneth Reitz
8813787a12 wildly inaccurate button results in deletion
(not the button's fault!)
2016-06-04 22:08:47 -04:00
Cory Benfield
bca205e9bf Merge pull request #3251 from sigmavirus24/bug/3250
Update documentation of Session.max_redirects
2016-06-01 11:08:39 -07:00
Ian Cordasco
de4c75bbad Update documentation of Session.max_redirects
Fixes #3250
2016-06-01 11:00:42 -05:00
Daniele Tricoli
5e86103387 Use xfail marker for a test expected to fail without Internet connection
This is only a minor improvement on the great work of
https://github.com/kennethreitz/requests/pull/2859 that permits to run
tests on hosts without Internet connection.
2016-05-29 20:47:41 +02:00
Seppo Yli-Olli
9e9d2c6521 Make BaseAdapter describe the mandatory adapter interface (#3216)
* BaseAdapter definition of send is missing mandatory params

* Copy over relevant parts of the interface documentation

* Indentation fix

* Change base class documentation for close
2016-05-24 13:23:16 -05:00
Cory Benfield
49b69c4751 Merge pull request #3178 from haikuginger/master
Encoding JSON requests to bytes for urllib3 to handle
2016-05-22 17:02:09 +01:00
Brett Higgins
b6d6894f53 Allow graceful interruption of testserver.Server
So that failing tests don't cause the server thread to hang
indefinitely, waiting for connections that will never come.

Rationale for suppressing error/traceback from interrupted
_accept_connection in testserver.Server:
https://gist.github.com/brettdh/b6e741227b2297f19d2118077f14dfa5

* Move server socket close to just before join

This way it handles the no-connections, no-exceptions case
as well as the exception case. If the server thread doesn't
exit by itself within 5 seconds of the context manager exit,
the accept will be interrupted.

* Address feedback

- pytest.raises rather than except:pass
- Move socket create/bind back to run()
- Timeout on accepting connections
2016-05-17 10:45:12 -05:00
Ian Cordasco
cd4e6b9aef Merge pull request #3185 from brettdh/3183-support-all-proxy-env-var
Support ALL_PROXY environment variable
2016-05-17 10:42:31 -05:00
Brett Higgins
35744c3e5d Use iter instead of noop list comprehension 2016-05-16 21:53:20 -04:00
Ian Cordasco
12e3631827 Merge pull request #3195 from kumarvaradarajulu/no_proxy_fix
Fix to check for Plain ip notations in no_proxy settings if not CIDR
2016-05-16 07:47:33 -05:00
Kumar Varadarajulu
b94decc47c Combined tests to one tests for should_bypass_proxies method 2016-05-16 10:49:37 +00:00
Kumar Varadarajulu
f59a95713e Added tests for should_bypass_proxies function 2016-05-16 10:40:22 +00:00
Kumar Varadarajulu
17b6c5742c consider plain ip notation of an ip in no_proxy if not in cidr notation 2016-05-16 06:11:25 +00:00
Brett Higgins
4bf8866172 Add 'all' proxy selection to select_proxy
It seems it's necessary both in pulling all_proxy from the environment
(rebuild_proxies) and deciding which proxy to use (select_proxy).

Also added new functional test.
2016-05-13 15:30:38 -04:00
Ian Cordasco
4865f0f9bf Merge pull request #3188 from Lukasa/fixup-indentation
Replace tab with appropriate spaces.
2016-05-12 08:11:19 -05:00
Cory Benfield
0838685dab Replace tab with appropriate spaces. 2016-05-12 10:57:52 +01:00
Brett Higgins
1121f8b915 Support ALL_PROXY environment variable
Closes #3183.
2016-05-11 10:37:53 -04:00
Cory Benfield
87704105af Merge pull request #3179 from messense/messense-patch-1
Fix TypeError when get json-encoded content of a response
2016-05-06 13:59:01 +01:00
messense
cb4c2c0b65 Fix TypeError when get json-encoded content of a response
``self.content`` could be ``None``, so ``len(self.content)`` may raise ``TypeError: object of type 'NoneType' has no len()``
2016-05-06 09:53:14 +08:00
Ian Cordasco
3669b4216a Merge pull request #3173 from Lukasa/socks-proxy-docs
Add section on SOCKS proxies.
2016-05-05 12:18:27 -05:00
Jesse Shapiro
04bb965c87 Fixing test; it was accomplishing the right thing, but doing it in the wrong way. 2016-05-05 12:23:59 -04:00
Jesse Shapiro
52c0daff5f Cleaning up comment on JSON encoding to be more strictly relevant. 2016-05-05 12:12:49 -04:00
Jesse Shapiro
9ff2e43cd6 Removing charset from JSON content type; tightening requirements on .encode() 2016-05-05 06:27:12 -04:00
Jesse Shapiro
386382b18c Encoding JSON requests to bytes for urllib3 to handle; ensuring same with testing. 2016-05-04 20:09:07 -04:00
Cory Benfield
989e8f15dd Merge pull request #3171 from luv/master
docs: Add a note about SSL c_rehash
2016-05-03 08:44:42 +01:00
Cory Benfield
339e950dc7 Add section on SOCKS proxies. 2016-05-03 08:07:30 +01:00
Lukas Vacek
52facb2257 docs: Add a note about SSL c_rehash 2016-05-02 23:03:35 +02:00
Kenneth Reitz
296928f36f fixed date formatting 2016-04-29 18:17:21 -04:00
Kenneth Reitz
efb4af0127 v2.10.0 2016-04-29 18:11:49 -04:00
Kenneth Reitz
f69d8c16ed updated urllib3 (v1.15.1) 2016-04-29 18:11:17 -04:00
Kenneth Reitz
a5da4f399f v2.10.0 2016-04-29 18:03:28 -04:00
Kenneth Reitz
39d6935488 Merge pull request #2953 from Lukasa/socks_proxy_support
SOCKS Proxy Support
2016-04-29 18:03:04 -04:00
Kenneth Reitz
c9ef5653cc v2.9.2 2016-04-29 17:56:42 -04:00
Kenneth Reitz
2824867412 v2.9.2 2016-04-29 17:52:19 -04:00
Kenneth Reitz
f803dc6c99 updated authors 2016-04-29 17:52:11 -04:00
Kenneth Reitz
ce5e312593 Merge pull request #3096 from piotrjurkiewicz/master
Change _store of CaseInsensitiveDict to OrderedDict
2016-04-29 17:47:35 -04:00
Ian Cordasco
ecebf337ed Merge pull request #3139 from markshannon/fix/3138
Initialize hash_utf8 to None, preventing NameError. Fixes #3138.
2016-04-29 11:05:19 -05:00
Mark Shannon
abe02ed89f Initialize hash_utf8 to None, preventing NameError. Fixes #3138. 2016-04-29 16:49:24 +01:00
Cory Benfield
252bfa7885 Merge pull request #3136 from Natim/readthedocs.io
Update readthedocs links.
2016-04-28 11:43:14 +01:00
Rémy HUBSCHER
70a344d8eb Update readthedocs links. 2016-04-28 12:39:10 +02:00
Cory Benfield
343027893b Merge pull request #3132 from chipaca/no-hostname-no-cry
utils: let select_proxy not raise an exception when url has no hostname
2016-04-26 11:35:23 +01:00
John R. Lenton
4e7beef860 utils: let select_proxy not raise an exception when url has no hostname 2016-04-26 11:22:44 +01:00
Ian Cordasco
bbeb0001cd Merge pull request #3108 from kevinburke/flip-conditional
Flip conditional in session.send()
2016-04-21 10:30:22 -05:00
Kevin Burke
ae1ac2d4e0 Flip conditional in session.send()
Previously we checked that the `request` being sent was an instance of a
PreparedRequest. If a user somehow created a PreparedRequest using a different
Requests library instance, this check makes the request un-sendable.

(This happened recently - unbeknownst to me, my server was running an outdated
version of pip, vulnerable to this issue - pypa/pip#1489, which creates
multiple subdirectories (src/requests, src/requests/requests) when you rerun
pip install --target. So the PreparedRequest was being created in one version
of the library and compared against the other version of the library, and
throwing this exception, even though they were both PreparedRequest instances!)

It would probably be preferable to check the object's behavior (instead of
its type), but a PreparedRequest has a lot of behavior, and it wouldn't be
really feasible or allow us to provide a helpful error message to check all
of it here. Instead flip the conditional to guard against the user sending an
unprepared Request, which should still give us most of the benefits of the
better error message.

Fixes #3102
2016-04-21 08:12:05 -07:00
Kenneth Reitz
aa1c3adf9a Merge pull request #3100 from hitstergtd/hitstergtd-docfixes-1
Remove stale sentence in philosophy.rst
2016-04-17 13:26:24 -04:00
Piotr Jurkiewicz
b1a7dcd799 Fix test_headers_preserve_order 2016-04-16 22:21:10 +02:00
Hitster GTD
d801d7797e Remove stale sentence in philosophy.rst
Sentence contained reference to version 1.0.0.
2016-04-16 10:57:24 +01:00
Ian Cordasco
60aee145b9 Merge pull request #3091 from bodgit/proxy
Clear any pooled proxy connections
2016-04-15 07:50:06 -05:00
Matt Dainty
2029a8a931 Clear any pooled proxy connections
As well as clearing any pooled direct connections, iterate over any
ProxyManager objects and clear any pooled proxy connections there as well.
2016-04-15 09:33:37 +01:00
Piotr Jurkiewicz
c8a0fc6aa2 Use OrderedDict from .compat module 2016-04-15 04:43:53 +02:00
Piotr Jurkiewicz
4f5741e1ff Add test of headers order preservation 2016-04-15 00:35:57 +02:00
Piotr Jurkiewicz
4c04469cfb Change _store of CaseInsensitiveDict to OrderedDict 2016-04-14 18:10:50 +02:00
Kenneth Reitz
4a716e0dfc Merge pull request #2897 from BraulioVM/dummy-server
Test socket server
2016-04-11 16:29:02 -04:00
Braulio Valdivielso Martínez
634b2beb39 Fixed indenting issues 2016-04-11 20:03:23 +02:00
Ian Cordasco
e65d6fc637 Merge pull request #3082 from tzickel/master
Added a test to show a faulty behaviour when posting binary data for an object with no __iter__
2016-04-11 07:38:50 -05:00
Cory Benfield
b5d375417f Merge pull request #3086 from sleshep/master
add rtype in session.request,help pycharm easy.
2016-04-11 08:14:39 +01:00
liuyang
2981366f56 add rtype in session.request 2016-04-11 14:33:23 +08:00
Kenneth Reitz
2874fd18fe Merge pull request #3080 from Lukasa/rfc7838
Add 421 Misdirected Request.
2016-04-10 16:49:27 -04:00
tzickel
219490ea7f Make a dummy test 2016-04-08 23:17:37 +03:00
tzickel
fb230709a8 Fix for the test ? 2016-04-08 22:23:35 +03:00
tzickel
2246a52a36 Added a test to show a faulty behaviour when posting binary data for an object
with no __iter__
2016-04-08 20:25:01 +03:00
Cory Benfield
831d8e0a1e Add 421 Misdirected Request. 2016-04-08 08:23:46 +01:00
Kenneth Reitz
f0860bd3ca Merge pull request #3048 from Stranger6667/test-structures
Added unit tests for structures module
2016-04-06 15:06:36 -04:00
Kenneth Reitz
456be3cfde Merge pull request #3024 from Stranger6667/utils-unit-tests
Added unit tests for utils module
2016-04-06 15:05:13 -04:00
Kenneth Reitz
b6b1b3a81c Merge pull request #3049 from Stranger6667/test-hooks
Added unit tests for hooks module
2016-04-06 15:04:15 -04:00
Kenneth Reitz
90578795eb Update HISTORY.rst 2016-04-06 15:02:06 -04:00
Kenneth Reitz
03ed671a41 Merge pull request #3059 from alexanderad/proxy-connection-errors
Raise a ProxyError for proxy related connection issues
2016-04-06 15:01:25 -04:00
Cory Benfield
e576f98429 Merge pull request #3069 from achermes/master
Update docstring and API doc to document ability to add per-file headers in multipart POST
2016-03-29 12:31:57 +01:00
Alexander Hermes
b8a577050d Update docstring and API doc to document ability to add per-file headers in multipart POST
* Docstring only change - for the function itself cf. requests Issue #1640
2016-03-29 11:57:47 +01:00
Ian Cordasco
3acf3a7238 Merge pull request #3060 from benweatherman/master
Consolidate logic for changing method during redirects
2016-03-20 13:46:00 -05:00
Ben
f24d56a1ce Consolidate logic for changing method during redirects
I only moved the code into a function, there was no actual change to
the code. I added a few tests to ensure we're doing things correctly.

The real point of me doing this is to make it easier to bring back
`strict_mode` functionality. For you requests youngsters in the crowd,
`strict_mode` followed the spec for redirects meaning the method
wouldn't change to a GET. The current code follows the browser
convention of changing the method to a GET when doing a 302 redirect.
However, lots of servers want you to follow the standards (the nerve!)
so I'd like to override the logic. Now that the method changing logic
is in `rebuild_method`, I can simply override that function instead of
overriding the entire `resolve_redirects` function as suggested by
kennethreitz/requests#1325
2016-03-17 23:16:39 -05:00
Alexander Shchapov
6ca9d71bb5 Raise a ProxyError for proxy related connection issues. 2016-03-17 15:46:26 -04:00
Cory Benfield
c9f8414476 Merge pull request #3057 from kevinburke/secure-by-default
Clarify that SSL verification is on by default
2016-03-17 15:19:59 +00:00
Kevin Burke
e94c812c2d Clarify that SSL verification is on by default
Generally if a kwarg is present it indicates that an option other than the
default is being specified. Putting `verify=True` in the first code sample
for SSL confused me, because it seemed to indicate that you had to specify
`verify=True` to get SSL verification. The opposite is true; SSL verification
is turned on by default and you have to specify `verify=False` to opt out of
SSL verification.

Updates the docs to make this more clear. Furthermore, connections to
https://kennethreitz.com currently time out instead of presenting an invalid
certificate, so I replaced this domain with https://requestb.in, which presents
the same error message as is currently there.
2016-03-17 08:16:56 -07:00
Dmitry Dygalo
81dc9084b2 Added unit tests for structures module 2016-03-15 14:47:32 +01:00
Dmitry Dygalo
eddea4e914 Added unit tests for hooks module 2016-03-14 14:08:44 +01:00
Dmitry Dygalo
1eb153529a Merge remote-tracking branch 'upstream/master' into utils-unit-tests
Conflicts:
	tests/test_utils.py
2016-03-13 10:24:47 +01:00
Ian Cordasco
190cddd4ae Merge pull request #3036 from Lukasa/issue/3035
Allow for exceptions from tell()
2016-03-11 07:30:53 -06:00
Cory Benfield
90a166d44a Release note. 2016-03-11 09:57:59 +00:00
Kenneth Reitz
3a26d13b52 Merge pull request #3041 from bsandrow/patch-2
Fix autofunction Reference
2016-03-09 03:59:44 -05:00
Kenneth Reitz
fe475f5d46 Merge pull request #3042 from bsandrow/patch-1
Fix api.rst References
2016-03-09 00:35:45 -05:00
Brandon Sandrowicz
f0d5a1f230 Fix autofunction Reference
`request.codes` is a class (`LookupDict`), not a function.
2016-03-08 23:57:54 -05:00
Brandon Sandrowicz
ee060ba7f3 Fix api.rst References
api.rst references `requests.ConnectTimeout` and `requests.ReadTimeout`, but they aren't imported into the top-level of the package.
2016-03-08 23:51:46 -05:00
Braulio Valdivielso Martínez
b473440cc1 Fix tests in python 3 2016-03-07 18:33:06 +01:00
Cory Benfield
6cc0b56d51 Switch to treat files without tell() as zero-length 2016-03-07 09:05:43 +00:00
Cory Benfield
e034dd1140 Allow for exceptions from tell() 2016-03-07 08:31:23 +00:00
Cory Benfield
4f378b0e1a Merge pull request #3032 from davidsoncasey/master
Changes for #3028
2016-03-06 18:07:59 +00:00
Casey Davidson
f74a6707af Verify that cookie can be properly accessed if domain is specified, and that error is raised otherwise. Refs #3028. 2016-03-05 20:37:56 -08:00
Casey Davidson
c53a685e7d Fix typo. 2016-03-05 20:30:36 -08:00
Braulio Valdivielso Martínez
03743b15ed Added docstrings to tests in test_testserver.py 2016-03-05 23:50:11 +01:00
Braulio Valdivielso Martínez
0dff06a7b9 Add blank line in test_requests.py 2016-03-05 23:28:32 +01:00
Braulio Valdivielso Martínez
c4abb4c9fb Remove unwanted changes in test_utils.py 2016-03-05 23:26:36 +01:00
Braulio Valdivielso Martínez
94d4818fde Remove unwanted change in test_requests.py 2016-03-05 23:22:52 +01:00
Braulio Valdivielso Martínez
eeafdc143b Move test_chunked_upload to test_lowlevel.py 2016-03-05 23:21:00 +01:00
Braulio Valdivielso Martínez
66c52c3ce0 Leave two lines of separation between top level definitions 2016-03-05 23:11:31 +01:00
Braulio Valdivielso Martínez
3c3bde5381 Remove unwanted changes 2016-03-05 23:10:13 +01:00
Braulio Valdivielso Martínez
4edf1ae55f Compare response bodies with unicode strings 2016-03-05 23:05:36 +01:00
Braulio Valdivielso Martínez
7088c06d8d Changed tests to use socket.sendall instead of socket.send 2016-03-05 22:45:26 +01:00
Casey Davidson
b9517a58bc Assert that both cookies were added in test. Refs #3028. 2016-03-04 15:59:13 -08:00
Casey Davidson
d8b36c1718 Override __contains__ method of RequestsCookieJar to catch CookieConflictError. Refs #3028 2016-03-04 15:55:43 -08:00
Casey Davidson
1185d65202 Add tests to specify when CookieConflicError should be raised. References #3028. 2016-03-04 15:55:43 -08:00
Braulio Valdivielso Martínez
44161ac373 Moved TestTestServer to its own file 2016-03-04 19:35:46 +01:00
Braulio Valdivielso Martínez
0d1a779030 Fixed style issues 2016-03-04 19:33:58 +01:00
Braulio Valdivielso Martínez
bf026e3c31 Removed unittest execution chunk 2016-03-04 19:24:15 +01:00
Braulio Valdivielso Martínez
e3ad31f3be Added test_chunked_upload to test_requests.py 2016-03-04 19:21:32 +01:00
Braulio Valdivielso Martínez
f17ef753d2 Moved test_chunked_upload to test_requests.py 2016-03-03 22:13:47 +01:00
Braulio Valdivielso Martínez
567b31080e Fixed formatting error in python2.6 2016-03-03 22:00:27 +01:00
Braulio Valdivielso Martínez
75a9a981b5 Removed unnecessary files 2016-03-03 22:00:08 +01:00
Braulio Valdivielso Martínez
ca35c847a2 Moved testserver to tests/ 2016-03-03 21:52:59 +01:00
Braulio Valdivielso Martínez
141db281d1 Merged master 2016-03-03 21:44:21 +01:00
Braulio Valdivielso Martínez
9ac5a6e4ae Fixed encoding issues, added timeouts to event waits and refactored Server 2016-03-03 21:11:17 +01:00
Braulio Valdivielso Martínez
241656355b Changed whitespace in docstring 2016-03-03 20:09:13 +01:00
Braulio Valdivielso Martínez
fa91b0ab7c Fixed style 2016-03-03 20:07:42 +01:00
Kenneth Reitz
46184236dc docs2 2016-02-21 23:02:10 -05:00
Kenneth Reitz
7c5d703466 docs 2016-02-21 23:01:41 -05:00
Kenneth Reitz
f8798a253a http://pep8.org 2016-02-21 23:00:42 -05:00
Kenneth Reitz
7de1495bf5 add httpbin.org 2016-02-21 22:54:04 -05:00
Kenneth Reitz
c4adf614a6 translate all the pages 2016-02-21 22:35:38 -05:00
Kenneth Reitz
f90c311851 peeps be stealin'! 2016-02-21 22:04:52 -05:00
Kenneth Reitz
f2ec732ce8 stay informed 2016-02-21 20:45:45 -05:00
Kenneth Reitz
e47e80b92f &bsp; 2016-02-21 20:34:15 -05:00
Kenneth Reitz
5f06b8196e updated sidebars 2016-02-21 20:32:42 -05:00
Kenneth Reitz
41c26ce1f5 improvements to index 2016-02-21 20:32:36 -05:00
Kenneth Reitz
75096a167c transcendental meditation 2016-02-19 09:26:21 -05:00
Kenneth Reitz
b366ef039c improved presentation of style guide 2016-02-19 09:11:09 -05:00
Kenneth Reitz
fc1e9b46a1 lyrics, er, docstrings 2016-02-19 09:08:29 -05:00
Kenneth Reitz
a7b5e3191d pass go, yay $200 2016-02-19 08:51:36 -05:00
Kenneth Reitz
ca303cda0a letters 2016-02-19 06:14:51 -05:00
Kenneth Reitz
1b1f4ac77d cheat code 2016-02-19 06:08:38 -05:00
Kenneth Reitz
d8bf59dde4 namedrop 2016-02-19 05:45:55 -05:00
Kenneth Reitz
14a83339a7 words (docs) 2016-02-19 05:41:17 -05:00
Kenneth Reitz
b70136cf52 completely (docs) 2016-02-19 05:38:33 -05:00
Kenneth Reitz
f653b9ac58 sentences 2016-02-19 05:03:04 -05:00
Kenneth Reitz
1cf1699e37 what's docstrung 2016-02-19 04:56:25 -05:00
Kenneth Reitz
8dc5f68bc1 sp 2016-02-19 04:50:55 -05:00
Kenneth Reitz
29b191b5ea </tone> 2016-02-19 04:48:47 -05:00
Kenneth Reitz
ee024423a5 more pleasant wording about strong opinion 2016-02-19 04:44:11 -05:00
Kenneth Reitz
90ddeca70d updated style guide 2016-02-19 04:42:54 -05:00
Dmitry Dygalo
f123f89d32 Added unit tests for utils module 2016-02-19 10:32:23 +01:00
Kenneth Reitz
5d0ffd85ce style guide 2016-02-19 04:30:06 -05:00
Kenneth Reitz
2cb052aa95 sp 2016-02-19 04:11:41 -05:00
Kenneth Reitz
886f92324a contributing 2016-02-19 04:10:37 -05:00
Kenneth Reitz
d3bd9f30a6 contributing 2016-02-19 04:09:03 -05:00
Kenneth Reitz
688a00c386 improve contributions section 2016-02-19 03:47:12 -05:00
Kenneth Reitz
f63106005b better codeblocks on mobile 2016-02-19 02:59:05 -05:00
Kenneth Reitz
f8af499700 improve further advanced.rst 2016-02-19 02:45:07 -05:00
Kenneth Reitz
f4445b3d4f improve advanced.rst 2016-02-19 02:42:22 -05:00
Kenneth Reitz
bf8c8312dd cleanup quickstart 2016-02-19 02:12:15 -05:00
Kenneth Reitz
f4f863f168 cleanup advanced.rst
single-quoted strings, yo!
2016-02-19 02:06:33 -05:00
Kenneth Reitz
f422ace07e clean up codeblock styles 2016-02-19 01:52:59 -05:00
Kenneth Reitz
60b591eaac docs: widen things up 2016-02-19 01:47:54 -05:00
Kenneth Reitz
dbefff6821 sphinx is now working properly on RTD (grrrR) 2016-02-19 01:23:31 -05:00
Kenneth Reitz
e98d71de13 docs cleanup 2016-02-19 00:56:14 -05:00
Kenneth Reitz
45992769b2 +sphinx 2016-02-18 23:58:47 -05:00
Kenneth Reitz
47fa07dcd8 update requirements workflow 2016-02-18 23:57:30 -05:00
Kenneth Reitz
f6252c2203 improved installation instructions 2016-02-18 20:59:01 -05:00
Kenneth Reitz
c1c393122d change up marketing, update js/css 2016-02-18 20:41:04 -05:00
Kenneth Reitz
9f33a0cd3c refactor API documentation 2016-02-18 20:41:04 -05:00
Kenneth Reitz
b0704b86de years 2016-02-18 14:16:50 -05:00
Kenneth Reitz
057722af23 Update Makefile 2016-02-10 21:07:22 -05:00
Kenneth Reitz
169b7edcc3 Update README.rst 2016-02-07 11:51:23 -05:00
Kenneth Reitz
283491f8b6 Update Makefile 2016-02-07 10:58:30 -05:00
Kenneth Reitz
a3ded28c57 Update Makefile 2016-02-07 03:45:31 -05:00
Kenneth Reitz
2fa5fa6ac5 Update Makefile 2016-02-07 03:43:35 -05:00
Kenneth Reitz
476938ab8d Delete setup.cfg 2016-02-07 03:43:15 -05:00
Kenneth Reitz
3a77b59df2 Update index.rst 2016-02-05 18:08:48 -05:00
Kenneth Reitz
00c0a80e6b Update README.rst 2016-02-05 18:08:18 -05:00
Kenneth Reitz
087de5232c v2.9.2 in history 2016-02-05 17:53:18 -05:00
Kenneth Reitz
fc512d8924 Don't use redirect_cache if allow_redirects=False
Fix for #2997
2016-02-05 17:51:09 -05:00
Kenneth Reitz
bbadf47a8f syntax changes 2016-02-05 15:53:59 -05:00
Dmitry Dygalo
18b26d20f7 Added tests module. 2016-02-05 13:21:57 +01:00
Cory Benfield
6143b7eebc Merge pull request #2994 from Stranger6667/fix-bad-test
Fixed test execution.
2016-02-03 20:53:08 +00:00
Dmitry Dygalo
1c5c6eeb7a Fixed test execution. 2016-02-03 21:19:20 +01:00
Kenneth Reitz
7461371361 behold the power of requests 2016-02-03 06:11:36 -05:00
Kenneth Reitz
20290e3f2c docs fix 2016-02-03 06:01:50 -05:00
Kenneth Reitz
87f04e2a32 docs cleanup 2016-02-03 05:59:49 -05:00
Kenneth Reitz
54d3b59f89 update 2016-02-03 05:50:45 -05:00
Kenneth Reitz
ba2b355168 Update README.rst 2016-02-03 05:33:23 -05:00
Kenneth Reitz
fbe104876e Update README.rst 2016-02-03 05:14:01 -05:00
Kenneth Reitz
4d97b5b39a Update README.rst 2016-02-03 05:13:34 -05:00
Kenneth Reitz
9057f7539b Update README.rst 2016-02-03 05:09:45 -05:00
Kenneth Reitz
9c939ec026 Update README.rst 2016-02-03 05:09:25 -05:00
Kenneth Reitz
72d8293e08 Update README.rst 2016-02-03 05:07:47 -05:00
Kenneth Reitz
33d2ba961b Update README.rst 2016-02-03 05:07:33 -05:00
Kenneth Reitz
ab22b3ea5f Update README.rst 2016-02-03 05:07:08 -05:00
Kenneth Reitz
c003797319 Update README.rst 2016-02-03 05:05:48 -05:00
Kenneth Reitz
52054be612 Update README.rst 2016-02-03 05:04:23 -05:00
Kenneth Reitz
f997c0590f Update README.rst 2016-02-03 05:02:06 -05:00
Kenneth Reitz
8c963b52ea standard 2016-02-03 04:59:42 -05:00
Kenneth Reitz
4095b26f13 readme cleanup 2016-02-03 04:58:22 -05:00
Kenneth Reitz
2d0d291f5a Merge branch 'master' of github.com:kennethreitz/requests 2016-02-03 04:54:07 -05:00
Kenneth Reitz
20b4bb7c36 revised readme 2016-02-03 04:52:50 -05:00
Kenneth Reitz
b1e97650f7 Update README.rst 2016-02-03 04:00:14 -05:00
Kenneth Reitz
6e35ec4c12 cleandup test_requests.py 2016-02-03 03:50:14 -05:00
Kenneth Reitz
90688c68ad cleanup setup.py from #2991 2016-02-03 03:37:52 -05:00
Kenneth Reitz
458cb64e3d cleanup tests from merge of #2991 2016-02-03 03:35:51 -05:00
Kenneth Reitz
5481db22b5 Merge pull request #2991 from Stranger6667/tests-refactoring
[WIP] Test suite refactoring
2016-02-03 03:26:27 -05:00
Dmitry Dygalo
6c2942b198 Initial work 2016-02-02 13:24:05 +01:00
Kenneth Reitz
b782e66462 happy belated new year 2016-02-02 02:33:53 -05:00
Cory Benfield
ed8cfd33e6 Merge pull request #2986 from untitaker/syntax-error
Fix syntax error
2016-01-30 19:14:20 +00:00
Markus Unterwaditzer
2140c98fa4 Fix syntax error 2016-01-30 19:59:58 +01:00
Cory Benfield
3f725bc226 Merge pull request #2985 from homeworkprod/patch-1
Fixed markup for/rendering of list in section "Custom Headers".
2016-01-30 14:00:14 +00:00
Jochen Kupperschmidt
0d25f8a00c Fixed markup for/rendering of list in section "Custom Headers". 2016-01-30 14:45:07 +01:00
Kenneth Reitz
6195edc075 cleanup of auth __eq__ 2016-01-29 22:18:07 -05:00
Kenneth Reitz
f7447d1871 Merge pull request #2958 from Malizor/master
Add equality functions for authentication handlers
2016-01-29 22:08:26 -05:00
Kenneth Reitz
3f8b1fb617 Merge pull request #2984 from rbcarson/httpadapter-maxretries-doc
Remove int type on HTTPAdapter's max_retries argument doc
2016-01-29 21:59:03 -05:00
Carson Lam
a02069ec9e Remove int type on max_retries argument. 2016-01-29 15:30:22 -08:00
Ian Cordasco
645ac3087f Merge pull request #2981 from Lukasa/unencrypted-keys
Warn about encrypted keys in the docs.
2016-01-27 10:19:26 -06:00
Cory Benfield
5887b136e3 Warn about encrypted keys in the docs. 2016-01-27 11:56:27 +00:00
Cory Benfield
00fa5f171c Merge pull request #2976 from shoma/fix-debug-logging-doc
Fix api doc of debug logging for Python 3
2016-01-22 07:12:01 +00:00
shoma
75c7e5f1c3 Update example for Python 2/3 compatible. 2016-01-22 13:48:22 +09:00
shoma
ceb88ac077 Fix api doc of debug logging for Python 3 2016-01-22 12:47:18 +09:00
Cory Benfield
d76f304462 Merge pull request #2972 from munro/master
Return request & response with TooManyRedirects
2016-01-21 23:01:58 +00:00
Ryan Munro
56a1b55a42 Use httpbin to assert the final redirection URL 2016-01-20 11:24:03 -08:00
Ryan Munro
1f05867493 Add exception message to TooManyRedirects test 2016-01-20 11:06:39 -08:00
Ryan Munro
6a8a480d6c Review changes to TooManyRedirect exception with response 2016-01-20 10:48:12 -08:00
Cory Benfield
8b92d9989b Merge pull request #2973 from sigmavirus24/no-distutils-fallback
Stop falling back to distutils in setup.py
2016-01-20 13:54:58 +00:00
Ian Cordasco
5f2fef5bb5 Stop falling back to distutils in setup.py
distutils has been deprecated for years now and pip is refusing to install
projects using it. As such, *some* users are reporting problems installing
requests. Let's avoid this entirely by not falling back to distutils at all.
2016-01-20 07:51:42 -06:00
Ryan Munro
5a18066c45 Fix Python 3.x tests for TooManyRedirects API 2016-01-19 16:59:18 -08:00
Ryan Munro
e6f218f3f6 Return request & response with TooManyRedirects 2016-01-19 16:44:58 -08:00
Kenneth Reitz
6592dbc29b github_banner 2016-01-15 18:57:40 -05:00
Kenneth Reitz
851d65efb7 remove hellobar 2016-01-15 18:55:26 -05:00
Kenneth Reitz
7250665297 Python 3.5 2016-01-15 18:45:17 -05:00
Kenneth Reitz
f9d5cbe5b5 add github banner 2016-01-15 18:44:56 -05:00
Kenneth Reitz
07d8c28a75 align rezzy the sea turtle 2016-01-15 18:41:30 -05:00
Kenneth Reitz
820d31d5e2 Merge pull request #2915 from onceuponatimeforever/alabaster_sphinx_theme
Switch to alabaster sphinx theme in the docs
2016-01-15 18:35:03 -05:00
Kenneth Reitz
fe0850f341 Update conf.py 2016-01-15 17:57:46 -05:00
Nicolas Delvaux
06df08e676 Add equality functions for authentication handlers 2016-01-04 17:01:06 +01:00
Cory Benfield
a3acd30bcc Socks extra 2015-12-31 09:19:45 +00:00
Cory Benfield
e4d15c4649 Help @sigmavirus24 with code golf. 2015-12-30 16:45:51 +00:00
Cory Benfield
11b9b24ac9 Some code cleanups. 2015-12-30 14:37:53 +00:00
Cory Benfield
1c54014daf Don't parse nonexistent URLs. 2015-12-30 10:48:29 +00:00
Cory Benfield
39ee5d46dc Silence SOCKS dependency warning on import 2015-12-30 10:40:30 +00:00
Cory Benfield
08364c6739 Add support for SOCKS 2015-12-30 10:40:24 +00:00
Cory Benfield
396963ac7e Temporary urllib3 patch 2015-12-30 10:40:12 +00:00
Cory Benfield
cd84b3ff94 Update to urllib3 1.14 2015-12-30 10:07:16 +00:00
Cory Benfield
cbb0830ee9 Merge pull request #2948 from vincentbernat/patch-1
advanced: use "client.*" to designate client certificate
2015-12-28 15:58:54 +00:00
Vincent Bernat
f14f30817e advanced: use "client.*" to designate client certificate
Using "server.crt" is confusing as one may try to put the server certificate while this is really the client certificate that should be put here. Instead, use "client.cert", "client.key" and "client.pem".
2015-12-28 16:21:53 +01:00
Cory Benfield
a1c9b8439c Merge pull request #2945 from ibnIrshad/fixdocs-2062
Docs: clarify the precedence of `auth=` over `netrc`
2015-12-21 18:49:52 +00:00
Isa Hassen
fcb8c8d33b Docs: clarify the precedence of auth= over netrc
This closes #2062 by clarifying in the docs which auth
header takes precedence:
1st auth=
2nd .netrc
3rd headers=

This precedence order is already tested in test_requests.py,
in the test_basicauth_with_netrc method. Perhaps we should
add further tests for non-basic auth schemes.
2015-12-21 11:52:45 -05:00
Cory Benfield
1108058626 v2.9.1 2015-12-21 14:53:36 +00:00
Ian Cordasco
06a411c289 Merge pull request #2937 from Lukasa/release/2.9.1
Release 2.9.1
2015-12-21 08:51:21 -06:00
Ian Cordasco
728c318080 Merge pull request #2936 from Lukasa/netrc_with_bytes_url
Handle bytes and unicode URLs for netloc
2015-12-19 11:34:34 -06:00
Cory Benfield
6e0649d9f8 Push code review advice from @sigmavirus24 2015-12-19 08:44:21 +00:00
Cory Benfield
46b7f19857 Changelog for urllib3 update 2015-12-19 08:41:51 +00:00
Cory Benfield
834a9601c3 Update urllib3 to 1.13.1 2015-12-19 08:40:39 +00:00
Cory Benfield
b444f21b1f Update changelog for 2.9.1 2015-12-18 09:54:42 +00:00
Cory Benfield
589f13ca9d Handle bytes and unicode URLs for netloc 2015-12-18 09:22:23 +00:00
Cory Benfield
f7cb796241 Merge branch 'fix-1859' 2015-12-18 09:18:10 +00:00
Cory Benfield
96a068b58e Merge branch 'master' into fix-1859 2015-12-18 09:14:13 +00:00
Ian Cordasco
b32c3bc10f Merge pull request #2931 from Lukasa/uploading_bytes
Fix regression from #2844 regarding binary bodies.
2015-12-16 09:20:26 -06:00
Cory Benfield
fc8fa1aa26 Fix regression from #2844 regarding binary bodies. 2015-12-16 14:56:13 +00:00
Cory Benfield
5f7a3a74aa v2.9.0 2015-12-15 15:29:27 +00:00
Ian Cordasco
046a0f215d Merge pull request #2927 from Lukasa/release/2.9.0
Prepare 2.9.0 release.
2015-12-15 09:26:56 -06:00
Cory Benfield
424fe263d8 Suggested wording from @sigmavirus24 2015-12-15 15:20:26 +00:00
Cory Benfield
2f744b5010 Update 2.9.0 release log. 2015-12-15 14:59:14 +00:00
Cory Benfield
3c0f0b9ab5 Update urllib3 to 1.13 2015-12-15 14:47:20 +00:00
Ian Cordasco
3d33f30436 Merge pull request #2926 from bsamek/master
Refactor default params
2015-12-11 16:13:53 -06:00
Brian Samek
9aca57d4bf Revert changes to params
This reverts commit 9a20afd6b5.

Docstring changes were desirable, but changes to params were not.
2015-12-11 16:47:47 -05:00
Brian Samek
9a20afd6b5 Refactor default params
Specified the default argument for params that have a default in the docstring
so that the default is easier to see from the code. Modified the docstring in
api.py to match the docstring in sessions.py.
2015-12-11 13:32:09 -05:00
Cory Benfield
2d91365cba Merge pull request #2923 from bsamek/verifyparam
Add hint to :param verify.
2015-12-09 16:33:09 +00:00
Brian Samek
3ad66349ea Add hint to :param verify.
It is not clear that :param verify defaults to True. The way the verify
portion of the docstring is written it looks like it defaults to False, and
you have to pass in True if you'd like the SSL cert to be verified, but the
opposite is the case.
2015-12-09 11:21:21 -05:00
Braulio Valdivielso Martínez
534ee814fc Tested timeouts in text_response_server requests retrieval 2015-12-08 20:54:12 +01:00
Braulio Valdivielso Martínez
3eeea3771b Added a way for TestServer request handlers to store data for later retrieval by the main thread (actual requests, for example) 2015-12-08 20:40:58 +01:00
Braulio Valdivielso Martínez
578b032555 Tested TestServer multiple request handling 2015-12-08 16:37:03 +01:00
Braulio Valdivielso Martínez
4a41c591f8 Tested text_response_server 2015-12-08 16:23:02 +01:00
Braulio Valdivielso Martínez
3b2a489e13 Added text_response_server classmethod to TestServer and updated basic_response_server to use it 2015-12-08 16:12:40 +01:00
Ian Cordasco
e48fea7fb3 Merge pull request #2917 from matt-jordan/qop
requests/auth: Handle an empty 'qop' attribute in an Authenticate challenge
2015-12-05 22:48:52 -06:00
Matt Jordan
5c19d3e07b requests/auth: Handle an empty 'qop' attribute in a Authenticate challenge
Some malfunctioning HTTP servers may return a qop directive with no token, as
opposed to correctly omitting the qop directive completely. For example:

header: WWW-Authenticate: Digest realm="foobar_api_auth", qop="",
        nonce="a12059eaaad0b86ece8f62f04cbafed6", algorithm="MD5",
        stale="false"

Prior to this patch, requests would respond with a 'None' Authorization header.
While the server is certainly incorrect, this patch updates requests to be
more tolerant to this kind of shenaniganry. If we receive an empty string for
the value of the qop attribute, we instead treat that as if the qop attribute
was simply not provided.

Closes #2916
2015-12-05 16:14:52 -06:00
Susan Tan
4d5e534467 Remove kenneth's sphinx themes from docs directory 2015-12-04 04:06:17 -08:00
Susan Tan
6e903de068 Switch to alabaster instead of kr sphinx theme for requests docs
Add in the pre-existing ad tracker Javascript tags from kr sphinx theme.
2015-12-04 04:06:14 -08:00
Ian Cordasco
40ce36671c Merge pull request #2896 from BraulioVM/master
[WIP] Set 'Transfer-Encoding: chunked' if data is a file with length 0
2015-12-02 08:35:41 -06:00
Braulio Valdivielso Martínez
5ecf789a6f Avoid server from blocking if an exception is found in the main thread 2015-12-02 02:02:09 +01:00
Braulio Valdivielso Martínez
aac32ac56e Updated tests relying on the old testserver and added basic test for chunked uploads 2015-12-02 01:53:39 +01:00
Braulio Valdivielso Martínez
6551c290fd Allow main thread to block testserver before closing 2015-12-02 01:52:32 +01:00
Cory Benfield
dfa97addcc Merge pull request #2909 from jwilk/spelling
Fix typos
2015-12-01 11:28:06 +00:00
Jakub Wilk
23d9b077d8 Fix typos 2015-12-01 12:24:56 +01:00
Cory Benfield
6cfe6e775f Merge pull request #2902 from jparise/jparise-authors
Include a link to my GitHub profile.
2015-11-26 14:57:10 +00:00
Jon Parise
27f5a15364 Include a link to my GitHub profile. 2015-11-26 09:34:01 -05:00
Braulio Valdivielso Martínez
6adabacd81 Close socket properly in test_server_closes 2015-11-26 01:11:18 +01:00
Braulio Valdivielso Martínez
b4b4661f46 Implemented test to verify that the context manager exits after the server is closed 2015-11-26 01:05:16 +01:00
Braulio Valdivielso Martínez
f7917c305a Make server set stop_event right after closing its socket 2015-11-26 01:04:27 +01:00
Braulio Valdivielso Martínez
11ad502b80 Added basic_response_server classmethod and tested it 2015-11-26 00:29:53 +01:00
Braulio Valdivielso Martínez
2ad3f07982 Make exceptions in the testserver.Server thread not block the main thread 2015-11-25 14:41:03 +01:00
Braulio Valdivielso Martínez
ab0f063d85 Made TestServer.Server listen on an arbitrary open port by default 2015-11-25 14:15:51 +01:00
Braulio Valdivielso Martínez
47e96c4e57 Renamed dummyserver to testserver 2015-11-25 14:05:21 +01:00
Braulio Valdivielso Martínez
b806ce15ba Make strings in DummyServer test bytestrings 2015-11-25 13:53:54 +01:00
Braulio Valdivielso Martínez
9a2cc99b06 Put docstring inside Server class 2015-11-25 13:52:53 +01:00
Ian Cordasco
c1f51fd100 Merge pull request #2898 from lndbrg/patch-1
Update adapters.py
2015-11-24 20:44:51 -06:00
Olle Lundberg
68db4132e3 Update adapters.py
Remove duplicate word.
2015-11-25 02:02:41 +01:00
Braulio Valdivielso Martínez
99825de025 Implemented dummy socket server interface and added one test 2015-11-24 23:08:38 +01:00
Braulio Valdivielso Martínez
4c82dbab6f Fix 'Transfer-Encoding: chunked' change 2015-11-24 13:42:13 +01:00
Braulio Valdivielso Martínez
6f6b2fd1d5 Set 'Transfer-Encoding: chunked' if data file length equals 0 2015-11-23 20:52:06 +01:00
Ian Cordasco
6506dc8f66 Merge pull request #2895 from Lukasa/contributing
Add basic CONTRIBUTING.md file
2015-11-20 08:14:59 -06:00
Cory Benfield
085a8768a2 Where did you get Requests? 2015-11-20 13:59:59 +00:00
Cory Benfield
e5d6630888 Add basic CONTRIBUTING.md file 2015-11-20 11:29:35 +00:00
Cory Benfield
6c47a0c5e9 Merge pull request #2891 from lorenzph/pyopenssl-min-version
Specify minimum pyOpenSSL version
2015-11-19 19:11:34 +00:00
Philip Lorenz
6597b53834 Specify minimum pyOpenSSL version
urllib3 requires "set_tlsext_host_name" which was only added in
pyOpenSSL 0.13. As some distributions (e.g. Ubuntu 12.04) still ship an
older version enforce the correct minimum version during installation.
2015-11-19 20:05:03 +01:00
Cory Benfield
2128321b85 Merge pull request #2878 from kiddick/master
Remove redundant json import.
2015-11-12 13:56:55 +00:00
unknown
de2a5f4332 Remove redundant json import. 2015-11-12 16:54:47 +03:00
Cory Benfield
6d0017ee6a Merge pull request #2873 from sigmavirus24/bug/2872
Fix super_len for partially read files
2015-11-11 07:52:47 +00:00
Ian Cordasco
5397ef71b3 Fix super_len for partially read files
Closes #2872
2015-11-10 21:22:24 -06:00
Ian Cordasco
0a1aaca024 Add failing test for #2872 2015-11-10 21:15:29 -06:00
Cory Benfield
4e89ba7077 Merge pull request #2869 from vienno/unnest-cookie-loop
unnest deep loop
2015-11-10 13:21:01 +00:00
vienno
f835843f87 error in github bio link 2015-11-10 14:07:55 +01:00
vienno
cf9da5b52e add myself to authors 2015-11-10 14:05:24 +01:00
vienno
d849d6e907 Replace 'if x' with 'if x is not None' in cookie loop 2015-11-10 13:58:09 +01:00
vienno
89178ebcdc Complete unnesting of if statements in cookie loop 2015-11-10 13:47:40 +01:00
vienno
a25a641fb4 unnest deep loop 2015-11-10 12:36:36 +01:00
Ian Cordasco
35170e180e Merge pull request #2858 from Lukasa/support_ca_cert_directories
Add support for a directory of CAs
2015-11-07 15:39:41 -06:00
Ian Cordasco
7d5d067e9c Merge pull request #2861 from Lukasa/broken_chunked_encoding
Fix breakage introduced by 8f591682
2015-11-07 11:50:50 -06:00
Cory Benfield
c1c164ba80 Removed test of chunked encoding 2015-11-07 14:08:15 +00:00
Cory Benfield
02576ae7e7 Merge pull request #2864 from aartur/master
Assure session is closed on exception.
2015-11-06 21:02:30 +00:00
Artur Siekielski
1ced0040bd Assure session is closed on exception. 2015-11-06 21:54:43 +01:00
Cory Benfield
e67cd15bc8 Fix breakage introduced by 8f591682 2015-11-05 18:54:40 +00:00
Ian Cordasco
f7e0494130 Merge pull request #2859 from kennethreitz/pytest-httpbin
Move test suite offline using pytest-httpbin
2015-11-05 09:37:22 -06:00
Cory Benfield
43b90d7f72 Remove remaining test that contacts external server. 2015-11-05 13:49:35 +00:00
Cory Benfield
7c91e27d01 Remove threaded test 2015-11-05 13:49:35 +00:00
Cory Benfield
15cf19431a Pin httpbin version. 2015-11-05 13:49:35 +00:00
Cory Benfield
be564e500c Fixup assertion broken in rewrite to py.test
Broke it in 0364a8ca7fc67b89f3e54d50fa3936d65e979b96
2015-11-05 13:49:35 +00:00
Cory Benfield
70d7b134c8 Stop being so specific when testing error strings. 2015-11-05 13:49:35 +00:00
Cory Benfield
a8fdba15b1 Use py.test style assertions 2015-11-05 13:49:35 +00:00
Cory Benfield
3bc189b0af Inject and use httpbin fixture everywhere. 2015-11-05 13:49:35 +00:00
Cory Benfield
9b63f9cd37 Make sure we unapply this patch. 2015-11-05 13:48:42 +00:00
Cory Benfield
f52287d999 Stop using HTTP and HTTPS schemes in one test. 2015-11-05 13:48:42 +00:00
Cory Benfield
a56db9ecc4 Stop inheriting from unittest.TestCase 2015-11-05 13:48:42 +00:00
Cory Benfield
e5053cd322 Define some httpbin fixtures. 2015-11-05 13:48:42 +00:00
Cory Benfield
de53523bef Add pytest-httpbin requirement. 2015-11-05 13:48:42 +00:00
Cory Benfield
0352ec0bd3 Add support for a directory of CAs 2015-11-05 13:21:21 +00:00
Cory Benfield
4dffe5efaa Update trove classifiers. 2015-11-05 10:38:25 +00:00
Ian Cordasco
8f460faa31 Merge pull request #2849 from annp89/master
Add 511 Network Authentication Required status code
2015-10-26 10:58:01 -05:00
Ann Paul
7dd94941c8 Add 511 Network Authentication Required status code to dict of status codes 2015-10-26 08:42:37 -07:00
Ian Cordasco
d290a9b4c6 Merge pull request #2825 from Lukasa/universal_newlines
Add warnings about text/binary mode files.
2015-10-24 09:37:16 -05:00
Cory Benfield
f1fd11e54f Emit warnings when using text mode files. 2015-10-24 09:29:23 +01:00
Cory Benfield
1dff6c9153 Merge pull request #2845 from gagoman/fix-2844
Fix issue #2844
2015-10-23 13:24:36 +01:00
Alex Khomchenko
edc68a0ac8 fix issue #2844 2015-10-23 15:22:36 +03:00
Cory Benfield
13ea7394cc Merge pull request #2831 from shagunsodhani/proposed-fix-for-#2826
added fix for #2826
2015-10-16 13:21:45 +01:00
shagun Sodhani
b675377dc2 added fix for #2826 2015-10-16 17:01:36 +05:30
Cory Benfield
58b20d671c Merge pull request #2829 from dblia/getresponse-buffering
Use buffering for HTTP responses on chunked requests
2015-10-15 15:37:06 +01:00
Dimitris Bliablias
8f591682e6 Use buffering for HTTP responses on chunked requests
For non-chunked requests, the request is performed using the 'urlopen'
method that underlying uses buffering for the HTTP responses (for Python
2.7+ versions). For chunked requests though, the request is made via a
different code path and so the 'getresponse' method is called without
using buffering. So, the response is consumed per single byte via a
recv() call on the underlying socket.

This patch, fixes that issue to mimic the non-chucked request behavior.
2015-10-15 16:58:07 +03:00
Cory Benfield
6c2d09dc2f Merge pull request #2827 from daniel-mueller/master
Fixed usage example in sessions.py
2015-10-15 14:01:13 +01:00
Daniel Müller
d8f28f4bca Fixed usage example in sessions.py 2015-10-15 14:32:35 +02:00
Cory Benfield
7c55446b7e Add warnings about text/binary mode files. 2015-10-14 13:23:19 +01:00
Cory Benfield
18a6b60110 v2.8.1 2015-10-13 13:55:09 +01:00
Cory Benfield
14a555ac71 Merge pull request #2821 from Lukasa/issue/2818
Allow non-native-string method names.
2015-10-12 15:50:53 +01:00
Cory Benfield
2df3c7c75d Move to_native_string for methods to prepare() 2015-10-12 10:50:37 +01:00
Cory Benfield
b071c49556 Failing test for issue #2818 2015-10-12 10:48:57 +01:00
Ian Cordasco
978a89d5a3 Merge pull request #2810 from Lukasa/certupdate
Update requests certificate bundle.
2015-10-08 11:12:09 -05:00
Ian Cordasco
931fd0eece Merge pull request #2814 from Lukasa/issue/2813
Use general null check for JSON
2015-10-08 10:13:08 -05:00
Cory Benfield
3948a9562d Use general null check for JSON 2015-10-08 14:53:35 +01:00
Ian Cordasco
2da8a604d3 Merge pull request #2812 from Lukasa/issue/2811
Don't treat NewConnectionErrors as timeouts.
2015-10-08 08:10:01 -05:00
Cory Benfield
f7be4e5f28 NewConnectionErrors aren't timeouts.
This is a compatibility change, and should be removed in 2.8.0
2015-10-08 14:05:17 +01:00
Cory Benfield
23051979f4 Update requests certificate bundle.
This brings it up-to-date with the certifi 2015.9.6.2 release,
specifically its `weak.pem` bundle.
2015-10-08 08:09:53 +01:00
Ian Cordasco
e499b354c4 Merge pull request #2804 from Lukasa/final-2.8.0
Final 2.8.0
2015-10-05 11:21:40 -05:00
Cory Benfield
ba7d09354a Changelog for #2785. 2015-10-05 15:57:05 +01:00
Ian Cordasco
96e9490100 Merge pull request #2803 from asieira/master
Update default user-agent (#2785)
2015-10-05 09:54:17 -05:00
Cory Benfield
397f10bac7 Increment version numbers. 2015-10-05 15:41:04 +01:00
Cory Benfield
8dcd9f12de Prepare changelog for 2.8.0 2015-10-05 15:38:31 +01:00
Cory Benfield
09bd3232dd Update urllib3 to 1.12 2015-10-05 15:38:24 +01:00
Alexandre Sieira
4e44c2ab64 Removing change to .gitignore (#2785) 2015-10-05 11:36:21 -03:00
Cory Benfield
d996a95cf7 Merge pull request #2721 from Lukasa/no_proxy_fix
Ignore empty fields in no_proxy env var
2015-10-05 15:28:49 +01:00
Cory Benfield
f6afa71281 Merge pull request #2763 from ravipra/json_supersedes
Fixed issue #2756
2015-10-05 15:27:53 +01:00
Alexandre Sieira
2a635ba87d Update default user-agent (#2785)
* Updated default user agent so that it includes only the requests
version;
* Added PyCharm / IDEA project directory to `.gitignore`.
2015-10-05 11:18:23 -03:00
Cory Benfield
8963e1567b Merge pull request #2678 from sigmavirus24/proposed/2.8.0
Proposed 2.8.0
2015-10-05 15:09:41 +01:00
Cory Benfield
f7a43e2664 Merge branch 'hosamaly-master' 2015-10-03 18:33:38 +01:00
Cory Benfield
139418475c Remove reference to ok. 2015-10-03 18:33:25 +01:00
Cory Benfield
a89d5c003a Revert "Clarify the contract of Response#ok, and avoid exceptions in it"
This reverts commit 086e19d8e1.
2015-10-03 18:32:28 +01:00
Hosam Aly
086e19d8e1 Clarify the contract of Response#ok, and avoid exceptions in it 2015-10-03 16:34:36 +01:00
Hosam Aly
443d07e0d3 Fix #2799: Update Quickstart documentation of Response.json() 2015-10-03 00:01:58 +01:00
Cory Benfield
3c6f89b8f4 Merge pull request #2798 from Doctor-love/patch-1
Clarified description for option "trust_env"
2015-10-02 13:48:56 +01:00
Doctor-love
63b3b9be55 Clarified description for option "trust_env" 2015-10-02 14:47:50 +02:00
Cory Benfield
610fbd062f Merge pull request #2797 from sumitbinnani/DocumentationCorrection
Updated Documentation for Issue #2756
2015-10-02 10:08:23 +01:00
sumitbinnani
bf38d5bf52 Update models.py
Updated Documentation:
```data``` as well as ```files``` supersedes json
2015-10-02 13:50:52 +05:30
Cory Benfield
aead8c347c Merge pull request #2792 from Lukasa/update-test-dependencies
Update test dependencies
2015-10-01 10:27:25 +01:00
Cory Benfield
79675a0638 Update test dependencies 2015-10-01 10:26:14 +01:00
Cory Benfield
21bf8cd9bf Merge pull request #2789 from sigmavirus24/remove-self
Remove offer to pair with others from README
2015-09-30 14:29:27 +01:00
Ian Cordasco
76a0d3fcb9 Remove offer to pair with others from README 2015-09-27 21:48:42 -05:00
Kenneth Reitz
b8df8911c3 60m times 2015-09-24 13:40:49 -04:00
Cory Benfield
46ff1a9a54 Merge pull request #2775 from ueg1990/remove_unused_module
Removed unused module from hooks.py
2015-09-13 13:26:05 +01:00
ueg1990
649aeaa489 Removed unused module from hooks.py 2015-09-13 06:36:39 -04:00
Kenneth Reitz
9d69c7845d Merge pull request #2774 from ueg1990/pythonic_hooks
Some pythonic suggestions for requests/hooks.py
2015-09-13 01:05:34 -04:00
ueg1990
c5a41269d9 Some pythonic suggestions for requests/hooks.py 2015-09-12 20:43:25 -04:00
Cory Benfield
7c74050d66 Merge pull request #2772 from jimbrowne/master
Move CA Certificates documentation next to SSL Cert Verification
2015-09-11 20:22:13 +01:00
Jim Browne
2cee3bb57a docs: move CA Certificates next to SSL Cert Verification 2015-09-11 10:50:23 -07:00
Cory Benfield
17a9e6da9e Merge pull request #2769 from jwilk/spelling
docs: Fix typos
2015-09-10 22:14:11 +01:00
Jakub Wilk
e9c94e0f06 docs: Fix typos 2015-09-10 22:45:59 +02:00
Ian Cordasco
ebc38f7825 Merge pull request #2767 from ueg1990/master
Remove redundant function call list when iterating over status codes
2015-09-10 12:38:25 -05:00
Usman Ehtesham Gul
96e8e8b92f Remove redundant function call list when iterating over status codes 2015-09-10 12:59:39 -04:00
Ravi Prakash Putchala
1f48a4c9ea Removed the other 'encode' as well, in the test case. 2015-09-09 14:43:22 +05:30
Ravi Prakash Putchala
7a0cd16c1a changed the null check for 'data' parameter to be more explicit.
removed the superfluous encode from the testcase.
2015-09-09 13:04:24 +05:30
Ravi Prakash Putchala
37037607b5 Fixed issue #2756
Now 'json' parameter will be used to prepare body only if the 'data'
parameter is not present
2015-09-08 14:45:46 +05:30
Cory Benfield
56ecdebcc5 Merge pull request #2741 from jasongrout/per-host-proxy
Implement per-host proxies
2015-09-06 15:02:40 +12:00
Cory Benfield
14ee84b5fd Merge pull request #2758 from mhils/patch-1
Fix RFC Quotation
2015-09-06 09:01:39 +12:00
Maximilian Hils
f4eaefa63e fix rfc quotation 2015-09-05 12:07:49 +02:00
Jason Grout
704a922fc2 Clarify documentation for per-host proxies
Make sure it's clear that a per-host proxy matches a scheme and exact
hostname.
2015-09-04 22:55:38 +00:00
Ian Cordasco
719c76cd9d Merge pull request #2753 from Lukasa/ssldocs
Document the string form of the verify parameter.
2015-08-31 20:34:11 -05:00
Cory Benfield
7c958ee28e Document the string form of the verify parameter. 2015-08-31 10:26:06 +01:00
Ian Cordasco
bf9e66364f Merge pull request #2751 from carlosvargas/master
Add link to ES translation.
2015-08-29 07:21:07 -05:00
Carlos Vargas
00d8c24fe1 Add link to ES translation. 2015-08-28 19:12:10 -07:00
Jason Grout
4c6540898c don't lowercase a url before urlparsing it
urlparse automatically lowercases the scheme and hostname
2015-08-28 20:20:07 +00:00
Jason Grout
f3d4480a33 Use url parsing to check the scheme 2015-08-28 20:06:45 +00:00
Jason Grout
fb496e4e86 Add test for per-host proxy selection 2015-08-27 18:21:04 +00:00
Jason Grout
c80121df91 Fix documentation for the proxies dictionary 2015-08-27 18:21:04 +00:00
Jason Grout
500f15da1f Factor out the proxy selection code 2015-08-27 18:21:04 +00:00
Jason Grout
2c8721540a Fix documentation for proxies in the Session class 2015-08-27 17:26:45 +00:00
Jason Grout
d7a3aa6188 Fix another place the proxy-selecting logic is used. 2015-08-27 17:26:14 +00:00
Ian Cordasco
bf436ea0a4 Merge pull request #2746 from csparpa/master
Add link to IT translation
2015-08-25 19:38:04 -05:00
csparpa
a2e828d4d7 Add link to IT translation 2015-08-25 22:09:10 +02:00
Jason Grout
22075f02d0 Clarify the per-host proxy code 2015-08-25 18:21:20 +00:00
Jason Grout
618514231b Reword documentation for per-host proxies 2015-08-25 15:11:27 +00:00
Jason Grout
56844d1287 Add documentation for host-specific proxies 2015-08-25 14:53:52 +00:00
Cory Benfield
e57925223f Merge pull request #2743 from sigmavirus24/fix-py26-tests
Fix tests on python 2.6
2015-08-25 08:27:20 +01:00
Ian Cordasco
66567e037b Fix tests on python 2.6 2015-08-24 20:47:22 -05:00
Ian Cordasco
767cc9d2dc Merge pull request #2742 from everett-toews/data-arg
Include file-like object in data arg description
2015-08-24 20:44:45 -05:00
Everett Toews
8b03cd96cb Include file-like object in data arg description 2015-08-24 18:28:41 -05:00
Jason Grout
48fe34447d Implement per-host proxies
This change allows the proxy dict to be have entries of the form
{'<scheme>://<hostname>': '<proxy>'}.  Host-specific proxies will be used in
preference to the scheme-specific proxies (i.e., proxy dict entries with keys
like 'http' or 'https').

Fixes #2722
2015-08-24 21:16:35 +00:00
Cory Benfield
cef2589436 Merge pull request #2740 from qingyunha/master
params of proxy_headers are inconsistent with its docstrings
2015-08-24 13:43:01 +01:00
qingyunha
9d88810d52 modify proxy_headers docstrings 2015-08-24 19:48:17 +08:00
Cory Benfield
5d6d1bc284 Merge pull request #2737 from mjpieters/fix_dict_iteration_issue_2706
Avoid altering dictionary size during iteration
2015-08-21 09:08:19 +01:00
Martijn Pieters
4947cd01ae Avoid altering dictionary size during iteration, by gathering keys that need to be deleted first.
Fixes `RuntimeError` on Python 3 introduced in 53ea23128e
2015-08-21 08:44:09 +01:00
Ian Cordasco
c7c26fb8eb Merge pull request #2730 from bmispelon/doc-codeblock-fix
Fixed minor rendering issue in documentation code blocks
2015-08-15 15:02:06 -05:00
Baptiste Mispelon
7197afa887 Fixed minor rendering issue in documentation code blocks 2015-08-15 21:56:24 +02:00
Cory Benfield
3cf4ec41b9 Merge pull request #2729 from smiley/patch-1
Add own name to "AUTHORS" after PR #2724
2015-08-15 14:42:21 -04:00
Smiley Barry
2411b1f56a Added name to AUTHORS after PR #2724 2015-08-15 21:00:13 +03:00
Ian Cordasco
53ea23128e Merge pull request #2706 from ak1r4/fix-merge-setting
Fix merge setting for not preserving original order of dict parameters
2015-08-15 10:39:46 -05:00
Cory Benfield
fdc76f12e5 Merge pull request #2728 from lukasgraf/docs-fix-timeout-links
Docs: Fix links to `timeouts` section by using :ref:
2015-08-15 09:24:20 -04:00
Lukas Graf
f40bd0f707 Docs: Fix links to timeouts section by using :ref: instead of
linking to .html files.
2015-08-15 12:03:05 +02:00
Cory Benfield
98a59e4894 Merge pull request #2724 from smiley/master
Add documentation in "More complicated POST requests" (Quickstart) to resolve #2686
2015-08-14 15:30:00 -04:00
Smiley Barry
b1de7e7287 Changed phrasing to be a little clearer. 2015-08-14 17:31:54 +03:00
Smiley Barry
5a9097dc4b Update quickstart.rst
Added note about the `json` parameter in `requests.post`.
2015-08-14 17:15:51 +03:00
Cory Benfield
b6127ca9ca Ignore empty fields in no_proxy 2015-08-13 15:04:49 -04:00
Ian Cordasco
408d75d47a Merge pull request #2713 from lukasgraf/master
Docs: Clarify that method-level parameters are not persisted in sessions.
2015-08-07 20:18:21 -05:00
Lukas Graf
1bb91653cc Docs: Clarify that method-level params are not persisted in sessions. 2015-08-08 01:57:06 +02:00
Kenneth Reitz
313143959e Merge pull request #2712 from lukasgraf/master
Document use of sessions as context managers
2015-08-07 16:41:21 -04:00
Lukas Graf
8f3ddbeefb Mention connection pooling in session docs. 2015-08-07 20:48:07 +02:00
Lukas Graf
75c1776bde Document use of sessions as context managers. 2015-08-07 20:48:03 +02:00
Cory Benfield
5d7392f140 Merge branch 'fix-merge-setting' of https://github.com/ak1r4/requests into proposed/2.8.0 2015-08-06 19:06:23 -04:00
Akira J
276202f51e Fix merge setting for not preserving original order of dict parameters 2015-08-04 22:47:12 +01:00
Cory Benfield
9b067db19e Merge pull request #2704 from sYnfo/patch-1
Mention SNI being backported to Python2.7.9 in FAQ
2015-08-04 09:54:30 -04:00
Matej Stuchlik
e8a4784c8f Mention SNI being backported to Python2.7.9 in FAQ
That happened as part of PEP 466 - "Network Security Enhancements for Python 2.7"
2015-08-04 15:05:35 +02:00
Cory Benfield
9648301e1e Merge pull request #2680 from peplin/patch-1
Fix docs for passing a list of values for a query string
2015-07-19 10:57:01 +01:00
Christopher Peplin
6648defcdd Fix docs for passing a list of values for a query string
The special `[]` notation at the end of the field name is not necessary to get a field to appear with multiple values in the query string.
2015-07-18 18:50:29 -04:00
Ian Cordasco
873f834fc9 Merge remote-tracking branch 'upstream/master' into proposed/2.8.0 2015-07-18 10:57:34 -05:00
Ian Cordasco
31817b66c6 Fix pool connection closed test 2015-07-18 10:57:28 -05:00
Cory Benfield
b4c1feac43 Merge pull request #2679 from sigmavirus24/bug/2668
Remove broken CaseInsensitiveDict repr test
2015-07-18 16:48:26 +01:00
Ian Cordasco
b8a297baab Remove broken CaseInsensitiveDict repr test
Fixes #2668
2015-07-18 10:47:26 -05:00
Ian Cordasco
d0aecb271f Merge pull request #2506 from Lukasa/chunkeddocs
Expand on chunked handling.
2015-07-18 10:44:31 -05:00
Ian Cordasco
d7026bfb2a Upgrade urllib3 to 7fcfcd08a6a2150f93144d111904d1e4fb65c909 2015-07-18 10:43:26 -05:00
Cory Benfield
2b5cdc56f3 Expand on chunk length 2015-07-18 16:41:29 +01:00
Ian Cordasco
77d7e53c12 Merge branch 'auth-digest-multi-thread' of https://github.com/exvito/requests into proposed/2.8.0 2015-07-18 10:38:58 -05:00
Ian Cordasco
1e640c8456 Merge branch 'debian-imports' of https://github.com/untitaker/requests into proposed/2.8.0 2015-07-18 10:38:30 -05:00
Susan Tan
5ec7576f23 Catch and wrap ClosedPoolError
Partially resolves #1572: "urllib3 exceptions passing through requests
API".

Inspired from Lukasa's 2605be11d82d42438ac7c3993810c955bde74cef.
2015-07-17 01:30:51 -07:00
Ian Cordasco
0be38a0c37 Merge pull request #2672 from petedmarsh/fix-custom-headers-example
Fix quickstart "Custom Headers" example intro
2015-07-15 20:51:06 -05:00
Peter Marsh
beaa7e4180 Fix quickstart "Custom Headers" example intro
Previously this section prefaced an example with:

    For example, we didn't specify our content-type

But, the actual example set a custom user-agent header on the request. This
changes it to say "user-agent" instead which matches the given example.
2015-07-15 23:31:21 +01:00
Cory Benfield
2b26489f74 Merge pull request #2666 from gvangool/extra_tests
Adds extra tests for CaseInsensitiveDict
2015-07-14 07:57:58 +01:00
Gert Van Gool
3b325f1bc5 assert that the copy() is not the original 2015-07-14 08:10:13 +02:00
Gert Van Gool
47e71d1774 Don't test the NotImplemented, just make sure it's False 2015-07-13 15:07:38 +02:00
Gert Van Gool
147a305da8 Adds extra tests for CaseInsensitiveDict
- Test for NotImplemented in __eq__
- Adds test for copy()
- Adds test for __repr__()
2015-07-13 14:33:50 +02:00
Ian Cordasco
2440b6f089 Merge pull request #2661 from Lukasa/timeouts_are_tricky
Only pass useful timeouts to _get_conn
2015-07-04 15:19:37 -05:00
Cory Benfield
e9a1e35f89 Only pass useful timeouts to _get_conn 2015-07-03 17:00:38 +01:00
Cory Benfield
e4d59bedfd Merge pull request #2656 from dpursehouse/get_netrc_auth_errors
Allow get_netrc_auth to raise parse/permission errors to caller
2015-06-29 08:24:21 +01:00
David Pursehouse
884cb7a7fb Change ignore_errors to raise_errors in get_netrc_auth
Change-Id: Ib82c7c614edafc15e5db858d9c1b9a73aebd8a95
2015-06-29 12:22:57 +09:00
David Pursehouse
a560e09427 Allow get_netrc_auth to raise parse/permission errors to caller
If the netrc file exists but cannot be parsed or read, get_netrc_auth
silently fails.

Add a new argument `ignore_errors` which when set to False will cause
any parse/permission errors to be raised to the caller.  The default
value is True, which means the default behavior is unchanged.

Fixes #2654

Change-Id: I7436aaaf593178673ab84fd9e7ab4bcb0e3fe75e
2015-06-29 10:56:51 +09:00
Ian Cordasco
f5dacf8446 Merge pull request #2648 from msabramo/display_url_for_exceptions
Display URL as part of HTTP error messages
2015-06-22 16:16:28 -05:00
Marc Abramowitz
e3bdec5934 Display URL as part of HTTP error messages
It seems convenient to include the URL in the error message in case you
get an unexpected error.

E.g.:

    In [1]: import requests

    In [2]: resp = requests.get('http://www.google.com/eofdfdfdfdfd')

    In [3]: resp
    Out[3]: <Response [404]>

    In [4]: resp.raise_for_status()
    ---------------------------------------------------------------------------
    HTTPError                                 Traceback (most recent call last)
    <ipython-input-4-00e7077cfb5b> in <module>()
    ----> 1 resp.raise_for_status()

    /Users/marca/dev/git-repos/requests/requests/models.py in raise_for_status(self)
        835
        836         if http_error_msg:
    --> 837             raise HTTPError(http_error_msg, response=self)
        838
        839     def close(self):

    HTTPError: 404 Client Error: Not Found for url: http://www.google.com/eofdfdfdfdfd
2015-06-22 13:22:59 -07:00
Ian Cordasco
9bbab338fd Merge pull request #2640 from Lukasa/issue/2636
Avoid double releasing chunked upload connections
2015-06-13 08:54:40 -05:00
Cory Benfield
2e62df456a Avoid double releasing chunked upload connections
Resolves #2636
2015-06-13 08:10:53 +01:00
Cory Benfield
8b5e457b75 Merge branch 'colindickson-master' 2015-05-26 20:54:51 +01:00
colin
fd31453aa2 fix unittest typo 2015-05-26 20:53:31 +01:00
Ian Cordasco
a92a2a4263 Merge pull request #2615 from awiddersheim/docs/add_section_labels
Docs: Add more section labels for referencing
2015-05-26 09:12:33 -05:00
Andrew Widdersheim
7ba130a0cb Docs: Add more section labels for referencing
Allows for sections to be linked from other projects using Intersphinx.
2015-05-26 09:16:24 -04:00
Cory Benfield
dfdf371a0f Merge pull request #2610 from colindickson/master
fix contextlib.closing bug for sessions where content is not consumed…
2015-05-25 18:15:57 +01:00
colin
f608547bef Merge remote-tracking branch 'origin/master'
Conflicts:
	test_requests.py
2015-05-24 15:02:36 -04:00
colin
1da62a65d9 fix contextlib.closing bug for sessions where content is not consumed (issue #2593) 2015-05-24 15:01:34 -04:00
colin
8d0889b91b fix contextlib.closing bug for sessions where content is not consumed (issue #2593) 2015-05-24 09:59:35 -04:00
Cory Benfield
3c850b3339 Merge pull request #2608 from radarhere/patch-1
Fixed typos
2015-05-21 09:16:24 +01:00
Andrew Murray
d249c0a9c6 Fixed typo in contributing.rst 2015-05-21 10:31:42 +10:00
Andrew Murray
d866d8a44d Fixed typos in HISTORY.rst 2015-05-21 10:25:42 +10:00
Ian Cordasco
ab1f493c8b Merge branch 'max-age-pr' 2015-05-15 10:13:42 -05:00
latyas(懒)
dd0f164f8e Update cookies.py 2015-05-15 10:13:06 -05:00
Cory Benfield
059e105f8f Use complexjson everywhere 2015-05-15 10:13:06 -05:00
Cory Benfield
395a3e8885 Partially revert ab84f9be57 2015-05-15 10:13:06 -05:00
latyas(懒)
d3bd3630ee max-age may be not digits 2015-05-15 10:16:35 +08:00
Ian Cordasco
639f8347a3 Merge pull request #2598 from Lukasa/not-poor
Partially revert ab84f9be57
2015-05-14 17:32:19 -05:00
Cory Benfield
553907aa6b Use complexjson everywhere 2015-05-14 22:30:24 +01:00
Cory Benfield
fb6dade63d Partially revert ab84f9be57 2015-05-14 20:58:20 +01:00
latyas(懒)
cda95d3cde morsel['max-age'] may be a str.
Example:

here are Set-Cookie list:
```python
sclst = ['dwac_bcIBMiaagZmkYaaadeYtg11eVR=j9jHdmPjUhgDOhyH9f89X4lQgehEmflVyeA%3D|dw-only|||CNY|false|Asia%2FShanghai|true; Path=/',
 'sid=j9jHdmPjUhgDOhyH9f89X4lQgehEmflVyeA; Path=/',
 'geoLocation=CN; Path=/',
 'dwpersonalization_fae107a9dd0fc32ed99532ec1977f31f=bc8sEiaagZqRsaaadk8XoNTL8h20150506; Expires=Sun, 14-Jun-2015 10:37:07 GMT; Path=/',
 'dwanonymous_fae107a9dd0fc32ed99532ec1977f31f=abjpA8kng31LjPp8ZEERDT4XVg; Version=1; Comment="Demandware anonymous cookie for site Sites-abercrombie_cn-Site"; Max-Age=15552000; Expires=Tue, 10-Nov-2015 10:37:07 GMT; Path=/',
 'myStore=91156; Path=/',
 'AF_PREF=en_CN; Path=/',
 'dwsid=MiHJy3KYZKDcN0lZg4HS1zSpj1VV4s_tFu39ar0KXNpAx9aX8X2LlvZQ9m5fOOknb6QXtmmukHcOjmivYf31hg==; path=/; HttpOnly']
```

```python
    for sc in sclst:
        C = Cookie.SimpleCookie(sc)
        for morsel in C.values():
            cookie = requests.cookies.morsel_to_cookie(morsel)
            cookiejar.set_cookie(cookie)
```
Then, exception occured
```shell
  File "/Library/Python/2.7/site-packages/requests/cookies.py", line 402, in morsel_to_cookie
    expires = time.time() + morsel['max-age']
TypeError: unsupported operand type(s) for +: 'float' and 'str'
```

As Cookie.SimpleCookie is in STL, should `morsel_to_cookie` check the type of `max-age`? On the other hand, if **max-age** can not be converted to float, it's illegal obviously.
2015-05-14 18:44:33 +08:00
Cory Benfield
c3c4c96a95 Merge pull request #2601 from sahutd/issue2599
Auth handler calls close instead of raw.close_conn
2015-05-14 07:15:10 +01:00
Saimadhav Heblikar
86aff09103 Auth handler calls close instead of raw.close_conn 2015-05-14 11:42:07 +05:30
Cory Benfield
4505f71829 Merge pull request #2597 from t-8ch/defensive_programming
do not blindly catch all AttributeErrors
2015-05-13 07:16:44 +01:00
Thomas Weißschuh
c6c8d649af do not blindly catch all AttributeErrors
see shazow/urllib3#618
2015-05-12 23:21:03 +00:00
Kenneth Reitz
868625532d Merge remote-tracking branch 'origin/master' 2015-05-06 12:42:47 -07:00
Kenneth Reitz
74609c5c8f cleanup styles a bit 2015-05-06 12:42:43 -07:00
Kenneth Reitz
ab84f9be57 removed poor code 2015-05-06 12:36:26 -07:00
Kenneth Reitz
3475399a47 fix captilization 2015-05-06 12:35:14 -07:00
Ian Cordasco
a6937534ce Merge pull request #2588 from gutworth/patch-1
use reST link syntax
2015-05-03 21:18:37 -05:00
Benjamin Peterson
ba7975fd16 use reST link syntax 2015-05-03 20:34:09 -04:00
Cory Benfield
b7bd297340 v2.7.0 2015-05-03 15:47:20 +01:00
Cory Benfield
ee7389da98 Synchronize urllib3 to 1.10.4 2015-05-03 15:16:07 +01:00
Cory Benfield
6acca21bae Merge pull request #2582 from mhavard999/master
Make docstring of api.get more clear
2015-05-01 06:59:46 +01:00
Matt Havard
6e9ebc06d1 Make docstring of api.get more clear 2015-04-30 23:54:34 -04:00
Kenneth Reitz
ff71b25efc release and version history 2015-04-25 17:50:03 -04:00
Kenneth Reitz
c8004e3dd7 Merge remote-tracking branch 'origin/master' 2015-04-25 17:49:14 -04:00
Kenneth Reitz
e859204554 new community 2015-04-25 17:49:12 -04:00
Kenneth Reitz
5d722bd0f5 Merge pull request #2570 from sigmavirus24/release-process-docs
Add new release process to docs
2015-04-25 17:46:31 -04:00
Kenneth Reitz
1f85ce8670 be cordial 2015-04-25 17:44:25 -04:00
Kenneth Reitz
51938de6b7 improve contributing section 2015-04-25 17:42:48 -04:00
Kenneth Reitz
535c51f548 style of contributing.rst 2015-04-25 17:36:14 -04:00
Kenneth Reitz
09023f5894 Merge pull request #2572 from Lukasa/contribution
Add basic contributing guide
2015-04-25 17:34:45 -04:00
Cory Benfield
9dba203952 Add basic contributing guide 2015-04-25 21:39:00 +01:00
Ian Cordasco
f74fc486be Update version number examples. Strip whitespace
Also I've included a bit more verbiage around why a major release
would happen and some reassurances that they will be rare.
2015-04-25 09:29:40 -05:00
Ian Cordasco
773e730d80 Add new release process to docs
Closes #2569
2015-04-24 19:28:23 -05:00
Markus Unterwaditzer
93216afbaf Add information about the package stub 2015-04-24 15:29:19 +02:00
Markus Unterwaditzer
b7fc3a1250 Import aliases for Debian
Alternative to #2375
2015-04-24 12:05:19 +02:00
Ian Cordasco
ca66267d2c Add release notes for 2.6.2
Closes #2561
2015-04-23 11:29:10 -05:00
Ian Cordasco
73b9b6906d Update urllib3 to 7b82da0fa3a13514d11a863e379e7541d0ec46ef 2015-04-23 11:27:42 -05:00
Ian Cordasco
3880cf1255 Merge pull request #2556 from sigmavirus24/release/2.6.1
Prepare v2.6.1
2015-04-22 17:12:26 -05:00
Ian Cordasco
ae7c28eb8e Update notes for 2.6.1 2015-04-22 16:52:40 -05:00
Ian Cordasco
3e3fc7683c Remove VendorAlias meta_path hook 2015-04-22 16:26:14 -05:00
Cory Benfield
3d339ed7e6 Update urllib3 to 0b744993
(cherry picked from commit df63ee3e13672caa6b3256c6579fa85caefb2729)
2015-04-22 13:16:12 -05:00
Ian Cordasco
cfb9e66b04 Update history and version number for v2.6.1 2015-04-22 09:10:48 -05:00
Ian Cordasco
5fcd843eb2 Update urllib3 to 10b7a0fefa6596f47a9a6afc80f1f4d1ae950b66 2015-04-22 08:17:39 -05:00
Kenneth Reitz
1f0e5775f2 add betamax 2015-04-21 17:18:04 -04:00
Kenneth Reitz
4cfc5bcd96 add @sigmavirus42's blog post 2015-04-21 17:15:51 -04:00
Cory Benfield
b906c04a6f Merge pull request #2553 from sigmavirus24/bug/2552
Simplify PreparedRequest.prepare API
2015-04-21 06:59:55 +01:00
Ian Cordasco
35045e851a Simplify PreparedRequest.prepare API
Do not require that hooks be passed as an empty list to
PreparedRequest.prepare. In the event hooks is None in prepare or
prepare_hooks, use an empty list as a default.

Related to #2552
2015-04-20 20:13:58 -05:00
Kenneth Reitz
16eeee1436 and extensions 2015-04-17 08:52:47 -04:00
Kenneth Reitz
576e18a796 recommended packages and extensions 2015-04-17 08:51:02 -04:00
Kenneth Reitz
d0e64d32ba Merge pull request #2550 from Lukasa/recommended
Recommended packages.
2015-04-17 08:44:38 -04:00
Cory Benfield
a0d9e0bc57 Merge pull request #2504 from pvanderlinden/bug/2503-resolve-redirect-pass-all-arguments
fix resolve redirect to pass all original arguments
2015-04-16 06:57:56 +01:00
Kenneth Reitz
5a799dd0f5 Merge pull request #2546 from Lukasa/crystals
Keepers of the Three Crystals.
2015-04-14 14:03:08 -04:00
Cory Benfield
8cf5e67041 Recommended packages. 2015-04-13 11:39:23 -04:00
Ian Cordasco
a0632d8df0 Minor formatting change 2015-04-10 22:03:26 -05:00
Ian Cordasco
5478dd6271 Merge pull request #2547 from sh1buy/bug_2540
Fix MisssingSchema error message does not handle unicode input correctly #2540
2015-04-10 21:59:13 -05:00
sh1buy
599f834351 fix bug 2540 2015-04-11 03:29:21 +03:00
sh1buy
f02d0f9e79 Fix bug 2540 2015-04-11 01:41:02 +03:00
sh1buy
f89b5a5d90 fix bug 2540 2015-04-11 00:23:07 +03:00
Cory Benfield
0cd9f5855e Keepers of the Three Crystals. 2015-04-10 14:40:52 -04:00
Kenneth Reitz
ccc03b93ef Test 2015-04-10 13:22:14 -04:00
Kenneth Reitz
b0c008c593 Merge pull request #2536 from smiley/master
Document that "PreparedRequest.prepare_cookies" can only be called once
2015-04-06 18:29:17 -04:00
Cory Benfield
a57c87a459 Merge pull request #2535 from sigmavirus24/bug/2530
Fix build version number in metadata
2015-04-06 17:54:22 -04:00
Smiley Barry
e3c7b43fc9 #2532: Documented strange behaviour in "PreparedRequest.prepare_cookies", caused by cookielib. Also documented a workaround if absolutely necessary. 2015-04-06 21:00:51 +03:00
Ian Cordasco
956ec8321a Merge pull request #2427 from luozhaoyu/master
Bug fix: field uri in digest authentication should not be empty when enc...
2015-04-06 10:19:15 -05:00
Cory Benfield
0581f2c7d2 Merge pull request #2533 from sigmavirus24/bug/2465-2
Place VendorAlias first in meta_path
2015-04-06 07:19:15 -04:00
Cory Benfield
1ff9a05181 Merge pull request #2534 from sigmavirus24/bug/2527
Copy a PreparedRequest's CookieJar reliably
2015-04-06 07:15:55 -04:00
Ian Cordasco
36093e69c7 Copy a PreparedRequest's CookieJar reliably
When a PreparedRequests's cookie jar is not a RequestsCookieJar instance, it
will not have a "copy" method. By adding _copy_cookie_jar we can reliably copy
cookie jars so that we have an actual copy instead of the same instance on
different prepared requests.

This also updates the RequestsCookieJar.update logic to create copies of
cookies from the other jar.

Closes #2527
2015-04-05 21:49:52 -05:00
Ian Cordasco
dacf69a16d Fix build version number in metadata
Closes #2530
2015-04-05 21:49:10 -05:00
Ian Cordasco
1b5bfe681b Place VendorAlias first in meta_path
When other libraries or tools add items to the meta_path, we need to preempt
some of their import hooks to be sure modules can be properly found. This also
prevents problems importing built-in modules on Python 2 where it will first
attempt to import something like:

    requests.packages.chardet.sys

By placing our VendorAlias first, the above will fail and then it will fall
back to trying to import sys directly instead.

Closes #2465
2015-04-05 20:48:36 -05:00
Cory Benfield
18e678c1f8 Merge pull request #2531 from benjaminran/issue2062
Issue 2062: Updated custom header precedence info with .netrc example
2015-04-05 23:33:29 +01:00
benjaminran
1b1866934b updated custom header precedence info with .netrc example 2015-04-05 14:23:10 -07:00
exvito
5a69137ac8 Issue #2334 - HTTPDigestAuth - Renamed thread local attribute
Per @sigmavirus24 suggestion: private and more readable.
2015-04-04 14:25:08 +01:00
exvito
36dea43406 Issue #2334 - HTTPDigestAuth - Improved per-thread state init
Inspired in @tardyp approach.
2015-04-03 17:04:33 +01:00
Cory Benfield
d294de38c4 Merge pull request #2525 from benjaminran/issue2062
Issue 2062: Added custom header precedence info
2015-04-03 16:57:54 +01:00
Pierre Tardy
142e24de7b digestauth: threadsafe test
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
2015-04-03 16:32:39 +01:00
benjaminran
898465756a added custom header precedence info 2015-04-03 07:58:42 -07:00
exvito
e8d9bc55bc Issue #2334 - HTTPDigestAuth - All state now in thread local storage
Following feedback from tardyp and @vincentxb.
2015-04-03 14:21:29 +01:00
exvito
e65360dbaf Issue #2334 - HTTPDigestAuth - Replace getattr utilization
Following Lukasa + kennethreitz suggestion.
2015-04-02 21:29:51 +01:00
exvito
845e8f943f Issue #2334 - HTTPAuthDigest - Making it thread-safe
The existing code counts the number of 401 responses in the num_401_calls
authenticator attribute. This is in place so as to ensure the necessary auth
header is sent, while avoiding infinite 401 loops (issue #547).

This commit makes num_401_calls an instance of threading.local() (previously
an integer), using num_401_calls.value as the counter.

It ensures that concurrent authentication requests get each their own counter
and behave as expected (otherwise every other concurrent request would have
its authentication fail).
2015-04-02 14:24:54 +01:00
Kenneth Reitz
0ad075c430 Update index.rst 2015-03-31 12:44:50 -04:00
Ian Cordasco
460caf71a4 Merge pull request #2518 from deronnax/shorter_version_extraction
shorter and faster version extraction from __init__.py
2015-03-27 07:49:29 -05:00
Cory Benfield
452ba32edf Merge pull request #2497 from Lukasa/secprocess
Requests security release policy
2015-03-27 11:03:41 +00:00
Paul van der Linden
587eb193dd fix resolve redirect to pass all original arguments 2015-03-26 19:57:16 +00:00
deronnax
1145fe64a5 matching the version only at the begining of lines 2015-03-26 15:53:19 +01:00
deronnax
ce234d53a5 shorter and faster version extraction from __init__.py 2015-03-25 18:21:34 +01:00
Cory Benfield
e95e173b8c Merge pull request #2514 from kennethreitz/revert-2513-master
Revert "Minor Patch TypeError thrown"
2015-03-23 15:13:14 +00:00
Ian Cordasco
b2ce5be9d0 Revert "Minor Patch TypeError thrown" 2015-03-23 10:11:13 -05:00
Cory Benfield
a0f5776f35 Merge pull request #2513 from Montycarlo/master
Minor Patch TypeError thrown
2015-03-23 06:18:48 +00:00
Josh Brown
1b5317ea08 Minor Patch TypeError thrown 2015-03-23 16:01:48 +11:00
Ian Cordasco
8dda20f8e3 Merge pull request #2512 from Lukasa/elapsed
Expand on what 'elapsed' means.
2015-03-22 14:51:17 -05:00
Cory Benfield
54791d1970 Expand on what 'elapsed' means. 2015-03-21 16:27:21 +00:00
Cory Benfield
b7e3370762 'At least' 2015-03-18 21:40:03 +00:00
Cory Benfield
84cc36017a Expand on chunked handling. 2015-03-18 21:31:55 +00:00
Cory Benfield
bedd2be0a7 Clarify that we ship patches early. 2015-03-18 21:27:20 +00:00
Cory Benfield
b974cd3741 Describe our new vulnerabilities process. 2015-03-17 20:07:28 +00:00
Cory Benfield
86f9b1616a Merge pull request #2501 from yasoob/master
Added myself to authors.rst
2015-03-16 20:31:09 +00:00
M.Yasoob Ullah Khalid ☺
dfa0a2925f added myself to authors.rst 2015-03-17 01:29:33 +05:00
M.Yasoob Ullah Khalid ☺
81d2d5535a Merge pull request #1 from kennethreitz/master
Only for me
2015-03-17 01:25:05 +05:00
Cory Benfield
cd3f7eb388 Merge pull request #2493 from yasoob/master
made the quickstart more reader friendly
2015-03-15 18:39:54 +00:00
M.Yasoob Ullah Khalid ☺
3711e04f37 edited the useragent string 2015-03-15 22:42:43 +05:00
Cory Benfield
8c6d82a244 Merge pull request #2496 from Lukasa/cve
Update 2.6.0 changelog with CVE number CVE-2015-2296
2015-03-15 11:50:51 +00:00
Cory Benfield
3385c78999 Update 2.6.0 changelog with CVE number. 2015-03-15 11:49:32 +00:00
M.Yasoob Ullah Khalid ☺
6e2f1eb402 made the quickstart more reader friendly. Closes #2418 2015-03-15 01:02:09 +05:00
Ian Cordasco
fa338da717 Merge pull request #2492 from sigmavirus24/release/v2.6.0
Bump version and add release notes for 2.6.0
2015-03-14 11:43:32 -05:00
Ian Cordasco
80a3e87bf3 Bump version and add release notes for 2.6.0 2015-03-14 11:42:38 -05:00
Ian Cordasco
bbbd9de6fd Merge pull request #2472 from scholer/master
Avoid data duplication when creating a Request with str/bytes/bytearray input
2015-03-14 07:43:17 -05:00
Ian Cordasco
e776bb2656 Merge pull request #2489 from Lukasa/cookiebad
Don't label cookies for the target domain.
2015-03-14 07:05:48 -05:00
Cory Benfield
f7c85685a8 Add explanatory comment for cookie change 2015-03-14 11:29:05 +00:00
Cory Benfield
8a2fd7ce6d Merge pull request #2486 from sigmavirus24/bug/2462
Extract version from requests/__init__.py instead of importing requests
2015-03-14 11:20:33 +00:00
Cory Benfield
76f7ce8a24 Merge pull request #2487 from ulope/return_type
Add return type field to entry-point docstrings
2015-03-14 11:19:12 +00:00
Ulrich Petri
573d460aa7 Add return type field to entry-point docstrings
Fixes: #2483
2015-03-14 10:49:32 +01:00
Cory Benfield
3bd8afbff2 Don't ascribe cookies to the target domain. 2015-03-14 08:49:55 +00:00
Ian Cordasco
1acc4992d4 Parse version number out of requests/__init__.py
With the new import machinery in requests/packages/__init__.py people
using `python setup.py test` will not be able to run the tests the first
time on a new environment. The VendorAlias logic breaks the import
machinery and the tests fail. By removing the import of requests in
setup.py, we avoid the issue where sys.meta_path continues to have the
version of VendorAlias from the import in setup.py.

Closes #2462
2015-03-13 21:47:29 -05:00
Cory Benfield
bc746e158c Merge pull request #2485 from sigmavirus24/bug/shazow/urllib3/567
Import urllib3's Retry location from the right place
2015-03-12 06:50:33 +00:00
Ian Cordasco
c4bd6ea150 Import urllib3's Retry location from the right place
Importing from urllib3's top-level location causes the namespace to be
urllib3.util.retry.Retry instead of
requests.packages.urllib3.util.retry.Retry. Without this fix, an using
requests with an un-vendored version of urllib3 will break when urllib3's
retry handling kicks in.

Closes shazow/urllib3#567
2015-03-11 20:52:12 -05:00
Ian Cordasco
9adaae6785 Merge pull request #2482 from sigmavirus24/update-urllib3
Update urllib3 to 43b5b2b452e4344374de7d08ececcca495079b8d
2015-03-11 09:52:11 -05:00
Ian Cordasco
a0790f37b7 Update urllib3 to 43b5b2b452e4344374de7d08ececcca495079b8d 2015-03-10 19:34:34 -05:00
Cory Benfield
14b653ab3c Merge pull request #2478 from plaes/iter-lines
Document Response.iter_lines() deficiencies
2015-03-07 10:03:42 +00:00
Priit Laes
4497a26c37 Document Response.iter_lines() reentrancy issues 2015-03-07 12:00:41 +02:00
Priit Laes
62200cb07e Add testcase to demonstrate r.iter_lines() reentrancy issue 2015-03-07 12:00:37 +02:00
Ian Cordasco
c53aa08cce Merge pull request #2429 from kennethreitz/sigmavirus24/docs/support
Update support documentation to be more accurate
2015-03-04 16:20:33 -06:00
Cory Benfield
bcfcd9f980 Add Lukasa's GPG key fingerprint. 2015-03-04 20:16:25 +00:00
Rasmus Scholer (TimelineX)
ec700a9a13 Avoid duplicating files data when creating a Request with str/bytes/bytearray in the files argument. 30-40% performance improvement. 2015-03-04 10:21:38 -05:00
Ian Cordasco
e7ac8ea0c1 Add PGP Key fingerprints 2015-03-04 08:11:39 -06:00
Ian Cordasco
39e49e5fb9 Merge pull request #2466 from sigmavirus24/bug/2465
Only add VendorAliases for vendored dependencies
2015-03-04 07:49:12 -06:00
Ian Cordasco
61f4faae70 Merge pull request #2468 from scholer/master
Support for bytearray when creating Request with files argument, just like str and bytes.
2015-03-03 14:01:31 -06:00
Rasmus Scholer (TimelineX)
1887f32b17 test_can_send_bytes_bytearray_objects_with_files test now uses string input, not float. 2015-03-03 14:37:39 -05:00
Rasmus Scholer (TimelineX)
326f77d57c Created test case for using bytes and bytearray objects with files argument to Request. 2015-03-03 03:41:00 +01:00
Rasmus Scholer (TimelineX)
11b12c3e07 models.RequestEncodingMixin._encode_files now takes bytearray as fp in addition to the currently supported bytes and str input. 2015-03-03 02:44:52 +01:00
Ian Cordasco
2669f0c0b1 Fix when packages are unvendored
When working these changes back upstream to pip, we realized that the
previous fix wasn't ideal since unvendoring the packages broke the
imports. For example, if urllib3 were unvendored, then the following
would fail:

    from requests.packages import urllib3
2015-02-28 23:04:24 -06:00
Ian Cordasco
9d8a57f2a2 Add a test to ensure the alias does not regress 2015-02-28 20:19:13 -06:00
Ian Cordasco
6ea3f2ada8 Only alias the imports for vendored dependencies
While discussion the issue, Donald Stufft (@dstufft) and I realized the
simplest solution is to simply add an alias per vendored dependency. The
resulting changes are simple and effective. It prevents the issue in
2.5.2 and 2.5.3 where the following would work:

    from requests.packages import webbrowser

This now appropriately raises an ImportError.

Closes #2465
2015-02-28 20:13:46 -06:00
Cory Benfield
461b740db6 Merge pull request #2459 from kennethreitz/release-notes/2.5.3
Update HISTORY and release version for 2.5.3
2015-02-24 16:32:15 +00:00
Ian Cordasco
628474d626 Update HISTORY and release version for 2.5.3 2015-02-24 10:30:17 -06:00
Cory Benfield
de674fc82c Merge pull request #2458 from kennethreitz/revert-2442-certs
Revert "Update certificate bundle."
2015-02-24 16:18:16 +00:00
Ian Cordasco
b58318163c Revert "Update certificate bundle." 2015-02-24 09:44:51 -06:00
Ian Cordasco
d8be2473d1 Update HISTORY and version for v2.5.2 2015-02-23 16:28:42 -06:00
Ian Cordasco
58e513579a Update urllib3 to 29aa09bde9c42cc9a8d79aac47ee3d362b438cca 2015-02-23 16:02:30 -06:00
Ian Cordasco
0b6d2e451b Merge pull request #2444 from Yasumoto/urllib_upgrade
Upgrade urllib3 to 490d3a227fadb626cd54a240b9d0922f849914b4
2015-02-23 16:01:06 -06:00
Cory Benfield
6f3c91b834 Merge pull request #2453 from requiredfield/master
document combination of repeated response headers
2015-02-21 10:20:57 +00:00
requiredfield
ed73d9e45d document combination of repeated response headers 2015-02-20 12:20:18 -06:00
Ian Cordasco
5a22d2060f Merge pull request #2450 from iKevinY/shields-badges
Update README to use Shields badges
2015-02-19 20:01:55 -06:00
Kevin Yap
344b51327c Update README to use Shields badges
Shields badges are friendlier to retina displays.
2015-02-19 11:10:55 -08:00
Joe Smith
62df872871 Upgrade urllib3 to 490d3a227fadb626cd54a240b9d0922f849914b4 2015-02-11 11:04:25 -08:00
Ian Cordasco
a5a314e8ee Merge pull request #2442 from Lukasa/certs
Update certificate bundle.
2015-02-10 13:05:56 -06:00
Cory Benfield
b86330d1f1 Update certificate bundle. 2015-02-10 19:03:59 +00:00
Ian Cordasco
69d9594338 Merge pull request #2440 from aquarion/patch-1
Update to use readthedocs.org instead of rtfd.org

The requests-toolbelt link can't mix HTTPS with the short domain rtfd.
2015-02-06 08:02:58 -06:00
Nicholas Avenell
291b6b24b7 Update to use readthedocs.org instead of rtfd.org
https://toolbelt.rtfd.org causes an SSL error because the wildcard SSL cert is for *.readthedocs.org.
2015-02-06 13:46:38 +00:00
Cory Benfield
426493f388 Merge pull request #2438 from colindickson/master
add a timeout value to connection_error_invalid_port test to accelerate failure
2015-02-04 07:01:10 +00:00
Colin Dickson
80aee7a225 add a timeout value to connection_error_invalid_port test to accelerate failure 2015-02-04 21:05:03 -05:00
Colin Dickson
ced6550a25 split test_connection_error into two distinct tests, and changed "unknown url" test URL since fooobarbangbazbing.httpbin.org currently gives a valid response. 2015-02-03 21:23:07 -05:00
Cory Benfield
c7beb703bf Merge pull request #2437 from tomscytale/docs_query_param_array
quickstart: using a list as a value in query params
2015-02-03 10:34:06 +00:00
Tom S
53f33eb473 quickstart: using a list as a value in query params 2015-02-03 09:19:30 +00:00
Cory Benfield
69b7c45c2e Merge pull request #2436 from colindickson/master
Fix for failing test: test_connection_error
2015-02-03 06:50:11 +00:00
Ian Cordasco
e644857877 Fix typo. Use smaller paragraphs. Add CVE list 2015-01-28 20:48:22 -06:00
Ian Cordasco
3a5e2b2f3d Add a missing comma 2015-01-28 08:58:43 -06:00
Ian Cordasco
02f852cc41 Add Cory's twitter account
Added some more detail to the Vulnerability section
2015-01-28 08:58:05 -06:00
Ian Cordasco
ff56e431ad Update support documentation to be more accurate
We were missing instructions to report security vulnerabilities,
and all of the documentation referred to Kenneth as the only
source of support. We were also missing a link to StackOverflow.
2015-01-28 08:16:05 -06:00
Kenneth Reitz
b137472936 Merge pull request #2393 from sigmavirus24/bug/2356
Attempt to quote anyway if unquoting fails
2015-01-27 10:24:34 -08:00
Kenneth Reitz
383b20b023 Merge pull request #2412 from sigmavirus24/remove-cruft
Remove entirely unnecessary and unused bits from requests.compat
2015-01-27 10:24:25 -08:00
Kenneth Reitz
3314eb9a62 Merge pull request #2413 from sigmavirus24/bug/2411
Check that filenames are unicode or bytes
2015-01-27 10:23:18 -08:00
Kenneth Reitz
cf3a7f4945 Merge pull request #2415 from sigmavirus24/bug/2408
Move noncebit to the only place it is used
2015-01-27 10:22:53 -08:00
Zhaoyu Luo
fb1971778f Bug fix: field uri in digest authentication should not be empty when encounter http redirections 2015-01-25 18:11:22 -06:00
Cory Benfield
2f7f6a57f3 Merge pull request #2420 from chriskuehl/master
Replace n-dash in HISTORY to workaround pip bug
2015-01-23 07:19:39 +00:00
Chris Kuehl
74d85d0a2f HISTORY: replace n-dash to workaround pip bug
There exists a problem (maybe a bug?) in pip when using a locale like
`LC_ALL=C` (which is commonly used by CI environments and system
configuration tools such as Puppet), where the PKG-INFO file is decoded
using ascii, raising a UnicodeDecodeError when PKG-INFO contains
non-ASCII characters (such as the n-dash removed by this commit):

> Downloading/unpacking requests from https://pypi.python.org/packages/source/r/requests/requests-2.5.1.tar.gz
>   Downloading requests-2.5.1.tar.gz (443Kb): 443Kb downloaded
>   Running setup.py egg_info for package requests
>
> Exception:
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 104, in main
>     status = self.run(options, args)
>   File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 245, in run
>     requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
>   File "/usr/lib/python3/dist-packages/pip/req.py", line 1014, in prepare_files
>     req_to_install.assert_source_matches_version()
>   File "/usr/lib/python3/dist-packages/pip/req.py", line 359, in assert_source_matches_version
>     version = self.installed_version
>   File "/usr/lib/python3/dist-packages/pip/req.py", line 351, in installed_version
>     return self.pkg_info()['version']
>   File "/usr/lib/python3/dist-packages/pip/req.py", line 318, in pkg_info
>     data = self.egg_info_data('PKG-INFO')
>   File "/usr/lib/python3/dist-packages/pip/req.py", line 261, in egg_info_data
>     data = fp.read()
>   File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
>     return codecs.ascii_decode(input, self.errors)[0]
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8161: ordinal not in range(128)

I'm not able to reproduce this by installing the package directly, only by
installing another package which depends on it (via `install_requires`).

The command I used was `LC_ALL=C /usr/bin/pip-3.2 install --upgrade ocflib`,
with "pip 1.1 from /usr/lib/python3/dist-packages (python 3.2)" (which
is the packaged version for Debian 7).

Although this should probably be addressed ultimately in pip, replacing
this character in HISTORY is a pain-free and pragmatic way to help
developers and system administrators who may be stuck with old versions
of pip for many years to come.
2015-01-22 19:45:49 -08:00
Ian Cordasco
eec44dbbb1 Check that a filename is a basestring instance
Instead of only checking one or another type of string-like object that
we accept, let's be able to check both. Previously, we only checked if
the filename was an instance of the native str type which on Python 2
excluded unicode filenames and bytes-like filenames on Python 3.

Fixes #2411
2015-01-20 20:44:52 -06:00
Ian Cordasco
677bbe30d7 Move noncebit to the only place it is used
Since we only allow for "auth" qop-value, hardcode it

Fixes #2408
2015-01-19 18:50:50 -06:00
Ian Cordasco
f37fe551bb Remove entirely unnecessary and unused bits from requests.compat 2015-01-18 21:17:11 -06:00
Ian Cordasco
751b35c346 Attempt to quote anyway if unquoting fails
Fixes #2356
2015-01-18 21:07:43 -06:00
Ian Cordasco
d2d576b6b1 Update urllib3 to a27758625e4169330fcf965652b1093faf5aaaa2 2015-01-09 20:55:54 -06:00
Kenneth Reitz
a57eacf080 Merge pull request #2375 from sigmavirus24/fix-imports-when-unbundled
Copy pip's import machinery wholesale
2015-01-09 15:38:30 -05:00
Kenneth Reitz
b176ccd481 drawn towards it rather than pushed away 2015-01-08 10:04:58 -05:00
Kenneth Reitz
176b365287 certifi 2015-01-08 10:01:39 -05:00
Kenneth Reitz
09658b80c0 certifi 2015-01-08 09:58:31 -05:00
Kenneth Reitz
ac34e3b346 simpler button 2015-01-08 09:55:40 -05:00
Kenneth Reitz
5549f50258 cleanups 2015-01-08 09:52:56 -05:00
Kenneth Reitz
15597c27cd Requests Pro 2015-01-08 09:52:50 -05:00
Kenneth Reitz
673bd6afce javascripts 2015-01-06 00:56:47 -05:00
Cory Benfield
7612015424 Merge pull request #2395 from shrayasr/happy-new-year
Changing year in all copyright information
2015-01-01 08:28:11 +00:00
Shrayas
892f2560c1 Changing year in all copyright information
- Happy new year! Thanks for this awesome library :)
2015-01-01 09:04:50 +05:30
Kenneth Reitz
2d1ffad80b Merge pull request #2390 from Lukasa/cookiedocs
Clean up cookie docstrings, document cookie jar.
2014-12-24 10:15:37 -05:00
Cory Benfield
101425ebfc Enhance documentation for clarity. 2014-12-24 14:54:49 +00:00
Cory Benfield
f4ec3d2309 Clean up cookie docs and display them. 2014-12-24 14:33:14 +00:00
Ian Cordasco
b83131779c Bump version to 2.5.1 2014-12-23 11:54:01 -06:00
Ian Cordasco
ce5b5fe227 Add release notes for 2.5.1 2014-12-23 11:50:31 -06:00
Ian Cordasco
eccbf4a412 Merge pull request #2389 from sigmavirus24/bug/fix-digest-auth
Fix bug in renegotiating a nonce with the server
2014-12-23 11:40:35 -06:00
Ian Cordasco
86c3ecfd34 Fix bug in renegotiating a nonce with the server
If a session runs long enough (without constant activity) then the server can
expire the nonce the session has negotiated. If that happens the session will
get a new 401 response which we were immediately returning to the user. A user
would then have to essentially reinitialize session.auth each time they get an
unexpected 401.

Also, there's no need for setattr calls when we can simply assign the
attribute on the instance.
2014-12-23 10:40:31 -06:00
Ian Cordasco
bd3cf95e34 Fix error handling on Python 3 2014-12-16 22:49:24 -06:00
Ian Cordasco
386c589ba0 Merge branch 'master' of https://github.com/ContinuousFunction/requests into pr/2344 2014-12-16 22:18:51 -06:00
Cory Benfield
f723ab538f Merge pull request #2382 from daftshady/exception
catch exception more specifically
2014-12-16 09:19:50 +00:00
daftshady
925e975295 catch exception more specifically in Response.ok 2014-12-16 16:55:13 +09:00
ContinuousFunction
4c61fef13f Uncommented test in test_requests.py
Uncommented test_sesion_pickling in test_requests.py and ran the file to
make sure the test passes.
2014-12-15 13:41:10 -05:00
ContinuousFunction
39090cfba6 Merge branch 'master' of https://github.com/kennethreitz/requests 2014-12-15 13:24:06 -05:00
Cory Benfield
d7c0249aa8 Merge pull request #2381 from namlede/patch-1
Fix a typo in a comment
2014-12-15 07:59:47 +00:00
Ben Edelman
01b58ba04e Fix a typo in a comment
I just fixed a minor typo: "throws" is misspelled as "thows".
2014-12-15 01:37:19 -05:00
Ian Cordasco
a8205bb509 Merge pull request #2379 from arthurdarcet/master
utils.guess_filename fails if the given parameter looks like a file object but has a non-string name attribute
2014-12-13 13:49:04 -06:00
Ian Cordasco
da82fb4b1d Give proper attribution to pip 2014-12-12 21:12:31 -06:00
Arthur Darcet
e8d02ea0bb utils.guess_filename fails if the given parameter looks like a file object but has a non-string name attribute
e.g. a cherrypy uploaded file behave like a regular file, except that its name attribute is an int and passing it directly to requests fails because of that
2014-12-12 17:32:43 +01:00
Ian Cordasco
d615405519 Copy pip's import machinery wholesale 2014-12-08 20:48:40 -06:00
Ian Cordasco
e23bf10cf4 Merge pull request #2374 from krvc/fix_link
Updated the broken link to twitter streaming API documentation
2014-12-08 17:46:08 -06:00
rakesh
508f4b1ca5 Updated the broken link to twitter streaming API documentation 2014-12-09 01:59:55 +05:30
Ian Cordasco
1d9bf43def Merge pull request #2373 from frewsxcv/patch-1
Enable GitHub syntax highlighting on README
2014-12-08 12:40:44 -06:00
Corey Farwell
bf2e73522f Enable GitHub syntax highlighting on README 2014-12-08 13:04:27 -05:00
Kenneth Reitz
4e90aa7bd0 Merge pull request #2363 from sigmavirus24/fix-tests
Update tests to work offline
2014-12-02 20:46:10 -08:00
Ian Cordasco
f172b30356 Merge pull request #2365 from sigmavirus24/release/2.5
Release v2.5.0
2014-12-01 17:22:17 -06:00
Ian Cordasco
33b25176b8 Bump version to 2.5.0 2014-12-01 17:03:24 -06:00
Ian Cordasco
9a0ce93935 Add updates for 2.5.0 2014-12-01 17:02:42 -06:00
Ian Cordasco
cf82d4406b Update tests to work offline 2014-12-01 16:21:41 -06:00
Kenneth Reitz
90857b8b59 Merge pull request #2216 from sigmavirus24/retries-take-2
Retries logic
2014-12-01 14:45:27 -05:00
Kenneth Reitz
7aa6c62d6d updatee chardet, urllib3 2014-12-01 14:40:32 -05:00
Kenneth Reitz
53d02381e2 Merge pull request #2349 from sigmavirus24/fix-pickling
Properly serialize RecentlyUsedContainers for cache
2014-11-30 14:12:43 -05:00
Kenneth Reitz
8ae4d02d73 Merge pull request #2348 from danmichaelo/master
Docs: Add more section labels for referencing
2014-11-30 14:12:04 -05:00
Kenneth Reitz
1c4a666b16 Merge pull request #2353 from mattrobenolt/patch-1
url was already parsed, don't urlparse twice
2014-11-30 14:11:52 -05:00
Matt Robenolt
2a5364cf72 url was already parsed, don't urlparse twice 2014-11-23 17:54:44 -08:00
Ian Cordasco
c8baf88125 Properly serialize RecentlyUsedContainers for cache
RecentlyUsedContainers are threadsafe so they require a lock and as such
cannot be serialized with pickle directly. To handle it, we need to
convert it to a dictionary first and then back when deserializing.

Fixes #2345
2014-11-17 22:16:32 -06:00
ContinuousFunction
3246b1fe17 Changed ConnectionError to InvalidURL 2014-11-17 20:06:24 -08:00
Dan Michael O. Heggø
8b03f60278 Docs: Add more section labels for referencing
so sections can be linked from other projects using Intersphinx
2014-11-17 11:39:33 +01:00
ContinuousFunction
087a27aba9 Partially addresses Issue #1572
Addresses the LocationParseError but not the DecodeError from
kennethreitz#1572. When running
test_requests.py, I got an error in test_session_pickling which resulted
in a TypeError. I'm not sure of the reason for the TypeError but I have
commented out that test.
2014-11-15 16:58:25 -08:00
Ian Cordasco
adf475ef82 Update HTTPAdapter docstring 2014-11-12 13:58:03 -06:00
Ian Cordasco
2eb7e3c80b Add last few changes and add a quick test 2014-11-12 13:56:28 -06:00
Ian Cordasco
f54a4e3de1 Update urllib3 to df4ec5cce1 2014-11-12 13:56:28 -06:00
Ian Cordasco
2bc7762cb6 Update how we handle retries to be consistent with documentation 2014-11-12 13:56:28 -06:00
Kenneth Reitz
9dc660269f Merge pull request #2309 from sigmavirus24/add-deprecation-warnings
Add DeprecationWarnings to inform users of plans
2014-11-12 12:36:03 -05:00
Kenneth Reitz
1601387cbe Merge pull request #2308 from kevinburke/read-timeout-retry
Note about read timeout errors and max_retries
2014-11-12 12:35:24 -05:00
Kenneth Reitz
45ef1f8eeb Merge pull request #2332 from asnelzin/fix-2329
Add overriding Content-Length
2014-11-12 12:34:48 -05:00
Kenneth Reitz
e4ddca0f8b Merge pull request #2326 from sigmavirus24/close-functional-sessions
Close sessions created in the functional API
2014-11-12 12:34:14 -05:00
Ian Cordasco
19b8e3042e Merge pull request #2333 from akitada/reinit-pos
Fix HTTPDigestAuth not to treat non-file as a file
2014-11-12 09:53:32 -06:00
Akira Kitada
67c505781c Fix HTTPDigestAuth not to treat non-file as a file
Ensure pos is set to None when the body is not a file
so that HTTPDigestAuth detects the type of the body correctly.
2014-11-13 00:51:35 +09:00
Alexander Nelzin
ee50afef59 Fixed. 2014-11-12 15:35:27 +03:00
Alexander Nelzin
34f6088c8f Added test for overriding Content-Length. 2014-11-12 15:23:23 +03:00
Ian Cordasco
431282e778 Merge pull request #2299 from mattrobenolt/master
Cap the redirect_cache size to prevent memory abuse
2014-11-07 14:18:41 -06:00
Ian Cordasco
3155bc9936 Close sessions created in the functional API
This is related to #1882 and #1685. By calling close on the session, we
clear the PoolManager operated by the Session and close all sockets.

Fixes #1882
Partially-fixes #1685
2014-11-07 08:55:18 -06:00
Ian Cordasco
1c52d15d97 Merge pull request #2323 from Lukasa/strict
Pass strict to urllib3.
2014-11-07 08:12:23 -06:00
Cory Benfield
f28bde7250 Pass strict to urllib3. 2014-11-07 09:19:18 +01:00
Kenneth Reitz
122c92e590 Merge pull request #2253 from yossigo/digest_redirect_fix
A fix for #1979: repeat HTTP digest authentication after redirect.
2014-11-01 10:04:29 -04:00
Kenneth Reitz
124c0940e9 Merge pull request #2317 from sigmavirus24/bug/2316
Use to_native_string instead of builtin_str
2014-11-01 10:04:09 -04:00
Ian Cordasco
29ef108158 Use to_native_string instead of builtin_str
Fixes #2316
2014-10-31 21:20:04 -05:00
Kevin Burke
a703e24573 Update documentation about max_retries to reflect code 2014-10-27 09:56:18 -07:00
Matt Robenolt
387c8f852c Cap the redirect_cache size to prevent memory abuse 2014-10-27 09:20:06 -07:00
Ian Cordasco
091991be0d Merge pull request #2306 from ssadler/fix-failing-test-test_prepare_unicode_url
Fix failing test test_prepare_unicode_url
2014-10-26 19:32:46 -05:00
Ian Cordasco
d505b94fa4 Add DeprecationWarnings to inform users of plans
After a long discussion in IRC and on several issues, the developers of
requests have decided to remove specific functions from requests.utils
in version 3.0.0. To give users ample time to prepare for this, we've
added DeprecationWarnings long in advance. See also the planning of this
in issue #2266.
2014-10-26 19:24:41 -05:00
Kevin Burke
f2f3bdea8d Note about read timeout errors and max_retries 2014-10-26 12:46:23 -07:00
Scott Sadler
583859b820 fix failing test "test_prepare_unicode_url" \(take 3\) 2014-10-26 14:45:12 +01:00
Scott Sadler
8e69c9f0a1 Revert "fix failing test "test_prepare_unicode_url""
This reverts commit 26ed7c2e1d.
2014-10-26 14:41:56 +01:00
Scott Sadler
26ed7c2e1d fix failing test "test_prepare_unicode_url" 2014-10-26 12:49:46 +01:00
Scott Sadler
77687de509 Revert "fix failing test "test_prepare_unicode_url""
This reverts commit cfd6e25749.
2014-10-26 12:40:05 +01:00
Kenneth Reitz
be805f942e Merge pull request #2295 from 2deviant/feature-custom-newline
Adding a custom line delimiter to iter_lines()
2014-10-25 14:33:52 -04:00
Scott Sadler
c044a70796 update AUTHORS 2014-10-25 16:52:02 +02:00
Scott Sadler
cfd6e25749 fix failing test "test_prepare_unicode_url" 2014-10-25 16:51:51 +02:00
Val Tenyotkin
3602690886 Changing parameter name newline ==> delimiter. 2014-10-24 16:37:35 -07:00
Yossi Gottlieb
3d8823cafc Clean up handle_redirect. 2014-10-23 13:46:44 +03:00
Val Tenyotkin
f5ff05be1e Adding a custom line delimiter to iter_lines() 2014-10-21 18:03:11 -07:00
Cory Benfield
6b58a359e8 Merge pull request #2290 from syedsuhail/fix-2282
Fix #2279. Update layout css
2014-10-19 10:42:28 +01:00
syedsuhail
96efb5ec96 Fix #2279. Update layout css 2014-10-19 14:06:02 +05:30
Cory Benfield
e1e1855b85 Merge pull request #2289 from syedsuhail/fix-2288
Fix #2288 . Change urllib3 and chardet workflow
2014-10-19 08:56:36 +01:00
syedsuhail
3a6348dbb9 Fix #2288. Change urllib3 and chardet workflow 2014-10-19 13:18:26 +05:30
Kenneth Reitz
f7ecad843b Merge pull request #2282 from morganthrapp/patch-1
Update sidebarintro.html
2014-10-14 11:22:48 -04:00
morganthrapp
4d498db3ed Update sidebarintro.html
Fix issue #2279. "Gittip" changed to "Gratipay". Tip button extended from 48px to 60px.
2014-10-14 10:56:05 -04:00
Kenneth Reitz
c41eb27091 Merge pull request #2273 from sigmavirus24/add-changelog-to-sidebar
Add Release History to the sidebar
2014-10-12 10:55:34 -04:00
Ian Cordasco
2ac771b35e Merge pull request #2271 from mikecool1000/fix-2250
Fixed #2250
2014-10-10 13:30:18 -05:00
Michael DeLay
8339b60fd5 Made more better 2014-10-10 09:58:30 -07:00
Ian Cordasco
589f2f6d6e Add Release History to the sidebar
Closes #2269
2014-10-09 21:07:05 -05:00
mikecool1000
ce1ac88543 Fixed #2250 2014-10-09 12:22:18 -07:00
mikecool1000
4594667f07 Update utils.py
Fixed -2250
2014-10-08 19:26:07 -07:00
Yossi Gottlieb
6ff6f756c0 Clean up, support all redirects, fix potential endless 401 loop. 2014-10-08 00:06:01 +03:00
Kenneth Reitz
46d646064c v2.4.3 2014-10-06 05:44:25 -04:00
Kenneth Reitz
78d12bbbe9 v2.4.3 2014-10-06 05:42:55 -04:00
Kenneth Reitz
6da438dabd Merge pull request #2268 from sigmavirus24/fix-params
Re-order params for backwards compat
2014-10-06 05:40:03 -04:00
Kenneth Reitz
4ec26da2f7 Merge pull request #2267 from minrk/unicode-url-py2
allow unicode URLs on Python 2
2014-10-06 05:39:54 -04:00
Ian Cordasco
0e4efab270 Re-order params for backwards compat 2014-10-05 18:55:59 -05:00
MinRK
ca2ebc5b68 allow unicode URLs on Python 2
on Python 2 u'é'.decode('utf8') fails with UnicodeEncodeError,
but only AttributeError is caught.

This only calls decode on known bytes objects.
2014-10-05 16:30:11 -07:00
Kenneth Reitz
5850b1f53b Merge pull request #2249 from t-8ch/fix_2247
fix #2247
2014-10-05 13:19:14 -04:00
Kenneth Reitz
779c001e44 requests v2.4.2 2014-10-05 13:15:33 -04:00
Kenneth Reitz
79f56e2e7e fix documentation for utils.get_unicode_from_response() :) 2014-10-05 13:14:38 -04:00
Kenneth Reitz
90dc467fc0 v2.4.2 changelog 2014-10-05 13:13:42 -04:00
Kenneth Reitz
65cdccb70f Merge pull request #2241 from tijko/master
raise RuntimeError when a single streamed request calls *iter methods th...
2014-10-05 12:48:40 -04:00
Kenneth Reitz
1e79cf6a47 Merge pull request #2258 from willingc/add-json
Add json parameter
2014-10-05 12:46:09 -04:00
Cory Benfield
20ca9feeb3 Merge pull request #2265 from sigmavirus24/session-attrs
Remove timeout from __attrs__
2014-10-05 09:05:29 +01:00
Ian Cordasco
b1f3a2dd66 Remove timeout from __attrs__
We do not allow the user to set the timeout value on the Session any longer so
this is extraneous
2014-10-04 23:04:36 -05:00
Kenneth Reitz
e74791d054 Merge pull request #2238 from buttscicles/byte-urls
Support bytestring URLs on Python 3.x
2014-10-02 12:20:05 -04:00
Ian Cordasco
8ed941fa69 Fix a couple of issues I noticed
- Don't _ prefix json in prepare_body
- Don't initialize json to []
- Don't initialize json to {}
- Reorder parameters to PreparedRequest.prepare
- Remove extra parentheses
- Update docstring
2014-09-30 16:03:31 -05:00
Joe Alcorn
a68d1b4517 Support bytestring URLs on Python 3.x 2014-09-30 19:29:10 +01:00
Yossi Gottlieb
c28da22e9c A fix for #1979 repeat HTTP digest authentication after redirect. 2014-09-27 21:05:59 +03:00
Thomas Weißschuh
cd5eb62961 remove unused import 2014-09-26 22:28:29 +00:00
Thomas Weißschuh
6e1db21733 fix #2247
We have to pass urllib3 the url without the authentication information,
else it will be parsed by httplib as a netloc and included in the request line
and Host header
2014-09-25 19:49:28 +00:00
Cory Benfield
a718a81d27 Merge pull request #2248 from jktjkt/docs-CAs
docs: Clarify how to pass a custom set of CAs
2014-09-25 19:28:05 +01:00
Jan Kundrát
3635b1501d docs: Clarify how to pass a custom set of CAs
This new wording makes it hopefully easier to find how to override the
system-provided list of trusted CAs. I failed to find this through some googling
and had to resort to asking on IRC previously.
2014-09-25 20:06:04 +02:00
Kenneth Reitz
de76fbeefb Merge pull request #2244 from sigmavirus24/bug/2231
Avoid getting stuck in a loop
2014-09-24 22:57:38 -04:00
Cory Benfield
e0d88c2814 Merge pull request #2245 from sigmavirus24/doc-fix
Correct redirection introduction
2014-09-23 07:25:26 +01:00
Ian Cordasco
671ba85d41 Correct redirection introduction
The history attribute contains responses, not requests.

Thanks to Yang Yang for reporting this to me via email
2014-09-22 21:08:29 -05:00
Ian Cordasco
ac44b48297 Avoid getting stuck in a loop
This prevents a case where we make a request to URL A, which 301s to B which
would then 301 back to A. Alternatively, for less simple schemes, this will
also prevent us from getting stuck in a loop, e.g., it will prevent the
following from causing an endless loop:

    A -> B -> C -> D -> E -> F --
    ^                             \
    |                             /
    ---<------------<----------<-
2014-09-22 21:01:36 -05:00
Tim Konick
64ba451049 make StreamConsumedError doubly inherit 2014-09-22 15:58:54 -04:00
Tim Konick
6e5f7bb9d3 using the StreamConsumedError 2014-09-22 15:51:59 -04:00
Tim Konick
58e0a6f4a0 add-in StreamConsumedError 2014-09-22 15:51:10 -04:00
Tim Konick
d6470870d0 rm else after if then raise block 2014-09-22 12:46:07 -04:00
Tim Konick
fdf932c61c raise RuntimeError when a single streamed request calls *iter methods than once 2014-09-22 12:04:29 -04:00
Cory Benfield
d28d45af91 Merge pull request #2237 from buttscicles/contributing-update
Remove invoke from requirements.txt, docs
2014-09-20 23:12:38 +01:00
Joe Alcorn
d243668d16 Remove invoke from requirements.txt, docs 2014-09-20 20:56:00 +01:00
Cory Benfield
466a70f7c1 Fixup the remaining references to timeline.json. 2014-09-20 15:00:36 +01:00
Kenneth Reitz
082c8d0db8 Merge pull request #2227 from mjul/master
Added example of how to send multiple files in one request.
2014-09-18 10:06:54 +09:00
Martin Jul
0924069b68 Moved multiple files upload example to advanced section. 2014-09-16 11:54:31 +02:00
Martin Jul
4707d11004 Added example of how to send multiple files in one request. 2014-09-16 11:38:40 +02:00
Ian Cordasco
9b41308b9f Merge pull request #2223 from blueyed/doc-followup-2222
Document skipping in PreparedRequest; followup to #2222
2014-09-12 11:54:40 -05:00
Daniel Hahler
bff8b91638 Document skipping in PreparedRequest; followup to #2222 2014-09-12 18:07:28 +02:00
Cory Benfield
1a44a99f17 Merge pull request #2222 from blueyed/fix-MissingScheme-for-hostport
Add tests to test_invalid_url for `InvalidSchema`
2014-09-12 15:16:11 +01:00
Daniel Hahler
d3566ee1b0 Add more tests to test_invalid_url
This adds tests for the behavior introduced in b149be5d, where
`PreparedRequest` was made to skip `parse_url` for e.g.
`localhost:3128/`.
2014-09-12 16:11:30 +02:00
Kenneth Reitz
9e8702d3d5 lawl 2014-09-09 12:42:00 -04:00
Kenneth Reitz
27b6bfc213 mils 2014-09-09 12:39:36 -04:00
Kenneth Reitz
dff383ce8f requests v2.4.1 2014-09-09 12:34:34 -04:00
Cory Benfield
5e94c81e98 Merge pull request #2210 from sigmavirus24/bug/2207
Fix #2207
2014-09-09 15:24:24 +01:00
Cory Benfield
2416e2343a Merge pull request #2213 from kennethreitz/req-rsp
Request->Response.
2014-09-09 08:45:30 +01:00
Cory Benfield
bf8f791a93 Request->Response. 2014-09-09 08:44:40 +01:00
Ian Cordasco
27c83f7177 Fix #2207
@Lukasa wrote the fix in #2207
2014-09-07 12:02:23 -05:00
Kenneth Reitz
359659cf4b Merge pull request #2203 from Lukasa/remove_certifi
Remove hard certifi dependency and document.
2014-09-05 08:11:57 -07:00
Cory Benfield
9c6ae1dc0b Link to Mozilla trust store. 2014-09-04 19:44:37 +01:00
Kenneth Reitz
0df32de02d Merge pull request #2199 from mtorromeo/patch-1
Open README and HISTORY as utf-8 encoded files (fixes #2196)
2014-09-04 11:41:46 -07:00
Cory Benfield
a77054f90f Remove hard certifi dependency and document. 2014-09-04 19:40:15 +01:00
Kenneth Reitz
1324ca1a0f Merge pull request #2193 from sigmavirus24/bug/2192
Capture and re-raise urllib3 ProtocolError
2014-09-04 11:39:41 -07:00
Kenneth Reitz
209a871b63 Merge pull request #2191 from kevinburke/comma
add trailing comma
2014-09-04 11:39:23 -07:00
Kenneth Reitz
07bbe214aa Merge pull request #2187 from kevinburke/more-docs
Document Timeout behaviour
2014-09-04 11:39:12 -07:00
Kenneth Reitz
958845ae35 requests[security] 2014-09-04 11:37:45 -07:00
Kenneth Reitz
bc2560480e Merge pull request #2195 from sigmavirus24/betterssl
Add betterssl extra
2014-09-04 11:36:56 -07:00
Ian Cordasco
9354855648 Consolidate error handling 2014-09-03 16:01:25 -05:00
Massimiliano Torromeo
226b5c7b0a Open README and HISTORY as utf-8 encoded files (fixes #2196) 2014-09-03 09:40:27 +02:00
Ian Cordasco
ce7957c085 Add test for invalid port 2014-08-29 16:50:45 -05:00
Ian Cordasco
c6a1167e8b Merge remote-tracking branch 'kevinburke/domain-failure-connection-error' into bug/2192 2014-08-29 16:43:51 -05:00
Ian Cordasco
c809867035 Add betterssl extra 2014-08-29 16:39:22 -05:00
Kevin Burke
2c76122a48 Add test that invalid domain raises a ConnectionError 2014-08-29 14:07:28 -07:00
Ian Cordasco
da122231e4 Capture and re-raise urllib3 ProtocolError 2014-08-29 15:16:30 -05:00
Kevin Burke
34ea836d77 tildes 2014-08-29 12:08:03 -07:00
Kevin Burke
59f5a1089a add trailing comma 2014-08-29 12:06:58 -07:00
Kevin Burke
81d6b3e435 s/behavior/behaviour 2014-08-29 11:51:09 -07:00
Kevin Burke
dfa41afd43 Document Timeout behaviour 2014-08-29 11:50:11 -07:00
Kenneth Reitz
95161ed313 v2.4.0 changelog 2014-08-29 10:32:18 -04:00
Kenneth Reitz
1fcda912db Revert "Documentation update : connection keep alive"
This reverts commit 1b2602344f.

Conflicts:
	docs/user/advanced.rst
2014-08-29 10:30:49 -04:00
Carol Willing
0713e09526 Fixes typo in test 2014-08-28 19:42:21 -07:00
Carol Willing
402f3b4993 Changes check on base and json. Fails on tests. 2014-08-28 19:27:45 -07:00
Carol Willing
b34a496649 Adds review changes 2014-08-28 16:45:24 -07:00
Carol Willing
8f17741849 Adds json parameter for POST requests 2014-08-28 12:53:19 -07:00
Kenneth Reitz
d22b8d8e7e 3.4 classifier 2014-08-28 13:10:26 -04:00
Kenneth Reitz
d33ce49aaa keep-alive 2014-08-28 13:05:30 -04:00
Kenneth Reitz
89cb408bb0 v2.4.0 2014-08-28 13:05:23 -04:00
Kenneth Reitz
5f483369aa Merge pull request #2178 from sigmavirus24/env-retrieval
Add Session method to merge environment settings with per-request settings
2014-08-26 15:44:51 -04:00
Kenneth Reitz
7e24176ca1 Merge pull request #2183 from Lukasa/docupdate
Fix #2180.
2014-08-26 15:41:44 -04:00
Cory Benfield
08d8876230 Remove timeline.json from docs. 2014-08-26 20:20:34 +01:00
Ian Cordasco
596ca83f0c Update verify check and doc-string 2014-08-26 14:20:19 -05:00
Ian Cordasco
b4a7906bca Add Session method to merge environment settings with per-request settings 2014-08-26 14:20:19 -05:00
Kenneth Reitz
7a09e727e3 Merge pull request #2174 from kevinburke/test-clarification
Clarify which tests to run in the Makefile
2014-08-26 15:15:28 -04:00
Kenneth Reitz
32e403a908 Merge pull request #2176 from kevinburke/connect
Add support for connect timeouts
2014-08-26 15:13:30 -04:00
Kenneth Reitz
c879873b3e Merge pull request #2179 from kevinburke/urllib3-pypy-ssl
Updates urllib3 to 528ad3c
2014-08-26 15:10:51 -04:00
Kevin Burke
8bbc4fcb57 Updates urllib3 to 528ad3c
This includes fixes for openssl running with Pypy, so SSL connections can be
made if ndg-httpsclient, pyopenssl and pyasn1 are installed.

see also:

- https://github.com/shazow/urllib3/issues/449
- https://github.com/pypa/pip/issues/1988
2014-08-25 13:44:29 -07:00
Kevin Burke
7f236fcc40 woops 2014-08-24 20:22:55 -07:00
Kevin Burke
39b3a436d3 assert connect timeout inheritance 2014-08-24 20:18:05 -07:00
Kevin Burke
8f9ce13e43 ConnectTimeout multiple inheritance 2014-08-24 19:56:57 -07:00
Kevin Burke
f0b9b60f62 revert change 2014-08-24 19:46:46 -07:00
Kevin Burke
c2aeaa3959 Add support for connect timeouts
Modifies the timeout interface to also accept a tuple (connect, read) which
would be used to set individual connect and read timeouts for Requests. Adds
Advanced documentation explaining the interface and providing guidance for
timeout values.
2014-08-23 15:12:29 -07:00
Kevin Burke
024db279c4 clarify comment 2014-08-23 10:10:44 -07:00
Kevin Burke
e70179a620 Clarify which tests to run in the Makefile
If you put your Virtualenv in the same folder as Requests (as I
usually do), py.test will pick up any test_* files inside the
virtualenv and attempt to run them too, leading to the following error:
https://gist.github.com/kevinburke/1aa2b07e01de3a7daa15

Instead specify the test file we would like to run in the Makefile.
2014-08-23 10:02:27 -07:00
Kenneth Reitz
c0322e490b Merge pull request #2172 from ContinuousFunction/master
Add to authors and fix case
2014-08-22 09:04:50 -04:00
Cory Benfield
1c20d01f10 Cleanup grammar from previous commit. 2014-08-22 11:50:37 +01:00
Cory Benfield
391e064b8f Merge pull request #2173 from tychotatitscheff/master
Documentation update : connection keep alive
2014-08-22 11:47:35 +01:00
tat3657
1b2602344f Documentation update : connection keep alive 2014-08-22 10:39:05 +02:00
ContinuousFunction
337b338187 Adding my name to authors 2014-08-21 11:25:29 -07:00
ContinuousFunction
5aa1881959 Adding myself to authors. 2014-08-21 11:16:59 -07:00
ContinuousFunction
8bb8a9a37c Adding my name to authors. 2014-08-21 11:12:36 -07:00
ContinuousFunction
c7e087cf56 Added space and sentence case
Added space and sentence case as requested by sigmavirus24.
https://github.com/kennethreitz/requests/pull/2168
2014-08-21 11:05:02 -07:00
Kenneth Reitz
aa6650a2e7 Merge pull request #2168 from ContinuousFunction/master
Tracking Previous Requests
2014-08-21 13:43:23 -04:00
ContinuousFunction
2fc6e8a894 Update on Tracking Previous Requests
Modified the comment in sessions.py and rewrote the test in
test_requests.py
2014-08-19 10:51:26 -07:00
Kenneth Reitz
53d3cece00 21m 2014-08-19 12:53:26 -04:00
ContinuousFunction
df641e74ff Tracking Previous Requests
Addresses the issue brought up here:
https://github.com/kennethreitz/requests/issues/1929
2014-08-17 19:13:26 -07:00
Kenneth Reitz
35d083e166 Merge pull request #2153 from jschneier/master
handle urllib3 api changes; closes #2045
2014-08-01 21:33:55 -04:00
Josh Schneier
47d0517d66 handle urllib3 api changes; closes #2045 2014-07-29 23:29:21 -04:00
Kenneth Reitz
3eb69be879 Merge pull request #2148 from romanlevin/handle-socket-error-in-iter_content
Handle socket errors in iter_content
2014-07-27 09:59:08 -04:00
Roman Levin
cf01a743af Replace setattr 2014-07-24 23:30:11 +02:00
Roman Levin
9eab9f7415 Handle socket errors in iter_content 2014-07-24 23:00:50 +02:00
Kenneth Reitz
fe693c4922 Merge pull request #2142 from sigmavirus24/urllib3-1.9
Upgrade urllib3 to 1.9.x
2014-07-22 16:21:05 -04:00
Kenneth Reitz
9575d6a6ce Merge pull request #2145 from TkTech/patch-1
Update faq.rst
2014-07-22 16:20:37 -04:00
Tyler Kennedy
35f7bcdaa2 Update faq.rst
Revised wording based on feedback from @sigmavirus24
2014-07-22 13:10:40 -04:00
Tyler Kennedy
57b861148e Update faq.rst
Removed an unnecessary "to" in the "What are "hostname doesn't match" errors?" section.
2014-07-22 12:38:08 -04:00
Cory Benfield
eb2906a65c Merge pull request #2140 from dpursehouse/linkify-usernames
Linkify Github usernames in authors list
2014-07-22 07:57:25 +01:00
Ian Cordasco
170d6269eb Fix test bug courtesy of @shazow 2014-07-21 15:00:14 -05:00
Ian Cordasco
811ee4eb5d Upgrade urllib3 to 1.9.x 2014-07-21 13:37:10 -05:00
Cory Benfield
e66466a331 Merge pull request #2141 from esparta/master
Docs: Using print() function instead print command on advanced & quickstart
2014-07-18 21:17:43 +01:00
Espartaco Palma
698b93b86d Docs: Using print() function instead print command on advanced & quickstart user docs 2014-07-18 11:44:57 -05:00
David Pursehouse
eef4e0836c Add links to Twitter accounts
Change-Id: Ic88eb128384b3cc9108151c219cd759c7524a4f1
2014-07-18 22:46:19 +09:00
Cory Benfield
4c94282fdf Merge pull request #2139 from dpursehouse/line-wrapping
More line wrapping
2014-07-18 10:59:48 +01:00
David Pursehouse
743f38209d Linkify Github usernames in authors list
- Linkify github usernames
- Remove usernames that do not exist

Change-Id: Ib88b70a3010e915b3570ae5062c8cb416c9a6462
2014-07-18 17:00:00 +09:00
David Pursehouse
44e426e4ff More line wrapping
Change-Id: I950c3da727fb97b58d96a872b0d2ed718cc60ba8
2014-07-18 16:35:54 +09:00
Cory Benfield
587a5153f0 Merge pull request #2138 from dpursehouse/more-doc-updates
More doc updates
2014-07-18 08:24:27 +01:00
David Pursehouse
be453ba3c3 Remove empty 'internals' page
The file is empty and not linked from anywhere, resulting in
a warning when building the docs.

Change-Id: Ib995d094ef525496fe8b2a369e0a0c5b4c7bd2dd
2014-07-18 15:19:32 +09:00
David Pursehouse
17852784e8 Remove redundant sentence from quickstart introduction
Change-Id: Ic03aa394941367745f3148d299b5313849f77051
2014-07-18 15:18:20 +09:00
David Pursehouse
c6fa5bb1cd Fix a couple more malformed :meth: and :class: links
Change-Id: Ie38844a40ec7a483e6ce5e56077be344242bcd99
2014-07-18 15:15:54 +09:00
David Pursehouse
49ecffb86e Add authentication classes to the API document
Change-Id: Ic1464f246602b809f3c29fbafd6f36b747d5d5df
2014-07-18 15:15:54 +09:00
Ian Cordasco
999ba49611 Merge pull request #2136 from dpursehouse/greenfeld-not-greenfield
Fix name misspelling
2014-07-16 07:14:36 -05:00
David Pursehouse
f0fb20cd83 Fix name misspelling
Change-Id: Ied3e600e5673eff48558b634b3c2616d13a3337b
2014-07-16 15:13:11 +09:00
Cory Benfield
e25fbc879e Merge pull request #2135 from dpursehouse/fix-meth-and-class-directives
Docs: Fix :class: and :meth: directives
2014-07-16 06:36:40 +01:00
David Pursehouse
2a6303e018 Docs: Fix :class: and :meth: directives
A few instances of the directives were malformed and did not
result in hyperlinks in the generated HTML.

Change-Id: I94d93de928ee4ff24a48797baf2ac77598a20704
2014-07-16 10:50:57 +09:00
Ian Cordasco
d21916c0ff Merge pull request #2134 from nonZero/patch-1
removed unneeded parentheses from if clause
2014-07-15 12:13:09 -05:00
Ian Cordasco
54fc8075e6 Merge pull request #2133 from esparta/master
Update link to pip site on docs/user/install.rst
2014-07-15 12:12:49 -05:00
Udi Oron
6dc13f2194 removed unneeded parentheses from if clause 2014-07-15 19:56:47 +03:00
Cory Benfield
127ab0a9f6 Merge pull request #2131 from dpursehouse/quickstart-doc-updates
Quickstart doc updates
2014-07-15 11:40:28 +01:00
David Pursehouse
a8a4c9828a Restructure "Redirection and History" section in quickstart documentation
Change-Id: Ida38d551e8cd0edaeb92d09de411a6f4a3d0578b
2014-07-15 18:44:13 +09:00
David Pursehouse
f5a2138e8c Minor tidy-ups in quickstart documentation
Change-Id: Ia862c17707a2a76182c549db88821636e8402729
2014-07-15 18:27:50 +09:00
David Pursehouse
cde5a4a5d5 Add Timeout exception in API documentation
The Timeout exception is referenced from quickstart.rst but does
not get hyperlinked.

Change-Id: I69ad881bf9d2475c6239ac7b17f68ddbce0d03cd
2014-07-15 18:27:38 +09:00
Cory Benfield
55df62954b Merge pull request #2130 from dpursehouse/doc-index-updates
Doc index updates
2014-07-15 09:57:47 +01:00
David Pursehouse
504b960fb4 Documentation: Add Sony to list of users
Change-Id: I0568f27562e5d12f7e5e528b216ca1b1e9cd8256
2014-07-15 17:53:18 +09:00
David Pursehouse
d9ea1aaeb0 Documentation: Wrap lines in index.rst
Wrap lines at 80 characters where possible.

Change-Id: Ib254734a7a18b62f965577c368929058258b489f
2014-07-15 17:53:14 +09:00
Ian Cordasco
28d1ef5be9 Merge pull request #2128 from tshepang/patch-1
Fix broken link
2014-07-14 09:39:19 -05:00
Tshepang Lekhonkhobe
36b6c37496 Fix broken link 2014-07-14 16:13:23 +02:00
Kenneth Reitz
e48b4b492d Merge pull request #2124 from Lukasa/certifi
Depend on certifi
2014-07-11 13:30:07 -04:00
Cory Benfield
52facc7984 Install certifi with requests. 2014-07-10 21:49:31 +01:00
Cory Benfield
7a51337ce0 Preferentially use certifi to requests. 2014-07-10 21:49:16 +01:00
Espartaco Palma
291bc9ea07 Update link to pip site on docs/user/install.rst 2014-07-04 11:42:56 -05:00
Kenneth Reitz
39f0c66cbe Merge pull request #2115 from sigmavirus24/fix-2092
Update how we check verify when inspecting env variables
2014-07-03 09:35:55 -04:00
Ian Cordasco
3957b0befb Fix silly check 2014-07-02 10:42:00 -05:00
Cory Benfield
538a41e70d Merge pull request #2116 from sigmavirus24/fix-2107
Replace dead link with StackOverflow answer
2014-07-02 16:41:14 +01:00
Ian Cordasco
d25280dc20 Replace dead link with StackOverflow answer 2014-07-02 10:34:25 -05:00
Ian Cordasco
84f67379c8 Update how we check verify when inspecting env variables 2014-07-02 10:26:15 -05:00
Ian Cordasco
de2cd2e9c8 Merge pull request #2112 from np-csu/patch-1
Update quickstart.rst
2014-06-29 08:31:23 -05:00
np-csu
1bf4af6395 Update quickstart.rst
line 394: correct an input error.
2014-06-29 21:05:04 +08:00
Kenneth Reitz
b9bbfa659f Merge pull request #2049 from codedstructure/adapter-proxy_manager_for
Separated out proxy_manager_for to fix #2048
2014-06-23 12:11:13 -07:00
Cory Benfield
fcb735fd99 Merge pull request #2097 from bkerensa/patch-1
Update out-there.rst
2014-06-15 09:19:34 +01:00
Benjamin Kerensa
c451dd2c77 Update out-there.rst
Remove french blog post which is now a deadlink.
2014-06-15 00:10:09 -07:00
Kenneth Reitz
6b21e5c8f0 Merge pull request #2095 from ericfrederich/redirect_cache
Redirect cache
2014-06-12 14:42:41 -04:00
Eric L Frederich
493697a0aa Merge branch 'master' into redirect_cache 2014-06-12 08:25:33 -04:00
Eric L Frederich
c3444f8c7a don't make duplicate requests for permanent redirects 2014-06-12 08:25:21 -04:00
Kenneth Reitz
2c262de0fe Merge pull request #2090 from ericfrederich/fix_308
handle 308 redirection the same as 301 and 302
2014-06-12 00:19:44 -04:00
Kenneth Reitz
b80ed77cdd Update index.rst 2014-06-11 16:40:23 -04:00
Eric L Frederich
da3178f377 Re-add resume to not break existing apps
as requested by Cory Benfield
2014-06-11 13:27:36 -04:00
Eric L Frederich
ec3a2e6f04 rename resume/resume_incomplete to permanent_redirect according to rfc7238
Use temporary_redirect intead of temporary_moved to make the words
line up nicely ;-)
2014-06-11 11:08:10 -04:00
Eric L Frederich
07d9b730b7 handle 308 redirection the same as 301 and 302 2014-06-10 16:30:17 -04:00
Kenneth Reitz
743ce8119b Merge pull request #2088 from jeffknupp/master
various pep-8 cleanups; remove unsused imports; remove unused variables
2014-06-10 12:02:21 -04:00
Jeff Knupp
bff65f42ee Update with style considerations by @kennethreitz 2014-06-10 11:16:24 -04:00
Jeff Knupp
e2c4da7dd2 various pep-8 cleanups; remove unsused imports; remove unused variables 2014-06-10 09:09:33 -04:00
Kenneth Reitz
3ee781b895 Merge pull request #2076 from Lukasa/basic
Basic Auth handler sets unicode header value on Python 2
2014-06-09 10:53:23 -04:00
Ian Cordasco
326f6adcfa Merge pull request #2087 from Lukasa/2616
Update trivial mentions to RFC 2616.
2014-06-08 09:44:26 -05:00
Ben Bass
046302c0cb indentation change for code review 2014-06-08 15:23:37 +01:00
Cory Benfield
2b8353d3b3 Avoid unnecessary encode/decode cycles. 2014-06-08 10:28:35 +01:00
Cory Benfield
d977ee8a24 Force basic auth strings to native string type 2014-06-08 10:20:32 +01:00
Cory Benfield
22433163b3 Update trivial mentions to RFC 2616. 2014-06-07 09:53:12 +01:00
Kenneth Reitz
702283093a v2.3.1 changelog 2014-05-30 13:36:18 -04:00
Kenneth Reitz
75cd0a9bd9 Merge pull request #2078 from dgouldin/2077
Allow copying of PreparedRequests without headers/cookies
2014-05-30 13:33:29 -04:00
David Gouldin
32f600b083 Allow copying of PreparedRequests without headers/cookies 2014-05-30 10:11:53 -07:00
Kenneth Reitz
69996114d9 Merge pull request #2072 from sigmavirus24/fix-urlencoded-bytes
Check for basestring, not just str
2014-05-29 10:39:42 -04:00
Cory Benfield
785e4ab360 Merge pull request #2074 from Lukasa/filedoc
Ensure that we open files in binary mode in the docs.
2014-05-28 17:01:10 +01:00
Cory Benfield
a2413e010f Ensure that we open files in binary mode. 2014-05-28 16:59:57 +01:00
Ian Cordasco
5ab79e2514 Remove unnecessary check for builtin_str 2014-05-28 08:17:18 -05:00
Ian Cordasco
3faff0b8ea Check for basestring, not just str
Fixes #2071
2014-05-27 20:29:44 -05:00
Kenneth Reitz
6c72509f5b Merge pull request #2059 from jschneier/master
remove unused IteratorProxy
2014-05-27 11:28:11 -04:00
Kenneth Reitz
e71282394c Merge pull request #2064 from mgeisler/simplejson-syntax-error-import
compat: handle SyntaxError when importing simplejson
2014-05-27 11:25:54 -04:00
Kenneth Reitz
ddd748e67a Merge pull request #2065 from mgeisler/tox
Fix Python 3.2 compatibility in tests
2014-05-27 11:24:47 -04:00
Kenneth Reitz
0d40d97d3e Merge pull request #2069 from Lukasa/request
Document and initialise Response.request
2014-05-27 11:11:21 -04:00
Cory Benfield
3346ad1134 Document and initialise Response.request 2014-05-26 16:40:45 +01:00
Martin Geisler
c8916a08de test: restore Python 3.2 compatibility
The tests were broken because they used the u'...' Unicode literal
syntax which disappeared in Python 3.0 to 3.2.

We can work around this by conditionally defining a "u" function which
will produce a Unicode literal on Python 2.x. This is basically the
same approach as taken by the six library often used for writing
cross-version compatible code.
2014-05-26 16:20:39 +02:00
Martin Geisler
f4d1bbb7c5 faq: add Python 3.4 to list of supported Python versions
No code changes were necessary for this.
2014-05-26 16:20:03 +02:00
Martin Geisler
5eea4a3767 faq: mention that PyPy 2.2 works too
The FAQ says that PyPy 1.9 is supported. On my Debian Unstable, I can
install PyPy 2.2.1 and the tests work with that version too.
2014-05-26 16:19:17 +02:00
Martin Geisler
3b0fcb620d compat: handle SyntaxError when importing simplejson
We officially support Python 2.6 to 3.3, but simplejson does not
support Python 3.1 or 3.2:

  https://github.com/simplejson/simplejson/issues/66

Importing simplejson on Python 3.2 results in a SyntaxError because
simplejson uses the u'...' syntax (the syntax was not supported in
Python 3.0 to 3.2).

Support for loading simplejson instead of the stdlib json module was
added by #710:

  https://github.com/kennethreitz/requests/pull/710

No mention was made of the lack of support for Python 3.2, but it was
mentioned that simplejson can be faster than the stdlib json module.
2014-05-26 00:56:35 +02:00
Josh Schneier
7815953cb4 remove unused IteratorProxy 2014-05-23 11:52:17 -04:00
Ben Bass
54e96b40b7 allow pool_kwargs to be specified in init_poolmanager 2014-05-18 20:24:35 +01:00
Ben Bass
02618c8df5 improve proxy_manager_for re-usability by subclass 2014-05-18 20:10:35 +01:00
Ben Bass
e3d0ac7c9d update AUTHORS.rst 2014-05-17 23:22:15 +01:00
Ben Bass
f97e78726e Factor out HTTPAdapter.proxy_manager_for for #2048 2014-05-17 23:15:51 +01:00
Cory Benfield
a7c218480d Merge pull request #2047 from Hasimir/master
Fixed paragraph formatting in Urllib3/MIT License.
2014-05-17 16:37:31 +01:00
Ben McGinnes
eebae9c63b Fixed paragraph formatting in Urllib3/MIT License. 2014-05-18 01:16:27 +10:00
Ian Cordasco
c43ecd1c47 Merge pull request #2046 from alex/patch-2
Fixed a typo
2014-05-16 16:05:41 -05:00
Kenneth Reitz
76c09e7076 ignot dist 2014-05-16 15:30:48 -04:00
Alex Gaynor
53d3519a35 Fixed a typo 2014-05-16 14:11:05 -04:00
Kenneth Reitz
6366d3dd19 v2.3.0 2014-05-16 13:55:47 -04:00
Kenneth Reitz
b26c85f081 history update 2014-05-16 13:55:06 -04:00
Kenneth Reitz
343db40375 Merge remote-tracking branch 'origin/master' 2014-05-16 13:44:21 -04:00
Kenneth Reitz
bbed65d100 Merge pull request #2040 from Lukasa/clog
Initial 2.3.0 changelog.
2014-05-16 10:37:32 -04:00
Cory Benfield
24986f853c Merge pull request #2041 from pawroman/patch-1
Fix typo in advanced.rst docs
2014-05-13 11:31:24 +01:00
Paweł Romanowski
a7e7241616 Fix typo in advanced.rst docs
`Sesssion` -> `Session`
2014-05-13 10:11:40 +02:00
Kenneth Reitz
739d153ef7 Merge pull request #1944 from schlamar/redirect-decoding
Catch errors while handling redirects
2014-05-12 16:50:33 -04:00
schlamar
16459910a9 Added test for redirect with wrong gzipped header. 2014-05-12 22:45:45 +02:00
schlamar
5e860c08d8 Added test case to handle response of streamed redirects.
Credits go to @zackw.
2014-05-12 22:45:45 +02:00
schlamar
59c8d81381 Read content in Session.send instead of Adapter.send. 2014-05-12 22:42:54 +02:00
schlamar
c2a1f28a2e Catch possible exceptions while consuming content of redirect responses. 2014-05-12 22:42:53 +02:00
Cory Benfield
679ab5bc20 Initial 2.3.0 changelog. 2014-05-12 20:30:10 +01:00
Kenneth Reitz
c15a8f8a3d CaseInsensitiveDict now looks like a normal dict 2014-05-12 15:10:15 -04:00
Kenneth Reitz
5893cfcd90 Merge pull request #1972 from avidas/response_str
Add __str__ to case insensitive dict
2014-05-12 15:08:31 -04:00
Kenneth Reitz
c023f06aad Merge pull request #1924 from schlamar/proxy-default-scheme
Default proxy scheme to HTTP
2014-05-12 15:05:56 -04:00
Kenneth Reitz
569cd23c00 Merge pull request #1937 from jaraco/master
Improved decoding support for Response.iter_content and iter_lines
2014-05-12 15:04:35 -04:00
Kenneth Reitz
be2674bf3c Merge pull request #2038 from dstufft/update-urllib3
Update urllib3 to 4fb351cd2
2014-05-12 14:50:36 -04:00
Donald Stufft
626c48e947 Update urllib3 to 4fb351cd2 2014-05-12 14:43:50 -04:00
Cory Benfield
07f9a7ea02 Remove references to not-yet-made 2.3.0 release. 2014-05-03 10:59:14 +01:00
Kenneth Reitz
02a76b79a1 Merge pull request #2026 from Lukasa/updateurllib3
ImportError: No module named 'requests.packages.urllib3.util'
2014-05-02 15:09:39 -04:00
Kenneth Reitz
8f12f948b1 Merge pull request #2032 from dstufft/patch-1
Remove the easy_install section
2014-05-02 15:09:21 -04:00
Donald Stufft
31762899a0 Remove the easy_install section
There's not a lot of good reason to actually call out easy_install at all.
Anyone who prefers it already knows it exists and everyone else should be
directed unambiguously towards pip.
2014-05-02 12:51:50 -04:00
Cory Benfield
b8049ba201 Add urllib3 util package to setup.py. 2014-04-29 18:50:38 +01:00
Kenneth Reitz
54541a9927 Merge pull request #2021 from Lukasa/proxies2
Don't repopulate proxies if we don't trust the environment.
2014-04-28 17:49:27 -04:00
Cory Benfield
142b26ea7b Clearer description of Response.close(). 2014-04-28 19:42:30 +01:00
Kenneth Reitz
7fa9799e28 sidebar update 2014-04-26 09:28:05 -04:00
Kenneth Reitz
3e568eb3b0 sidebar update 2014-04-26 09:27:06 -04:00
Cory Benfield
459f8dfccb Don't repopulate proxies if we don't trust the env. 2014-04-26 13:05:01 +01:00
Kenneth Reitz
dae4026c18 Merge pull request #2017 from Ayper/master
Update urllib to 1.8.2
2014-04-25 23:04:54 -04:00
apr
36b0481f24 Update urllib to 1.8.2 2014-04-24 14:43:26 -04:00
Kenneth Reitz
826425fdfd Merge pull request #2010 from Lukasa/philosophy
[WIP] Update philosophy section
2014-04-21 12:25:01 -04:00
Cory Benfield
6c1ddeedfb First pass at update to philosophy section. 2014-04-18 17:28:12 +01:00
Cory Benfield
082b877d81 We're awesome, but don't need to be here twice. 2014-04-18 17:15:45 +01:00
Cory Benfield
35d20b2168 Merge pull request #2009 from sigmavirus24/fix-my-name
Fix my name
2014-04-18 17:13:17 +01:00
Ian Cordasco
e56cc11757 Fix my name 2014-04-18 10:35:44 -05:00
Kenneth Reitz
229c4d8f7c Merge pull request #2005 from ap-Codkelden/master
SVG logo version
2014-04-16 15:37:29 -04:00
ap-Codkelden@github.com
b1d0f9743e SVG logo version (with fonts converted to curves) 2014-04-16 18:11:35 +03:00
Kenneth Reitz
b4354fc66f Revert "Font layer convert to curves"
This reverts commit af21ec6165.
2014-04-16 10:58:30 -04:00
Kenneth Reitz
b5fd95cab9 Merge pull request #1999 from ap-Codkelden/master
Font layer in logo convert to curves
2014-04-16 10:56:44 -04:00
Kenneth Reitz
df34ed7a00 @sigmavirus42 2014-04-15 19:15:39 -04:00
Kenneth Reitz
b8ba5c2bcb github urls 2014-04-15 19:11:58 -04:00
Kenneth Reitz
b2c801f3c7 Merge remote-tracking branch 'origin/master' 2014-04-15 19:07:52 -04:00
Kenneth Reitz
21010ee25a core contributors 2014-04-15 19:07:41 -04:00
Kenneth Reitz
f409d65d15 12,000,000 2014-04-15 19:01:41 -04:00
ap-Codkelden@github.com
af21ec6165 Font layer convert to curves 2014-04-12 21:13:52 +03:00
Cory Benfield
07ee20d07d Merge pull request #1998 from Kapishin/master
Fix typo
2014-04-10 06:46:05 +01:00
Pavlo Kapyshin
4ca4865170 Fix typo 2014-04-10 06:09:41 +03:00
Kenneth Reitz
338c5f6a0b Merge pull request #1991 from gutworth/patch-1
replace reference to crate.io
2014-04-08 10:19:39 -04:00
Cory Benfield
6f52970a6d Reinstate '$'. 2014-04-05 17:29:00 +01:00
Benjamin Peterson
fb2380c3cc delete pypi mirror section 2014-04-05 11:57:43 -04:00
Ionel Cristian Mărieș
96936b5616 Make it more clear where install commands are run (so that newbies don't run them in the REPL, I've seen it happen :). 2014-04-05 16:40:13 +03:00
Benjamin Peterson
8a23dd94cb replace reference to crate.io
crate.io is gone, so a different mirror should be used as an example. Also, the list of PyPI mirrors should be mentioned.
2014-04-04 23:58:18 -04:00
Cory Benfield
6a877661fb Merge pull request #1989 from sigmavirus24/HISTORY-updates
Make note of the fact that we fixed some CVEs
2014-04-03 06:51:07 +01:00
Ian Cordasco
b361a4c056 Make note of the fact that we fixed some CVEs 2014-04-02 19:04:58 -05:00
Kenneth Reitz
ae5ecdf2ae Merge pull request #1959 from Feng23/master
support request tuple data
2014-03-31 10:30:36 -04:00
Kenneth Reitz
826667a54c Merge pull request #1981 from stanhu/master
Update urllib to 1.8 (8a8c601bee)
2014-03-31 10:29:30 -04:00
Stan Hu
6c839985b9 Update urllib to 1.8 (8a8c601bee) 2014-03-28 16:37:54 -07:00
Feng Liu
24819e8aae support request tuple data
rewrite the TestModels

Ajust the code
2014-03-27 10:41:49 +08:00
Kenneth Reitz
0303e9b137 Merge pull request #1976 from kennethreitz/fix-redirect-test
The expected value changed for the proxies keyword
2014-03-26 11:34:36 -04:00
Ian Cordasco
b92f4ec6fb The expected value changes for the proxies keyword
It used to be None but a recent PR changed that before my last one was merged
2014-03-26 08:12:31 -05:00
Kenneth Reitz
b8128d6b1e Merge pull request #1962 from sigmavirus24/fix-history-type
Fix #1960: A Response's history should be a list
2014-03-24 11:45:06 -04:00
Kenneth Reitz
5f48e4a120 Merge pull request #1963 from sigmavirus24/fix-redirect-methods
Fix #1955: Do not use original request in redirect
2014-03-24 11:44:14 -04:00
Kenneth Reitz
a3cd2f3929 Merge remote-tracking branch 'origin/master' 2014-03-24 11:39:20 -04:00
Kenneth Reitz
b2db089eef 3.4 2014-03-24 11:39:15 -04:00
Avi Das
c2e6fe4d5d Shorten str for case insensitive dict 2014-03-23 11:38:37 -05:00
Kenneth Reitz
fe4c4f1461 Merge pull request #1951 from Lukasa/proxyauth
Re-evaluate proxy authorization.
2014-03-23 10:51:48 -04:00
Avi Das
a3fb689942 Fix parenthesis typo 2014-03-22 16:30:22 -05:00
Cory Benfield
90f7337858 Style changes thanks to @sigmavirus24. 2014-03-22 21:11:33 +00:00
Avi Das
98ac3df713 Add __str__ to case insensitive dict. Logging headers for debugging purposes is often necessary, and the currently logging the headers would be using __repr__ which would log the implementation detail of headers, caseinsensitivedict. Adding str lends a more printing and log friendly implementation for case insentitice dict 2014-03-22 15:42:23 -05:00
Ian Cordasco
8fc6a65be8 Actually assign history 2014-03-15 12:48:29 -05:00
Ian Cordasco
8d693a2a27 Fix #1955: Do not use original request in redirect
The original request was never being properly overriden in resolve_redirects.
As such being having a POST request respond with a 303 would generate a GET
request. If the GET request encountered another redirect to something like a
307, then it would use the original request and generate another POST request.

There are two parts to this fix:

- The fix itself
- The test infrastructure to ensure it does not regress because HTTPBin is
  insufficient
2014-03-15 11:38:13 -05:00
Ian Cordasco
daf56b3f62 Fix #1960: A Response's history should be a list 2014-03-15 10:33:00 -05:00
Cory Benfield
724038e4b5 Test stripping standard auth. 2014-03-12 21:53:07 +00:00
Cory Benfield
4f6dca42ea Remove some extraneous comments to please KR. 2014-03-12 21:21:14 +00:00
Kenneth Reitz
110048f983 Merge pull request #1916 from schlamar/accept-encoding
Fix Accept-Encoding in default headers
2014-03-12 16:37:27 -04:00
Kenneth Reitz
4112b8f14b Merge pull request #1949 from Lukasa/pickle
Pickled Responses should include a None value for the raw attribute
2014-03-12 16:18:58 -04:00
Cory Benfield
4d8cb3244e Add method for rebuilding proxy configuration.
This includes auth.
2014-03-12 19:22:40 +00:00
Cory Benfield
97cf16e958 Move auth rebuild to its own method. 2014-03-12 19:22:11 +00:00
Cory Benfield
6d7e8a97bb Split get_environ_proxies into two methods.
This makes it possible to get at the no_proxy logic separately.
2014-03-12 19:20:12 +00:00
Cory Benfield
ee7fe02953 Ensure that .raw() is present after unpickling.
Some people will assume that .raw() is present, and they shouldn't get
AttributeErrors when they make that assumption on a pickled Response.
However, @kennethreitz has asked that we not be too dependent on
urllib3. For that reason, set to None.
2014-03-12 18:34:43 +00:00
schlamar
a59fac5e4b Removed compress from accepted encodings. 2014-03-12 12:11:55 +01:00
Jason R. Coombs
7b378cb742 Add tests for decode_unicode 2014-03-04 17:46:58 -05:00
Jason R. Coombs
d289eb22f1 Always honor decode_unicode, even when _content is present.
--HG--
extra : amend_source : 25977a1227b163d49bf2e1aec6aa448e5cd3be8a
2014-03-04 16:33:40 -05:00
Jason R. Coombs
c8226f69e1 Add documentation about decode_unicode. 2014-03-04 16:27:13 -05:00
Cory Benfield
03f444e601 Timeout documentation changes. 2014-03-03 20:23:59 +00:00
Kenneth Reitz
d8557a2627 Merge pull request #1935 from cjstapleton/master
Add timeout to stream with testing
2014-03-03 13:14:37 -05:00
Kenneth Reitz
3c4b3747e4 Merge pull request #1921 from sigmavirus24/fix-session-header-none
Do not set headers with None value
2014-03-03 13:13:13 -05:00
Cory Benfield
9a14086e6d Merge pull request #1934 from kennethreitz/update-notice
Charade -> Chardet and Add cacert.pem license
2014-03-02 09:34:55 +00:00
Ian Cordasco
64f0b3c81e Remove unnecessary bits from cacert notice section 2014-03-01 11:15:14 -06:00
cjstapleton
5f404a0592 Fix styling issues with add timeout to stream with testing 2014-02-28 19:06:59 -06:00
cjstapleton
930f03c864 Add timeout to stream with testing
Fixes Issue #1803
2014-02-28 10:08:57 -06:00
Ian Cordasco
9b20cadaeb Charade -> Chardet and Add cacert.pem license
- Charade is gone, long live Chardet.
- cacert.pem is now taken wholesale from Mozilla so we need to display that
  itis licensed under the MPL2.0
2014-02-28 08:29:05 -06:00
schlamar
4404e7e328 Default proxy scheme to http. 2014-02-18 15:24:24 +01:00
schlamar
780ce3902e Revert "Proxy urls should have explicit schemes."
This reverts commit 840540b6b1.

Conflicts:
	requests/adapters.py
	requests/utils.py
2014-02-18 15:15:36 +01:00
Cory Benfield
e909a92343 Merge pull request #1923 from Lukasa/master
The timeout is in seconds.
2014-02-16 19:02:05 +00:00
Cory Benfield
81e88b70bd The timeout is in seconds. 2014-02-16 19:00:22 +00:00
Ian Cordasco
d2f647cee4 Do not set headers with None value
- Regardless of whether they are on the session or not
- Fixes #1920
2014-02-14 16:15:21 -06:00
Kenneth Reitz
3c88e520da Merge pull request #1918 from zackw/response-is-redirect
New Response property, .is_redirect.
2014-02-13 16:03:37 -05:00
Zack Weinberg
0caa243212 New Response property, .is_redirect. 2014-02-13 14:27:42 -05:00
Kenneth Reitz
4ecd74693f Merge pull request #1891 from sigmavirus24/add-requests-to-exceptions
Add request to RequestException
2014-02-11 11:58:23 -05:00
Kenneth Reitz
94badad24c Merge pull request #1897 from aliles/master
Document requirements for SNI support on Python2
2014-02-11 11:55:33 -05:00
Kenneth Reitz
1371e81944 Merge pull request #1900 from mjpieters/issue1674-json-fallback-encoding
Reinstate falling back to self.text for JSON responses
2014-02-11 11:55:20 -05:00
Cory Benfield
969195ad55 Clarify our 1.2.1 behaviour change. 2014-02-11 07:31:47 +00:00
Kenneth Reitz
a44910b837 Merge pull request #1902 from mjpieters/master
Remove unused loggers.
2014-02-06 18:32:41 -08:00
Cory Benfield
2b9b4a35b2 Merge pull request #1904 from mjpieters/doc-response-reason
Document the `Response.reason` attribute.
2014-02-05 18:32:16 +00:00
Martijn Pieters
3443c177a3 Document the Response.reason attribute.
Made `.status_code` and `.reason` consistent with one another, adding some examples. Addresses #1225.
2014-02-05 17:29:09 +00:00
Aaron Iles
98b76f4b98 State early in SNI discussion Python2 limitation
Reference at the earliest opportunity that Server-Name-Indication is a
limitation of Python 2.6 and 2.7. Avoid describing it as a Requests
issue.
2014-02-04 21:08:11 +11:00
Cory Benfield
15ac4e5fb6 Merge pull request #1901 from mjpieters/chardet-not-charade
One last Charade reference to remove here.
2014-02-04 00:53:53 -08:00
Martijn Pieters
488b90f5ac Remove unused loggers. 2014-02-03 13:43:59 +00:00
Martijn Pieters
c5b6a107eb One last Charade reference to remove here. 2014-02-03 13:39:21 +00:00
Martijn Pieters
f35838beb6 Remove logging and charade mention.
Logging is Not Allowed, so out it goes.
2014-02-03 13:37:57 +00:00
Martijn Pieters
5ee8b348eb Reinstate falling back to self.text for JSON responses
A JSON response that has no encoding specified will be decoded with a detected UTF codec (compliant with the JSON RFC), but if that fails, we guessed wrong and need to fall back to charade character detection (via `self.text`). Kenneth removed this functionality (by accident?) in 1451ba0c6d, this reinstates it again and adds a log warning.

Fixes #1674
2014-02-03 12:00:14 +00:00
Aaron Iles
8a0bae45c2 Move SNI documentation to FAQ
Relocate documentation on Server-Name-Indication from the advanced
section to the frequently asked questions. This is minus details on
enabling SNI on Python2, which is instead captured by linking to Stack
Overflow.
2014-02-02 22:19:10 +11:00
Aaron Iles
b5b8198fd1 Document requirements for SNI support on Python2
A section for Request's advanced usage guide on what Server Name
Indication is, its purpose, and how to enable it on Python2.
2014-02-02 20:14:05 +11:00
Kenneth Reitz
c6084704cc what is wrong with you people? :) 2014-01-31 12:31:11 -05:00
Kenneth Reitz
2b23d6a9f7 omg never do this again ever please 2014-01-31 12:30:52 -05:00
Kenneth Reitz
c042c08179 who did this 2014-01-31 12:29:56 -05:00
Kenneth Reitz
f74f5e3ebf cleanup shitty code 2014-01-31 12:27:05 -05:00
Kenneth Reitz
f1893c8355 Merge pull request #1892 from Lukasa/netrcauth
Repopulate ~/.netrc auth.
2014-01-31 09:19:53 -08:00
Cory Benfield
d9f34c6848 Respect trust_env on redirect. 2014-01-31 07:36:44 +00:00
Kenneth Reitz
4f12bfa636 Merge pull request #1893 from Lukasa/license
Avoid breaking crappy distribution methods.
2014-01-30 09:23:57 -08:00
Cory Benfield
326a22e888 Better layout for checking. 2014-01-30 15:11:24 +00:00
Cory Benfield
0163a836a1 Avoid breaking crappy distribution methods. 2014-01-29 19:21:04 +00:00
Cory Benfield
7ba5a534ae Repopulate ~/.netrc auth. 2014-01-29 19:13:46 +00:00
Ian Cordasco
07e0a6198d Explicitly check for None 2014-01-28 20:39:09 -06:00
Ian Cordasco
c2fab5b4ca Avoid having to fix tests 2014-01-28 20:24:41 -06:00
Ian Cordasco
27eb54a20a Move creation of attributes to RequestException
Pass request objects in HTTPAdapter
2014-01-28 20:13:57 -06:00
Kenneth Reitz
b1c8fd3b67 Merge pull request #1888 from longaccess/handle301
Fix for 301 redirect and latest PyOpenSSL.
2014-01-28 12:14:38 -08:00
Konstantinos Koukopoulos
8b792be81b on redirect pass URL as bytes. Fixes: #1887 2014-01-28 09:11:23 -08:00
Konstantinos Koukopoulos
b6e16799d0 test pyopenssl redirect (unit test for #1887) 2014-01-28 09:08:16 -08:00
Cory Benfield
19756d57f7 Merge pull request #1886 from meteozond/patch-1
Added info about posted files headers
2014-01-28 01:07:23 -08:00
Alexander
1e3eb4ef9e Added info about posted files headers 2014-01-28 12:03:59 +03:00
Ian Cordasco
42b8a6d8ab Merge pull request #1881 from kevinburke/typo
s/soley/solely
2014-01-25 05:38:39 -08:00
Kevin Burke
4c11fb7f04 s/soley/solely 2014-01-25 00:20:10 -08:00
Kenneth Reitz
06ecae43bd NOTICE update 2014-01-24 15:39:32 -05:00
Kenneth Reitz
7773b2712e Merge pull request #1870 from sigmavirus24/add-toolbelt-to-docs
Add a small note about requests-toolbelt
2014-01-23 10:54:08 -08:00
Kenneth Reitz
33735480f7 v2.2.1 2014-01-23 13:25:40 -05:00
Kenneth Reitz
a5b3719967 Merge pull request #1876 from dstufft/update-urllib3
Update urllib3 to 9346c5c
2014-01-23 10:22:21 -08:00
Donald Stufft
d181577f3e Update urllib3 to 9346c5c 2014-01-22 14:20:34 -05:00
Cory Benfield
2a6b835a5e Update changelog for 2.2.1. 2014-01-22 14:28:41 +00:00
Ian Cordasco
3bd16ce9c5 Add missing sled
Thanks @kevinburke
2014-01-21 19:55:00 -06:00
Cory Benfield
4872f4628c Merge pull request #1874 from kevinburke/typo
Typo in History
2014-01-21 10:24:37 -08:00
Kevin Burke
f17ead4133 Typo in History 2014-01-21 10:18:04 -08:00
Ian Cordasco
799bf116fe Add a small note about requests-toolbelt 2014-01-18 22:44:50 -06:00
Kenneth Reitz
c3055863c6 Update NOTICE 2014-01-16 15:12:40 -08:00
Kenneth Reitz
57c71ec9b6 Merge pull request #1867 from Lukasa/closing
Document contextlib.closing.
2014-01-16 14:16:04 -08:00
Cory Benfield
476ab203bc Document contextlib.closing. 2014-01-16 08:37:29 +00:00
Kenneth Reitz
0465d34955 Merge pull request #1862 from sybeck2k/master
Fixed parsing of username and password encoded in the URI
2014-01-14 11:56:04 -08:00
Roberto Migli
eb124353af Added comment for test test_get_auth_from_url 2014-01-13 16:29:46 +01:00
Roberto Migli
49fb630eb4 Merged changes from @lukasa 2014-01-13 14:04:28 +01:00
Roberto Migli
a6a8342066 Fixed parsing of username and password encoded in the URI 2014-01-13 13:32:00 +01:00
Ian Cordasco
87abd9c609 Use calendar.timegm when calculating cookie expiration
Fixes #1859

Credit: @lukasa
2014-01-12 14:27:45 -06:00
Cory Benfield
5b4e9aff0e Don't need to unquote twice. 2014-01-12 14:46:40 +00:00
Cory Benfield
2f98ef1792 Be less defensive in get_auth_from_url. 2014-01-12 14:44:53 +00:00
Cory Benfield
b4ca6c95b6 Meet @sigmavirus24's demanding stylistic criteria. 2014-01-12 09:39:32 +00:00
Cory Benfield
dddb41e349 TypeError, not AttributeError on 3.3. 2014-01-11 10:15:53 +00:00
Cory Benfield
ca187abd13 Unquote the auth after splitting the url. 2014-01-11 09:59:23 +00:00
Cory Benfield
ac4e05874a Fixup the header heirarchy. 2014-01-09 19:50:56 +00:00
Cory Benfield
098865122c Merge branch 'master' of github.com:dsoprea/requests
Conflicts:
	docs/user/advanced.rst
2014-01-09 19:46:32 +00:00
Kenneth Reitz
1720e4bb87 fix rst syntax bugs 2014-01-09 14:38:44 -05:00
Kenneth Reitz
0db1d3d675 v2.2.0 2014-01-09 14:33:17 -05:00
Kenneth Reitz
94981e1701 Merge pull request #1854 from Lukasa/220
Changelog for 2.2.0.
2014-01-09 11:14:45 -08:00
Cory Benfield
48e2ecc14d Changelog for 2.2.0. 2014-01-09 19:10:30 +00:00
Cory Benfield
4862d29a96 Make ContentDecodingError a subclass.
This should avoid the user having to worry about the new exception.
2014-01-09 19:08:58 +00:00
Dustin Oprea
3ccdfce2e5 Added an SSL TA example. 2014-01-09 11:41:30 -05:00
Kenneth Reitz
14f207f3fc Merge pull request #1846 from acdha/paranoid-get_netrc_auth
get_netrc_auth should handle os.path.expanduser failing
2014-01-08 10:57:09 -08:00
Kenneth Reitz
df1c2335c8 Merge branch 'master' into fix-pickling-adapters
Conflicts:
	AUTHORS.rst
2014-01-08 13:53:23 -05:00
Kenneth Reitz
b17cad65cf Merge pull request #1845 from Lukasa/proxy_bypass
Resolve proxy_bypass problems.
2014-01-08 10:51:08 -08:00
Kenneth Reitz
a855ba8189 Merge pull request #1827 from pepijndevos/master
Use adapter pool size for proxies
2014-01-08 10:50:00 -08:00
Kenneth Reitz
632304209c Merge pull request #1831 from kevinburke/interlinks
Add more interlinks between the documentation
2014-01-08 10:48:25 -08:00
Kenneth Reitz
e93b07eef6 Merge pull request #1832 from kevinburke/docs-warnings
Fix warnings when building the docs
2014-01-08 10:45:33 -08:00
Kenneth Reitz
73c3040896 Merge pull request #1836 from sigmavirus24/2014
Bump the year ftw
2014-01-08 10:44:20 -08:00
Kenneth Reitz
0f40d8149a Merge pull request #1849 from kevinburke/urllib3-update
Update urllib3 to 232f496
2014-01-07 15:22:24 -08:00
Kevin Burke
e1562afb58 Update urllib3 to 232f496 2014-01-07 12:32:01 -08:00
Chris Adams
a80bd7708d get_netrc_auth: code cleanup
* Stop iterating as soon as we find a netrc file
* More obvious return None
2014-01-07 12:23:11 -05:00
Kenneth Reitz
e40342afbe /me grumbles 2014-01-07 12:03:24 -05:00
Chris Adams
0b41cec7a4 get_netrc_auth: handle os.path.expanduser failure
os.path.expanduser can raise a KeyError when $HOME is not set and the
POSIX getpwuid() call fails, which can happen when running under a UID
which is not in /etc/passwd or when the password file cannot be read.

The upstream bug report http://bugs.python.org/issue20164 is unlikely to
be backported to Python 2.x even if fixed so this change handles
KeyError by skipping netrc authentication.

Closes #1846
2014-01-07 11:34:51 -05:00
Cory Benfield
e2a36dda0a Don't let proxy_bypass bring you down. 2014-01-07 09:37:59 +00:00
Ian Cordasco
14a1839a45 No one checks docs or a license 2014-01-02 16:05:29 -06:00
Ian Cordasco
81f4412e0e Bump the year ftw 2014-01-02 16:01:15 -06:00
Kevin Burke
a0e7706440 Fix warnings when building the docs
It may be nice to make builds fail if new documentation generates warnings, to
avoid these sorts of problems slipping in in the future.
2013-12-28 00:09:29 -08:00
Kevin Burke
fad8d743b5 Add more interlinks between the documentation
Also fixes up tense in a few cases, and adds the `intersphinx` extension so we
can link to the urllib3 documentation when it is called out.
2013-12-27 23:43:55 -08:00
Pepijn de Vos
9e843468de use adapter pool size for proxies 2013-12-24 11:14:04 +01:00
Kenneth Reitz
99ebac7e84 Merge pull request #1823 from Lukasa/moredocs
Update docs to highlight the value of r.encoding.
2013-12-20 06:21:04 -08:00
Cory Benfield
4a6a0c3c65 Update docs to highlight the value of r.encoding. 2013-12-20 09:15:12 +00:00
Kenneth Reitz
e0ba49e780 Merge pull request #1807 from podshumok/fix-request-cookiejar-as-dict
cookiejar.iteritems() is broken after 2.1.0 update
2013-12-19 12:38:52 -08:00
Kenneth Reitz
11cd49987a Merge pull request #1816 from daftshady/master
Re-raise DecodeError
2013-12-19 12:38:34 -08:00
daftshady
aad828704d Re-raise DecodeError 2013-12-19 18:02:56 +09:00
Kenneth Reitz
0eb6dc36f0 Merge pull request #1808 from kennethreitz/fix-cookies-saved-on-redirect
Fixes #1805
2013-12-18 07:56:30 -08:00
Kenneth Reitz
d88cd02fd8 Merge pull request #1810 from kennethreitz/swap-charade-for-chardet
Swap charade for chardet
2013-12-18 07:52:55 -08:00
Konstantin Podshumok
b8f1263f16 split cookiejar as dict test 2013-12-18 18:50:53 +04:00
Ian Cordasco
d8d9591076 Update the history and change the last last references to charade 2013-12-18 08:46:49 -06:00
Ian Cordasco
9379a14cb4 Fix all remaining references to charade 2013-12-18 08:43:18 -06:00
Ian Cordasco
0bfbacd8b1 Initial work towards replacing charade 2013-12-18 08:42:12 -06:00
Konstantin Podshumok
e6a32d6283 preserve python2-like dict API for RequestCookieJar 2013-12-18 18:09:24 +04:00
Ian Cordasco
642bbf6060 Fixes #1805
Sure cookies are persisted to the session, but those new cookies are not added
to the next prepared request. We need to update that new request's CookieJar
with the new cookies.
2013-12-17 22:55:50 -06:00
Konstantin Podshumok
537def4a4f fix regression with cookiejar.iteritems() 2013-12-18 06:56:53 +04:00
Kenneth Reitz
1832e33753 Merge remote-tracking branch 'origin/master' 2013-12-16 13:19:36 -05:00
Kenneth Reitz
39d12818fe 8,000,000 2013-12-16 13:19:30 -05:00
Ian Cordasco
1500632b60 Move comment to the right place 2013-12-13 22:29:30 -06:00
Erik Wickstrom
d3f3b423ad Updated AUTHORS. 2013-12-13 22:28:46 -06:00
Erik Wickstrom
16f9798208 Fixed pickle support for requests.adapters.HTTPAdapter by adding
'proxy_manager' when unpickling.
2013-12-13 22:28:37 -06:00
Ian Cordasco
cac2077c36 Prevent error when using proxies after picking an Adapter 2013-12-12 13:03:37 -06:00
Cory Benfield
0b680379e5 Merge pull request #1792 from Lukasa/oops
Fixup changelog with missing breaking change.
2013-12-12 08:21:38 -08:00
Cory Benfield
456c42b00d Fixup changelog with missing breaking change. 2013-12-12 16:21:04 +00:00
Kenneth Reitz
9fc0701247 Merge pull request #1772 from mdbecker/make_morsel_to_cookie_more_pythonic
Make morsel_to_cookie more pythonic
2013-12-06 07:38:12 -08:00
Michael Becker
837ba94dde test_requests: convert tests to py.test style 2013-12-06 10:08:42 -05:00
Michael Becker
ea4570da57 cookies: Fix bugs found during CI 2013-12-06 09:02:45 -05:00
Michael Becker
ef5875cc19 cookies: Take a less cowardly approach
Per discussion with @sigmavirus24, we'll take the less cowardly approach here.
"the RFC defines the Expires header as a string with the format we're assigning to ``time_template`` so checking if it is a string is unnecessary."

Crossing my fingers that this doesn't break anyones existing code...
2013-12-06 09:02:45 -05:00
Michael Becker
6ac70450dc AUTHORS: Take credit 2013-12-06 08:57:37 -05:00
Michael Becker
6140d08241 cookies: Replace type checks with try/except 2013-12-06 08:56:30 -05:00
Michael Becker
39841562c5 test_requests: Add tests for morsel_to_cookie
These tests will ensure my changes to how we handle 'expires' don't cause any regressions.
2013-12-06 08:56:30 -05:00
Kenneth Reitz
3235766d67 updated CA Bundle! 2013-12-05 17:51:10 -05:00
Kenneth Reitz
57c4684035 Merge remote-tracking branch 'origin/master' 2013-12-05 17:45:05 -05:00
Kenneth Reitz
795f18560b last changelog entry 2013-12-05 17:44:56 -05:00
Kenneth Reitz
aae7e39a56 further notes and version bump 2013-12-05 17:41:25 -05:00
Kenneth Reitz
ba3dab5047 Merge pull request #1770 from kmadac/master
Implemetation of IP address ranges for no_proxy environment variable
2013-12-05 14:40:44 -08:00
Kenneth Reitz
f6107bc151 history notes about v2.1 2013-12-05 17:37:48 -05:00
Kenneth Reitz
1cac72bfa9 Merge pull request #1669 from Lukasa/chunked
[WIP] Better chunked handling.
2013-12-05 14:36:10 -08:00
Kenneth Reitz
2dae61c0e3 Merge pull request #1776 from sigmavirus24/fix-1728
Fix 1728 (Fixed up from #1729)
2013-12-05 14:26:58 -08:00
Kenneth Reitz
e851efb29b Merge pull request #1781 from Lukasa/ucliteral
Clean up #1779.
2013-12-05 14:00:58 -08:00
Cory Benfield
57c138e59b Remove the unicode literals. 2013-12-05 21:06:11 +00:00
Kenneth Reitz
2c465de332 Merge pull request #1779 from kracekumar/patch-2
Made default_user_agent reusable
2013-12-05 11:44:06 -08:00
Kamil Madac
1d42d9d274 function is_ipv4_network renamed
more detailed check of cidr format
2013-12-05 11:15:52 +01:00
Kamil Madac
f3bc8b6e1f Typo fixed 2013-12-05 09:36:49 +01:00
Kamil Madac
21c88c829a Broad exception fixed 2013-12-05 09:32:29 +01:00
kracekumar
6c1be607f1 Made default_user_agent reusable
This is not exciting change, but will help for people who wants to change name of user agent alone. Also name can be unicode.
2013-12-05 12:11:35 +05:30
Kamil Madac
59b29d02f8 Tiny comment fix 2013-12-04 15:11:10 +01:00
Kamil Madac
0d52ef7084 Additional tests added 2013-12-04 15:10:24 +01:00
Ian Cordasco
e8bdcdb0a7 Address feedback from #1729
- Make the PreparedRequest's cookie jar an implementation detail
2013-12-04 06:45:18 -06:00
Chase Sterling
8bfe0d873f Store the request cookiejar in PreparedRequest.cookies fix #1728
Conflicts:
	requests/sessions.py
2013-12-04 06:38:58 -06:00
Chase Sterling
5b30e960eb Add a test case for request cookies persisting to session. refs #1728 2013-12-04 06:35:16 -06:00
Kamil Madac
947248129b Better comments 2013-12-04 11:47:40 +01:00
Kamil Madac
0a4e65c0ed Tests added 2013-12-04 10:54:36 +01:00
Kamil Madac
fe945345dd Unnecessary files kmadac.xml deleted 2013-12-04 09:31:56 +01:00
Kamil Madac
dfd3e45ad0 Merge branch 'master' of https://github.com/kmadac/requests 2013-12-04 09:30:01 +01:00
Kenneth Reitz
4bceb312f1 Merge pull request #1768 from Lukasa/credpct
Unencode usernames and passwords taken from URLs.
2013-12-03 17:36:00 -08:00
Kenneth Reitz
b2cee7bee8 Merge pull request #1764 from Lukasa/clog
Prepare new release (2.1.0)?
2013-12-03 17:35:02 -08:00
Kenneth Reitz
a030a58303 Merge pull request #1766 from Lukasa/qop
Quote qop values in digest auth.
2013-12-03 17:33:59 -08:00
Kenneth Reitz
5c915451e7 Merge pull request #1657 from sigmavirus24/fix-session-hooks
Honor session hooks
2013-12-03 17:33:42 -08:00
Kenneth Reitz
8b88549bb7 Merge pull request #1713 from daftshady/master
Fixed #1711
2013-12-03 17:33:33 -08:00
Kenneth Reitz
3e66f08db7 Merge pull request #1775 from sigmavirus24/add-readme-to-packages
Add README to requests/packages
2013-12-03 17:02:25 -08:00
Kamil Madac
6131390345 Revert "Small test added"
This reverts commit f0d3edf409.
2013-12-03 16:41:07 +01:00
Kamil Madac
0eccd7a856 Merge remote-tracking branch 'origin/master'
Conflicts:
	test_requests.py
2013-12-03 16:34:02 +01:00
Kamil Madac
f0d3edf409 Small test added 2013-12-03 16:30:47 +01:00
Kamil Madac
8aff6f5ed0 Redesigned no_proxy ip range imlementation to use only stdlib functions 2013-12-03 16:23:08 +01:00
Ian Cordasco
617bc8cc1c Add README to requests/packages
- Hopefully people will read this before making changes to vendored libraries
2013-12-03 09:17:37 -06:00
Kamil Madac
f9a48e0f0b Added kamil.madac to Authors 2013-12-02 22:42:20 +01:00
Kamil Madac
9ec222c363 Added test for domain name no_proxy matching. 2013-12-02 22:40:26 +01:00
Kamil Madac
2c914126ba Added possibility to use IP ranges (ex. 192.168.1.0/24) to no_proxy environment variable 2013-12-02 22:32:29 +01:00
Cory Benfield
e2961b9f91 Unquote the URL before extracting the auth. 2013-12-01 10:29:14 +00:00
Cory Benfield
4f786e4f62 Tests for #1767. 2013-12-01 10:29:10 +00:00
Cory Benfield
92d3616b02 Merge remote-tracking branch 'upstream/pr/1765' into qop 2013-11-29 16:44:13 +00:00
Cory Benfield
fecb35a08e Quote qop values in digest auth. 2013-11-29 08:37:25 +00:00
佐藤 建太
649dac1029 quote qop options in Digest Auth
Based on RFC2617 (http://tools.ietf.org/html/rfc2617), the value of
'qop-options' directive should be quoted with double quotes:

    qop-options
         This directive is optional, but is made so only for backward
         compatibility with RFC 2069 [6]; it SHOULD be used by all
         implementations compliant with this version of the Digest
         scheme. If present, it is a quoted string of one or more
         tokens indicating the "quality of protection" values supported by
         the server.  The value "auth" indicates authentication; the
         value "auth-int" indicates authentication with
         integrity protection; see the

curl comamnd-line tool also appends these quotes. You can see this
by `curl -v --digest --user user:passwd http://example.com/digest-auth`.
Unfortunately, some minor server-side implementations seem to be sensitive
on this difference.
2013-11-29 15:28:47 +09:00
Cory Benfield
dc31c11339 Missed a couple. 2013-11-28 18:37:45 +00:00
Cory Benfield
e45d425343 Prepare changelog. 2013-11-28 18:32:28 +00:00
Kenneth Reitz
847735553a Merge pull request #1762 from dstufft/update-urllib3
Update urllib3 to 929f1586
2013-11-27 09:23:40 -08:00
Donald Stufft
b825bbd4a2 Update urllib3 to 929f1586 2013-11-26 21:41:15 -05:00
daftshady
c26a6c310c remove unused import 2013-11-26 15:38:48 +09:00
daftshady
8eb40c777e remove unnecessary try 2013-11-26 15:28:59 +09:00
daftshady
8b2255d0f8 double try statement 2013-11-26 15:28:59 +09:00
daftshady
5fcaf45c33 update 'merge_cookies' not to create new instance. 2013-11-26 15:28:59 +09:00
daftshady
1adba3c9e9 modified 'merge_cookies' and update tests.
made sessions.py to use that method when merging cookies.
2013-11-26 15:28:59 +09:00
daftshady
30018e604c update 'merge_cookies' 2013-11-26 15:28:59 +09:00
daftshady
e40c1637c9 added new method 'merge_cookies' and use it when merging session cookies with param cookies. 2013-11-26 15:28:59 +09:00
daftshady
e3c771f36b added test case related to #1711 2013-11-26 15:22:46 +09:00
daftshady
2bbd7ba1c2 Fixed #1711 2013-11-26 15:22:46 +09:00
Kenneth Reitz
340b245903 Merge pull request #1760 from akitada/fix-hangs-on-streaming-uploads
Fix hangs on streaming uploads with HTTPDigestAuth
2013-11-25 11:40:10 -08:00
Kenneth Reitz
e5b9ae1f8e Merge pull request #1754 from Lukasa/verb_change
Match the HTTPbis on HTTP 301.
2013-11-25 11:40:00 -08:00
Akira Kitada
3a9d9f2279 Fix hangs on streaming uploads with HTTPDigestAuth
When using Digest Authentication, the client resends the same request
after the server responds with the 401 "Unauthorized". However, when
doing streaming uploads, it gets stuck because the body data (a
file-like object) is already consumed at the initial request.

The patch fixes this by rewinding the file-like object before
resending the request.
2013-11-25 22:29:53 +09:00
Cory Benfield
3369d87da9 Cleanup the redirect if blocks. 2013-11-24 11:13:49 +00:00
Cory Benfield
470af31f4a Handle 301s 'properly'. 2013-11-24 11:09:00 +00:00
Kenneth Reitz
3327652623 Merge pull request #1747 from daftshady/lowercase
#1746 don't lowercase the whole url
2013-11-20 01:05:15 -08:00
Kenneth Reitz
8a4c83022a Merge pull request #1742 from kevinburke/docs
Add make target to build the documentation
2013-11-20 01:02:38 -08:00
Kenneth Reitz
af921c7f51 Merge pull request #1733 from ionrock/pickleable-responses
Response and Request objects are pickleable.
2013-11-20 01:01:26 -08:00
Kenneth Reitz
248c9ec53f Merge pull request #1745 from nonm/master
Small fix broken cookie parse
2013-11-20 00:58:21 -08:00
daftshady
4972133a9b use geturl to lower scheme 2013-11-19 19:54:46 +09:00
daftshady
8c8938e8cb issue #1746 : Don't lowercase the whole URL! 2013-11-19 18:59:22 +09:00
nonm
cfbbd15de7 Small fix broken cookie parse 2013-11-18 13:32:59 -08:00
Kevin Burke
0c88ae42e6 wording 2013-11-17 18:39:01 -08:00
Kevin Burke
4b69798796 Add target to build the documentation 2013-11-17 18:38:15 -08:00
Kenneth Reitz
947375e982 Merge pull request #1739 from pengfei-xue/devel
add coverage make target
2013-11-15 10:51:47 -08:00
Pengfei Xue
afaed3343a add coverage make target 2013-11-15 22:11:49 +08:00
Kenneth Reitz
42bffb575d Merge pull request #1735 from Lukasa/wheel
Wheel
2013-11-15 01:33:38 -08:00
Kenneth Reitz
bcb10af64f Merge pull request #1717 from jvantuyl/master
loosen URL handling for non-native URL schemes
2013-11-15 01:33:03 -08:00
Jayson Vantuyl
b149be5d86 loosen URL handling for non-native URL schemes 2013-11-15 01:25:32 -08:00
Cory Benfield
abf96670ce Add wheel to dev requirements. 2013-11-14 13:23:45 +00:00
Cory Benfield
86bdd85c4a Wheel support. 2013-11-13 19:09:49 +00:00
Eric Larson
512beb8795 Response and Request objects are pickleable.
Includes a basic test. More could be add to confirm known attributes
that could cause problems.
2013-11-06 20:01:27 -06:00
Kenneth Reitz
a123f8351d Merge pull request #1660 from sigmavirus24/parse-cookies-when-users-set-host-header
Parse cookies when users set custom Host header
2013-11-06 11:19:31 -08:00
Kenneth Reitz
7ccbcd28f0 Merge pull request #1724 from daftshady/dev3
Fixed #1723
2013-11-04 13:58:12 -08:00
Kenneth Reitz
598f977df4 Merge pull request #1726 from t-8ch/update_urllib3
Update urllib3
2013-11-04 13:55:58 -08:00
Thomas Weißschuh
c477242376 add myself to AUTHORS.rst 2013-11-04 18:54:42 +00:00
Thomas Weißschuh
3ef4115349 upate urllib3 to a0c986a24d 2013-11-04 18:53:41 +00:00
daftshady
1511dfa637 moved logic to Session object and added test case 2013-11-04 22:32:17 +09:00
daftshady
495f87363b fixed #1723 2013-11-04 18:33:14 +09:00
Ian Cordasco
1ba83c47ce Merge pull request #1722 from schinckel/patch-1
Fix documentation typo.
2013-11-03 18:16:21 -08:00
Matthew Schinckel
edf7e5f420 Fix documentation typo. 2013-11-04 12:29:24 +10:30
Cory Benfield
9ffcbb82a2 Capitalisation. 2013-11-01 11:14:05 +00:00
Cory Benfield
c86de38780 Merge pull request #1720 from Lukasa/docs
Chardet -> charade.
2013-11-01 02:21:01 -07:00
Cory Benfield
20f8027641 Chardet -> charade. 2013-11-01 09:20:22 +00:00
Kenneth Reitz
0228851f19 Revert "Merge pull request #1710 from jvantuyl/master"
This reverts commit a8300c0ae6, reversing
changes made to 2e196be143.
2013-10-30 15:32:19 -04:00
Kenneth Reitz
a8300c0ae6 Merge pull request #1710 from jvantuyl/master
loosen URL handling for non-native protocols
2013-10-30 10:17:26 -07:00
Jayson Vantuyl
a9ec28a1b4 don't prepare URLs for oddball schemes 2013-10-30 10:04:43 -07:00
Kenneth Reitz
2e196be143 Merge pull request #1709 from samuelhug/test-branch
Fix for AppEngine
2013-10-28 10:40:52 -07:00
Kenneth Reitz
ebdd5cabab further cleanup examples 2013-10-28 13:39:04 -04:00
Kenneth Reitz
a9839dc7db Merge remote-tracking branch 'origin/master' 2013-10-28 13:36:08 -04:00
Kenneth Reitz
2c1f51be0e fix @lukasa's lack of taste :)
#1702
2013-10-28 13:36:04 -04:00
Kenneth Reitz
129ee3510f Merge pull request #1702 from Lukasa/docs_n_stuff
Improve the PreparedRequest docs.
2013-10-28 10:34:07 -07:00
Kenneth Reitz
55ad38964b Merge pull request #1706 from daftshady/dev2
restoring pull request fixing #1623
2013-10-28 10:32:21 -07:00
Kenneth Reitz
2d5542502b Merge pull request #1707 from canibanoglu/tests
Modified the tests so that they use py.test convention
2013-10-28 10:32:09 -07:00
Kenneth Reitz
c4a7760ca6 Merge pull request #1708 from alex/patch-2
close files in setup.py
2013-10-28 10:31:59 -07:00
Samuel Hug
a501b0ca81 Fix for AppEngine 2013-10-28 09:51:56 -07:00
Alex Gaynor
3488f3ade7 close files in setup.py
otherwise python3.4 warns
2013-10-26 16:43:08 -07:00
Can Ibanoglu
aa60b8ea5b Modified the tests so that they use py.test convention 2013-10-26 13:38:11 +03:00
daftshady
6931bd6715 second commit : Fixed #1623. Added 'MD5-sess' algorithm to HTTPDigestAuth 2013-10-26 18:14:19 +09:00
Kenneth Reitz
25f86f1347 clean up sidebar 2013-10-24 18:09:12 -04:00
Kenneth Reitz
1f83ccb308 get support 2013-10-24 18:07:47 -04:00
Kenneth Reitz
592fb34a3d try gumroad overlay 2013-10-24 18:05:24 -04:00
Kenneth Reitz
cb0d4efba2 projects 2013-10-24 18:01:50 -04:00
Kenneth Reitz
3d8d465a90 "get updates" 2013-10-24 18:00:52 -04:00
Kenneth Reitz
ded42e6498 newsletter 2013-10-24 17:58:30 -04:00
Cory Benfield
e8683f00a6 Improve the PreparedRequest docs. 2013-10-24 21:14:46 +01:00
Kenneth Reitz
7b5c11f66b Merge remote-tracking branch 'origin/master' 2013-10-24 10:54:48 -04:00
Kenneth Reitz
afa7594a20 build status isn't useful anyway 2013-10-24 10:54:45 -04:00
Kenneth Reitz
6e52b5fe41 Merge pull request #1689 from Lukasa/unicode
Use builtin_str for all auto-set header values.
2013-10-24 07:38:52 -07:00
Kenneth Reitz
52fe3f790e Merge pull request #1693 from kevinburke/schema-message
Add clarification to MissingSchema error
2013-10-24 07:35:40 -07:00
Kenneth Reitz
dd777b3d7e urllib3/chardet note in release for v2.0.1 2013-10-24 10:32:05 -04:00
Kenneth Reitz
df272b7740 update internal dependencies 2013-10-24 10:31:05 -04:00
Kenneth Reitz
db108a19c8 Merge pull request #1700 from kennethreitz/v2.0.1
v2.0.1
2013-10-24 07:29:11 -07:00
Kenneth Reitz
c244f8ea87 more release notes for v2.0.1 2013-10-24 10:28:30 -04:00
Kenneth Reitz
f045979f8d release notes 2013-10-24 10:26:47 -04:00
Kenneth Reitz
3d59569264 v2.0.1 2013-10-24 10:00:49 -04:00
Kenneth Reitz
5469291296 $ make ci 2013-10-24 09:54:14 -04:00
Kenneth Reitz
3b35f1c37d replace invoke with makefiles 2013-10-24 09:53:00 -04:00
Kenneth Reitz
e813574497 remove travis support 2013-10-24 09:47:31 -04:00
Kenneth Reitz
e1e6255b48 Merge pull request #1699 from kennethreitz/cert-update
Latest Mozilla Certs
2013-10-24 06:44:26 -07:00
Kenneth Reitz
1a9f0be6df Latest Mozilla Certs
generated via https://github.com/tiran/extract-nss-root-certs
2013-10-24 09:40:39 -04:00
Kenneth Reitz
d9ec7000db Merge pull request #1696 from canibanoglu/remove-parentheses
Removed extra extra parentheses in SessionRedirectMixin.resolve_redirects
2013-10-24 04:10:14 -07:00
Cory Benfield
6b975cbd82 Merge pull request #1697 from canibanoglu/docstring-PreparedRequest
Deleted the extra word in PreparedRequest.prepare's docstring
2013-10-22 14:19:47 -07:00
Can Ibanoglu
76be17b00a Deleted the extra word in PreparedRequest.prepare's docstring 2013-10-23 00:15:41 +03:00
Can Ibanoglu
0cd6959f19 Removed extra extra parentheses in SessionRedirectMixin.resolve_redirects 2013-10-22 23:48:04 +03:00
Cory Benfield
741fd3ded5 Remove requests.*() from docs.
This looks like a typo, even though it isn't.
2013-10-21 11:57:06 +01:00
Cory Benfield
ff2b496e2d Merge pull request #1695 from sigmavirus24/docs
Add bit to docs about iter_content
2013-10-21 01:31:50 -07:00
Ian Cordasco
6a24eb6d20 Add bit to docs about iter_content 2013-10-20 12:29:43 -05:00
Kevin Burke
b5d2160ef8 use .format() 2013-10-20 10:17:54 -07:00
Kevin Burke
333ac101ba Add clarification to MissingSchema error 2013-10-20 00:46:41 -07:00
Cory Benfield
8a42d5fb41 Use builtin_str for all auto-set header values. 2013-10-18 18:34:29 +01:00
Kenneth Reitz
e91ee0e246 Merge remote-tracking branch 'origin/master' 2013-10-17 02:33:05 -04:00
Kenneth Reitz
ab8e43a196 fix unprotected build status link 2013-10-17 02:32:16 -04:00
Kenneth Reitz
c05b1bfca9 Update README.rst 2013-10-17 01:51:50 -04:00
Kenneth Reitz
011f6dac82 Merge remote-tracking branch 'origin/master' 2013-10-17 01:47:39 -04:00
Kenneth Reitz
f35363e584 test out requests-trunk badge 2013-10-17 01:47:00 -04:00
Cory Benfield
c8d3dcb315 Small grammar fix. 2013-10-16 22:11:54 +01:00
Cory Benfield
2ec1bdd0ab Merge pull request #1675 from houqp/master
fix doc for redirction and history
2013-10-16 14:10:31 -07:00
Qingping Hou
3d0a1eb90d fix doc for redirction and history
In current version of requests, allow_redirect is disabled by default
only for HEAD requests
2013-10-16 16:59:22 -04:00
Kenneth Reitz
65ec319f01 Merge pull request #1673 from daftshady/dev
fixed typo
2013-10-15 02:47:55 -07:00
daftshady
17dd3c0a76 fixed typo 2013-10-15 18:33:51 +09:00
Cory Benfield
9606f0240b PEP8 fix to make me happier. 2013-10-13 09:54:01 +01:00
Cory Benfield
31c0962e83 Better connection behaviour for chunked upload. 2013-10-13 09:53:44 +01:00
Kenneth Reitz
3f84190a7b Merge pull request #1667 from Lukasa/json2
Second time lucky for json related fixes.
2013-10-12 14:15:30 -07:00
Cory Benfield
bea2060182 'or content' does us no good. 2013-10-12 21:05:34 +01:00
Ian Cordasco
6632fb87c0 Fix typo 2013-10-11 20:42:52 -05:00
Ian Cordasco
df7aece2c8 Comment our reasonsing for the special cases 2013-10-10 20:43:18 -05:00
Kenneth Reitz
097121d214 Merge pull request #1662 from voberoi/patch-1
Adding myself to AUTHORS.rst
2013-10-10 15:45:14 -07:00
Vikram Oberoi
21c9680a11 Adding myself to AUTHORS.rst
Taking a page out of @mattspitz's book.

https://github.com/kennethreitz/requests/pull/1439

#dreamsdocometrue
2013-10-10 18:13:51 -04:00
Kenneth Reitz
8d63577b78 Merge pull request #1661 from mattspitz/super_len_compatibility
Increasing super_len compatibilty to include BytesIO and cStringIO objects.
2013-10-10 12:11:14 -07:00
Matt Spitz
2c2af651c4 Adding myself to AUTHORS.rst. 2013-10-10 15:08:34 -04:00
Matt Spitz
13a6e02ccd Increasing super_len compatibilty to include BytesIO and cStringIO objects.
Added a check for 'getvalue' attr, calling it to retrieve the length if we can.

We also try/except the fileno() call, which can throw
io.UnsupportedOperation for BytesIO because, well, they're not files.
2013-10-10 14:54:47 -04:00
Cory Benfield
025543b604 Merge pull request #1658 from randymorris/master
False -> True typo
2013-10-08 11:36:12 -07:00
Randy Morris
f32b86dba2 False -> True typo 2013-10-08 14:19:30 -04:00
Ian Cordasco
0bb8be0e5b Parse cookies when users set custom Host header 2013-10-07 21:43:21 -05:00
Ian Cordasco
a4605fe324 Fix failing test to preserve behaviour 2013-10-07 21:17:59 -05:00
Ian Cordasco
f12584b94a Add tests around hook behaviour 2013-10-07 21:17:46 -05:00
Kenneth Reitz
43477edc91 Merge pull request #1636 from Lukasa/httpsprox
Don't send the full URL on CONNECT messages.
2013-10-07 16:23:18 -07:00
Kenneth Reitz
318ca102cd Merge pull request #1635 from daftshady/dev
Fixed #1630 and added test case.
2013-10-07 16:22:49 -07:00
Kenneth Reitz
14c12fb151 Merge pull request #1637 from Lukasa/redir
Correctly lowercase a redirect scheme.
2013-10-07 16:21:29 -07:00
Kenneth Reitz
3246fc088a Merge pull request #1640 from abarnert/master
Accept per-file headers in multipart file POST messages.
2013-10-07 16:21:16 -07:00
Cory Benfield
45873e2a0a Merge pull request #1656 from randymorris/master
Update verbiage about streaming requests
2013-10-07 13:45:11 -07:00
Ian Cordasco
5bf396d5d1 Honor session hooks 2013-10-07 12:23:16 -05:00
Randy Morris
66339b21fa update verbiage about streaming requests
The Twitter API is no longer used in the example.
2013-10-07 10:43:48 -04:00
Cory Benfield
d8180f5dac Merge pull request #1654 from riyadparvez/deprecation-removal
Deprecation removal and other idiomatic updates
2013-10-05 10:02:46 -07:00
Riyad Parvez
48f59aa1f7 back to BaseException 2013-10-05 22:49:54 +06:00
Riyad Parvez
56c82c52b0 fixed print statement 2013-10-05 20:12:18 +06:00
Riyad Parvez
36485983ca fixed print statement 2013-10-05 20:11:30 +06:00
Riyad Parvez
6087015f1c Update advanced.rst 2013-10-05 20:10:27 +06:00
Riyad Parvez
5c92c72e2c removed deprecated while 1: 2013-10-05 09:59:47 +06:00
Riyad Parvez
4656c9b89b fixed print statement 2013-10-05 09:57:18 +06:00
Riyad Parvez
8370e66464 fixed print statement 2013-10-05 09:56:11 +06:00
Riyad Parvez
f9b7d92b91 updated print statement 2013-10-05 09:55:14 +06:00
Riyad Parvez
c8a68334a7 replaced deprecated BaseException 2013-10-05 09:53:34 +06:00
Cory Benfield
953b234aff Merge pull request #1649 from dpursehouse/minor-doc-updates
Minor doc updates
2013-10-04 01:55:19 -07:00
Kenneth Reitz
c9bee155c2 Merge pull request #1651 from GrahamDumpleton/master
Translate urllib3 ProxyError into a requests ProxyError derived from ConnectionError.
2013-10-03 23:14:26 -07:00
Graham Dumpleton
4291f76c99 Translate urllib3 ProxyError into a requests ProxyError derived from ConnectionError. 2013-10-04 16:07:11 +10:00
David Pursehouse
82e6706722 Minor doc updates
- Improve wording of sentence describing proxy environment
  variable setting.
- Mention that proxy URLs must include the scheme.
2013-10-04 10:19:33 +09:00
Andrew Barnert
af4fb8cedc Accept per-file headers in multipart file POST messages.
- Each file in the `files` argument can now be a 4-tuple, instead of
  just a file, 2-tuple, or 3-tuple. If it is, the last value in the
  tuple is a dictionary of extra headers.
2013-09-30 17:07:13 -07:00
daftshady
c8fc19a779 add myself to authors. 2013-09-29 02:27:20 +09:00
daftshady
012f0334ce added param to cookiejar_from_dict instead of creating new method. 2013-09-29 01:08:58 +09:00
Cory Benfield
0051837af4 Correctly lowercase a redirect scheme. 2013-09-28 17:01:32 +01:00
Cory Benfield
8b7fcfb49a Don't send the full URL on CONNECT messages. 2013-09-28 15:46:43 +01:00
daftshady
d22eaf96e2 Fixed #1630 2013-09-28 23:44:27 +09:00
daftshady
373166d833 checkout auth 2013-09-28 16:41:08 +09:00
daftshady
39fe0068aa Fixed #1630, added test case for cookie persistence. 2013-09-28 16:33:05 +09:00
daftshady
1d1831ba40 fixed extra bonus bug 2013-09-27 22:17:40 +09:00
daftshady
3501ea4634 Fixed #1623. Added 'MD5-sess' algorithm to HTTPDigestAuth 2013-09-26 15:40:12 +09:00
Cory Benfield
9968a10fcf Typo in changelog. 2013-09-25 14:00:17 +01:00
Kenneth Reitz
768b175fee Merge pull request #1621 from davidfischer/migrate-2-0
Added migrating to 2.x docs
2013-09-24 19:02:18 -07:00
David Fischer
a17f5592f8 Added link to @Lukasa's blog - the source material 2013-09-24 18:59:04 -07:00
David Fischer
fbb8d32c4e Added migrating to 2.x docs 2013-09-24 18:35:22 -07:00
Kenneth Reitz
4401620111 add history to the docs 2013-09-24 15:08:12 -04:00
Kenneth Reitz
b8a8835151 readme fix 2013-09-24 14:41:39 -04:00
Kenneth Reitz
4f463e897a Merge remote-tracking branch 'origin/master' 2013-09-24 14:31:25 -04:00
Kenneth Reitz
58eacfa1ad Merge pull request #1619 from Lukasa/master
Up to date CL.
2013-09-24 11:31:13 -07:00
Kenneth Reitz
c93419f512 TimeoutSauce! 2013-09-24 14:31:00 -04:00
Cory Benfield
53ba629a23 Up to date CL. 2013-09-24 19:26:31 +01:00
Kenneth Reitz
62925fb668 note on timeouts 2013-09-24 14:22:02 -04:00
Kenneth Reitz
94da24e387 v2.0.0 2013-09-24 14:19:07 -04:00
Kenneth Reitz
2d283c9f2d 2.0.0 2013-09-24 14:17:17 -04:00
Kenneth Reitz
54ad646067 merge 2.0 insto master 2013-09-24 14:13:28 -04:00
Kenneth Reitz
12760f2295 runscope! 2013-09-24 14:08:28 -04:00
Kenneth Reitz
c64c0ab121 prototype for new urllib3 timeouts 2013-09-24 14:06:24 -04:00
Kenneth Reitz
2f39e0e2aa new urllib3 2013-09-24 13:59:38 -04:00
Kenneth Reitz
23ced527f7 Merge pull request #1503 from skastel/master
Fixing error return to be consistent with tuple return at the end of the method
2013-09-24 10:48:07 -07:00
Kenneth Reitz
2affd6385e Merge pull request #1602 from sigmavirus24/handle_multiple_qop_types
Handle multiple qop types
2013-09-24 10:46:16 -07:00
Kenneth Reitz
58376489af Merge pull request #1585 from rvoicilas/master
Use values() when the keys are not being used
2013-09-24 10:45:46 -07:00
Kenneth Reitz
a2dbf54456 Merge pull request #1541 from Lukasa/releasenote
[2.0] Tracking PR for the 2.0 changelog
2013-09-24 10:45:11 -07:00
Kenneth Reitz
03d844f926 Merge pull request #1565 from Lukasa/relative
Don't absolute import things we've vendored.
2013-09-24 10:39:09 -07:00
Kenneth Reitz
9ffc5e6a95 runscope 2013-09-24 13:31:29 -04:00
Ian Cordasco
22e31b4b73 Handle case when WWW-Authenticate returns multiple qops
In Digest Access Authentication there are two possible values (four if you
count the not-present and both cases) for authentication. We were narrowly
handling one of the four cases. Now we handle two.
2013-09-13 22:29:42 -05:00
Kenneth Reitz
c0e9f411fc Merge pull request #1598 from Lukasa/defaults
[2.0] Python default arguments are hard
2013-09-13 06:17:41 -07:00
Cory Benfield
61421843bc Python defaults arguments are hard. 2013-09-13 14:10:09 +01:00
Cory Benfield
ce6762ff63 Fixup unicode in AUTHORS file 2013-09-12 10:34:34 +01:00
Cory Benfield
d8f2463b57 Merge pull request #1592 from homm/master
remove extra mention of dangerous `r.raw`
2013-09-12 02:29:16 -07:00
homm
f0c592b09e Update AUTHORS.rst 2013-09-12 13:27:06 +04:00
homm
a4cd1a85d6 fix spelling 2013-09-12 13:21:54 +04:00
homm
3440fca2e8 clearly describe r.raw in Body Content Workflow 2013-09-12 13:13:51 +04:00
homm
10b6d77945 remove extra mention of dangerous r.raw 2013-09-12 10:20:47 +04:00
Cory Benfield
917a15f154 Merge pull request #1591 from sayanchowdhury/patch-1
minor typo: Fix requests spelling
2013-09-11 08:16:29 -07:00
Sayan Chowdhury
0a52d9405e minor typo: Fix requests spelling 2013-09-11 20:21:57 +05:30
Cory Benfield
cde6fdd00f Merge pull request #1587 from kracekumar/patch-1
Fixed persistence spelling
2013-09-10 06:43:04 -07:00
kracekumar
a829ef9b46 Fixed persistence spelling 2013-09-10 17:52:29 +05:30
Radu Voicilas
056da86f6d Use values() when the keys are not being used 2013-09-09 15:21:36 +03:00
Cory Benfield
c1eb7027fc Merge pull request #1579 from yang/patch-1
Clarify timeout behavior in quickstart doc
2013-09-08 08:05:00 -07:00
Yang Zhang
2cb523b267 Fix typo in Timeouts doc 2013-09-07 00:16:09 -07:00
Yang Zhang
6d0315f78f Clarify timeout behavior in quickstart doc 2013-09-06 19:27:57 -07:00
Cory Benfield
b891877ee6 Merge pull request #1578 from jparise/jparise-authors
Adding myself to the list of contributors.
2013-09-04 23:44:28 -07:00
Jon Parise
9d0d11a369 Adding myself to the list of contributors. 2013-09-04 09:00:03 -07:00
Kenneth Reitz
6c73d864ef Merge pull request #1575 from jparise/content-encoding
Improved content encoding detection.
2013-09-03 19:42:43 -07:00
Jon Parise
b9b5be7c4c Improved content encoding detection.
get_encodings_from_content() can now detect HTML in-document content
encoding declarations in the following formats:

 - HTML5
 - HTML4
 - XHTML 1.x served with text/html MIME type
 - XHTML 1.x served as XML

Ref: http://www.w3.org/International/questions/qa-html-encoding-declarations
2013-09-03 16:16:46 -07:00
Cory Benfield
d991fb032a Merge pull request #1566 from sigmavirus24/update_readme
Add link to Contributor Friendly tag in README
2013-09-01 11:25:04 -07:00
Ian Cordasco
9f42a50742 Add link to Contributor Friendly tag
Add note that I'm willing to help anyone who is looking to submit a pull request
2013-09-01 13:21:55 -05:00
Cory Benfield
88011f4032 Bring release note current to 1st Sept. 2013-09-01 18:46:46 +01:00
Cory Benfield
1aa7658256 Don't absolute import vendored things. 2013-09-01 18:10:09 +01:00
Cory Benfield
e77344345a Merge pull request #1556 from ssbarnea/master
Added link to StackOverflow questions related to python-requests. This s...
2013-08-27 08:03:33 -07:00
Sorin Sbarnea
a0ffeaa56e Added link to StackOverflow questions related to python-requests. This should be the default support way for the library, as clearly most questions are supposed to be programming related.
Signed-off-by: Sorin Sbarnea <sorin.sbarnea@citrix.com>
2013-08-27 15:39:07 +01:00
Kenneth Reitz
efbae1855b Merge pull request #1552 from Lukasa/noproxy
Allow spaces in the no_proxy environ variable
2013-08-23 17:23:57 -07:00
Cory Benfield
f040b2aa5d Allow spaces in the no_proxy environ variable. 2013-08-23 12:37:03 +01:00
Kenneth Reitz
09c52e7282 Merge pull request #1537 from Lukasa/datetime
Allow non-string objects to be posted as data alongside files.
2013-08-21 11:46:27 -07:00
Kenneth Reitz
4b6649e37b Merge pull request #1527 from paul-matthews/restrict-hooks-access
Raise an error for unsupported hook event
2013-08-21 11:28:23 -07:00
Kenneth Reitz
aeeb0af3a2 Merge pull request #1536 from Lukasa/IOError
RequestsException subclasses IOError
2013-08-21 11:25:20 -07:00
Cory Benfield
148c1b5c13 Begin work on the 2.0 changelog. 2013-08-19 13:28:05 +01:00
Cory Benfield
377ac9501a Merge pull request #1540 from libbkmz/master
Event hooks update
2013-08-18 13:03:03 -07:00
libbkmz
78e5262dbd Update advanced.rst 2013-08-19 00:01:37 +04:00
Cory Benfield
0f40290039 Merge pull request #1538 from enkore/patch-1
Remove superfluous double dot
2013-08-17 23:26:59 -07:00
enkore
4ffc3e4d1f Remove superfluous double dot 2013-08-18 03:06:34 +02:00
Cory Benfield
f44b86e039 Allow non-string objects to be data with files 2013-08-17 07:27:58 +01:00
Cory Benfield
3bc01eed6f RequestException subclasses IOError. 2013-08-17 07:17:03 +01:00
Kenneth Reitz
3dc61e5d68 Merge pull request #1535 from sigmavirus24/ignore_original_response_if_none
Skip cookie extraction if necessary
2013-08-16 20:15:18 -07:00
Ian Cordasco
98680b64f4 Skip cookie extraction if necessary
If _original_response is never set/is None, then don't try to extract cookies
from the response.
2013-08-16 21:38:20 -05:00
Kenneth Reitz
d8268fb7b4 Merge pull request #1515 from schlamar/https-proxy-2.0
[2.0] Https proxy support
2013-08-14 13:41:08 -07:00
Cory Benfield
2e5a674601 Add proxy_headers functionality.
This brings us in line with urllib3's fancy new magic for sending
headers to HTTP(S) proxies.
2013-08-14 09:47:44 +01:00
Paul Matthews
61617e74ed Raise an error for unsupported hook event
* Raises a ValueError for an unsupported hook event
2013-08-12 15:27:17 +01:00
Stephen Huenneke
b676bf3214 Fixing tests to verify thrown ValueError's. 2013-08-08 09:20:41 -07:00
Stephen Huenneke
9dd823c289 Raising ValueError's when we're passed inconsistent POST data and files dict. 2013-08-06 11:04:03 -07:00
Kenneth Reitz
d3b786399e Merge pull request #1516 from Lukasa/io
UnsupportedOperation errors
2013-08-06 08:43:44 -07:00
Cory Benfield
a5e5a51fb4 Catch UnsupportedOperation. 2013-08-03 19:24:23 +01:00
schlamar
09d97c1126 Added entry to AUTHORS. 2013-08-03 13:59:38 +02:00
schlamar
6a3ca7372f Added proxy support to feature list. 2013-08-03 13:59:38 +02:00
ms4py
c951f0543c Cache manager for proxy connection. 2013-08-03 13:59:28 +02:00
ms4py
134699faf9 Fix for new proxy API. 2013-08-03 13:57:15 +02:00
ms4py
d06dabab59 Update urllib3 to 14b8945 2013-08-03 13:55:19 +02:00
Kenneth Reitz
a05aba1033 Merge pull request #1514 from Lukasa/verror
Better percent-escape exception.
2013-08-02 09:48:33 -07:00
Cory Benfield
5a26241287 Better percent-escape exception. 2013-08-02 12:29:23 +01:00
Kenneth Reitz
abfb38bd57 Merge pull request #1508 from dieterv/master
remove duplicate comment
2013-07-31 18:36:07 -07:00
Kenneth Reitz
bd1f1404a0 Merge branch 'fix_401_cookies' of git://github.com/sigmavirus24/requests into 2.0 2013-07-31 21:33:24 -04:00
Kenneth Reitz
f865d61713 Merge branch 'proxyscheme' of git://github.com/Lukasa/requests into 2.0 2013-07-31 21:27:01 -04:00
Kenneth Reitz
1a6637c285 Merge branch 'keytype' of git://github.com/Lukasa/requests into 2.0 2013-07-31 21:25:57 -04:00
Kenneth Reitz
22701d149a Merge pull request #1500 from gavrie/master
Update urllib3 to d89d508
2013-07-31 18:23:43 -07:00
Kenneth Reitz
d5fd3d3331 Merge pull request #1487 from dpursehouse/rewrite-test_mixed_case_scheme_acceptable
Rewrite test cases to remove dependency on httpbin.org and example.com
2013-07-31 18:23:34 -07:00
Kenneth Reitz
d5a8816926 Merge pull request #1498 from Lukasa/incompleteread
Wrap IncompleteRead in ChunkedEncodingError.
2013-07-31 18:23:14 -07:00
Kenneth Reitz
6b13ecdc85 Merge pull request #1501 from sigmavirus24/remove_setting_of_hooks
Fix duplication of efforts caught by @dofelw
2013-07-31 18:22:58 -07:00
Kenneth Reitz
7eb9a9298e Merge pull request #1506 from Lukasa/mockrequest
Provide 'host' parameter to MockRequest.
2013-07-31 18:22:02 -07:00
Kenneth Reitz
3e6e68baa1 Merge pull request #1507 from buzztabapp/prepared-session-requests
Allow preparing of Requests from Session settings without sending.
2013-07-31 18:21:28 -07:00
Robert Estelle
0ab7a52f7c Merge settings when creating PreparedRequest, don't copy Request. 2013-07-31 13:42:02 -07:00
Dieter Verfaillie
852de116dd remove duplicate comment
This is already mentioned at line 357...
2013-07-31 09:29:24 +02:00
Robert Estelle
0eccb547a2 Add Session.prepare_request test case. 2013-07-30 23:02:13 -07:00
Robert Estelle
d4385f6fc8 Add Request.copy() test case. 2013-07-30 23:01:56 -07:00
Robert Estelle
ee90f0af60 Shallow copy of Request fields in Request.copy()
This prevents e.g. modifying the headers of a copied request from
affecting the headers of its source and vice versa. Copying is used with
the intent to mutuate, so allowing this kind of mutation of fields makes
sense.

Is a deep copy better?
2013-07-30 22:59:53 -07:00
Robert Estelle
9edba838b3 Skip unneccessary Request.copy in Session.request 2013-07-30 22:59:11 -07:00
Robert Estelle
b5c136152f Prepare requests with session settings separately from sending. 2013-07-30 21:39:36 -07:00
Cory Benfield
6ef3710970 Provide 'host' parameter to MockRequest. 2013-07-30 18:21:37 +01:00
Stephen Huenneke
f75ee9fb6e Making sure we check for str/unicode. 2013-07-29 14:42:47 -07:00
Stephen Huenneke
8d9d9fb064 Fixing error return to be consistent with tuple return at the end of the method. 2013-07-29 13:31:06 -07:00
Cory Benfield
7de6b1e162 Instantiate the CID directly.
No need to do this the slow way now. Thanks to Colin (@cdunklau) for the
idea.
2013-07-29 14:52:44 +01:00
Cory Benfield
ec2859c0de Modify new CID tests to use native string keys. 2013-07-29 14:52:44 +01:00
Cory Benfield
f5775594cc Header keys should be native strings.
This commit follows a discussion on IRC. For more information, see the
Pull Request associated with it.
2013-07-29 14:52:44 +01:00
Ian Cordasco
37786613e0 Fix duplication of efforts caught by @dofelw 2013-07-29 08:09:07 -05:00
Gavrie Philipson
ea2b639d31 Update urllib3 to d89d508 2013-07-29 11:29:41 +03:00
Cory Benfield
79f3e69f5e Wrap IncompleteRead in ChunkedEncodingError. 2013-07-28 07:42:17 +01:00
Cory Benfield
840540b6b1 Proxy urls should have explicit schemes. 2013-07-28 07:16:06 +01:00
Cory Benfield
9473f15909 Merge pull request #1494 from Lukasa/close
Document the Response.close() method.
2013-07-27 23:04:34 -07:00
Ian Cordasco
286ddb672d Take advantage of the new copy method 2013-07-27 23:08:46 -04:00
Ian Cordasco
972089826e Fixed finally. Also requires updated httpbin.org 2013-07-27 23:07:25 -04:00
Ian Cordasco
c25a72ea24 Make the regular tests pass
I broke Digest Auth completely
2013-07-27 23:07:25 -04:00
Ian Ross and Ian Cordasco
73635df1b2 Start work on sending cookies back
On 401's the cookies received aren't sent back to the server. See: #1336
2013-07-27 23:07:25 -04:00
Kenneth Reitz
77bd9c4a9d Merge pull request #1476 from sigmavirus24/add_copy_to_prepared_requests
[2.0] Add copy method to PreparedRequest objects
2013-07-26 18:16:00 -07:00
Cory Benfield
f401287afb Document the Response.close() method. 2013-07-25 19:10:42 +01:00
Cory Benfield
3becc47366 Comment markups, courtesy of @sigmavirus24 2013-07-24 16:03:24 +01:00
Kenneth Reitz
7d3d074e66 Merge pull request #1490 from Lukasa/cookiedocs
Better cookie docs on sessions.
2013-07-24 06:12:10 -07:00
Cory Benfield
f40a1d6a8a Better cookie docs on sessions. 2013-07-24 13:25:59 +01:00
David Pursehouse
82c9aa912e Check the response URL in test_uppercase_scheme_redirect
Update the test to check that the URL in the response is the
one that we expect, i.e. the one it was supposed to redirect to.
2013-07-24 17:37:35 +09:00
David Pursehouse
56b5f02551 Rewrite test_uppercase_scheme_redirect to use local httpbin
Instead of redirecting to hard-coded 'example.com', use the URL
defined in `HTTPBIN_URL` with the path set to the 'html' endpoint.
2013-07-24 17:18:16 +09:00
David Pursehouse
c4f16c351c Remove redundant test case test_uppercase_scheme
This test verifies that an upper case scheme ('HTTP') works correctly,
but this is already tested in `test_mixed_case_scheme_acceptable`.
2013-07-24 16:58:09 +09:00
David Pursehouse
012cc33d44 Rewrite test_mixed_case_scheme_acceptable to work with local httpbin
Instead of using hard-coded urls to httpbin.org, use the url defined
in `HTTPBIN_URL` replacing the scheme as necessary to test the mixed
cases.

Refs #1485
2013-07-24 16:36:10 +09:00
David Pursehouse
415fb53cb4 Remove redundant session in test_mixed_case_scheme_acceptable 2013-07-24 12:15:46 +09:00
Kenneth Reitz
b65b8c5ed3 Merge pull request #1486 from sigmavirus24/use_urljoin
Use urlparse.urljointo construct httpbin url
2013-07-23 09:03:05 -07:00
Ian Cordasco
c0cb698191 Derp. Use compat 2013-07-23 10:48:45 -05:00
Ian Cordasco
d2176cf052 Use urlparse.urljointo construct httpbin url 2013-07-23 10:24:30 -05:00
Kenneth Reitz
f71bff1226 Merge pull request #1482 from dpursehouse/fix-testcases-with-proxy
Fix test cases that fail when running behind a proxy
2013-07-23 05:23:35 -07:00
Kenneth Reitz
47f5a0db64 Merge pull request #1483 from dpursehouse/httpbin-url-without-trailing-slash
Test cases fail when `HTTPBIN_URL` does not have trailing slash
2013-07-23 05:23:11 -07:00
David Pursehouse
9e771aa79c Fix test cases that fail when running behind a proxy
When sending a request via `Session.send()` the proxies must be
explicitly given with the `proxies` argument.  This is not done
in the test cases, which means that they fail when run on a system
that is behind a proxy.

Update test cases to make sure the proxies are set in the sessions.
2013-07-23 16:55:27 +09:00
David Pursehouse
29db7b7216 Test cases fail when HTTPBIN_URL does not have trailing slash
Test cases can be run against a local httpbin server defined by
the `HTTPBIN_URL` environment variable, but it causes tests to
fail if the given URL does not end with a slash.

Ensure that the URL always ends with a slash.
2013-07-23 15:29:36 +09:00
Kenneth Reitz
66de6b528d Merge pull request #1479 from dpursehouse/fix-warnings
Fix a few warnings flagged by PyDev
2013-07-22 01:31:16 -07:00
David Pursehouse
4f64938ff0 Fix a few warnings flagged by PyDev
- Unused import of urlparse
- Unnecessary definition of variable
- Incorrect indentation
2013-07-22 17:14:45 +09:00
Kenneth Reitz
e5597dfcce Merge pull request #1478 from dpursehouse/add-me-to-authors
Add myself to the authors list
2013-07-22 00:09:35 -07:00
David Pursehouse
787c1e8c6e Add myself to the authors list 2013-07-22 15:19:10 +09:00
Cory Benfield
ec6584f2d1 Merge pull request #1477 from dpursehouse/other-auth-basic-example
Add a simple example of custom authentication in the documentation
2013-07-21 23:04:31 -07:00
David Pursehouse
62f0df4434 Add a simple example of custom authentication in the documentation
Refs #1471
2013-07-22 09:14:33 +09:00
David Pursehouse
5cdcf58b3b Wrap long lines in the authentication documentation 2013-07-22 09:08:47 +09:00
Ian Cordasco
b84547d786 Add copy method to PreparedRequest objects 2013-07-20 17:08:35 -04:00
Kenneth Reitz
d83919a6f7 Merge pull request #1474 from Kwpolska/docfix
Some tiny fixes to the documentation
2013-07-20 05:15:06 -07:00
Kwpolska
2ef782b8e6 further treatment
Signed-off-by: Kwpolska <kwpolska@gmail.com>
2013-07-20 13:54:33 +02:00
Kwpolska
b738c97ec3 session object should be uppercase
Signed-off-by: Kwpolska <kwpolska@gmail.com>
2013-07-20 13:39:50 +02:00
Kwpolska
022c370bcd fixed underline
Signed-off-by: Kwpolska <kwpolska@gmail.com>
2013-07-20 13:31:37 +02:00
Kwpolska
587385bfe0 Grammar fixes and such
Signed-off-by: Kwpolska <kwpolska@gmail.com>
2013-07-20 12:56:25 +02:00
Kwpolska
ca033b83fe Some cosmetic updates to the docs
Signed-off-by: Kwpolska <kwpolska@gmail.com>
2013-07-20 12:12:57 +02:00
Cory Benfield
949a29c34f Merge pull request #1470 from Lukasa/carset
Remove charset from JSON types: not valid.
2013-07-19 06:45:56 -07:00
Cory Benfield
be884341f4 Merge pull request #1465 from dpursehouse/doc-netrc-authentication
Improve documentation of netrc authentication
2013-07-19 06:45:17 -07:00
David Pursehouse
c88fd8cc9d Move netrc authentication documentation under the Basic Auth section 2013-07-19 22:37:57 +09:00
Cory Benfield
8385fb397b Remove charset from JSON types: not valid. 2013-07-19 14:03:20 +01:00
Cory Benfield
e0df4b5f18 Merge pull request #1466 from s7v7nislands/fix_doc
Fix doc
2013-07-19 04:12:29 -07:00
s7v7nislands
39ad5e7388 merge 2013-07-19 17:12:01 +08:00
s7v7nislands
0df505bd7c fix doc 2013-07-19 17:04:53 +08:00
David Pursehouse
6f6a920a68 Improve documentation of netrc authentication
The documentation does not make it clear that when the credentials
from netrc are used, Requests authenticates with HTTP Basic Auth.

I just spent ages trying to figure out why it wasn't working, and
it was because although the credentials in the netrc were correct,
the server actually required HTTP Digest Auth.

Add a section in the authentication documentation to make it clear
that HTTP Basic Auth is used.
2013-07-19 17:30:54 +09:00
Cory Benfield
32293655ff Merge pull request #1464 from dpursehouse/document-none-not-sent
Fix #1322: Add note in docs about None not being sent as data
2013-07-19 01:19:55 -07:00
David Pursehouse
07ad75ee04 Fix #1322: Add note in docs about None not being sent as data
In the case:

  payload = {'key1': 'value1', 'key2': 'value2', 'key3': None}
  r = requests.get("http://httpbin.org", params=payload)

the parameter `key3` will not be sent as a parameter in the URL.

Mention this in the documentation.
2013-07-19 17:14:59 +09:00
Kenneth Reitz
e4b41320e6 Merge pull request #1463 from AudriusButkevicius/master
Update urllib3 to a43319f
2013-07-18 15:00:28 -07:00
Audrius Butkevicius
9f119ee420 Update urllib3 to a43319f 2013-07-18 21:06:19 +00:00
Kenneth Reitz
e0df2168b7 Merge remote-tracking branch 'origin/master' 2013-07-16 02:20:28 -04:00
Kenneth Reitz
d7e8073198 badge.fury.io 2013-07-16 02:20:23 -04:00
Kenneth Reitz
65a0fd88a9 Merge pull request #1440 from fcurella/patch-0
unquote double-quotes cookie values
2013-07-15 06:54:00 -07:00
Kenneth Reitz
4b7cf389e4 Merge pull request #1439 from voberoi/master
Make sure netrc doesn't override any authentication settings explicitly set by the client
2013-07-15 06:22:53 -07:00
Kenneth Reitz
86d466c745 Merge pull request #1441 from Lukasa/1395
Remove urllib3-specific kwargs from non-urllib3 branch.
2013-07-15 06:22:41 -07:00
Kenneth Reitz
de9d84489b Merge pull request #1456 from phndiaye/master
Changed the "im_used" informational status code for the value given by IANA (226)
2013-07-15 06:21:31 -07:00
Philippe Ndiaye
18a736fbe6 Set 208 status_code to "already_reported" 2013-07-13 11:08:01 +02:00
Philippe Ndiaye
7bdf37bc27 Changed the "im_used" informational status code for the value given by IANA (226)
See RFC 3229 at http://tools.ietf.org/html/rfc3229#section-10.4.1 and HTTP status codes at http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
2013-07-13 09:55:50 +02:00
Kenneth Reitz
41517e2111 Delete invokefile.py 2013-07-06 14:04:50 +10:00
Cory Benfield
555472bf1e Remove urllib3-specific kwargs from general code 2013-07-04 10:34:43 +01:00
Flavio Curella
7da16c584a Added myself to AUTHORS 2013-07-01 15:54:59 -05:00
Flavio Curella
a8cf5b8502 keep the double quotes, but don't escape them 2013-07-01 15:48:48 -05:00
Flavio Curella
cdab4fabf4 unquote double-quotes cookie values 2013-07-01 13:51:40 -05:00
Vikram Oberoi
d9c49ad30d Add test to verify .netrc authentication behavior.
Here's what should happen:

- If no credentials are given, use netrc if there's a netrc entry.
- If credentials are given, they should override netrc.
2013-06-27 17:16:42 -04:00
Vikram Oberoi
188e7609b3 .netrc settings shouldn't blow away explicit auth settings on a session 2013-06-27 16:43:40 -04:00
Cory Benfield
2b62980e26 Merge pull request #1437 from lukaszb/patch-1
Fixed wrong method call at streaming example
2013-06-27 11:18:56 -07:00
Lukasz Balcerzak
805abee9b4 Fixed wrong method call at streaming example
405 is returned if POST request is performed to http://httpbin.org/stream/20
2013-06-27 13:37:39 +02:00
Kenneth Reitz
a1bb7fb0d2 Merge pull request #1435 from chinux23/master
@1434 https://github.com/kennethreitz/requests/issues/1434
2013-06-25 15:49:04 -07:00
Chen Huang
9083735963 @1434 Fix https://github.com/kennethreitz/requests/issues/1434 2013-06-25 18:38:59 -04:00
Cory Benfield
dcf20c4cfe Merge pull request #1429 from Lukasa/docs
Packaging warning, in via @andrewgross.
2013-06-24 00:48:48 -07:00
Cory Benfield
d57a5efab3 Packaging warning, in via @andrewgross. 2013-06-22 15:02:18 +01:00
Kenneth Reitz
3781c96125 Merge pull request #1425 from Lukasa/stream
Use new urllib3 'stream' parameter.
2013-06-21 02:23:10 -07:00
Cory Benfield
1faa76a86f Use the new urllib3 stream generator. 2013-06-18 17:56:35 +01:00
Cory Benfield
ecf57cac5c Update urllib3 to cffbd6b317 2013-06-18 17:47:23 +01:00
Kenneth Reitz
25db83fe85 Merge pull request #1419 from kevinburke/exception-links
Exception links
2013-06-14 22:50:44 -07:00
Kevin Burke
ba0db9db86 Add self to AUTHORS 2013-06-12 15:56:10 -07:00
Kevin Burke
a6415cf895 Link to the actual exception references
Sphinx has a neat cross-referencing feature where if you include the tilde
character in front of a :py: class, it'll link to the full object but provide
only the last part of class name in the text. For more info see
http://sphinx-doc.org/domains.html#cross-referencing-syntax
2013-06-12 15:53:09 -07:00
Kenneth Reitz
df935f5b03 Merge pull request #1414 from jschneier/master
fixed typo in docs
2013-06-12 11:12:17 -07:00
Josh Schneier
43a64d9515 fix doc typo 2013-06-09 11:14:14 -04:00
Kenneth Reitz
70a6d035d9 Merge pull request #1315 from reclosedev/fix-redirects
Don't reuse the same prepared request for all redirects
2013-06-08 03:53:16 -07:00
Roman Haritonov
716b627c1e Don't reuse PreparedRequest on redirects 2013-06-08 14:41:34 +04:00
Roman Haritonov
798a1ffdec new failing test_requests_in_history_are_not_overridden() 2013-06-08 14:41:34 +04:00
Kenneth Reitz
8028103b71 Merge pull request #1400 from jam/master
Retrieve environment proxies using standard library functions
2013-06-08 03:20:18 -07:00
Kenneth Reitz
8430e6ccbb Merge pull request #1334 from rcarz/master
resolve_redirects no longer throws an InvalidSchema exception when the scheme is uppercase
2013-06-08 03:18:25 -07:00
Kenneth Reitz
d4c461042b Merge pull request #1385 from ViktorHaag/master
Cope with mixed-case URL schemes (like 'HTTP') by lower-ifying 'url' string before calling startswith() on it
2013-06-08 03:17:38 -07:00
Kenneth Reitz
60b1a0ba13 Merge pull request #1381 from expandrive/master
Don't force chunked transfer on 0-length file-like object.
2013-06-08 03:16:32 -07:00
Kenneth Reitz
cfd84d74ee Merge pull request #1392 from revolunet/patch-2
Update quickstart.rst
2013-06-08 03:16:21 -07:00
Kenneth Reitz
eec9bdd434 Merge pull request #1408 from wasw100/master
cookies.morsel_to_cookie morsel['expires'] can't be strtime, and morsel['max-age'] convert to expires problem repair
2013-06-08 03:14:32 -07:00
Kenneth Reitz
f74d5e96dd Merge pull request #1412 from t-8ch/update_urllib3
update urllib3 to 60ba176f5d
2013-06-08 03:13:34 -07:00
Kenneth Reitz
e63e68ef48 Merge pull request #1413 from Lukasa/docs
Assorted docs updates
2013-06-08 03:13:14 -07:00
Cory Benfield
73425fbffb Remove development reference from docs sidebar. 2013-06-08 11:10:07 +01:00
Cory Benfield
f53aed1611 Document blocking calls. 2013-06-08 11:09:39 +01:00
Thomas Weißschuh
2ed976ea71 update urllib3 to 60ba176f5d 2013-06-08 08:22:15 +00:00
wasw100
767f758aac cookies.morsel_to_cookie morsel['expires'] can't be strtime, and max-age convert to expires problem repair 2013-06-07 00:02:45 +08:00
wasw100
961790f95c cookies.morsel_to_cookie(morsel) raise TypeError repaired.
morsel_to_cookie(mosel) method raise TypeError: create_cookie() got unexpected keyword arguments: ['path_specified', 'domain_specified', 'port_specified', 'domain_initial_dot'].

so we should remove these param from create_cookie(...)
2013-06-06 19:15:09 +08:00
James Clarke
f705c41c1d Added myself to AUTHORS. 2013-05-31 18:19:42 -07:00
James Clarke
93be6916f9 Use urllib to retrieve environment proxies.
This has the added benefit of including proxies defined by the OS X System Configuration framework and in the Windows registry, rather than only checking os.environ.
2013-05-31 18:19:34 -07:00
Julien Bouquillon
340931ba8e Update quickstart.rst
rephrase misleading info about `raise_for_status`
2013-05-29 12:57:49 +03:00
Bob Carroll
2c5ea69e5d rebased with upstream/master 2013-05-26 14:46:36 -07:00
Bob Carroll
d59510481a this didn't merge properly 2013-05-26 14:45:49 -07:00
Bob Carroll
f3036adc4f added assertion to test_uppercase_scheme_redirect for the response code 2013-05-26 14:44:37 -07:00
Bob Carroll
489a412f96 I probably should add my name too 2013-05-26 14:44:37 -07:00
Bob Carroll
72e155e529 resolve_redirects now checks for a scheme before converting the scheme to lowercase, added tests or the scheme casing 2013-05-26 14:44:22 -07:00
Bob Carroll
e715d7184b resolve_redirects no longer throws an InvalidSchema exception when the scheme is uppercase 2013-05-26 14:43:00 -07:00
Kenneth Reitz
3bb13f8fbb v1.2.3 2013-05-25 12:48:10 -04:00
Viktor Haag
01993d21dc added tests for mixed-case scheme URLs, changed adapters passing down URLs into urllib3 by lower-ifying them so that the underlying pool manager can effectively pool by scheme as dictionary key 2013-05-24 16:14:14 -04:00
Viktor Haag
5e94f38001 - fixed func call syntax on lower to lower()
- added test cases for trying to test GETS on mixed-case schemas
2013-05-24 14:01:30 -04:00
Viktor Haag
3004ad5398 Lower-ify url before checking against prefix with startswith() 2013-05-24 11:26:00 -04:00
Jeff Mancuso
e7c9bbb96f Only switch to chunked if we don't know the length of a file like object. This fixes the case of trying to upload a 0-length file - chunked upload was being forced. Services like S3 that disallow chunked upload will fail. 2013-05-23 11:21:29 -04:00
Kenneth Reitz
00ab8fbfea Merge remote-tracking branch 'origin/master' 2013-05-21 17:43:53 -04:00
Kenneth Reitz
9930c9c737 v1.2.2 2013-05-21 17:43:13 -04:00
Kenneth Reitz
2ee814d924 Merge pull request #1375 from t-8ch/fix_digest_auth
don't replace 'Digest' in digest header value
2013-05-21 14:33:25 -07:00
Kenneth Reitz
8b55a253b1 Merge remote-tracking branch 'origin/master' 2013-05-21 17:27:15 -04:00
Kenneth Reitz
786fe94ac4 nope 2013-05-21 17:27:06 -04:00
Kenneth Reitz
fede8e5af3 Merge pull request #1376 from papaeye/master
Fix typo, %t -> %r
2013-05-21 14:25:49 -07:00
papaeye
2a34335dc3 Fix #1374 2013-05-22 04:30:19 +09:00
Thomas Weißschuh
3b0d8b8e39 don't replace 'Digest' in digest header value
See https://github.com/kennethreitz/requests/issues/1358
2013-05-21 17:48:30 +00:00
papaeye
715a57dec8 Fix typo, %t -> %r 2013-05-22 02:20:51 +09:00
Kenneth Reitz
2aabb71dc8 Merge pull request #1373 from ib-lundgren/unicode_fields_to_urllib
Only pass unicode multipart fieldnames to urllib3.
2013-05-21 06:19:48 -07:00
Ib Lundgren
003c795afe Only pass unicode fieldnames to urllib3. 2013-05-21 09:46:28 +01:00
Kenneth Reitz
1621015e00 Merge pull request #1343 from gazpachoking/#1321
Refactor merge_kwargs
2013-05-20 19:14:54 -07:00
Chase Sterling
98114245c6 Refactor merge_kwargs for clarity and to fix a few bugs 2013-05-20 21:20:51 -04:00
Kenneth Reitz
8eb4243f12 Merge remote-tracking branch 'origin/master' 2013-05-20 16:10:43 -04:00
Kenneth Reitz
569b59f495 v1.2.1 2013-05-20 16:10:23 -04:00
Kenneth Reitz
8f42369aa9 Merge pull request #1356 from Zoramite/ConnectionPoolArgs
Adding an argument to the adapter for passing a block argument
2013-05-20 13:05:02 -07:00
Kenneth Reitz
f4e7809e7c Merge pull request #1361 from Lukasa/1360
Always percent-encode location headers.
2013-05-20 13:04:08 -07:00
Kenneth Reitz
2afe3b2e99 Merge pull request #1370 from sigmavirus24/origin_req_host
Add an extra property for Python 3.3
2013-05-20 12:57:38 -07:00
Ian Cordasco
9ce7f0bf5b Attempt a fix for @michaelhelmick 2013-05-20 10:58:03 -04:00
Kenneth Reitz
7430a49f45 Merge remote-tracking branch 'origin/master' 2013-05-17 09:31:11 +02:00
Kenneth Reitz
538dbaecbe download image! 2013-05-17 09:31:01 +02:00
Kenneth Reitz
5943afa25d Merge pull request #1363 from dave-shawley/master
Fix for #1362
2013-05-16 23:23:04 -07:00
Dave Shawley
6e76ab7188 Fix for #1362.
`PreparedRequest.prepare_url` incorrectly applied IDNA encoding to the
URLs entire `netloc`.  It should only be encoding the hostname portion
of the URL.  IDNA encoding was limiting the user info, host, and port
segments to be a maximum of 63 characters which causes problems for
all by the most trivial user + password combinations.

- Replaced usage of `urlparse` in `PreparedRequest.prepare_url` with
  `urllib3` equivalent.
- Modified IDNA encoding section so that it only encodes the host
  portion of the URL.
2013-05-16 13:12:34 -04:00
Cory Benfield
2b6ebd2521 Always percent-encode location headers. 2013-05-16 12:02:46 +01:00
Kenneth Reitz
eacb91afb1 Merge pull request #1327 from ambv/adapter_order
Fixes #1320: transport adapters stored in ordered form
2013-05-15 09:43:57 -07:00
Łukasz Langa
4c8af1fff4 Fixes #1320: transport adapters stored in ordered form 2013-05-15 13:34:09 +02:00
Randy Merrill
c03e14242b Adding the _pool_bloc to the list of attrs. 2013-05-11 18:30:31 -07:00
Randy Merrill
9cb3d6444d Fixing the call to init_poolmanagers to correctly unpickle the adapter. 2013-05-11 18:13:08 -07:00
Randy Merrill
053613688b Moving the order of the arguments in the init to not interfere with existing usage. 2013-05-11 18:04:43 -07:00
Randy Merrill
2eb682671d Adding an argument to the adapter for passing a block argument to the connection pool.
This allows for blocking when using threading to prevent the pool from creating more connections that the max-size allows.

Specifically was seeing the following errors without the block=True:

    WARNING:requests.packages.urllib3.connectionpool:HttpConnectionPool is full, discarding connection: www.example.com
2013-05-10 23:46:54 -07:00
Kenneth Reitz
e7786ec14f Merge pull request #1355 from sigmavirus24/fix_links
Prevent a KeyError when there's no link headers
2013-05-09 01:03:49 -07:00
Ian Cordasco
88fda94218 Prevent a KeyError when there's no link headers 2013-05-08 23:26:49 -04:00
Kenneth Reitz
b599886beb Merge pull request #1352 from nicoddemus/docs-link-on-readme
Adding link to documentation in README.rst
2013-05-07 10:01:32 -07:00
Kenneth Reitz
7aedc6bb22 Merge pull request #1342 from mexicat/master
Fixed example in authentication docs
2013-05-07 10:01:18 -07:00
Bruno Oliveira
efefc6b778 Adding link to documentation in README.rst
Just adding a link to the documentation at python-requests.org
2013-05-06 23:46:59 -03:00
Kenneth Reitz
50e592209f Merge pull request #1347 from hobarrera/master
Issue #749: Add optional SNI support for python2.
2013-05-04 13:11:46 -07:00
Hugo Osvaldo Barrera
18857a0eed Issue #749: Add optional SNI support for python2.
SNI support will be enabled for python2 if ndg-httpsclient and pyopenssl are available.
2013-05-03 21:05:42 -03:00
giacomo
8781b56a0e Fixed example in authentication docs 2013-05-02 18:16:19 +03:00
Kenneth Reitz
e585e496c9 Merge pull request #1341 from cdunklau/docstring_test_1329
Minor update to tests, added docstrings
2013-05-01 11:40:02 -07:00
Colin Dunklau
f93275c47f Minor update to tests, added docstrings
Requested by @sigmavirus24.
2013-05-01 12:51:09 -05:00
Kenneth Reitz
4f83ef8328 Merge pull request #1314 from duailibe/master
Fix small typo in the Support docs
2013-05-01 10:29:40 -07:00
Kenneth Reitz
0f1bb96f01 Merge pull request #1337 from amercader/master
Fix minor issues on the API docs
2013-05-01 10:28:18 -07:00
Kenneth Reitz
e6e9b550c0 Merge pull request #1339 from cdunklau/case_insensitive_headers_cleanup
Rewrite CaseInsensitiveDict to work correctly/sanely
2013-05-01 10:27:58 -07:00
Kenneth Reitz
f8f1db8458 Merge pull request #1340 from ambv/tox_ini
Remove 3.1 and 3.2 from setup.py, add tox.ini to simplify testing on multiple versions
2013-05-01 10:27:02 -07:00
Łukasz Langa
7e825acd9b Remove Python 3.1 and 3.2 from the trove classifiers in setup.py 2013-05-01 19:26:12 +02:00
Colin Dunklau
f7596c75dc Rewrite CaseInsensitiveDict to work correctly/sanely
Fixes #649 and #1329 by making Session.headers a CaseInsensitiveDict,
and fixing the implementation of CID. Credit for the brilliant idea
to map `lowercased_key -> (cased_key, mapped_value)` goes to
@gazpachoking, thanks a bunch.

Changes from original implementation of CaseInsensitiveDict:

1.  CID is rewritten as a subclass of `collections.MutableMapping`.
2.  CID remembers the case of the last-set key, but `__setitem__`
    and `__delitem__` will handle keys without respect to case.
3.  CID returns the key case as remembered for the `keys`, `items`,
    and `__iter__` methods.
4.  Query operations (`__getitem__` and `__contains__`) are done in
    a case-insensitive manner: `cid['foo']` and `cid['FOO']` will
    return the same value.
5.  The constructor as well as `update` and `__eq__` have undefined
    behavior when given multiple keys that have the same `lower()`.
6.  The new method `lower_items` is like `iteritems`, but keys are
    all lowercased.
7.  CID raises `KeyError` for `__getitem__` as normal dicts do. The
    old implementation returned
6.  The `__repr__` now makes it obvious that it's not a normal dict.

See PR #1333 for the discussions that lead up to this implementation
2013-04-30 14:52:27 -05:00
amercader
505d2487e3 Fix API documentation issues
* 'Cookies' and 'Encodings' sections were not built because the
  reference to the functions was wrong.
* 'Exceptions' section had a wrong anchor link ('module-requests', same
   one as the main heading).
* Remove 'decode_gzip' function, which is no longer present.
2013-04-30 16:15:56 +02:00
Kenneth Reitz
ab36f3cc6f Merge pull request #1332 from bboe/urllib3
Update urllib3 to 59de03e6163c6928dc01832ed6e48e9f6c34c795.
2013-04-28 16:58:08 -07:00
Bryce Boe
49ca72c802 Update urllib3 to 59de03e6163c6928dc01832ed6e48e9f6c34c795.
This update includes two fixes:

* https://github.com/shazow/urllib3/issues/149
* https://github.com/shazow/urllib3/issues/174
2013-04-27 14:33:39 -07:00
Kenneth Reitz
d2ba5798ec Merge pull request #1330 from Kwpolska/patch-1
Fixing a tiny typo, noticed while working on the Polish translation
2013-04-27 04:53:37 -07:00
Chris Warrick
c3bef6b0d9 A tiny typo, noticed while working on the Polish translation. 2013-04-27 14:52:35 +03:00
Kenneth Reitz
98dea03710 Merge pull request #1328 from gazpachoking/session_cj_fix
Session CookieJar fix
2013-04-26 00:02:28 -07:00
Chase Sterling
0c609b59ab Fix session CookieJars without breaking more stuff this time 2013-04-25 23:15:50 -04:00
Chase Sterling
a7fef58756 Add another session cookie test 2013-04-25 23:11:43 -04:00
Chase Sterling
3ff8d43801 Fix cookielib import 2013-04-25 22:40:24 -04:00
Chase Sterling
9763a671da Fix crash when session.cookies was not a RequestsCookieJar 2013-04-25 22:34:51 -04:00
Chase Sterling
1866f7596e Add test for session cookiejars other than RequestsCookieJar 2013-04-25 22:32:03 -04:00
Kenneth Reitz
8f3f4e2744 milla 2013-04-20 00:22:13 -04:00
Kenneth Reitz
4438bfcc44 Merge remote-tracking branch 'origin/master' 2013-04-20 00:18:33 -04:00
Kenneth Reitz
65b6ef6036 pt 2013-04-20 00:18:27 -04:00
Lucas Duailibe
1ca423ec80 Fix small typo in the Support docs 2013-04-18 20:59:17 -03:00
Kenneth Reitz
770c3d7548 Merge pull request #1313 from iurisilvio/fix_max_redirects_docs
Fix max_redirects docs issue #1301
2013-04-17 12:39:03 -07:00
Iuri de Silvio
736e8cd735 Fix max_redirects docs issue #1301 2013-04-17 12:27:06 -07:00
Kenneth Reitz
6046fcffe8 Merge pull request #1279 from jemerick/unicode_multipart_post
Unicode strings in multipart post requests
2013-04-16 12:55:58 -07:00
Kenneth Reitz
d13bf9f113 support for draft-tbray-http-legally-restricted-status-02
http://datatracker.ietf.org/doc/draft-tbray-http-legally-restricted-stat
us/?include_text=1
2013-04-15 22:47:20 -04:00
Kenneth Reitz
ae5419db17 translations 2013-04-15 03:22:56 -04:00
Kenneth Reitz
9c2f9f61ef Translatoins 2013-04-15 03:22:48 -04:00
Kenneth Reitz
636476e704 Merge remote-tracking branch 'origin/master' 2013-04-15 03:21:40 -04:00
Kenneth Reitz
aafca7acdc translations 2013-04-15 03:21:32 -04:00
Kenneth Reitz
a527ecfabd Merge pull request #1242 from oviboy/master
HTTP Digest Auth case insensitive replacement of "Digest "
2013-04-13 20:28:43 -07:00
Kenneth Reitz
967cfbe663 Merge pull request #1299 from schlamar/fix-decompression
Use streaming decompression feature of urllib3.
2013-04-13 20:27:46 -07:00
Kenneth Reitz
9df450193f Merge pull request #1302 from ssbarnea/master
Documents the actual logging methods #1297
2013-04-13 20:25:47 -07:00
Kenneth Reitz
082029ff2e switch streaming requests to httpbin 2013-04-13 15:26:49 -04:00
Kenneth Reitz
c0baec1431 Merge pull request #1305 from michaelhelmick/patch-1
Fix Advanced docs Twitter Streaming example
2013-04-13 12:24:21 -07:00
Kenneth Reitz
561366cab0 Merge pull request #1309 from toastdriven/better-max-retries
Changed HTTPAdapter to allow max retries to be specified when initializing.
2013-04-13 12:05:13 -07:00
Kenneth Reitz
f0950a9e6c Merge pull request #1311 from sigmavirus24/fix1303
Change the method when it isn't already GET/HEAD
2013-04-13 12:02:29 -07:00
Ian Cordasco
c5d0a0931e Change the method when it isn't already GET/HEAD
For some reason it was only change the method when a POST was being made. This
is almost certainly my fault.

Fixes #1303
2013-04-13 12:31:22 -04:00
Daniel Lindsley
36dcce1a06 Changed HTTPAdapter to allow max retries to be specified when initializing. 2013-04-12 16:40:39 -07:00
Mike Helmick
ed0242ae3a Fix Advanced docs Twitter Streaming example
Twitter API v1.1 Streaming now requires OAuth Authentication rather than XAuth.
I believe v1 is being blacked out sometime at the beginning of May.
2013-04-11 20:19:51 -04:00
Kenneth Reitz
eda4b55f7a Merge pull request #1306 from pombredanne/patch-1
Updated NOTICE copyright from 2022 to 2012
2013-04-11 09:04:07 -07:00
pombredanne
6e3cfe5dd5 Updated NOTICE copyright from 2022 to 2012
Which is likely what you meant, eh?
2013-04-11 17:08:27 +03:00
Sorin Sbarnea
fb49481ddf Updated documentation indicating that logging is done via requests.packages.urllib3 instead of requests.
modified:   docs/api.rst
2013-04-10 16:46:05 +01:00
Sorin Sbarnea
17ecb6891c * Documented the logging, requested in #1297
* Added build directory and *.egg to .gitignore
* Added sphinx as setup requirement in order to be able to build documentation with `pyhton setup.py build_sphinx`

modified:   .gitignore
modified:   docs/api.rst
modified:   setup.py
2013-04-10 16:15:28 +01:00
schlamar
4c3432b759 Fix test with StringIO. 2013-04-10 08:24:33 +02:00
schlamar
59f916ca4a Use streaming decompression feature of urllib3. 2013-04-10 08:08:33 +02:00
schlamar
6d6252aa9f Update urllib3 to 71f84f9. 2013-04-10 08:00:36 +02:00
Kenneth Reitz
2426eeb371 Merge pull request #1298 from Lukasa/adapter_doc
Transport Adapter Docs
2013-04-09 13:17:19 -07:00
Cory Benfield
e5f1053b30 Shell of Transport Adapter documentation. 2013-04-09 20:58:59 +01:00
Cory Benfield
c73f653352 Add HTTPAdapter to API docs. 2013-04-09 19:54:47 +01:00
Kenneth Reitz
5b937b384b Merge pull request #1296 from sursh/master
Add helpful error message to r.json() method
2013-04-08 11:01:36 -07:00
Sasha Laundy
8ebeb3dc3f Make json error message more specific 2013-04-08 13:03:13 -04:00
sursh
dfa59c2d97 Fix markdown 2013-04-08 13:01:02 -03:00
sursh
511cc4c034 Make json error on empty response more specific 2013-04-08 13:00:27 -03:00
Kenneth Reitz
fa9234da05 Merge pull request #1295 from sigmavirus24/issue1293
Fix #1293
2013-04-06 17:27:23 -07:00
Ian Cordasco
afcc883d7f Fix #1293 2013-04-06 11:26:52 -04:00
Kenneth Reitz
1e465fd255 Merge pull request #1291 from gazpachoking/dont_set_session_cookies_on_response
Don't set all session cookies on response.cookies
2013-04-04 20:41:52 -07:00
Chase Sterling
49a3664222 Don't set all session cookies on response.cookies 2013-04-04 23:30:52 -04:00
Kenneth Reitz
848f2c297e Merge pull request #1290 from gazpachoking/#1287
fix #1287: Make sure expired cookies get removed from session.cookies
2013-04-04 20:22:38 -07:00
Chase Sterling
5c47ce1136 Make sure unit test works on python 2.6 2013-04-04 22:48:14 -04:00
Chase Sterling
88f13598f3 Add a unit test for server expiring cookies from session 2013-04-04 22:40:27 -04:00
Chase Sterling
d22ac00098 fix #1287: Make sure expired cookies get removed from session.cookies 2013-04-04 22:11:38 -04:00
Kenneth Reitz
dccfc5ba3c Merge pull request #1283 from sigmavirus24/master
Closes #1280
2013-04-03 18:04:40 -07:00
Jason Emerick
e7247ce3f6 model the encode_files data handling after encode_params 2013-04-02 14:22:49 -04:00
Jason Emerick
168c3e6913 add a few more variations to the unicode multipart post test 2013-04-02 14:22:12 -04:00
Jason Emerick
82d36d8259 add additional test for unicode multipart post 2013-04-02 11:41:07 -04:00
Ian Cordasco
b9e5cce2d2 Add PreparedRequest recipe to the docs 2013-04-02 10:07:37 -04:00
Ian Cordasco
1abd13700b Closes #1280
Correct the doc-string for Session#request that I copied without thinking
about.
2013-04-02 09:27:25 -04:00
Kenneth Reitz
54ed5ed469 Revert "Fix for the issue https://github.com/kennethreitz/requests/issues/1280"
This reverts commit ca0aea640d.
2013-04-02 08:13:46 -04:00
Kenneth Reitz
cdb700737b Merge pull request #1281 from KamilSzot/Issue_kennethreitz_requests_issues_1280
Fix for the issue https://github.com/kennethreitz/requests/issues/1280
2013-04-02 04:44:59 -07:00
Kamil Szot
ca0aea640d Fix for the issue https://github.com/kennethreitz/requests/issues/1280 2013-04-02 13:42:40 +02:00
Kenneth Reitz
20a8a9b681 Merge pull request #1278 from t-8ch/patch-1
fix tiny typo in HISTORY.rst
2013-04-01 21:36:49 -07:00
Kenneth Reitz
9c18febf45 Merge pull request #1277 from pborreli/typos
Fixed typos
2013-04-01 21:36:39 -07:00
Kenneth Reitz
848aca21be Merge pull request #1276 from alex/patch-1
is should not be used for comparing numbers
2013-04-01 20:42:22 -07:00
Jason Emerick
f37b968475 use compat.str instead of compat.builtin_str 2013-04-01 18:14:52 -04:00
Jason Emerick
f0660e33a2 add test for unicode multipart post 2013-04-01 18:10:12 -04:00
Thomas Weißschuh
333fa87489 fix tiny typo in HISTORY.rst 2013-04-01 18:47:20 +00:00
Pascal Borreli
037b38badb Fixed typos 2013-04-01 18:02:18 +00:00
Alex Gaynor
39acf1dbd2 is should not be used for comparing numbers 2013-03-31 23:20:46 -07:00
Kenneth Reitz
59b69d1fb8 Merge remote-tracking branch 'origin/master' 2013-03-31 08:28:57 +03:00
Kenneth Reitz
d06908d655 v1.2.0 2013-03-31 08:28:22 +03:00
Kenneth Reitz
5b5ffc9714 Merge pull request #1268 from t-8ch/update_urllib3
update vendored urllib3
2013-03-30 22:27:59 -07:00
Kenneth Reitz
75703d57e6 fix syntax error 2013-03-31 08:22:44 +03:00
Kenneth Reitz
bd6b981d12 Merge pull request #1267 from sigmavirus24/master
One last pull request before 1.2 ideally
2013-03-30 22:21:52 -07:00
Kenneth Reitz
6a2eea8b21 Merge pull request #1270 from makto/add_attr
add 'max_redirects' to Session's __attrs__
2013-03-30 22:20:02 -07:00
Ian Cordasco
325ea7b7e2 Use session defaults instead of arbitrary ones 2013-03-29 20:18:58 -04:00
makto
4ffae38627 add 'max_redirects' to Session's __attrs__ to ensure proper serialization of Session 2013-03-29 20:58:15 +08:00
Thomas Weißschuh
d7908a9fde update vendored urllib3 2013-03-28 12:49:04 +00:00
Ian Cordasco
0cd23d8d6e Fix the tests and unseparate comments from code
See the comments on the previous few commits on GitHub.
2013-03-28 08:33:34 -04:00
Ian Cordasco
aca91e06f2 Restore Session.request docstring
Resolves #1251
2013-03-27 23:46:21 -04:00
Ian Cordasco
88177ec33f Finally resolve #1084
Send body on redirect when POSTing or PUTing.
2013-03-27 23:30:00 -04:00
Ian Cordasco
1d5c4f3f0f This should take care of #1266
We were sending 'None' as the Content-Length on requests where the body was a
generator. This commit should prevent that entirely.
2013-03-27 23:26:11 -04:00
Ian Cordasco
478d49027f Add correct defaults in Session.send()
Resolves #1258

Also fixed the tests to reflect the necessary changes.
2013-03-27 23:17:34 -04:00
Ian Cordasco
46a770e03f Update the HISTORY for v1.2 2013-03-27 23:10:59 -04:00
Kenneth Reitz
ba25184ed5 sp 2013-03-26 16:38:11 -04:00
Kenneth Reitz
7f1ad5c127 Merge remote-tracking branch 'origin/master' 2013-03-26 16:32:25 -04:00
Kenneth Reitz
ab19b79375 Rezzy the Request Sea Turtle 2013-03-26 16:32:20 -04:00
Kenneth Reitz
c63472e328 Merge pull request #1263 from justin-factual/master
iter_lines documentation for #1260
2013-03-25 12:48:45 -07:00
Justin Fenn
6963b8490c Clarify streaming behavior in iter_lines doc 2013-03-25 12:20:33 -07:00
Ovidiu Negrut
9d16c72767 compiled regex expression in digest auth, this also works in python 2.6.x 2013-03-25 12:28:25 +02:00
Ovidiu Negrut
186a589783 Merge branch 'master' of git://github.com/kennethreitz/requests 2013-03-25 12:26:45 +02:00
Kenneth Reitz
12ef43e407 /s/make/invoke 2013-03-22 15:52:08 -04:00
Kenneth Reitz
92f7478174 first 2013-03-22 15:48:27 -04:00
Kenneth Reitz
19d38d502f actually cleanup url authentication 2013-03-22 15:47:20 -04:00
Kenneth Reitz
52d328ec3c cp949prover for charade 2013-03-22 15:21:28 -04:00
Kenneth Reitz
a554828931 invoke! 2013-03-22 15:21:04 -04:00
Kenneth Reitz
80a861cb84 upgrade to charade v1.0.3 2013-03-22 15:20:49 -04:00
Kenneth Reitz
0d07d1afb3 remove makefile 2013-03-22 15:20:27 -04:00
Kenneth Reitz
030b9763b5 fix get_auth_from_url 2013-03-22 00:15:06 -04:00
Kenneth Reitz
03a3ca5004 get_auth_from_url return None if nothing is found 2013-03-22 00:13:08 -04:00
Kenneth Reitz
1325409560 simplify get_auth_from_url call 2013-03-22 00:12:58 -04:00
Kenneth Reitz
13aeb9cb06 Merge pull request #1254 from jkakar/url-authentication
url-authentication
2013-03-21 21:06:23 -07:00
Jamu Kakar
7d217bf9bd - Pull credentials out of the URL when possible. 2013-03-21 17:55:08 -07:00
Kenneth Reitz
cb2116dcce Merge pull request #1239 from miikka/fix-issue-1228
Use session cookies when following redirects
2013-03-20 03:37:25 -07:00
Kenneth Reitz
db90d85a8d Merge pull request #1245 from Damgaard/master
Remove duplicate comment.
2013-03-14 08:29:53 -07:00
Andreas Damgaard Pedersen
af791d48c6 Remove duplicate comment. 2013-03-14 16:12:45 +01:00
Miikka Koskinen
120a2f385a Do not pass cookies to resolve_redirects
SessionRedirectMixin is extending Session, so we can just use
self.cookies.
2013-03-12 18:45:11 +02:00
Miikka Koskinen
5bb2be9a23 Use session cookies when following redirects
When a redirect was followed, only the cookies set by the initial
response were used in the follow-up request. Fixes #1228.
2013-03-12 18:43:58 +02:00
Miikka Koskinen
e958511df0 Add failing test case for #1228 2013-03-12 18:43:58 +02:00
Kenneth Reitz
1642996798 Merge pull request #1244 from jajadinimueter/master
Fixed further pickeling issues in Session and HTTPAdapter
2013-03-12 08:23:21 -07:00
Florian Mueller
c41932e184 Fixed some pickeling issues with HTTPAdapter and Session
Added trust_env and stream to Session.__attrs__. Initialize
self._pool_connections and self._pool_maxsize in HTTPAdapter.
2013-03-12 16:04:19 +01:00
Kenneth Reitz
25ea8cdb38 Merge pull request #1243 from darjus-amzn/master
Pickling of Session and HTTPAdapter + a test
2013-03-12 07:37:55 -07:00
Darjus Loktevic
e706d18cf8 Pickling of Session and HTTPAdapter + a test
This is for issue #1088
2013-03-11 18:12:34 +00:00
Ovidiu Negrut
e752455b6f Digest auth: case insensitive replacement of 'digest ' string with '' from WWW-Authenticate 2013-03-11 10:28:37 +02:00
Kenneth Reitz
3e72f234d0 Merge pull request #1238 from oczkers/master
cleanup (remove max_retries test)
2013-03-08 11:51:42 -08:00
Piotr Staroszczyk
25dc07e8ed cleanup (remove max_retries test) 2013-03-08 11:17:17 +01:00
Kenneth Reitz
13de69299f Merge pull request #1234 from Vassius/issue-1225
Fix issue #1225 (Documentation: response object status/reason)
2013-03-05 07:31:10 -08:00
Markus Wiik
90e109c241 Fix issue #1225 (Documentation: response object status/reason) 2013-03-05 16:18:24 +01:00
Kenneth Reitz
d25ba77b2e Merge remote-tracking branch 'origin/master' 2013-03-04 17:54:32 -05:00
Kenneth Reitz
c0d4b23cea Merge branch 'httperror_init' of git://github.com/dmedvinsky/requests
Conflicts:
	AUTHORS.rst
	test_requests.py
2013-03-04 17:54:25 -05:00
Kenneth Reitz
99eead01a3 Merge pull request #1223 from andrewjesaitis/master
Fixes __getstate__ for session pickling
2013-03-04 14:52:31 -08:00
Andrew Jesaitis
d60845303b Adds __attrs__ back to Session object 2013-03-04 11:07:29 -07:00
Kenneth Reitz
b14584f36e Revert "[kennethreitz/requests#1208] adding unit test for max_retries"
This reverts commit 18b29ea005.
2013-03-03 12:01:47 -05:00
Kenneth Reitz
23d8522285 Revert "[kennethreitz/requests#1208] adding a max_retries argument"
This reverts commit 796d3225dd.
2013-03-03 12:01:38 -05:00
Dmitry Medvinsky
c4f9340fb4 Add ability to pass response to HTTPError()
Just a little refactoring, but it seems nicer to me to be able to pass
the response when constructing the `HTTPError` instance instead of
constructing it and then changing the member variable.
2013-03-03 10:05:42 +04:00
Kenneth Reitz
d372a5b10b Merge pull request #1190 from mkomitee/master
Pass user options to hooks
2013-03-02 13:04:00 -08:00
Kenneth Reitz
7aad3fd08c Merge pull request #1219 from Wilfred/master
Adding max_retries as an argument
2013-03-02 13:02:26 -08:00
Kenneth Reitz
76c4b68e4a Merge pull request #1226 from dmedvinsky/fix-typos
Fix couple of typos in HISTORY.rst
2013-03-02 13:00:48 -08:00
Kenneth Reitz
07441c8951 Merge pull request #1229 from sprt/master
Doc fix: URLError doesn't exist anymore
2013-03-02 12:59:41 -08:00
Kenneth Reitz
98ff29f793 Merge pull request #1230 from davidfischer/trivial-docs-fix
Github URL fix
2013-03-02 12:59:10 -08:00
Kenneth Reitz
08cab48431 Merge pull request #1231 from davidfischer/docs-migration1.0
Initial docs patch for migrating from pre 1.0
2013-03-02 12:58:49 -08:00
David Fischer
7e7c275504 Session isn't advertised as a context manager 2013-03-02 08:59:19 -08:00
David Fischer
73abf84ace Capitalize s in Session 2013-03-02 08:51:55 -08:00
David Fischer
7eba5ffe48 Logic on streaming responses was changed in 1.0
* prefetch=False in 0.x is now stream=True
2013-03-02 08:44:14 -08:00
David Fischer
1d2ee524d8 Initial docs patch for migrating from pre 1.0 2013-03-01 23:21:08 -08:00
David Fischer
38f2581d6f Github URL fix 2013-03-01 20:36:42 -08:00
sprt
b80f8aa475 URLError doesn't exist anymore 2013-03-01 20:20:53 +01:00
Dmitry Medvinsky
057f32924a Fix couple of typos in HISTORY.rst
One typo and a couple of auto-completions, I guess.
2013-03-01 11:42:43 +04:00
Andrew Jesaitis
6a0845c984 Checks __attrs__ on session instance prior to iterating. 2013-02-28 15:13:57 -07:00
Wilfred Hughes
18b29ea005 [kennethreitz/requests#1208] adding unit test for max_retries 2013-02-27 16:01:36 +00:00
Wilfred Hughes
796d3225dd [kennethreitz/requests#1208] adding a max_retries argument 2013-02-27 16:01:23 +00:00
Ian Cordasco
be62645dd5 Revert "If Content-Length is already set.."[1]
This reverts commit 544d08d0f6.

[1]"If Content-Length is already set, don't over ride it"
2013-02-25 09:29:05 -05:00
Kenneth Reitz
603fd42fe6 Merge pull request #1205 from sigmavirus24/fix1203
Missing line was allowing redirects with HEAD
2013-02-25 02:31:21 -08:00
Kenneth Reitz
1fc567449c Merge pull request #1210 from Lukasa/urlencode_proxy
Unquote proxy usernames and passwords.
2013-02-25 02:31:00 -08:00
Kenneth Reitz
c01bc5be5b Revert "Lukasa is lazy"
This reverts commit 178ff62b93.
2013-02-22 08:23:34 -05:00
Cory Benfield
577dba2bf7 Unquote proxy usernames and passwords. 2013-02-22 11:33:01 +11:00
Ian Cordasco
a788cb7271 Missing line was allowing redirects with HEAD
Closes #1203
2013-02-20 08:57:37 -05:00
Kenneth Reitz
178ff62b93 Lukasa is lazy 2013-02-20 02:11:41 -05:00
Kenneth Reitz
aa99525537 Merge pull request #1193 from Lukasa/timeout_exception
Throw more informative exceptions.
2013-02-19 23:10:44 -08:00
Kenneth Reitz
7e0b9cf409 Merge pull request #1200 from gazpachoking/session_cookies_fix
Make sure session cookies do not overwrite explicit request cookies
2013-02-19 22:50:10 -08:00
Kenneth Reitz
017c027629 Merge pull request #1199 from t-8ch/docs_explicit_proxy_scheme
Use explicit scheme for proxies in the docs
2013-02-19 05:40:15 -08:00
Cory Benfield
c2480f65e6 Rethrow underlying exceptions. 2013-02-18 16:30:16 +11:00
Chase Sterling
3f86e22a07 Make sure session cookies do not overwrite explicit request cookies
Implement RequestsCookieJar.copy
Use RequestsCookieJar.update when merging cookiejars
2013-02-16 00:56:59 -05:00
Thomas Weißschuh
b53975327f use explicit scheme for proxies in the docs
Issue #1192 tried to force user to provide a scheme for proxy urls.
As this would break backwards compability change the docs instead.
2013-02-15 16:32:50 +00:00
Kenneth Reitz
d0390d4f27 Merge pull request #1194 from gazpachoking/cookiejar_update
Allow RequestsCookieJar to be updated with cookies from a CookieJar
2013-02-14 22:42:49 -08:00
Chase Sterling
f3393fb24c Remove ability to from RequestCookieJar __getitem__, __setitem__ to use cookies as keys 2013-02-14 22:52:31 -05:00
Michael Komitee
4c21106222 Fixing test for python3 2013-02-14 21:33:01 -05:00
Chase Sterling
87d9d9643c Allow RequestsCookieJar to be updated with cookies from a CookieJar 2013-02-14 01:05:42 -05:00
Michael Komitee
df5dcb8a7d New tests fail on python 3.x because read() returns bytes and the test checks for strings 2013-02-13 22:42:56 -05:00
Michael Komitee
69ba64380b Adding test to ensure options like stream function with authentication
This test demonstrates the reason why we need to pass kwargs to hooks. Without
it, features like stream cannot work with authentication.
2013-02-13 21:28:32 -05:00
Michael Komitee
d0285fac42 Use user supplied options when resending authenticated requests
Hooks sometimes have to send requests (e.g. when responding to a 401 during
authentication).

All keyword arguments should be passed along when hooks are dispatched so that
if a user wanted to use a timeout, stream, specify a cert location with the
verify flag, etc, their specification can be followed.
2013-02-13 19:11:38 -05:00
Kenneth Reitz
f73bda06e9 Merge pull request #1185 from sigmavirus24/fix_hook_dispatching
Dispatch hooks before following redirects
2013-02-13 02:13:31 -08:00
Ian Cordasco
4dfd6f3fc1 Dispatch hooks before following redirects
Fixes #1183
2013-02-12 23:00:06 -05:00
Kenneth Reitz
cdec20af65 Merge pull request #1181 from denis-ryzhkov/master
Fix of UnicodeDecodeError on unicode header name that can be converted to ascii.
2013-02-12 08:43:02 -08:00
Kenneth Reitz
09a7251245 Merge pull request #1184 from piotr-dobrogost/numeric_codes
small cleanup of redirect codes
2013-02-12 00:27:05 -08:00
Denis Ryzhkov
56f4b7ca68 Deleted is_py2 check from unicode_header_name fix thanks to Lukasa. 2013-02-12 09:51:46 +03:00
Piotr Dobrogost
4c8d1b9a7d removed no longer used redirect codes from models
added numeric values of redirect codes in comments
2013-02-11 23:07:12 +01:00
Denis Ryzhkov
6da7e22a4a Fix of UnicodeDecodeError on unicode header name that can be converted to ascii. 2013-02-11 15:37:58 +03:00
Kenneth Reitz
5d9fcc711b Merge pull request #1180 from sigmavirus24/master
Fix Session level Cookie Handling
2013-02-10 16:43:21 -08:00
Ian Cordasco
2e31696156 Test and perfection for cookie handling.
I also fixed up some of the RequestsCookieJar methods so using
jar.update(other_jar) works without a problem. This cleans up some of the code
in sessions and the resolve_redirects method.
2013-02-10 19:36:36 -05:00
Ian Cordasco
0fb13e0b6c And tests 2013-02-10 17:49:49 -05:00
Kenneth Reitz
1da1490bcd urllib3 update
#1053
2013-02-10 17:43:58 -05:00
Ian Cordasco
9cdc8325ae Fix Setting a cookie on redirect 2013-02-10 17:43:37 -05:00
Kenneth Reitz
12d66cfc41 Merge pull request #1173 from sigmavirus24/use_send_in_resolve_redirects
Use send in resolve redirects
2013-02-10 14:21:13 -08:00
Ian Cordasco
9c8660dbb6 Resolve @piotr-dobrogost's concerns
Piotr had good objections to my not re-sending the body of the request on 307.
2013-02-10 17:14:45 -05:00
Ian Cordasco
e7bc9bf1b2 Preserve the original request.
Let's make a copy to preserve it.
2013-02-10 17:11:16 -05:00
Ian Cordasco
e2ad0d0fe8 We shouldn't be sending the data on redirect.
As such, we should remove the body from the old request as well as the
Content-Length header.
2013-02-10 17:11:16 -05:00
Ian Cordasco
3299771e34 Fix the potential issue mentioned in #1151
See: https://github.com/kennethreitz/requests/pull/1151#issuecomment-12905796

This is solved by just reusing the PreparedRequest from the last request.
2013-02-10 17:11:16 -05:00
Kenneth Reitz
f2be5fae27 Merge pull request #1161 from sigmavirus24/fix1159
If Content-Length is already set, don't override
2013-02-10 14:07:08 -08:00
Kenneth Reitz
90cd37fda0 Merge pull request #1119 from Lukasa/diags
Better diagnostics when trying to send unprepared request
2013-02-10 14:06:38 -08:00
Cory Benfield
b0657cf163 Guard against users sending unprepared requests. 2013-02-10 06:13:02 +00:00
Kenneth Reitz
03f6908fe9 Merge pull request #1162 from Lukasa/proxy_auth
Proxy Authorization Headers
2013-02-06 13:05:04 -08:00
Kenneth Reitz
c68f928254 Merge pull request #1168 from Lukasa/freeze
Feature freeze.
2013-02-06 11:53:55 -08:00
Cory Benfield
ff954e16f1 Feature freeze. 2013-02-06 19:01:24 +00:00
Cory Benfield
d437c338d0 Add Proxy-Auth header when proxies have credentials. 2013-02-06 18:40:35 +00:00
Kenneth Reitz
9fc7059140 Merge pull request #1151 from sigmavirus24/fix1133
Move redirect handling from Session.request to Session.send
2013-02-05 11:42:51 -08:00
Ian Cordasco
544d08d0f6 If Content-Length is already set, don't override
Re: #1159
2013-02-01 11:58:23 -05:00
Kenneth Reitz
ae55676a50 Merge pull request #1158 from yehudasa/master
Fix check that breaks handling of 303 response in some cases (v2)
2013-02-01 07:30:47 -08:00
Yehuda Sadeh
b07c1ebd85 Fix POST 303 redirect resonse handling
This fixes issue #1156.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-01-31 11:23:09 -08:00
Kenneth Reitz
113b67c069 moar 2013-01-31 14:35:42 +00:00
Kenneth Reitz
12246afab8 HMG 2013-01-31 13:20:14 +00:00
Kenneth Reitz
85da715f40 Merge pull request #1153 from cbare/master
use only base filename in multipart file upload
2013-01-30 15:56:21 -08:00
Kenneth Reitz
b554b0c1cb Merge pull request #1152 from ekatsah/patch-1
Update docs/user/advanced.rst
2013-01-30 15:54:20 -08:00
Christopher Bare
9ff8cbe5fb shorten filename by os.path.basename in guess_filename(obj) 2013-01-30 15:33:43 -08:00
ekatsah
79727abb32 Update docs/user/advanced.rst
Rephrasing a line in the docs, add explicite mention of "client side certificate" (for indexing and clarity)
2013-01-30 21:22:24 +01:00
Ian Cordasco
ba485913b6 Thanks to @maxcountryman for the code review 2013-01-30 10:58:32 -05:00
Ian Cordasco
a95bfd3032 Fix the elapsed test and #1133 2013-01-29 23:50:37 -05:00
Kenneth Reitz
207a2744aa Merge pull request #1143 from Lukasa/master
Response as iterator
2013-01-28 20:52:17 -08:00
Cory Benfield
95084c9ca8 Fix test for Py3. 2013-01-28 18:35:41 +00:00
Cory Benfield
2f7923bc05 More useful docstring. 2013-01-28 18:35:41 +00:00
Cory Benfield
2ac3913733 Make Response objects iterable. 2013-01-28 18:35:41 +00:00
Kenneth Reitz
231e343a3b Merge pull request #1148 from sigmavirus24/timing_switch
Move the timing work to Session.send
2013-01-28 09:40:10 -08:00
Ian Cordasco
c8ad4f0b73 Move the timing work to Session.send
per @kennethreitz's request
2013-01-28 11:53:02 -05:00
Kenneth Reitz
25545b393b Merge pull request #1146 from oczkers/master
It`s more pep8 now
2013-01-27 19:11:15 -08:00
Kenneth Reitz
dfa89e299a Merge pull request #1138 from clee/master
Time each request
2013-01-27 19:10:16 -08:00
Chris Lee
318300848f Use timedelta and change attribute name back to elapsed 2013-01-27 19:07:48 -08:00
Chris Lee
d4aaef1e9a Time how long each request takes
Stored as attribute Response.time_taken
2013-01-27 19:06:50 -08:00
oczkers
40a060cf57 it`s more pep8 now 2013-01-27 02:04:12 +01:00
Kenneth Reitz
ac5e6807fa Merge pull request #1145 from sigmavirus24/master
Mock the links test
2013-01-26 09:05:19 -08:00
Ian Cordasco
250896b7f3 Mock the links test. 2013-01-26 11:55:08 -05:00
Kenneth Reitz
9d1d927420 Merge pull request #1103 from dmckeone/master
Restore the ability to use a list of 2-tuples for the data keyword argument with requests.post.
2013-01-25 21:02:01 -08:00
Kenneth Reitz
440aeca5d4 Merge pull request #1123 from andrewjesaitis/master
Fixes DigestAuth with Sessions
2013-01-25 21:00:33 -08:00
Kenneth Reitz
b6af86225d Merge pull request #1140 from ralphbean/cookie-test
Test for cookie parameters.
2013-01-25 20:58:35 -08:00
Kenneth Reitz
c50f8f7cc8 Merge pull request #1142 from theaeolianmachine/removeGETContentLength
Remove default Content-Length from GET requests.
2013-01-25 20:58:20 -08:00
Johnny Goodnow
8d8865aadb Remove Content-Length from GET/HEAD by default.
Now, Content-Length is only auto-added for non-GET/HEAD requests.
2013-01-25 20:50:58 -08:00
Johnny Goodnow
f7c10ca74d Always add Content-Length to HTTP PATCH. 2013-01-25 12:07:24 -08:00
Johnny Goodnow
4cac9f07c4 Add myself to AUTHORS. 2013-01-25 00:19:09 -08:00
Johnny Goodnow
f453892960 Fix python 2.6 unittest compatability issue. 2013-01-24 21:25:14 -08:00
Johnny Goodnow
44b1e7ebea Remove default Content-Length from GET requests.
Fix #1051.
2013-01-24 21:13:32 -08:00
Ralph Bean
4ce6440795 purported py2.6 support for cookies test. 2013-01-25 00:10:51 -05:00
Kenneth Reitz
22623bd8c2 Merge pull request #1099 from sprt/master
Make hooks work with prepared requests
2013-01-24 10:00:24 -08:00
Ralph Bean
5861254d8f Test for cookie parameters. 2013-01-24 12:47:55 -05:00
sprt
ab2e7df8a9 Merge branch 'master' of git://github.com/kennethreitz/requests
Conflicts:
	test_requests.py
2013-01-24 18:36:53 +01:00
Kenneth Reitz
beec48c8f8 Merge pull request #1137 from whit537/unperson_test
Remove a test per @kennethreitz in IRC
2013-01-23 17:37:13 -08:00
Kenneth Reitz
b2427223c1 Merge pull request #1136 from steveklabnik/test_link_header
introduce a test for link headers.
2013-01-23 17:34:55 -08:00
Chad Whitacre
ef52044c5f Remove a test per @kennethreitz in IRC
The test suite is moving from the httpbin pattern (which hits the
network) to depending on the request.prepare method (which doesn't).
Here's a start ...
2013-01-23 20:32:03 -05:00
Steve Klabnik
ccea28db07 introduce a test for link headers. 2013-01-23 20:31:05 -05:00
Kenneth Reitz
e21ef547f7 Merge pull request #1134 from steveklabnik/remove_silly_assert
remove silly assert
2013-01-23 17:06:40 -08:00
Steve Klabnik
0af8ff9405 remove silly assert 2013-01-23 20:03:43 -05:00
Kenneth Reitz
6e0ca583fe Merge pull request #1132 from sburns/jsonkwargs
Pass kwargs to json.loads
2013-01-23 14:02:37 -08:00
Scott Burns
2bcc4a774a Pass kwargs to json.loads
Not all JSON is created equally. This commit
addresses when users want to take control of the
json decode process.
2013-01-23 15:25:48 -06:00
Andrew Jesaitis
34268b16c3 Moves num_401_calls counter to HTTPDigestAuth 2013-01-23 10:32:56 -07:00
Ian Cordasco
1cfe59299b Only call the hook once. 2013-01-23 11:51:37 -05:00
Ian Cordasco
e771aa9386 Comment & replace something that keeps disappearing 2013-01-23 11:28:30 -05:00
sprt
cc7bee19f0 Refactor prepare_hooks() 2013-01-23 15:45:44 +01:00
sprt
088f908d58 Add missing import 2013-01-23 15:45:14 +01:00
sprt
c4ad8afba9 Merge remote-tracking branch 'upstream/master'
Conflicts:
	requests/sessions.py
2013-01-23 14:42:45 +01:00
Kenneth Reitz
0c09d16b29 Merge pull request #1125 from juanriaza/master
HTTPDigestAuth: missing algorithm field
2013-01-22 19:43:50 -08:00
Kenneth Reitz
30573b2d8b Merge pull request #1116 from Lukasa/master
Correct type of Content-Length headers.
2013-01-22 18:51:17 -08:00
Kenneth Reitz
1a87f15e6f Merge pull request #1117 from sigmavirus24/issue1106
Fix #1106
2013-01-22 18:48:31 -08:00
Kenneth Reitz
472a5b4748 Merge pull request #1127 from sigmavirus24/fix1126
A simple fix
2013-01-22 17:53:16 -08:00
Kenneth Reitz
b94510fc42 Merge pull request #1128 from mvid/master
Updating urllib3 to current master
2013-01-22 17:45:00 -08:00
Mantas Vidutis
6e53290acd update urllib3 to current master with ssl bugfixes 2013-01-22 14:40:10 -08:00
Ian Cordasco
ca85b4ec6c Tests pass this time. 2013-01-22 17:22:12 -05:00
Juan Riaza
a6360ca134 missing algorithm field 2013-01-22 16:35:16 +01:00
Kenneth Reitz
47aa968f3c Merge pull request #1121 from Lukasa/typo
Small typo fixes.
2013-01-22 06:40:24 -08:00
Kenneth Reitz
3bf46609c8 Merge pull request #1097 from matthewlmcclure/issues/1096
Resolves the parts of #1096 in requests proper.
2013-01-22 05:11:14 -08:00
Kenneth Reitz
cd0cbada65 Merge pull request #1095 from Jud/patch-1
Fix spacing in setup.py
2013-01-22 05:10:19 -08:00
Kenneth Reitz
ed559bb8b1 Merge pull request #1122 from Lukasa/readline
Decrease default line length for iter_lines
2013-01-22 05:09:11 -08:00
Ian Cordasco
27e814ad76 Fix failing tests. 2013-01-21 20:21:08 -05:00
Andrew Jesaitis
03893d9b7f Fixes repeated 401s when using DigestAuth with a session 2013-01-21 16:34:11 -07:00
Cory Benfield
297aa04bea Decrease default line length for iter_lines 2013-01-21 21:15:04 +00:00
Cory Benfield
c678a7b402 Small typo fixes. 2013-01-21 19:55:08 +00:00
Kenneth Reitz
b7242a1ad1 Merge pull request #1120 from spulec/patch-2
Add py3.3 testing back
2013-01-21 11:27:41 -08:00
Steve Pulec
cf0a5089f5 Add py3.3 testing back 2013-01-21 14:19:29 -05:00
Cory Benfield
de32f1774f Remove test that cannot work on Python3. 2013-01-19 17:14:32 +00:00
Ian Cordasco
e1c4fe21d4 Fix #1106 2013-01-19 11:49:52 -05:00
Cory Benfield
89c8cbbe0c Ensure Content-Length is a string. 2013-01-19 12:07:34 +00:00
Kenneth Reitz
16ba63ccde Merge pull request #1114 from vlaci/master
Keep-alive support for http proxies
2013-01-18 05:40:26 -08:00
László Vaskó
347a52aa5c Fixed proxy requests to pool connections. 2013-01-18 13:41:14 +01:00
Kenneth Reitz
c920ee57b8 Merge pull request #1110 from slingamn/certifi_eol
Remove support for certifi
2013-01-18 04:39:41 -08:00
Shivaram Lingamneni
985a906c6c Remove support for certifi
As per #1105, certifi is being end-of-lifed. Requests will use either
its own vendored bundle, or possibly (when packaged with OS distributions)
an externally packaged bundle, which can be enabled by patching
requests.certs.where().
2013-01-17 20:44:01 -08:00
Kenneth Reitz
f038f68ad8 Merge pull request #1107 from Lukasa/master
Correct broken cookies example
2013-01-17 19:50:55 -08:00
Cory Benfield
d3e6597f73 Update docs with correct cookie behaviour. 2013-01-17 19:28:28 +00:00
Kenneth Reitz
f8d729a17b Merge pull request #1105 from slingamn/turktrust
refresh CA certificates
2013-01-17 02:51:52 -08:00
Shivaram Lingamneni
b66427eab9 remove the TURKTRUST root certificates, as per #1102 2013-01-17 02:02:49 -08:00
David McKeone
35d4a47cb1 Allow passing POST data with a list of 2-tuples. 2013-01-16 11:53:24 -07:00
sprt
a721d590b4 Make hooks work with prepared requests 2013-01-12 21:46:44 +01:00
Matt McClure
628e393b9a Resolves the parts of #1096 in requests proper. 2013-01-11 15:04:47 -05:00
Jud
a950322b07 Fix spacing in setup.py 2013-01-11 11:42:02 -05:00
Kenneth Reitz
34917618d8 +1 2013-01-11 09:34:14 -05:00
Kenneth Reitz
1a7c91f658 Merge remote-tracking branch 'origin/master' 2013-01-10 02:13:06 -05:00
Kenneth Reitz
41687c8fa8 v1.1.0 and docs 2013-01-10 02:13:02 -05:00
Kenneth Reitz
91f6e69cc4 Merge pull request #1092 from jianlius/case-insensitive-update
Make merge_kwargs case-insensitive when looking up keys.
2013-01-09 23:07:45 -08:00
Kenneth Reitz
6ec1a9ca52 Merge pull request #1091 from vinodc/specify_file_content_type
Allow for explicit file content type support
2013-01-09 23:02:47 -08:00
Kenneth Reitz
9d33629b6d don't supply params for directs
Closes #1070
2013-01-10 01:58:46 -05:00
Kenneth Reitz
ef8563ab36 CHUNKED REQUESTS! 2013-01-10 01:58:29 -05:00
Jian Li
a392a87389 Retrieve kwargs.keys() just once. 2013-01-09 22:07:38 -08:00
Kenneth Reitz
4a5b5bc86e test cleanup 2013-01-10 00:40:17 -05:00
Jian Li
68edcd12b1 Make merge_kwargs case-insensitive when looking up keys. 2013-01-09 21:29:24 -08:00
Vinod Chandru
fbc366c1a5 Fixing test to ensure it passes with python 3. 2013-01-09 20:10:54 -08:00
Vinod Chandru
20b10aed1b Allow for third argument in file dict value to support explicit
file content type.
2013-01-09 19:29:28 -08:00
Kenneth Reitz
b4505284f2 Merge pull request #1080 from sigmavirus24/master
Fix #1079
2013-01-07 10:42:30 -08:00
Kenneth Reitz
47fe258b5a Merge pull request #1085 from graingert/patch-1
Update the advanced doc to use the r.json method
2013-01-07 10:42:14 -08:00
Kenneth Reitz
21616a815b Merge pull request #1086 from graingert/patch-2
Update the link headers doc to match the code
2013-01-07 10:41:51 -08:00
Kenneth Reitz
50934e056e Merge pull request #1089 from PaulMcMillan/philosophy
Clarify support for alternative distributions
2013-01-07 10:41:32 -08:00
Paul McMillan
ba1df2cfca Clarify support for alternative distributions 2013-01-07 13:34:51 -05:00
Thomas Grainger
7dc13e5cab Update the link headers doc to match the code 2013-01-04 21:46:14 +00:00
Thomas Grainger
7687746c7c Update the advanced doc to use the r.json method 2013-01-04 21:33:51 +00:00
Ian Cordasco
5264c71d86 Fix #1079
Restore the functionality from here:
https://github.com/kennethreitz/requests/blob/v0.14.2/requests/models.py#L884
2013-01-02 14:25:33 -05:00
Kenneth Reitz
5d87e1aeba Update LICENSE 2012-12-31 17:59:18 -05:00
Kenneth Reitz
c03e893416 Merge pull request #1076 from sigmavirus24/master
Remove (safe|danger)_mode references from docs
2012-12-30 23:49:44 -08:00
Ian Cordasco
fef09a6691 Remove safe_mode/danger_mode from docs 2012-12-30 19:46:04 -05:00
Kenneth Reitz
1d35d439cc Merge pull request #1071 from Lukasa/master
Proxies should have schemes.
2012-12-28 07:41:55 -08:00
Cory Benfield
054e1ab3ee Remove silly print statement. 2012-12-28 15:38:04 +00:00
Cory Benfield
641f4611b2 Make sure proxies have their scheme attached. 2012-12-27 13:37:36 +00:00
Kenneth Reitz
594716abea Merge pull request #1060 from Lukasa/proxy
Provide full URL to proxies.
2012-12-27 03:24:55 -08:00
Cory Benfield
d675abbd3f Remove unneeded import. 2012-12-27 11:22:36 +00:00
Cory Benfield
702f4039bc Use full URL when contacting proxies.
Requests should use the full URL, not the path URL, when forwarding
traffic through proxies.
2012-12-27 11:22:36 +00:00
Cory Benfield
b479a62ec2 PreparedRequests don't carry proxy information.
The proxy info appears to be carried on the session. The only remnants
of proxy handling are this line in __init__().
2012-12-27 11:22:36 +00:00
Kenneth Reitz
81c18c70f5 Merge pull request #1065 from slingamn/certs.release
clean up code support for OS certificate bundles
2012-12-23 02:49:02 -08:00
Shivaram Lingamneni
bbea679ab2 clean up code support for OS certificate bundles 2012-12-23 02:40:18 -08:00
Kenneth Reitz
f1d51aa7eb timeout 2012-12-23 02:45:41 -05:00
Kenneth Reitz
5b5ff69201 update docs 2012-12-23 02:42:14 -05:00
Kenneth Reitz
0665129008 reorder out there 2012-12-23 02:34:53 -05:00
Kenneth Reitz
afd6482219 python for ios 2012-12-23 02:33:03 -05:00
Kenneth Reitz
a23f22e5dc support 2012-12-23 02:29:24 -05:00
Kenneth Reitz
e00e50d01a philsophy 2012-12-23 02:27:28 -05:00
Kenneth Reitz
1960c3c29d Benevolent 2012-12-23 02:25:59 -05:00
Kenneth Reitz
08f66a99b1 semantic versioning 2012-12-23 02:13:31 -05:00
Kenneth Reitz
ab64052642 developer values 2012-12-23 02:07:01 -05:00
Kenneth Reitz
25a9c9fb22 - Python 2.6—3.3 2012-12-23 01:56:46 -05:00
Kenneth Reitz
f0beed8686 + 2012-12-23 01:53:22 -05:00
Kenneth Reitz
5a7d461230 philosophy 2012-12-23 01:51:23 -05:00
Kenneth Reitz
d45eb53bc7 contributor 2012-12-23 01:50:52 -05:00
Kenneth Reitz
911e8aec8d developer interface 2012-12-23 01:50:23 -05:00
Kenneth Reitz
9f89ebe0de request sessions 2012-12-23 01:49:44 -05:00
Kenneth Reitz
526a0befc7 cleaup api docs 2012-12-23 01:47:35 -05:00
Kenneth Reitz
f0fe551dc9 thanks, @sigmavirus24 2012-12-23 01:45:49 -05:00
Kenneth Reitz
f8e2d0e732 api docs 2012-12-23 01:44:54 -05:00
Kenneth Reitz
fcccc82282 Merge remote-tracking branch 'origin/master' 2012-12-23 01:40:12 -05:00
Kenneth Reitz
3ddcc99131 docs update 2012-12-23 01:40:07 -05:00
Kenneth Reitz
70faca2a14 docs, cleanup for preparedrequest 2012-12-23 01:25:01 -05:00
Kenneth Reitz
5f9fecd3aa prepared request docs 2012-12-23 01:21:02 -05:00
Kenneth Reitz
6e780fad6d remove unused timeout 2012-12-23 01:16:00 -05:00
Kenneth Reitz
28b706da83 v1.0.4 2012-12-23 01:15:14 -05:00
Kenneth Reitz
aa3347b2a3 request 2012-12-23 01:14:27 -05:00
Kenneth Reitz
f8a59c3e6f request docstrings 2012-12-23 01:14:22 -05:00
Kenneth Reitz
484916066a Merge pull request #1064 from rascalking/master
fix POST redirects
2012-12-22 22:06:12 -08:00
Kenneth Reitz
b3fbc810d2 no async anymore 2012-12-23 01:02:32 -05:00
Kenneth Reitz
1539d17366 update test docs 2012-12-23 01:02:26 -05:00
Kenneth Reitz
a158abfa15 remove stuidly annoying email notifications 2012-12-23 00:52:18 -05:00
David Bonner
7d085b188c fix POST redirects
the redirect handling logic compares then method to upper-case strings,
so make sure the method gets upper-cased as well.

add a test to POST to /status/302 on httpbin, which fails against httpbin.org
right now.  i'm submitting a pull request over there to fix that right after
this one.  once that's accepted, the new test verifies that the fix works.
2012-12-23 00:51:26 -05:00
Kenneth Reitz
aaa3bf16a9 Merge pull request #1061 from philfreo/patch-1
Fixes url to AUTHORS.rst
2012-12-22 14:10:30 -08:00
Kenneth Reitz
22a1f0917b Merge pull request #1062 from philfreo/patch-2
Using 'master' branch for development
2012-12-22 14:10:17 -08:00
Phil Freo
78f48aef8f Using 'master' branch for development
I'm assuming you're no longer using a 'develop' branch, as I don't see one on GitHub.
2012-12-22 16:46:05 -05:00
Phil Freo
7b1b9df423 Fixes url to AUTHORS.rst
and also mention using 'master' as development branch now.
2012-12-22 16:44:43 -05:00
Kenneth Reitz
e23343ab17 Merge pull request #1059 from Lukasa/sess_docs
Update session documentation.
2012-12-22 03:08:47 -08:00
Kenneth Reitz
b8affd9520 Merge pull request #1049 from Lukasa/master
Correctly identify certificate filenames.
2012-12-22 03:05:50 -08:00
Cory Benfield
1790b1df17 Update session documentation. 2012-12-22 11:03:29 +00:00
Kenneth Reitz
60b4843678 Merge pull request #1055 from michaelwheeler/patch-1
Fixed typo in comment.
2012-12-20 12:55:51 -08:00
michaelwheeler
0b42772663 Fixed typo in comment. 2012-12-20 15:38:04 -05:00
Kenneth Reitz
a49db50b4a Merge pull request #1052 from hozn/apidocs-tweak
Small tweak to API docs to indicate that file-like object supported for data param.
2012-12-20 09:09:24 -08:00
Hans Lellelid
bfef8d99c8 Updated API docs for 'data' param in sessions module to indicate that file-like object is also supported. 2012-12-20 09:47:29 -05:00
Hans Lellelid
dd271782e8 Tweaked the 'data' param docs to indicate that a file-like object is also supported. 2012-12-20 09:45:06 -05:00
Cory Benfield
09da1921ff Import basestring. 2012-12-19 21:37:47 +00:00
Kenneth Reitz
0769ee3b6d Merge pull request #1048 from ib-lundgren/master
Swap prepare_auth and body
2012-12-19 13:12:03 -08:00
Ib Lundgren
05de270d7a Why auth must be prepared last 2012-12-19 21:30:11 +01:00
Cory Benfield
f1ba27faa2 Fix stupid, stupid logic error. 2012-12-19 20:26:41 +00:00
Cory Benfield
8cb904b49d Correctly identify cert files.
Resolves issue #1046.
2012-12-19 20:11:17 +00:00
Ib Lundgren
7e594eb121 Swap prepare_auth and prepare_body 2012-12-19 21:04:50 +01:00
Kenneth Reitz
4966d9c714 Merge pull request #1037 from sigmavirus24/master
Fix #1036
2012-12-18 10:09:33 -08:00
Ian Cordasco
14da5cf180 A possible fix for #1036
I can only assume that the only possible thing to close on a session are the
adapters. As such, I wrote the close method for a session object which closes
all possible adapters.
2012-12-18 09:43:55 -05:00
Kenneth Reitz
6acce57271 no kwargs 2012-12-18 05:01:32 -05:00
211 changed files with 26065 additions and 20927 deletions

2
.coveragerc Normal file
View File

@@ -0,0 +1,2 @@
[run]
omit = requests/packages/*

5
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,5 @@
# You can configure git to automatically use this file with the following config:
# git config --global blame.ignoreRevsFile .git-blame-ignore-revs
# Add automatic code formatting to Requests
2a6f290bc09324406708a4d404a88a45d848ddf9

81
.github/AI_POLICY.md vendored Normal file
View File

@@ -0,0 +1,81 @@
# Generative AI / LLM Policy
We appreciate that we can't realistically police how you author your pull requests, which includes whether you employ large-language model (LLM)-based development tools.
So, we don't.
However, due to both legal and human reasons, we have to establish boundaries.
> [!CAUTION]
> **TL;DR:**
> - We take the responsibility for this project very seriously and we expect you to take your responsibility for your contributions seriously, too.
> This used to be a given, but it changed now that a pull request is just one prompt away.
>
> - Every contribution has to be backed by a human who unequivocally owns the copyright for all changes.
> No LLM bots in `Co-authored-by:`s.
>
> - DoS-by-slop leads to a permanent ban.
>
> - Absolutely **no** unsupervised agentic tools like OpenClaw.
>
> ---
>
> By submitting a pull request, you certify that:
>
> - You are the author of the contribution or have the legal right to submit it.
> - You either hold the copyright to the changes or have explicit legal authorization to contribute them under this project's license.
> - You understand the code.
> - You accept full responsibility for it.
## Legal
There is ongoing legal uncertainty regarding the copyright status of LLM-generated works and their provenance.
Since we do not have a formal [Contributor License Agreement](https://en.wikipedia.org/wiki/Contributor_license_agreement) (CLA), you retain your copyright to your changes to this project.
Therefore, allowing contributions by LLMs has unpredictable consequences for the copyright status of this project even when leaving aside possible copyright violations due to plagiarism.
## Human
As the makers of software that is used by millions of people worldwide and with a reputation for high-quality maintenance, we take our responsibility to our users very seriously.
No matter what LLM vendors or boosters on LinkedIn tell you, we have to manually review every change before merging, because it's **our responsibility** to keep the project stable.
Please understand that by opening low-quality pull requests you're not helping anyone.
Worse, you're [poisoning the open source ecosystem](https://lwn.net/Articles/1058266/) that was precarious even before the arrival of LLM tools.
Having to wade through plausible-looking-but-low-quality pull requests and trying to determine which ones are legit is extremely demoralizing and has already burned out many good maintainers.
Put bluntly, we have no time or interest to become part of your vibe coding loop where you drop LLM slop at our door, we spend time and energy to review it, and you just feed it back into the LLM for another iteration.
This dynamic is especially pernicious because it poisons the well for mentoring new contributors which we are committed to.
## Summary
In practice, this means:
- Pull requests that have an LLM product listed as co-author can't be merged and will be closed without further discussion.
We cannot risk the copyright status of this project.
If you used LLM tools during development, you may still submit but you must remove any LLM co-author tags and take full ownership of every line.
- By submitting a pull request, **you** take full **technical and legal** responsibility for the contents of the pull request and promise that **you** hold the copyright for the changes submitted.
"An LLM wrote it" is **not** an acceptable response to questions or critique.
**If you cannot explain and defend the changes you submit, do not submit them** and open a high-quality bug report/feature request instead.
- Accounts that exercise bot-like behavior like automated mass pull requests will be permanently banned, whether they belong to a human or not.
- Do **not** post LLM-generated review comments we can prompt LLMs ourselves should we desire their wisdom.
Do **not** post summaries unless you've fact-checked them and take responsibility for 100% of their content.
Remember that *all* LLM output *looks* **plausible**.
When using these tools, it's **your** responsibility to ensure that it's also **correct** and has a reasonable signal-to-noise ratio.
---
# Credits, Attribution
The original version of this can be found in [pyca/service-identity][] and is
used with permission from Hynek Schlawack.
[pyca/service-identity]:
https://github.com/pyca/service-identity/blob/fa91bf55cfda64145aa3d202cc84059befb98af4/.github/AI_POLICY.md

8
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,8 @@
# Restrict all files related to deploying to
# require lead maintainer approval.
.github/workflows/ @nateprewitt @sigmavirus24
.github/CODEOWNERS @nateprewitt @sigmavirus24
src/requests/__version__.py @nateprewitt @sigmavirus24
HISTORY.md @nateprewitt @sigmavirus24
pyproject.toml @nateprewitt @sigmavirus24

6
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@@ -0,0 +1,6 @@
# Treat each other well
Everyone participating in the _requests_ project, and in particular in the issue tracker,
pull requests, and social media activity, is expected to treat other people with respect
and more generally to follow the guidelines articulated in the
[Python Community Code of Conduct](https://www.python.org/psf/codeofconduct/).

66
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,66 @@
# Contribution Guidelines
Before opening any issues or proposing any pull requests, please read
our [Contributor's Guide](https://requests.readthedocs.io/en/latest/dev/contributing/)
as well as our [AI Policy](/.github/AI_POLICY.md).
To get the greatest chance of helpful responses, please also observe the
following additional notes.
## Questions
The GitHub issue tracker is for *bug reports* and *feature requests*. Please do
not use it to ask questions about how to use Requests. These questions should
instead be directed to [Stack Overflow](https://stackoverflow.com/). Make sure
that your question is tagged with the `python-requests` tag when asking it on
Stack Overflow, to ensure that it is answered promptly and accurately.
## Good Bug Reports
Please be aware of the following things when filing bug reports:
1. Avoid raising duplicate issues. *Please* use the GitHub issue search feature
to check whether your bug report or feature request has been mentioned in
the past. Duplicate bug reports and feature requests are a huge maintenance
burden on the limited resources of the project. If it is clear from your
report that you would have struggled to find the original, that's ok, but
if searching for a selection of words in your issue title would have found
the duplicate then the issue will likely be closed extremely abruptly.
2. When filing bug reports about exceptions or tracebacks, please include the
*complete* traceback. Partial tracebacks, or just the exception text, are
not helpful. Issues that do not contain complete tracebacks may be closed
without warning.
3. Make sure you provide a suitable amount of information to work with. This
means you should provide:
- Guidance on **how to reproduce the issue**. Ideally, this should be a
*small* code sample that can be run immediately by the maintainers.
Failing that, let us know what you're doing, how often it happens, what
environment you're using, etc. Be thorough: it prevents us needing to ask
further questions.
- Tell us **what you expected to happen**. When we run your example code,
what are we expecting to happen? What does "success" look like for your
code?
- Tell us **what actually happens**. It's not helpful for you to say "it
doesn't work" or "it fails". Tell us *how* it fails: do you get an
exception? A hang? A non-200 status code? How was the actual result
different from your expected result?
- Tell us **what version of Requests you're using**, and
**how you installed it**. Different versions of Requests behave
differently and have different bugs, and some distributors of Requests
ship patches on top of the code we supply.
If you do not provide all of these things, it will take us much longer to
fix your problem. If we ask you to clarify these and you never respond, we
will close your issue without fixing it.
## Good Pull Requests
1. Avoid raising duplicate pull requests. *Please* use the GitHub pull request
search feature to check whether someone else has already filed a pull
request.
2. When filing a pull request, always include tests that fail without your
changes thus preventing the fix from regressing.
3. Always run the test suite locally
4. Write commit messages that explain _why_ a change was made beyond "Fixes
#NNNN". Why is this the right fix? What other options were ruled out? etc.

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
custom: ['https://www.python.org/psf/sponsorship/']

28
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,28 @@
Summary.
## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).

36
.github/ISSUE_TEMPLATE/Bug_report.md vendored Normal file
View File

@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
---
<!-- Summary. -->
## Expected Result
<!-- What you expected. -->
## Actual Result
<!-- What happened instead. -->
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```json
{
"paste": "here"
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->

10
.github/ISSUE_TEMPLATE/Custom.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: Request for Help
about: Guidance on using Requests.
labels:
- "Question/Not a bug"
- "actions/autoclose-qa"
---
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.

View File

@@ -0,0 +1,10 @@
---
name: Feature request
about: Suggest an idea for this project
labels:
- "Feature Request"
- "actions/autoclose-feat"
---
Requests is not accepting feature requests at this time.

84
.github/SECURITY.md vendored Normal file
View File

@@ -0,0 +1,84 @@
# Vulnerability Disclosure
If you think you have found a potential security vulnerability in
requests, please open a [draft Security Advisory](https://github.com/psf/requests/security/advisories/new)
via GitHub. We will coordinate verification and next steps through
that secure medium.
If English is not your first language, please try to describe the
problem and its impact to the best of your ability. For greater detail,
please use your native language and we will try our best to translate it
using online services.
Please also include the code you used to find the problem and the
shortest amount of code necessary to reproduce it.
Please do not disclose this to anyone else. We will retrieve a CVE
identifier if necessary and give you full credit under whatever name or
alias you provide. We will only request an identifier when we have a fix
and can publish it in a release.
We will respect your privacy and will only publicize your involvement if
you grant us permission.
## Process
This following information discusses the process the requests project
follows in response to vulnerability disclosures. If you are disclosing
a vulnerability, this section of the documentation lets you know how we
will respond to your disclosure.
### Timeline
When you report an issue, one of the project members will respond to you
within two days *at the outside*. In most cases responses will be
faster, usually within 12 hours. This initial response will at the very
least confirm receipt of the report.
If we were able to rapidly reproduce the issue, the initial response
will also contain confirmation of the issue. If we are not, we will
often ask for more information about the reproduction scenario.
Our goal is to have a fix for any vulnerability released within two
weeks of the initial disclosure. This may potentially involve shipping
an interim release that simply disables function while a more mature fix
can be prepared, but will in the vast majority of cases mean shipping a
complete release as soon as possible.
Throughout the fix process we will keep you up to speed with how the fix
is progressing. Once the fix is prepared, we will notify you that we
believe we have a fix. Often we will ask you to confirm the fix resolves
the problem in your environment, especially if we are not confident of
our reproduction scenario.
At this point, we will prepare for the release. We will obtain a CVE
number if one is required, providing you with full credit for the
discovery. We will also decide on a planned release date, and let you
know when it is. This release date will *always* be on a weekday.
At this point we will reach out to our major downstream packagers to
notify them of an impending security-related patch so they can make
arrangements. In addition, these packagers will be provided with the
intended patch ahead of time, to ensure that they are able to promptly
release their downstream packages. Currently the list of people we
actively contact *ahead of a public release* is:
- Python Maintenance Team, Red Hat (python-maint@redhat.com)
- Daniele Tricoli, Debian (@eriol)
We will notify these individuals at least a week ahead of our planned
release date to ensure that they have sufficient time to prepare. If you
believe you should be on this list, please let one of the maintainers
know at one of the email addresses at the top of this article.
On release day, we will push the patch to our public repository, along
with an updated changelog that describes the issue and credits you. We
will then issue a PyPI release containing the patch.
At this point, we will publicise the release. This will involve mails to
mailing lists, Tweets, and all other communication mechanisms available
to the core team.
We will also explicitly mention which commits contain the fix to make it
easier for other distributors and users to easily patch their own
versions of requests if upgrading is not an option.

30
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
ignore:
# Ignore all patch releases as we can manually
# upgrade if we run into a bug and need a fix.
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
cooldown:
default-days: 7
groups:
actions:
patterns:
- "*"
- package-ecosystem: "pre-commit"
directory: "/"
schedule:
interval: "weekly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
cooldown:
default-days: 7
groups:
pre-commit:
patterns:
- "*"

38
.github/workflows/close-issues.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: 'Autoclose Issues'
on:
issues:
types:
- labeled
permissions: {}
jobs:
close_qa:
permissions:
issues: write
if: github.event.label.name == 'actions/autoclose-qa'
runs-on: ubuntu-latest
steps:
- env:
ISSUE_URL: ${{ github.event.issue.html_url }}
GH_TOKEN: ${{ github.token }}
run: |
gh issue close $ISSUE_URL \
--comment "As described in the template, we won't be able to answer questions on this issue tracker. Please use [Stack Overflow](https://stackoverflow.com/)" \
--reason completed
gh issue lock $ISSUE_URL --reason off_topic
close_feature_request:
permissions:
issues: write
if: github.event.label.name == 'actions/autoclose-feat'
runs-on: ubuntu-latest
steps:
- env:
ISSUE_URL: ${{ github.event.issue.html_url }}
GH_TOKEN: ${{ github.token }}
run: |
gh issue close $ISSUE_URL \
--comment "As described in the template, Requests is not accepting feature requests" \
--reason "not planned"
gh issue lock $ISSUE_URL --reason off_topic

74
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '0 23 * * 0'
permissions:
contents: read
jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
persist-credentials: false
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
with:
languages: "python"
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0

24
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Lint code
on: [push, pull_request]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.x"
- name: Run pre-commit
run: |
python -m pip install pre-commit==4.6.0
pre-commit run --show-diff-on-failure --color=always --all-files

19
.github/workflows/lock-issues.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: 'Lock Threads'
on:
schedule:
- cron: '0 0 * * *'
permissions:
issues: write
pull-requests: write
jobs:
action:
if: github.repository_owner == 'psf'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@89ae32b08ed1a541efecbab17912962a5e38981c # v6.0.2
with:
issue-lock-inactive-days: 90
pr-lock-inactive-days: 90

95
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,95 @@
name: Publish to PyPI
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
test-pypi-only:
description: "Publish to Test PyPI only"
type: boolean
default: true
permissions:
contents: read
jobs:
build:
name: "Build dists"
runs-on: "ubuntu-latest"
outputs:
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
steps:
- name: "Checkout repository"
uses: "actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0" # v7.0.0
with:
persist-credentials: false
- name: "Setup Python"
uses: "actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97" # v7.0.0
with:
python-version: "3.x"
- name: "Install dependencies"
run: python -m pip install build==1.4.0
- name: "Build dists"
run: |
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \
python -m build
- name: "Upload dists"
uses: "actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f"
id: upload-artifact
with:
name: "dist"
path: "dist/"
if-no-files-found: error
retention-days: 5
publish:
name: "Publish"
if: startsWith(github.ref, 'refs/tags/')
needs: ["build"]
permissions:
id-token: write
runs-on: "ubuntu-latest"
environment:
name: "publish"
steps:
- name: "Download dists"
uses: "actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3" # v8.0.0
with:
artifact-ids: ${{ needs.build.outputs.artifact-id }}
path: "dist/"
- name: "Publish dists to PyPI"
uses: "pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b" # v1.14.0
with:
attestations: true
publish-test-pypi:
name: "Publish to Test PyPI"
if: github.event_name == 'workflow_dispatch'
needs: ["build"]
permissions:
id-token: write
runs-on: "ubuntu-latest"
environment:
name: "testpypi"
steps:
- name: "Download dists"
uses: "actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3" # v8.0.0
with:
artifact-ids: ${{ needs.build.outputs.artifact-id }}
path: "dist/"
- name: "Publish dists to Test PyPI"
uses: "pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b" # v1.14.0
with:
repository-url: https://test.pypi.org/legacy/
attestations: true

83
.github/workflows/run-tests.yml vendored Normal file
View File

@@ -0,0 +1,83 @@
name: Tests
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15-dev", "pypy-3.11"]
os: [ubuntu-22.04, macOS-latest, windows-latest]
# Pypy-3.11 can't install openssl-sys with rust
# which prevents us from testing in GHA.
exclude:
- { python-version: "pypy-3.11", os: "windows-latest" }
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
allow-prereleases: true
- name: Install dependencies
env:
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: ${{ matrix.python-version == '3.15-dev' && '1' || '' }}
run: |
make
- name: Run tests
run: |
make ci
no_chardet:
name: "No Character Detection"
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false
- name: 'Set up Python 3.10'
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.10'
- name: Install dependencies
run: |
make
python -m pip uninstall -y "charset_normalizer" "chardet"
- name: Run tests
run: |
make ci
urllib3:
name: 'urllib3 1.x'
runs-on: 'ubuntu-latest'
strategy:
fail-fast: true
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false
- name: 'Set up Python 3.10'
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.10'
- name: Install dependencies
run: |
make
python -m pip install "urllib3<2"
- name: Run tests
run: |
make ci

32
.github/workflows/typecheck.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Type Check
on: [push, pull_request]
permissions:
contents: read
jobs:
typecheck:
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.10", "3.14"]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install pip==26.0.1
python -m pip install -e . --group typecheck
- name: Run pyright
run: python -m pyright src/requests/

24
.github/workflows/zizmor.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
# Sourced from https://github.com/zizmorcore/zizmor-action
name: GitHub Actions Security Analysis with zizmor 🌈
on:
push:
branches: ["main"]
pull_request:
branches: ["**"]
permissions: {}
jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@6599ee8b7a49aef6a770f63d261d214911a7ce02 # v0.6.0

19
.gitignore vendored
View File

@@ -5,16 +5,33 @@ nosetests.xml
junit-report.xml
pylint.txt
toy.py
violations.pyflakes.txt
.cache/
cover/
build/
docs/_build
requests.egg-info/
*.pyc
*.swp
*.egg
env/
.venv/
.eggs/
.tox/
.pytest_cache/
.vscode/
.eggs/
.workon
# in case you work with IntelliJ/PyCharm
.idea
*.iml
.python-version
t.py
t2.py
dist
/.mypy_cache/

21
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,21 @@
exclude: 'docs/|ext/'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=auto]
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.4
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
exclude: tests/test_lowlevel.py

29
.readthedocs.yaml Normal file
View File

@@ -0,0 +1,29 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
builder: "dirhtml"
# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf
- epub
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- path: .
- requirements: docs/requirements.txt

View File

@@ -1,9 +0,0 @@
language: python
python:
- 2.6
- 2.7
- 3.2
env: HTTPBIN_URL=http://httpbin.org/
script: make test
install:
- make test-deps

View File

@@ -1,17 +1,17 @@
Requests is written and maintained by Kenneth Reitz and
various contributors:
Requests was lovingly created by Kenneth Reitz.
Development Lead
````````````````
Requests Maintainers
````````````````````
- Kenneth Reitz <me@kennethreitz.com>
- Ian Stapleton Cordasco <graffatcolmingov@gmail.com> `@sigmavirus24 <https://github.com/sigmavirus24>`_.
- Nate Prewitt `@nateprewitt <https://github.com/nateprewitt>`_.
Previous Maintainers
````````````````````
Urllib3
```````
- Andrey Petrov <andrey.petrov@shazow.net>
- Kenneth Reitz <me@kennethreitz.org> `@kennethreitz <https://github.com/kennethreitz>`_, reluctant Keeper of the Master Crystal.
- Cory Benfield <cory@lukasa.co.uk> `@lukasa <https://github.com/lukasa>`_
- Seth M. Larson `@sethmlarson <https://github.com/sethmlarson>`_.
Patches and Suggestions
```````````````````````
@@ -39,7 +39,7 @@ Patches and Suggestions
- Peter Manser
- Jeremy Selier
- Jens Diemer
- Alex <@alopatin>
- Alex (`@alopatin <https://github.com/alopatin>`_)
- Tom Hogans <tomhsx@gmail.com>
- Armin Ronacher
- Shrikant Sharat Kandula
@@ -76,11 +76,10 @@ Patches and Suggestions
- Chase Sterling
- Marty Alchin
- takluyver
- Ben Toews (mastahyeti)
- Ben Toews (`@mastahyeti <https://github.com/mastahyeti>`_)
- David Kemp
- Brendon Crawford
- Denis (Telofy)
- Cory Benfield (Lukasa)
- Denis (`@Telofy <https://github.com/Telofy>`_)
- Matt Giuca
- Adam Tauber
- Honza Javorek
@@ -97,23 +96,100 @@ Patches and Suggestions
- Jonty Wareing <jonty@jonty.co.uk>
- Shivaram Lingamneni
- Miguel Turner
- Rohan Jain (crodjer)
- Rohan Jain (`@crodjer <https://github.com/crodjer>`_)
- Justin Barber <barber.justin@gmail.com>
- Roman Haritonov <@reclosedev>
- Roman Haritonov (`@reclosedev <https://github.com/reclosedev>`_)
- Josh Imhoff <joshimhoff13@gmail.com>
- Arup Malakar <amalakar@gmail.com>
- Danilo Bargen (dbrgn)
- Danilo Bargen (`@dbrgn <https://github.com/dbrgn>`_)
- Torsten Landschoff
- Michael Holler (apotheos)
- Michael Holler (`@apotheos <https://github.com/apotheos>`_)
- Timnit Gebru
- Sarah Gonzalez
- Victoria Mo
- Leila Muhtasib
- Matthias Rahlf <matthias@webding.de>
- Jakub Roztocil <jakub@roztocil.name>
- Ian Cordasco <graffatcolmingov@gmail.com> @sigmavirus24
- Rhys Elsmore
- André Graf (dergraf)
- Stephen Zhuang (everbird)
- André Graf (`@dergraf <https://github.com/dergraf>`_)
- Stephen Zhuang (`@everbird <https://github.com/everbird>`_)
- Martijn Pieters
- Jonatan Heyman
- David Bonner <dbonner@gmail.com> (`@rascalking <https://github.com/rascalking>`_)
- Vinod Chandru
- Johnny Goodnow <j.goodnow29@gmail.com>
- Denis Ryzhkov <denisr@denisr.com>
- Wilfred Hughes <me@wilfred.me.uk>
- Dmitry Medvinsky <me@dmedvinsky.name>
- Bryce Boe <bbzbryce@gmail.com> (`@bboe <https://github.com/bboe>`_)
- Colin Dunklau <colin.dunklau@gmail.com> (`@cdunklau <https://github.com/cdunklau>`_)
- Bob Carroll <bob.carroll@alum.rit.edu> (`@rcarz <https://github.com/rcarz>`_)
- Hugo Osvaldo Barrera <hugo@barrera.io> (`@hobarrera <https://github.com/hobarrera>`_)
- Łukasz Langa <lukasz@langa.pl>
- Dave Shawley <daveshawley@gmail.com>
- James Clarke (`@jam <https://github.com/jam>`_)
- Kevin Burke <kev@inburke.com>
- Flavio Curella
- David Pursehouse <david.pursehouse@gmail.com> (`@dpursehouse <https://github.com/dpursehouse>`_)
- Jon Parise (`@jparise <https://github.com/jparise>`_)
- Alexander Karpinsky (`@homm86 <https://twitter.com/homm86>`_)
- Marc Schlaich (`@schlamar <https://github.com/schlamar>`_)
- Park Ilsu <daftonshady@gmail.com> (`@daftshady <https://github.com/daftshady>`_)
- Matt Spitz (`@mattspitz <https://github.com/mattspitz>`_)
- Vikram Oberoi (`@voberoi <https://github.com/voberoi>`_)
- Can Ibanoglu <can.ibanoglu@gmail.com> (`@canibanoglu <https://github.com/canibanoglu>`_)
- Thomas Weißschuh <thomas@t-8ch.de> (`@t-8ch <https://github.com/t-8ch>`_)
- Jayson Vantuyl <jayson@aggressive.ly>
- Pengfei.X <pengphy@gmail.com>
- Kamil Madac <kamil.madac@gmail.com>
- Michael Becker <mike@beckerfuffle.com> (`@beckerfuffle <https://twitter.com/beckerfuffle>`_)
- Erik Wickstrom <erik@erikwickstrom.com> (`@erikwickstrom <https://github.com/erikwickstrom>`_)
- Константин Подшумок (`@podshumok <https://github.com/podshumok>`_)
- Ben Bass (`@codedstructure <https://github.com/codedstructure>`_)
- Jonathan Wong <evolutionace@gmail.com> (`@ContinuousFunction <https://github.com/ContinuousFunction>`_)
- Martin Jul (`@mjul <https://github.com/mjul>`_)
- Joe Alcorn (`@buttscicles <https://github.com/buttscicles>`_)
- Syed Suhail Ahmed <ssuhail.ahmed93@gmail.com> (`@syedsuhail <https://github.com/syedsuhail>`_)
- Scott Sadler (`@ssadler <https://github.com/ssadler>`_)
- Arthur Darcet (`@arthurdarcet <https://github.com/arthurdarcet>`_)
- Ulrich Petri (`@ulope <https://github.com/ulope>`_)
- Muhammad Yasoob Ullah Khalid <yasoob.khld@gmail.com> (`@yasoob <https://github.com/yasoob>`_)
- Paul van der Linden (`@pvanderlinden <https://github.com/pvanderlinden>`_)
- Colin Dickson (`@colindickson <https://github.com/colindickson>`_)
- Smiley Barry (`@smiley <https://github.com/smiley>`_)
- Shagun Sodhani (`@shagunsodhani <https://github.com/shagunsodhani>`_)
- Robin Linderborg (`@vienno <https://github.com/vienno>`_)
- Brian Samek (`@bsamek <https://github.com/bsamek>`_)
- Dmitry Dygalo (`@Stranger6667 <https://github.com/Stranger6667>`_)
- piotrjurkiewicz
- Jesse Shapiro <jesse@jesseshapiro.net> (`@haikuginger <https://github.com/haikuginger>`_)
- Nate Prewitt <nate.prewitt@gmail.com> (`@nateprewitt <https://github.com/nateprewitt>`_)
- Maik Himstedt
- Michael Hunsinger
- Brian Bamsch <bbamsch32@gmail.com> (`@bbamsch <https://github.com/bbamsch>`_)
- Om Prakash Kumar <omprakash070@gmail.com> (`@iamprakashom <https://github.com/iamprakashom>`_)
- Philipp Konrad <gardiac2002@gmail.com> (`@gardiac2002 <https://github.com/gardiac2002>`_)
- Hussain Tamboli <hussaintamboli18@gmail.com> (`@hussaintamboli <https://github.com/hussaintamboli>`_)
- Casey Davidson (`@davidsoncasey <https://github.com/davidsoncasey>`_)
- Andrii Soldatenko (`@a_soldatenko <https://github.com/andriisoldatenko>`_)
- Moinuddin Quadri <moin18@gmail.com> (`@moin18 <https://github.com/moin18>`_)
- Matt Kohl (`@mattkohl <https://github.com/mattkohl>`_)
- Jonathan Vanasco (`@jvanasco <https://github.com/jvanasco>`_)
- David Fontenot (`@davidfontenot <https://github.com/davidfontenot>`_)
- Shmuel Amar (`@shmuelamar <https://github.com/shmuelamar>`_)
- Gary Wu (`@garywu <https://github.com/garywu>`_)
- Ryan Pineo (`@ryanpineo <https://github.com/ryanpineo>`_)
- Ed Morley (`@edmorley <https://github.com/edmorley>`_)
- Matt Liu <liumatt@gmail.com> (`@mlcrazy <https://github.com/mlcrazy>`_)
- Taylor Hoff <primdevs@protonmail.com> (`@PrimordialHelios <https://github.com/PrimordialHelios>`_)
- Arthur Vigil (`@ahvigil <https://github.com/ahvigil>`_)
- Nehal J Wani (`@nehaljwani <https://github.com/nehaljwani>`_)
- Demetrios Bairaktaris (`@DemetriosBairaktaris <https://github.com/demetriosbairaktaris>`_)
- Darren Dormer (`@ddormer <https://github.com/ddormer>`_)
- Rajiv Mayani (`@mayani <https://github.com/mayani>`_)
- Antti Kaihola (`@akaihola <https://github.com/akaihola>`_)
- "Dull Bananas" <dull.bananas0@gmail.com> (`@dullbananas <https://github.com/dullbananas>`_)
- Alessio Izzo (`@aless10 <https://github.com/aless10>`_)
- Sylvain Marié (`@smarie <https://github.com/smarie>`_)
- Hod Bin Noon (`@hodbn <https://github.com/hodbn>`_)
- Mike Fiedler (`@miketheman <https://github.com/miketheman>`_)

2102
HISTORY.md Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,601 +0,0 @@
.. :changelog:
History
-------
1.0.3 (2012-12-18)
++++++++++++++++++
- Fix file upload encoding bug
- Fix cookie behavior
1.0.2 (2012-12-17)
++++++++++++++++++
- Proxy fix for HTTPAdapter.
1.0.1 (2012-12-17)
++++++++++++++++++
- Cert verification exception bug.
- Proxy fix for HTTPAdapter.
1.0.0 (2012-12-17)
++++++++++++++++++
- Massive Refactor and Simplification
- Switch to Apache 2.0 license
- Swappable Connection Adapters
- Mountable Connection Adapters
- Mutable ProcessedRequest chain
- /s/prefetch/stream
- Removal of all configuration
- Standard library logging
- Make Reponse.json() callable, not property.
- Usage of new charade project, which provides python 2 and 3 simultaneous chardet.
- Removal of all hooks except 'response'
- Removal of all authentication helpers (OAuth, Kerberos)
This is not a backwards compatible change.
0.14.2 (2012-10-27)
+++++++++++++++++++
- Improved mime-compatible JSON handling
- Proxy fixes
- Path hack fixes
- Case-Insensistive Content-Encoding headers
- Support for CJK parameters in form posts
0.14.1 (2012-10-01)
+++++++++++++++++++
- Python 3.3 Compatibility
- Simply default accept-encoding
- Bugfixes
0.14.0 (2012-09-02)
++++++++++++++++++++
- No more iter_content errors if already downloaded.
0.13.9 (2012-08-25)
+++++++++++++++++++
- Fix for OAuth + POSTs
- Remove exception eating from dispatch_hook
- General bugfixes
0.13.8 (2012-08-21)
+++++++++++++++++++
- Incredible Link header support :)
0.13.7 (2012-08-19)
+++++++++++++++++++
- Support for (key, value) lists everywhere.
- Digest Authentication improvements.
- Ensure proxy exclusions work properly.
- Clearer UnicodeError exceptions.
- Automatic casting of URLs to tsrings (fURL and such)
- Bugfixes.
0.13.6 (2012-08-06)
+++++++++++++++++++
- Long awaited fix for hanging connections!
0.13.5 (2012-07-27)
+++++++++++++++++++
- Packaging fix
0.13.4 (2012-07-27)
+++++++++++++++++++
- GSSAPI/Kerberos authentication!
- App Engine 2.7 Fixes!
- Fix leaking connections (from urllib3 update)
- OAuthlib path hack fix
- OAuthlib URL parameters fix.
0.13.3 (2012-07-12)
+++++++++++++++++++
- Use simplejson if available.
- Do not hide SSLErrors behind Timeouts.
- Fixed param handling with urls containing fragments.
- Significantly improved information in User Agent.
- client certificates are ignored when verify=False
0.13.2 (2012-06-28)
+++++++++++++++++++
- Zero dependencies (once again)!
- New: Response.reason
- Sign querystring parameters in OAuth 1.0
- Client certificates no longer ignored when verify=False
- Add openSUSE certificate support
0.13.1 (2012-06-07)
+++++++++++++++++++
- Allow passing a file or file-like object as data.
- Allow hooks to return responses that indicate errors.
- Fix Response.text and Response.json for body-less responses.
0.13.0 (2012-05-29)
+++++++++++++++++++
- Removal of Requests.async in favor of `grequests <https://github.com/kennethreitz/grequests>`_
- Allow disabling of cookie persistiance.
- New implimentation of safe_mode
- cookies.get now supports default argument
- Session cookies not saved when Session.request is called with return_response=False
- Env: no_proxy support.
- RequestsCookieJar improvements.
- Various bug fixes.
0.12.1 (2012-05-08)
+++++++++++++++++++
- New ``Response.json`` property.
- Ability to add string file uploads.
- Fix out-of-range issue with iter_lines.
- Fix iter_content default size.
- Fix POST redirects containing files.
0.12.0 (2012-05-02)
+++++++++++++++++++
- EXPERIMENTAL OAUTH SUPPORT!
- Proper CookieJar-backed cookies interface with awesome dict-like interface.
- Speed fix for non-iterated content chunks.
- Move ``pre_request`` to a more usable place.
- New ``pre_send`` hook.
- Lazily encode data, params, files.
- Load system Certificate Bundle if ``certify`` isn't available.
- Cleanups, fixes.
0.11.2 (2012-04-22)
+++++++++++++++++++
- Attempt to use the OS's certificate bundle if ``certifi`` isn't available.
- Infinite digest auth redirect fix.
- Multi-part file upload improvements.
- Fix decoding of invalid %encodings in URLs.
- If there is no content in a response don't throw an error the second time that content is attempted to be read.
- Upload data on redirects.
0.11.1 (2012-03-30)
+++++++++++++++++++
* POST redirects now break RFC to do what browsers do: Follow up with a GET.
* New ``strict_mode`` configuration to disable new redirect behavior.
0.11.0 (2012-03-14)
+++++++++++++++++++
* Private SSL Certificate support
* Remove select.poll from Gevent monkeypatching
* Remove redundant generator for chunked transfer encoding
* Fix: Response.ok raises Timeout Exception in safe_mode
0.10.8 (2012-03-09)
+++++++++++++++++++
* Generate chunked ValueError fix
* Proxy configuration by environment variables
* Simplification of iter_lines.
* New `trust_env` configuration for disabling system/environment hints.
* Suppress cookie errors.
0.10.7 (2012-03-07)
+++++++++++++++++++
* `encode_uri` = False
0.10.6 (2012-02-25)
+++++++++++++++++++
* Allow '=' in cookies.
0.10.5 (2012-02-25)
+++++++++++++++++++
* Response body with 0 content-length fix.
* New async.imap.
* Don't fail on netrc.
0.10.4 (2012-02-20)
+++++++++++++++++++
* Honor netrc.
0.10.3 (2012-02-20)
+++++++++++++++++++
* HEAD requests don't follow redirects anymore.
* raise_for_status() doesn't raise for 3xx anymore.
* Make Session objects picklable.
* ValueError for invalid schema URLs.
0.10.2 (2012-01-15)
+++++++++++++++++++
* Vastly improved URL quoting.
* Additional allowed cookie key values.
* Attempted fix for "Too many open files" Error
* Replace unicode errors on first pass, no need for second pass.
* Append '/' to bare-domain urls before query insertion.
* Exceptions now inherit from RuntimeError.
* Binary uploads + auth fix.
* Bugfixes.
0.10.1 (2012-01-23)
+++++++++++++++++++
* PYTHON 3 SUPPORT!
* Dropped 2.5 Support. (*Backwards Incompatible*)
0.10.0 (2012-01-21)
+++++++++++++++++++
* ``Response.content`` is now bytes-only. (*Backwards Incompatible*)
* New ``Response.text`` is unicode-only.
* If no ``Response.encoding`` is specified and ``chardet`` is available, ``Respoonse.text`` will guess an encoding.
* Default to ISO-8859-1 (Western) encoding for "text" subtypes.
* Removal of `decode_unicode`. (*Backwards Incompatible*)
* New multiple-hooks system.
* New ``Response.register_hook`` for registering hooks within the pipeline.
* ``Response.url`` is now Unicode.
0.9.3 (2012-01-18)
++++++++++++++++++
* SSL verify=False bugfix (apparent on windows machines).
0.9.2 (2012-01-18)
++++++++++++++++++
* Asynchronous async.send method.
* Support for proper chunk streams with boundaries.
* session argument for Session classes.
* Print entire hook tracebacks, not just exception instance.
* Fix response.iter_lines from pending next line.
* Fix but in HTTP-digest auth w/ URI having query strings.
* Fix in Event Hooks section.
* Urllib3 update.
0.9.1 (2012-01-06)
++++++++++++++++++
* danger_mode for automatic Response.raise_for_status()
* Response.iter_lines refactor
0.9.0 (2011-12-28)
++++++++++++++++++
* verify ssl is default.
0.8.9 (2011-12-28)
++++++++++++++++++
* Packaging fix.
0.8.8 (2011-12-28)
++++++++++++++++++
* SSL CERT VERIFICATION!
* Release of Cerifi: Mozilla's cert list.
* New 'verify' argument for SSL requests.
* Urllib3 update.
0.8.7 (2011-12-24)
++++++++++++++++++
* iter_lines last-line truncation fix
* Force safe_mode for async requests
* Handle safe_mode exceptions more consistently
* Fix iteration on null responses in safe_mode
0.8.6 (2011-12-18)
++++++++++++++++++
* Socket timeout fixes.
* Proxy Authorization support.
0.8.5 (2011-12-14)
++++++++++++++++++
* Response.iter_lines!
0.8.4 (2011-12-11)
++++++++++++++++++
* Prefetch bugfix.
* Added license to installed version.
0.8.3 (2011-11-27)
++++++++++++++++++
* Converted auth system to use simpler callable objects.
* New session parameter to API methods.
* Display full URL while logging.
0.8.2 (2011-11-19)
++++++++++++++++++
* New Unicode decoding system, based on over-ridable `Response.encoding`.
* Proper URL slash-quote handling.
* Cookies with ``[``, ``]``, and ``_`` allowed.
0.8.1 (2011-11-15)
++++++++++++++++++
* URL Request path fix
* Proxy fix.
* Timeouts fix.
0.8.0 (2011-11-13)
++++++++++++++++++
* Keep-alive support!
* Complete removal of Urllib2
* Complete removal of Poster
* Complete removal of CookieJars
* New ConnectionError raising
* Safe_mode for error catching
* prefetch parameter for request methods
* OPTION method
* Async pool size throttling
* File uploads send real names
* Vendored in urllib3
0.7.6 (2011-11-07)
++++++++++++++++++
* Digest authentication bugfix (attach query data to path)
0.7.5 (2011-11-04)
++++++++++++++++++
* Response.content = None if there was an invalid repsonse.
* Redirection auth handling.
0.7.4 (2011-10-26)
++++++++++++++++++
* Session Hooks fix.
0.7.3 (2011-10-23)
++++++++++++++++++
* Digest Auth fix.
0.7.2 (2011-10-23)
++++++++++++++++++
* PATCH Fix.
0.7.1 (2011-10-23)
++++++++++++++++++
* Move away from urllib2 authentication handling.
* Fully Remove AuthManager, AuthObject, &c.
* New tuple-based auth system with handler callbacks.
0.7.0 (2011-10-22)
++++++++++++++++++
* Sessions are now the primary interface.
* Deprecated InvalidMethodException.
* PATCH fix.
* New config system (no more global settings).
0.6.6 (2011-10-19)
++++++++++++++++++
* Session parameter bugfix (params merging).
0.6.5 (2011-10-18)
++++++++++++++++++
* Offline (fast) test suite.
* Session dictionary argument merging.
0.6.4 (2011-10-13)
++++++++++++++++++
* Automatic decoding of unicode, based on HTTP Headers.
* New ``decode_unicode`` setting.
* Removal of ``r.read/close`` methods.
* New ``r.faw`` interface for advanced response usage.*
* Automatic expansion of parameterized headers.
0.6.3 (2011-10-13)
++++++++++++++++++
* Beautiful ``requests.async`` module, for making async requests w/ gevent.
0.6.2 (2011-10-09)
++++++++++++++++++
* GET/HEAD obeys allow_redirects=False.
0.6.1 (2011-08-20)
++++++++++++++++++
* Enhanced status codes experience ``\o/``
* Set a maximum number of redirects (``settings.max_redirects``)
* Full Unicode URL support
* Support for protocol-less redirects.
* Allow for arbitrary request types.
* Bugfixes
0.6.0 (2011-08-17)
++++++++++++++++++
* New callback hook system
* New persistient sessions object and context manager
* Transparent Dict-cookie handling
* Status code reference object
* Removed Response.cached
* Added Response.request
* All args are kwargs
* Relative redirect support
* HTTPError handling improvements
* Improved https testing
* Bugfixes
0.5.1 (2011-07-23)
++++++++++++++++++
* International Domain Name Support!
* Access headers without fetching entire body (``read()``)
* Use lists as dicts for parameters
* Add Forced Basic Authentication
* Forced Basic is default authentication type
* ``python-requests.org`` default User-Agent header
* CaseInsensitiveDict lower-case caching
* Response.history bugfix
0.5.0 (2011-06-21)
++++++++++++++++++
* PATCH Support
* Support for Proxies
* HTTPBin Test Suite
* Redirect Fixes
* settings.verbose stream writing
* Querystrings for all methods
* URLErrors (Connection Refused, Timeout, Invalid URLs) are treated as explicity raised
``r.requests.get('hwe://blah'); r.raise_for_status()``
0.4.1 (2011-05-22)
++++++++++++++++++
* Improved Redirection Handling
* New 'allow_redirects' param for following non-GET/HEAD Redirects
* Settings module refactoring
0.4.0 (2011-05-15)
++++++++++++++++++
* Response.history: list of redirected responses
* Case-Insensitive Header Dictionaries!
* Unicode URLs
0.3.4 (2011-05-14)
++++++++++++++++++
* Urllib2 HTTPAuthentication Recursion fix (Basic/Digest)
* Internal Refactor
* Bytes data upload Bugfix
0.3.3 (2011-05-12)
++++++++++++++++++
* Request timeouts
* Unicode url-encoded data
* Settings context manager and module
0.3.2 (2011-04-15)
++++++++++++++++++
* Automatic Decompression of GZip Encoded Content
* AutoAuth Support for Tupled HTTP Auth
0.3.1 (2011-04-01)
++++++++++++++++++
* Cookie Changes
* Response.read()
* Poster fix
0.3.0 (2011-02-25)
++++++++++++++++++
* Automatic Authentication API Change
* Smarter Query URL Parameterization
* Allow file uploads and POST data together
* New Authentication Manager System
- Simpler Basic HTTP System
- Supports all build-in urllib2 Auths
- Allows for custom Auth Handlers
0.2.4 (2011-02-19)
++++++++++++++++++
* Python 2.5 Support
* PyPy-c v1.4 Support
* Auto-Authentication tests
* Improved Request object constructor
0.2.3 (2011-02-15)
++++++++++++++++++
* New HTTPHandling Methods
- Reponse.__nonzero__ (false if bad HTTP Status)
- Response.ok (True if expected HTTP Status)
- Response.error (Logged HTTPError if bad HTTP Status)
- Reponse.raise_for_status() (Raises stored HTTPError)
0.2.2 (2011-02-14)
++++++++++++++++++
* Still handles request in the event of an HTTPError. (Issue #2)
* Eventlet and Gevent Monkeypatch support.
* Cookie Support (Issue #1)
0.2.1 (2011-02-14)
++++++++++++++++++
* Added file attribute to POST and PUT requests for multipart-encode file uploads.
* Added Request.url attribute for context and redirects
0.2.0 (2011-02-14)
++++++++++++++++++
* Birth!
0.0.1 (2011-02-13)
++++++++++++++++++
* Frustration
* Conception

182
LICENSE
View File

@@ -1,13 +1,175 @@
Copyright 2012 Kenneth Reitz
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
http://www.apache.org/licenses/LICENSE-2.0
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

View File

@@ -1 +1,3 @@
include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem
include README.md LICENSE NOTICE HISTORY.md requirements-dev.txt
recursive-include tests *.py
recursive-include tests/certs *

View File

@@ -1,30 +1,27 @@
SHELL := /bin/bash
.PHONY: docs
init:
python -m pip install -r requirements-dev.txt
test:
py.test
python -m pytest tests
test-deps:
pip install -r requirements.txt
ci:
python -m pytest tests --junitxml=report.xml
six:
python test_requests.py
python3 test_requests.py
test-readme:
python setup.py check --restructuredtext --strict && ([ $$? -eq 0 ] && echo "README.rst and HISTORY.rst ok") || echo "Invalid markup in README.rst or HISTORY.rst!"
deps: urllib3 certs charade
coverage:
python -m pytest --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=src/requests tests
urllib3:
rm -fr requests/packages/urllib3
git clone https://github.com/shazow/urllib3.git
cd urllib3 && git checkout master && cd ..
mv urllib3/urllib3 requests/packages/
rm -fr urllib3
.publishenv:
python -m venv .publishenv
.publishenv/bin/pip install 'twine>=1.5.0' build
charade:
rm -fr requests/packages/charade
git clone https://github.com/sigmavirus24/charade.git
cd charade && git checkout master && cd ..
mv charade/charade requests/packages/
rm -fr charade
publish: .publishenv
.publishenv/bin/python -m build
.publishenv/bin/python -m twine upload --skip-existing dist/*
rm -fr build dist .egg requests.egg-info
certs:
cd requests && curl -O https://raw.github.com/kennethreitz/certifi/master/certifi/cacert.pem
docs:
cd docs && make html
@echo "\033[95m\n\nBuild successful! View the docs homepage at docs/_build/html/index.html.\n\033[0m"

97
NOTICE
View File

@@ -1,95 +1,2 @@
Requests includes some vendorized python libraries to ease installation.
Urllib3 License
===============
This is the MIT license: http://www.opensource.org/licenses/mit-license.php
Copyright 2008-2011 Andrey Petrov and contributors (see CONTRIBUTORS.txt),
Modifications copyright 2022 Kenneth Reitz.
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Charade License
================
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
Bundle of CA Root Certificates
==============================
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301
OAuthlib
========
Copyright (c) 2011 Idan Gazit and contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of this project nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Requests
Copyright 2019 Kenneth Reitz

76
README.md Normal file
View File

@@ -0,0 +1,76 @@
# Requests
[![Version](https://img.shields.io/pypi/v/requests.svg?maxAge=86400)](https://pypi.org/project/requests/)
[![Supported Versions](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/requests)
[![Downloads](https://static.pepy.tech/badge/requests/month)](https://pepy.tech/project/requests)
[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/psf/requests/graphs/contributors)
[![Documentation](https://readthedocs.org/projects/requests/badge/?version=latest)](https://requests.readthedocs.io)
**Requests** is a simple, yet elegant, HTTP library.
```python
>>> import requests
>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))
>>> r.status_code
200
>>> r.headers['content-type']
'application/json; charset=utf8'
>>> r.encoding
'utf-8'
>>> r.text
'{"authenticated": true, ...'
>>> r.json()
{'authenticated': True, ...}
```
Requests allows you to send HTTP/1.1 requests extremely easily. Theres no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data — but nowadays, just use the `json` method!
Requests is one of the most downloaded Python packages today, pulling in around `300M downloads / week` — according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `4,000,000+` repositories.
## Installing Requests and Supported Versions
Requests is available on PyPI:
```console
$ python -m pip install requests
```
Requests officially supports Python 3.10+.
## Supported Features & BestPractices
Requests is ready for the demands of building robust and reliable HTTPspeaking applications, for the needs of today.
- Keep-Alive & Connection Pooling
- International Domains and URLs
- Sessions with Cookie Persistence
- Browser-style TLS/SSL Verification
- Basic & Digest Authentication
- Familiar `dict`like Cookies
- Automatic Content Decompression and Decoding
- Multi-part File Uploads
- SOCKS Proxy Support
- Connection Timeouts
- Streaming Downloads
- Automatic honoring of `.netrc`
- Chunked HTTP Requests
## Cloning the repository
When cloning the Requests repository, you may need to add the `-c
fetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit timestamp (see
[this issue](https://github.com/psf/requests/issues/2690) for more background):
```shell
git clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git
```
You can also apply this setting to your global Git config:
```shell
git config --global fetch.fsck.badTimezone ignore
```
---
[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)

View File

@@ -1,82 +0,0 @@
Requests: HTTP for Humans
=========================
.. image:: https://travis-ci.org/kennethreitz/requests.png?branch=master
:target: https://travis-ci.org/kennethreitz/requests
Requests is an Apache2 Licensed HTTP library, written in Python, for human
beings.
Most existing Python modules for sending HTTP requests are extremely
verbose and cumbersome. Python's builtin urllib2 module provides most of
the HTTP capabilities you should need, but the api is thoroughly broken.
It requires an enormous amount of work (even method overrides) to
perform the simplest of tasks.
Things shouldn't be this way. Not in Python.
.. code-block:: pycon
>>> r = requests.get('https://api.github.com', auth=('user', 'pass'))
>>> r.status_code
204
>>> r.headers['content-type']
'application/json'
>>> r.text
...
See `the same code, without Requests <https://gist.github.com/973705>`_.
Requests allow you to send HTTP/1.1 requests. You can add headers, form data,
multipart files, and parameters with simple Python dictionaries, and access the
response data in the same way. It's powered by httplib and `urllib3
<https://github.com/shazow/urllib3>`_, but it does all the hard work and crazy
hacks for you.
Features
--------
- International Domains and URLs
- Keep-Alive & Connection Pooling
- Sessions with Cookie Persistence
- Browser-style SSL Verification
- Basic/Digest Authentication
- Elegant Key/Value Cookies
- Automatic Decompression
- Unicode Response Bodies
- Multipart File Uploads
- Connection Timeouts
- Thread-safety
Installation
------------
To install requests, simply:
.. code-block:: bash
$ pip install requests
Or, if you absolutely must:
.. code-block:: bash
$ easy_install requests
But, you really shouldn't do that.
Contribute
----------
#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
#. Fork `the repository`_ on Github to start making your changes to the **develop** branch (or branch off of it).
#. Write a test which shows that the bug was fixed or that the feature works as expected.
#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.
.. _`the repository`: http://github.com/kennethreitz/requests
.. _AUTHORS: https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst

1
docs/.nojekyll Normal file
View File

@@ -0,0 +1 @@

View File

@@ -1 +0,0 @@
include HISTORY.rst README.rst LICENSE

View File

@@ -7,6 +7,11 @@ SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://www.sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
@@ -14,8 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@@ -25,53 +29,66 @@ help:
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
.PHONY: clean
clean:
-rm -rf $(BUILDDIR)/*
rm -rf $(BUILDDIR)/*
.PHONY: html
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@@ -81,6 +98,16 @@ qthelp:
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Requests.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@@ -90,11 +117,13 @@ devhelp:
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Requests"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@@ -102,22 +131,33 @@ latex:
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
make -C $(BUILDDIR)/latex all-pdf
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@@ -125,29 +165,52 @@ texinfo:
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

12
docs/_static/custom.css vendored Normal file
View File

@@ -0,0 +1,12 @@
img.logo {margin-left: -20px!important;}
div#searchbox h3 {text-transform: capitalize;}
div.document {width: 1008px;}
div.highlight pre {padding: 11px 14px;}
@media screen and (max-width: 1008px) {
div.document {width: 100%!important;}
div.highlight pre {margin-right: -30px;}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 299 KiB

33
docs/_templates/sidebar.html vendored Normal file
View File

@@ -0,0 +1,33 @@
<p class="logo">
<a href="{{ pathto(root_doc) }}">
<img class="logo" src="{{ pathto('_static/requests-sidebar.png', 1) }}" alt="{{ _('Requests logo') }}" />
</a>
</p>
<p>
<iframe src="https://ghbtns.com/github-btn.html?user=psf&repo=requests&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
<p>
{{ _('Requests is an elegant and simple HTTP library for Python, built for human beings.') }}
</p>
<h3>{{ _('Useful Links') }}</h3>
<ul>
<li><a href="{{ pathto('user/quickstart') }}">{{ _('Quickstart') }}</a></li>
<li><a href="{{ pathto('user/advanced') }}">{{ _('Advanced Usage') }}</a></li>
<li><a href="{{ pathto('api') }}">{{ _('API Reference') }}</a></li>
<li><a href="{{ pathto('community/updates') + '#release-history' }}">{{ _('Release History') }}</a></li>
<li><a href="{{ pathto('dev/contributing') }}">{{ _('Contributors Guide') }}</a></li>
<p></p>
<li><a href="{{ pathto('community/recommended') }}">{{ _('Recommended Packages and Extensions') }}</a></li>
<p></p>
<li><a href="https://github.com/psf/requests">{{ _('Requests @ GitHub') }}</a></li>
<li><a href="https://pypi.org/project/requests/">{{ _('Requests @ PyPI') }}</a></li>
<li><a href="https://github.com/psf/requests/issues">{{ _('Issue Tracker') }}</a></li>
</ul>

View File

@@ -1,51 +0,0 @@
<p class="logo">
<a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/requests-sidebar.png', 1) }}" alt="Logo"/>
</a>
</p>
<p>
<iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&repo=requests&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
<p>
Requests is an elegant and simple HTTP library for Python, built for
human beings. You are currently looking at the documentation of the
development release.
</p>
<h3>Donate</h3>
<p>
If you love Requests, consider supporting the author <a href="https://www.gittip.com/kennethreitz/">on Gittip</a>:
</p>
<p>
<iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/kennethreitz/widget.html"
width="48pt" height="20pt"></iframe>
</p>
<p>
If your organization uses Requests, consider financial support:
</p>
<p>
<a href="http://gum.co/RRZc" class="gumroad-button">Requests Pro</a><script type="text/javascript" src="https://gumroad.com/js/gumroad-button.js"></script>
</p>
<h3>Feedback</h3>
<p>
Feedback is greatly appreciated. If you have any questions, comments,
random praise, or anonymous threats, <a href="mailto:me@kennethreitz.com">
shoot me an email</a>.
</p>
<h3>Useful Links</h3>
<ul>
<li><a href="http://pypi.python.org/pypi/requests">Requests @ PyPI</a></li>
<li><a href="http://github.com/kennethreitz/requests">Requests @ GitHub</a></li>
<li><a href="https://flattr.com/thing/442264/Requests">Requests @ Flattr</a></li>
<li><a href="http://github.com/kennethreitz/requests/issues">Issue Tracker</a></li>
</ul>

View File

@@ -1,34 +0,0 @@
<p class="logo">
<a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/requests-sidebar.png', 1) }}" alt="Logo"/>
</a>
</p>
<p>
<iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&repo=requests&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
<p>
Requests is an elegant and simple HTTP library for Python, built for
human beings. You are currently looking at the documentation of the
development release.
</p>
<h3>Donate</h3>
<p>
If you love Requests, consider supporting the author <a href="https://www.gittip.com/kennethreitz/">on Gittip</a>:
</p>
<p>
<iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/kennethreitz/widget.html"
width="48pt" height="20pt"></iframe>
</p>
<p>
If your organization uses Requests, consider financial support:
</p>
<p>
<a href="http://gum.co/RRZc" class="gumroad-button">Requests Pro</a><script type="text/javascript" src="https://gumroad.com/js/gumroad-button.js"></script>
</p>

View File

@@ -1,25 +0,0 @@
krTheme Sphinx Style
====================
This repository contains sphinx styles Kenneth Reitz uses in most of
his projects. It is a derivative of Mitsuhiko's themes for Flask and Flask related
projects. To use this style in your Sphinx documentation, follow
this guide:
1. put this folder as _themes into your docs folder. Alternatively
you can also use git submodules to check out the contents there.
2. add this to your conf.py: ::
sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'flask'
The following themes exist:
**kr**
the standard flask documentation theme for large projects
**kr_small**
small one-page theme. Intended to be used by very small addon libraries.

View File

@@ -1,71 +0,0 @@
{%- extends "basic/layout.html" %}
{%- block extrahead %}
{{ super() }}
{% if theme_touch_icon %}
<link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, 1) }}" />
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
{% endblock %}
{%- block relbar2 %}{% endblock %}
{%- block footer %}
<div class="footer">
&copy; Copyright {{ copyright }}.
</div>
<a href="https://github.com/kennethreitz/requests" class="github">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" class="github"/>
</a>
<script type="text/javascript">
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
<script type="text/javascript">
setTimeout(function(){var a=document.createElement("script");
var b=document.getElementsByTagName("script")[0];
a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0013/7219.js?"+Math.floor(new Date().getTime()/3600000);
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
</script>
<script type="text/javascript">
new HelloBar(36402,48802);
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-8742933-11']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id',
'4ddc27f6613f5d186d000007');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
{%- endblock %}

View File

@@ -1,19 +0,0 @@
<h3>Related Topics</h3>
<ul>
<li><a href="{{ pathto(master_doc) }}">Documentation overview</a><ul>
{%- for parent in parents %}
<li><a href="{{ parent.link|e }}">{{ parent.title }}</a><ul>
{%- endfor %}
{%- if prev %}
<li>Previous: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
}}">{{ prev.title }}</a></li>
{%- endif %}
{%- if next %}
<li>Next: <a href="{{ next.link|e }}" title="{{ _('next chapter')
}}">{{ next.title }}</a></li>
{%- endif %}
{%- for parent in parents %}
</ul></li>
{%- endfor %}
</ul></li>
</ul>

View File

@@ -1,536 +0,0 @@
/*
* flasky.css_t
* ~~~~~~~~~~~~
*
* :copyright: Copyright 2010 by Armin Ronacher. Modifications by Kenneth Reitz.
* :license: Flask Design License, see LICENSE for details.
*/
{% set page_width = '940px' %}
{% set sidebar_width = '220px' %}
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro';
font-size: 17px;
background-color: white;
color: #000;
margin: 0;
padding: 0;
}
div.document {
width: {{ page_width }};
margin: 30px auto 0 auto;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 {{ sidebar_width }};
}
div.sphinxsidebar {
width: {{ sidebar_width }};
}
hr {
border: 1px solid #B1B4B6;
}
div.body {
background-color: #ffffff;
color: #3E4349;
padding: 0 30px 0 30px;
}
img.floatingflask {
padding: 0 0 10px 10px;
float: right;
}
div.footer {
width: {{ page_width }};
margin: 20px auto 30px auto;
font-size: 14px;
color: #888;
text-align: right;
}
div.footer a {
color: #888;
}
div.related {
display: none;
}
div.sphinxsidebar a {
color: #444;
text-decoration: none;
border-bottom: 1px dotted #999;
}
div.sphinxsidebar a:hover {
border-bottom: 1px solid #999;
}
div.sphinxsidebar {
font-size: 14px;
line-height: 1.5;
}
div.sphinxsidebarwrapper {
padding: 18px 10px;
}
div.sphinxsidebarwrapper p.logo {
padding: 0;
margin: -10px 0 0 -20px;
text-align: center;
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: 'Garamond', 'Georgia', serif;
color: #444;
font-size: 24px;
font-weight: normal;
margin: 0 0 5px 0;
padding: 0;
}
div.sphinxsidebar h4 {
font-size: 20px;
}
div.sphinxsidebar h3 a {
color: #444;
}
div.sphinxsidebar p.logo a,
div.sphinxsidebar h3 a,
div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
border: none;
}
div.sphinxsidebar p {
color: #555;
margin: 10px 0;
}
div.sphinxsidebar ul {
margin: 10px 0;
padding: 0;
color: #000;
}
div.sphinxsidebar input {
border: 1px solid #ccc;
font-family: 'Georgia', serif;
font-size: 1em;
}
/* -- body styles ----------------------------------------------------------- */
a {
color: #004B6B;
text-decoration: underline;
}
a:hover {
color: #6D4100;
text-decoration: underline;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
margin: 30px 0px 10px 0px;
padding: 0;
}
div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
div.body h2 { font-size: 180%; }
div.body h3 { font-size: 150%; }
div.body h4 { font-size: 130%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: #ddd;
padding: 0 4px;
text-decoration: none;
}
a.headerlink:hover {
color: #444;
background: #eaeaea;
}
div.body p, div.body dd, div.body li {
line-height: 1.4em;
}
div.admonition {
background: #fafafa;
margin: 20px -30px;
padding: 10px 30px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
div.admonition tt.xref, div.admonition a tt {
border-bottom: 1px solid #fafafa;
}
dd div.admonition {
margin-left: -60px;
padding-left: 60px;
}
div.admonition p.admonition-title {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
line-height: 1;
}
div.admonition p.last {
margin-bottom: 0;
}
div.highlight {
background-color: white;
}
dt:target, .highlight {
background: #FAF3E8;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre, tt {
font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.9em;
}
img.screenshot {
}
tt.descname, tt.descclassname {
font-size: 0.95em;
}
tt.descname {
padding-right: 0.08em;
}
img.screenshot {
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils {
border: 1px solid #888;
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils td, table.docutils th {
border: 1px solid #888;
padding: 0.25em 0.7em;
}
table.field-list, table.footnote {
border: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
table.footnote {
margin: 15px 0;
width: 100%;
border: 1px solid #eee;
background: #fdfdfd;
font-size: 0.9em;
}
table.footnote + table.footnote {
margin-top: -15px;
border-top: none;
}
table.field-list th {
padding: 0 0.8em 0 0;
}
table.field-list td {
padding: 0;
}
table.footnote td.label {
width: 0px;
padding: 0.3em 0 0.3em 0.5em;
}
table.footnote td {
padding: 0.3em 0.5em;
}
dl {
margin: 0;
padding: 0;
}
dl dd {
margin-left: 30px;
}
blockquote {
margin: 0 0 0 30px;
padding: 0;
}
ul, ol {
margin: 10px 0 10px 30px;
padding: 0;
}
pre {
background: #eee;
padding: 7px 30px;
margin: 15px -30px;
line-height: 1.3em;
}
dl pre, blockquote pre, li pre {
margin-left: -60px;
padding-left: 60px;
}
dl dl pre {
margin-left: -90px;
padding-left: 90px;
}
tt {
background-color: #ecf0f3;
color: #222;
/* padding: 1px 2px; */
}
tt.xref, a tt {
background-color: #FBFBFB;
border-bottom: 1px solid white;
}
a.reference {
text-decoration: none;
border-bottom: 1px dotted #004B6B;
}
a.reference:hover {
border-bottom: 1px solid #6D4100;
}
a.footnote-reference {
text-decoration: none;
font-size: 0.7em;
vertical-align: top;
border-bottom: 1px dotted #004B6B;
}
a.footnote-reference:hover {
border-bottom: 1px solid #6D4100;
}
a:hover tt {
background: #EEE;
}
@media screen and (max-width: 870px) {
div.sphinxsidebar {
display: none;
}
div.document {
width: 100%;
}
div.documentwrapper {
margin-left: 0;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
}
div.bodywrapper {
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
}
ul {
margin-left: 0;
}
.document {
width: auto;
}
.footer {
width: auto;
}
.bodywrapper {
margin: 0;
}
.footer {
width: auto;
}
.github {
display: none;
}
}
@media screen and (max-width: 875px) {
body {
margin: 0;
padding: 20px 30px;
}
div.documentwrapper {
float: none;
background: white;
}
div.sphinxsidebar {
display: block;
float: none;
width: 102.5%;
margin: 50px -30px -20px -30px;
padding: 10px 20px;
background: #333;
color: white;
}
div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
div.sphinxsidebar h3 a {
color: white;
}
div.sphinxsidebar a {
color: #aaa;
}
div.sphinxsidebar p.logo {
display: none;
}
div.document {
width: 100%;
margin: 0;
}
div.related {
display: block;
margin: 0;
padding: 10px 0 20px 0;
}
div.related ul,
div.related ul li {
margin: 0;
padding: 0;
}
div.footer {
display: none;
}
div.bodywrapper {
margin: 0;
}
div.body {
min-height: 0;
padding: 0;
}
.rtd_doc_footer {
display: none;
}
.document {
width: auto;
}
.footer {
width: auto;
}
.footer {
width: auto;
}
.github {
display: none;
}
}
/* misc. */
.revsys-inline {
display: none!important;
}

View File

@@ -1,7 +0,0 @@
[theme]
inherit = basic
stylesheet = flasky.css
pygments_style = flask_theme_support.FlaskyStyle
[options]
touch_icon =

View File

@@ -1,22 +0,0 @@
{% extends "basic/layout.html" %}
{% block header %}
{{ super() }}
{% if pagename == 'index' %}
<div class=indexwrapper>
{% endif %}
{% endblock %}
{% block footer %}
{% if pagename == 'index' %}
</div>
{% endif %}
{% endblock %}
{# do not display relbars #}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}
{% if theme_github_fork %}
<a href="http://github.com/{{ theme_github_fork }}"><img style="position: fixed; top: 0; right: 0; border: 0;"
src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
{% endif %}
{% endblock %}
{% block sidebar1 %}{% endblock %}
{% block sidebar2 %}{% endblock %}

View File

@@ -1,287 +0,0 @@
/*
* flasky.css_t
* ~~~~~~~~~~~~
*
* Sphinx stylesheet -- flasky theme based on nature theme.
*
* :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: 'Georgia', serif;
font-size: 17px;
color: #000;
background: white;
margin: 0;
padding: 0;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 40px auto 0 auto;
width: 700px;
}
hr {
border: 1px solid #B1B4B6;
}
div.body {
background-color: #ffffff;
color: #3E4349;
padding: 0 30px 30px 30px;
}
img.floatingflask {
padding: 0 0 10px 10px;
float: right;
}
div.footer {
text-align: right;
color: #888;
padding: 10px;
font-size: 14px;
width: 650px;
margin: 0 auto 40px auto;
}
div.footer a {
color: #888;
text-decoration: underline;
}
div.related {
line-height: 32px;
color: #888;
}
div.related ul {
padding: 0 0 0 10px;
}
div.related a {
color: #444;
}
/* -- body styles ----------------------------------------------------------- */
a {
color: #004B6B;
text-decoration: underline;
}
a:hover {
color: #6D4100;
text-decoration: underline;
}
div.body {
padding-bottom: 40px; /* saved for footer */
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
margin: 30px 0px 10px 0px;
padding: 0;
}
{% if theme_index_logo %}
div.indexwrapper h1 {
text-indent: -999999px;
background: url({{ theme_index_logo }}) no-repeat center center;
height: {{ theme_index_logo_height }};
}
{% endif %}
div.body h2 { font-size: 180%; }
div.body h3 { font-size: 150%; }
div.body h4 { font-size: 130%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: white;
padding: 0 4px;
text-decoration: none;
}
a.headerlink:hover {
color: #444;
background: #eaeaea;
}
div.body p, div.body dd, div.body li {
line-height: 1.4em;
}
div.admonition {
background: #fafafa;
margin: 20px -30px;
padding: 10px 30px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
div.admonition p.admonition-title {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
line-height: 1;
}
div.admonition p.last {
margin-bottom: 0;
}
div.highlight{
background-color: white;
}
dt:target, .highlight {
background: #FAF3E8;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre, tt {
font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.85em;
}
img.screenshot {
}
tt.descname, tt.descclassname {
font-size: 0.95em;
}
tt.descname {
padding-right: 0.08em;
}
img.screenshot {
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils {
border: 1px solid #888;
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils td, table.docutils th {
border: 1px solid #888;
padding: 0.25em 0.7em;
}
table.field-list, table.footnote {
border: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
table.footnote {
margin: 15px 0;
width: 100%;
border: 1px solid #eee;
}
table.field-list th {
padding: 0 0.8em 0 0;
}
table.field-list td {
padding: 0;
}
table.footnote td {
padding: 0.5em;
}
dl {
margin: 0;
padding: 0;
}
dl dd {
margin-left: 30px;
}
pre {
padding: 0;
margin: 15px -30px;
padding: 8px;
line-height: 1.3em;
padding: 7px 30px;
background: #eee;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
}
dl pre {
margin-left: -60px;
padding-left: 60px;
}
tt {
background-color: #ecf0f3;
color: #222;
/* padding: 1px 2px; */
}
tt.xref, a tt {
background-color: #FBFBFB;
}
a:hover tt {
background: #EEE;
}

View File

@@ -1,10 +0,0 @@
[theme]
inherit = basic
stylesheet = flasky.css
nosidebar = true
pygments_style = flask_theme_support.FlaskyStyle
[options]
index_logo = ''
index_logo_height = 120px
github_fork = ''

View File

@@ -1,11 +1,11 @@
.. _api:
API
===
Developer Interface
===================
.. module:: requests
This part of the documentation covers all the interfaces of Requests. For
This part of the documentation covers all the interfaces of Requests. For
parts where Requests depends on external libraries, we document the most
important right here and provide links to the canonical documentation.
@@ -13,19 +13,11 @@ important right here and provide links to the canonical documentation.
Main Interface
--------------
All of Request's functionality can be accessed by these 7 methods.
All of Requests' functionality can be accessed by these 7 methods.
They all return an instance of the :class:`Response <Response>` object.
.. autofunction:: request
---------------------
.. autoclass:: Response
:inherited-members:
---------------------
.. autofunction:: head
.. autofunction:: get
.. autofunction:: post
@@ -33,115 +25,237 @@ They all return an instance of the :class:`Response <Response>` object.
.. autofunction:: patch
.. autofunction:: delete
Exceptions
----------
-----------------
.. autoexception:: requests.RequestException
.. autoexception:: requests.ConnectionError
.. autoexception:: requests.HTTPError
.. autoexception:: requests.TooManyRedirects
.. autoexception:: requests.ConnectTimeout
.. autoexception:: requests.ReadTimeout
.. autoexception:: requests.Timeout
.. autoexception:: requests.JSONDecodeError
.. autofunction:: session
Request Sessions
----------------
.. _sessionapi:
.. autoclass:: Session
:inherited-members:
Exceptions
~~~~~~~~~~
.. module:: requests
.. autoexception:: RequestException
.. autoexception:: ConnectionError
.. autoexception:: HTTPError
.. autoexception:: URLRequired
.. autoexception:: TooManyRedirects
.. _configurations:
Configurations
--------------
.. automodule:: requests.defaults
.. _async:
Async
-----
.. module:: requests.async
.. autofunction:: map
.. autofunction:: request
.. autofunction:: head
.. autofunction:: get
.. autofunction:: post
.. autofunction:: put
.. autofunction:: patch
.. autofunction:: delete
Utilities
---------
These functions are used internally, but may be useful outside of
Requests.
.. module:: requests.utils
Status Code Lookup
~~~~~~~~~~~~~~~~~~
.. autofunction:: requests.codes
::
>>> requests.codes['temporary_redirect']
307
>>> requests.codes.teapot
418
>>> requests.codes['\o/']
200
Cookies
~~~~~~~
.. autofunction:: dict_from_cookiejar
.. autofunction:: cookiejar_from_dict
.. autofunction:: add_dict_to_cookiejar
Encodings
~~~~~~~~~
.. autofunction:: get_encodings_from_content
.. autofunction:: get_encoding_from_headers
.. autofunction:: get_unicode_from_response
.. autofunction:: decode_gzip
Internals
---------
These items are an internal component to Requests, and should never be
seen by the end user (developer). This part of the API documentation
exists for those who are extending the functionality of Requests.
Classes
~~~~~~~
.. autoclass:: requests.Response
:inherited-members:
Lower-Level Classes
-------------------
.. autoclass:: requests.Request
:inherited-members:
.. _sessionapi:
.. autoclass:: Response
:inherited-members:
:exclude-members: is_permanent_redirect
.. autoclass:: requests.Session
Lower-Lower-Level Classes
-------------------------
.. autoclass:: requests.PreparedRequest
:inherited-members:
.. autoclass:: requests.adapters.BaseAdapter
:inherited-members:
.. autoclass:: requests.adapters.HTTPAdapter
:inherited-members:
Authentication
--------------
.. autoclass:: requests.auth.AuthBase
.. autoclass:: requests.auth.HTTPBasicAuth
.. autoclass:: requests.auth.HTTPProxyAuth
.. autoclass:: requests.auth.HTTPDigestAuth
Encodings
---------
.. autofunction:: requests.utils.get_encodings_from_content
.. autofunction:: requests.utils.get_encoding_from_headers
.. autofunction:: requests.utils.get_unicode_from_response
.. _api-cookies:
Cookies
-------
.. autofunction:: requests.utils.dict_from_cookiejar
.. autofunction:: requests.utils.add_dict_to_cookiejar
.. autofunction:: requests.cookies.cookiejar_from_dict
.. autoclass:: requests.cookies.RequestsCookieJar
:inherited-members:
.. autoclass:: requests.cookies.CookieConflictError
:inherited-members:
Status Code Lookup
------------------
.. autoclass:: requests.codes
.. automodule:: requests.status_codes
Migrating to 1.x
----------------
This section details the main differences between 0.x and 1.x and is meant
to ease the pain of upgrading.
API Changes
~~~~~~~~~~~
* ``Response.json`` is now a callable and not a property of a response.
::
import requests
r = requests.get('https://api.github.com/events')
r.json() # This *call* raises an exception if JSON decoding fails
* The ``Session`` API has changed. Sessions objects no longer take parameters.
``Session`` is also now capitalized, but it can still be
instantiated with a lowercase ``session`` for backwards compatibility.
::
s = requests.Session() # formerly, session took parameters
s.auth = auth
s.headers.update(headers)
r = s.get('https://httpbin.org/headers')
* All request hooks have been removed except 'response'.
* Authentication helpers have been broken out into separate modules. See
requests-oauthlib_ and requests-kerberos_.
.. _requests-oauthlib: https://github.com/requests/requests-oauthlib
.. _requests-kerberos: https://github.com/requests/requests-kerberos
* The parameter for streaming requests was changed from ``prefetch`` to
``stream`` and the logic was inverted. In addition, ``stream`` is now
required for raw response reading.
::
# in 0.x, passing prefetch=False would accomplish the same thing
r = requests.get('https://api.github.com/events', stream=True)
for chunk in r.iter_content(8192):
...
* The ``config`` parameter to the requests method has been removed. Some of
these options are now configured on a ``Session`` such as keep-alive and
maximum number of redirects. The verbosity option should be handled by
configuring logging.
::
import requests
import logging
# Enabling debugging at http.client level (requests->urllib3->http.client)
# you will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA.
# the only thing missing will be the response.body which is not logged.
try: # for Python 3
from http.client import HTTPConnection
except ImportError:
from httplib import HTTPConnection
HTTPConnection.debuglevel = 1
logging.basicConfig() # you need to initialize logging, otherwise you will not see anything from requests
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
requests.get('https://httpbin.org/headers')
Licensing
~~~~~~~~~
One key difference that has nothing to do with the API is a change in the
license from the ISC_ license to the `Apache 2.0`_ license. The Apache 2.0
license ensures that contributions to Requests are also covered by the Apache
2.0 license.
.. _ISC: https://opensource.org/licenses/ISC
.. _Apache 2.0: https://opensource.org/licenses/Apache-2.0
Migrating to 2.x
----------------
Compared with the 1.0 release, there were relatively few backwards
incompatible changes, but there are still a few issues to be aware of with
this major release.
For more details on the changes in this release including new APIs, links
to the relevant GitHub issues and some of the bug fixes, read Cory's blog_
on the subject.
.. _blog: https://lukasa.co.uk/2013/09/Requests_20/
API Changes
~~~~~~~~~~~
* There were a couple changes to how Requests handles exceptions.
``RequestException`` is now a subclass of ``IOError`` rather than
``RuntimeError`` as that more accurately categorizes the type of error.
In addition, an invalid URL escape sequence now raises a subclass of
``RequestException`` rather than a ``ValueError``.
::
requests.get('http://%zz/') # raises requests.exceptions.InvalidURL
Lastly, ``httplib.IncompleteRead`` exceptions caused by incorrect chunked
encoding will now raise a Requests ``ChunkedEncodingError`` instead.
* The proxy API has changed slightly. The scheme for a proxy URL is now
required.
::
proxies = {
"http": "10.10.1.10:3128", # use http://10.10.1.10:3128 instead
}
# In requests 1.x, this was legal, in requests 2.x,
# this raises requests.exceptions.MissingSchema
requests.get("http://example.org", proxies=proxies)
Behavioural Changes
~~~~~~~~~~~~~~~~~~~~~~~
* Keys in the ``headers`` dictionary are now native strings on all Python
versions, i.e. bytestrings on Python 2 and unicode on Python 3. If the
keys are not native strings (unicode on Python 2 or bytestrings on Python 3)
they will be converted to the native string type assuming UTF-8 encoding.
* Values in the ``headers`` dictionary should always be strings. This has
been the project's position since before 1.0 but a recent change
(since version 2.11.0) enforces this more strictly. It's advised to avoid
passing header values as unicode when possible.

View File

@@ -11,6 +11,9 @@ Encoded Data?
Requests automatically decompresses gzip-encoded responses, and does
its best to decode response content to unicode when possible.
When either the `brotli <https://pypi.org/project/Brotli/>`_ or `brotlicffi <https://pypi.org/project/brotlicffi/>`_
package is installed, requests also decodes Brotli-encoded responses.
You can get direct access to the raw response (and even the socket),
if needed as well.
@@ -19,14 +22,15 @@ Custom User-Agents?
-------------------
Requests allows you to easily override User-Agent strings, along with
any other HTTP Header.
any other HTTP Header. See :ref:`documentation about headers <custom-headers>`.
Why not Httplib2?
-----------------
Chris Adams gave an excellent summary on
`Hacker News <http://news.ycombinator.com/item?id=2884406>`_:
`Hacker News <https://news.ycombinator.com/item?id=2884406>`_:
httplib2 is part of why you should use requests: it's far more respectable
as a client but not as well documented and it still takes way too much code
@@ -40,8 +44,8 @@ Chris Adams gave an excellent summary on
Disclosure: I'm listed in the requests AUTHORS file but can claim credit
for, oh, about 0.0001% of the awesomeness.
1. http://code.google.com/p/httplib2/issues/detail?id=96 is a good example:
an annoying bug which affect many people, there was a fix available for
1. https://code.google.com/p/httplib2/issues/detail?id=96 is a good example:
an annoying bug that affected many people, there was a fix available for
months, which worked great when I applied it in a fork and pounded a couple
TB of data through it, but it took over a year to make it into trunk and
even longer to make it onto PyPI where any other project which required "
@@ -51,33 +55,36 @@ Chris Adams gave an excellent summary on
Python 3 Support?
-----------------
Yes! Here's a list of Python platforms that are officially
supported:
Yes! Requests supports all `officially supported versions of Python <https://devguide.python.org/versions/>`_
and recent releases of PyPy.
* cPython 2.6
* cPython 2.7
* cPython 3.1
* cPython 3.2
* PyPy-c 1.4
* PyPy-c 1.5
* PyPy-c 1.6
* PyPy-c 1.7
Keep-alive Support?
-------------------
Yep!
Proxy Support?
--------------
You bet!
SSL Verification?
Python 2 Support?
-----------------
Absolutely.
No! As of Requests 2.28.0, Requests no longer supports Python 2.7. Users who
have been unable to migrate should pin to `requests<2.28`. Full information
can be found in `psf/requests#6023 <https://github.com/psf/requests/issues/6023>`_.
It is *highly* recommended users migrate to a supported Python 3.x version now since
Python 2.7 is no longer receiving bug fixes or security updates as of January 1, 2020.
What are "hostname doesn't match" errors?
-----------------------------------------
These errors occur when :ref:`SSL certificate verification <verification>`
fails to match the certificate the server responds with to the hostname
Requests thinks it's contacting. If you're certain the server's SSL setup is
correct (for example, because you can visit the site with your browser) and
you're using Python 2.7, a possible explanation is that you need
Server-Name-Indication.
`Server-Name-Indication`_, or SNI, is an official extension to SSL where the
client tells the server what hostname it is contacting. This is important
when servers are using `Virtual Hosting`_. When such servers are hosting
more than one SSL site they need to be able to return the appropriate
certificate based on the hostname the client is connecting to.
Python 3 already includes native support for SNI in their SSL modules.
.. _`Server-Name-Indication`: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _`virtual hosting`: https://en.wikipedia.org/wiki/Virtual_hosting

View File

@@ -1,64 +1,10 @@
Modules
=======
- `requests-oauth <https://github.com/maraujop/requests-oauth>`_, adds OAuth support to Requests.
- `rauth <https://github.com/litl/rauth>`_, an alternative to requests-oauth, supports OAuth versions 1.0 and 2.0.
- `FacePy <https://github.com/jgorset/facepy>`_, a Python wrapper to the Facebook API.
- `robotframework-requests <https://github.com/bulkan/robotframework-requests>`_, a Robot Framework API wrapper.
- `fullerene <https://github.com/bitprophet/fullerene>`_, a Graphite Dashboard.
- `urbanairship-python <https://github.com/benjaminws/urbanairship-python>`_, a fork of the Urban Airship API wrapper.
- `WhitespaceBot <https://github.com/Gunio/WhitespaceBot/>`_, a project that automatically forks repos, strips trailing whitespace, and sends a pull request.
- `python-rexster <https://github.com/CulturePlex/python-rexster>`_, Rexter client that provides a simple interface for graph databases.
- `daikon <https://github.com/neogenix/daikon>`_, a CLI for ElasticSearch.
Articles & Talks
================
- `Python for the Web <http://gun.io/blog/python-for-the-web/>`_ teaches how to use Python to interact with the web, using Requests.
- `Daniel Greenfield's Review of Requests <http://pydanny.blogspot.com/2011/05/python-http-requests-for-humans.html>`_
- `My 'Python for Humans' talk <http://python-for-humans.heroku.com>`_ ( `audio <http://codeconf.s3.amazonaws.com/2011/pycodeconf/talks/PyCodeConf2011%20-%20Kenneth%20Reitz.m4a>`_ )
- `Issac Kelly's 'Consuming Web APIs' talk <http://issackelly.github.com/Consuming-Web-APIs-with-Python-Talk/slides/slides.html>`_
- `Blog post about Requests via Yum <http://arunsag.wordpress.com/2011/08/17/new-package-python-requests-http-for-humans/>`_
- `Russian blog post introducing Requests <http://habrahabr.ru/blogs/python/126262/>`_
- `French blog post introducing Requests <http://www.nicosphere.net/requests-urllib2-de-python-simplifie-2432/>`_
Integrations
============
ScraperWiki
------------
`ScraperWiki <https://scraperwiki.com/>`_ is an excellent service that allows
you to run Python, Ruby, and PHP scraper scripts on the web. Now, Requests
v0.6.1 is available to use in your scrapers!
To give it a try, simply::
import requests
Managed Packages
Articles & Talks
================
Requests is available in a number of popular package formats. Of course,
the ideal way to install Requests is via The Cheeseshop.
Ubuntu & Debian
---------------
Requests is available installed as a Debian package! Debian Etch Ubuntu, since Oneiric::
$ apt-get install python-requests
Fedora and RedHat
-----------------
You can easily install Requests v0.6.1 with yum on rpm-based systems::
$ yum install python-requests
- `Daniel Greenfeld's Review of Requests <https://pydanny.blogspot.com/2011/05/python-http-requests-for-humans.html>`_
- `Issac Kelly's 'Consuming Web APIs' talk <https://issackelly.github.io/Consuming-Web-APIs-with-Python-Talk/slides/slides.html>`_
- `Blog post about Requests via Yum <https://arunsag.wordpress.com/2011/08/17/new-package-python-requests-http-for-humans/>`_
- `Russian blog post introducing Requests <https://habr.com/post/126262/>`_
- `Sending JSON in Requests <https://www.coglib.com/~icordasc/blog/2014/11/sending-json-in-requests.html>`_

View File

@@ -0,0 +1,62 @@
.. _recommended:
Recommended Packages and Extensions
===================================
Requests has a great variety of powerful and useful third-party extensions.
This page provides an overview of some of the best of them.
Certifi CA Bundle
-----------------
`Certifi`_ is a carefully curated collection of Root Certificates for
validating the trustworthiness of SSL certificates while verifying the
identity of TLS hosts. It has been extracted from the Requests project.
.. _Certifi: https://github.com/certifi/python-certifi
CacheControl
------------
`CacheControl`_ is an extension that adds a full HTTP cache to Requests. This
makes your web requests substantially more efficient, and should be used
whenever you're making a lot of web requests.
.. _CacheControl: https://cachecontrol.readthedocs.io/en/latest/
Requests-Toolbelt
-----------------
`Requests-Toolbelt`_ is a collection of utilities that some users of Requests may desire,
but do not belong in Requests proper. This library is actively maintained
by members of the Requests core team, and reflects the functionality most
requested by users within the community.
.. _Requests-Toolbelt: https://toolbelt.readthedocs.io/en/latest/index.html
Requests-Threads
----------------
`Requests-Threads`_ is a Requests session that returns the amazing Twisted's awaitable Deferreds instead of Response objects. This allows the use of ``async``/``await`` keyword usage on Python 3, or Twisted's style of programming, if desired.
.. _Requests-Threads: https://github.com/requests/requests-threads
Requests-OAuthlib
-----------------
`requests-oauthlib`_ makes it possible to do the OAuth dance from Requests
automatically. This is useful for the large number of websites that use OAuth
to provide authentication. It also provides a lot of tweaks that handle ways
that specific OAuth providers differ from the standard specifications.
.. _requests-oauthlib: https://requests-oauthlib.readthedocs.io/en/latest/
Betamax
-------
`Betamax`_ records your HTTP interactions so the NSA does not have to.
A VCR imitation designed only for Python-Requests.
.. _betamax: https://github.com/betamaxpy/betamax

View File

@@ -0,0 +1,53 @@
Release Process and Rules
=========================
.. versionadded:: v2.6.2
Starting with the version to be released after ``v2.6.2``, the following rules
will govern and describe how the Requests core team produces a new release.
Major Releases
--------------
A major release will include breaking changes. When it is versioned, it will
be versioned as ``vX.0.0``. For example, if the previous release was
``v10.2.7`` the next version will be ``v11.0.0``.
Breaking changes are changes that break backwards compatibility with prior
versions. If the project were to change the ``text`` attribute on a
``Response`` object to a method, that would only happen in a Major release.
Major releases may also include miscellaneous bug fixes. The core developers of
Requests are committed to providing a good user experience. This means we're
also committed to preserving backwards compatibility as much as possible. Major
releases will be infrequent and will need strong justifications before they are
considered.
Minor Releases
--------------
A minor release will not include breaking changes but may include miscellaneous
bug fixes. If the previous version of Requests released was ``v10.2.7`` a minor
release would be versioned as ``v10.3.0``.
Minor releases will be backwards compatible with releases that have the same
major version number. In other words, all versions that would start with
``v10.`` should be compatible with each other.
Hotfix Releases
---------------
A hotfix release will only include bug fixes that were missed when the project
released the previous version. If the previous version of Requests released
``v10.2.7`` the hotfix release would be versioned as ``v10.2.8``.
Hotfixes will **not** include upgrades to vendored dependencies after
``v2.6.2``
Reasoning
---------
In the 2.5 and 2.6 release series, the Requests core team upgraded vendored
dependencies and caused a great deal of headaches for both users and the core
team. To reduce this pain, we're forming a concrete set of procedures so
expectations will be properly set.

View File

@@ -3,35 +3,29 @@
Support
=======
If you have a questions or issues about Requests, there are several options:
If you have questions or issues about Requests, there are several options:
Send a Tweet
------------
Stack Overflow
--------------
If your question is less than 140 characters, feel free to send a tweet to
`@kennethreitz <http://twitter.com/kennethreitz>`_.
If your question does not contain sensitive (possibly proprietary)
information or can be properly anonymized, please ask a question on
`Stack Overflow <https://stackoverflow.com/questions/tagged/python-requests>`_
and use the tag ``python-requests``.
File an Issue
-------------
If you notice some unexpected behavior in Requests, or want to see support
If you notice some unexpected behaviour in Requests, or want to see support
for a new feature,
`file an issue on GitHub <https://github.com/kennethreitz/requests/issues>`_.
`file an issue on GitHub <https://github.com/psf/requests/issues>`_.
E-mail
------
Send a Tweet
------------
I'm more than happy to answer any personal or in-depth questions about
Requests. Feel free to email
`requests@kennethreitz.com <mailto:requests@kennethreitz.com>`_.
IRC
---
The official Freenode channel for Requests is
`#python-requests <irc://irc.freenode.net/python-requests>`_
I'm also available as **kennethreitz** on Freenode.
If your question is less than 280 characters, feel free to send a tweet to
`@nateprewitt <https://twitter.com/nateprewitt>`_,
`@sethmlarson <https://twitter.com/sethmlarson>`_, or
`@sigmavirus24 <https://twitter.com/sigmavirus24>`_.

View File

@@ -1,30 +1,18 @@
.. _updates:
Updates
=======
Community Updates
=================
If you'd like to stay up to date on the community and development of Requests,
there are several options:
GitHub
------
The best way to track the development of Requests is through
`the GitHub repo <https://github.com/kennethreitz/requests>`_.
Twitter
-------
I often tweet about new features and releases of Requests.
Follow `@kennethreitz <https://twitter.com/kennethreitz>`_ for updates.
Mailing List
------------
There's a low-volume mailing list for Requests. To subscribe to the
mailing list, send an email to
`requests@librelist.org <mailto:requests@librelist.org>`_.
`the GitHub repo <https://github.com/psf/requests>`_.
.. include:: ../../HISTORY.md

View File

@@ -0,0 +1,5 @@
Vulnerability Disclosure
========================
The latest vulnerability disclosure information can be found on GitHub in our
`Security Policy <https://github.com/psf/requests/blob/main/.github/SECURITY.md>`_.

View File

@@ -1,9 +1,10 @@
# -*- coding: utf-8 -*-
#
# Requests documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 13 23:54:25 2011.
# sphinx-quickstart on Fri Feb 19 00:05:47 2016.
#
# This file is execfile()d with the current directory set to its containing dir.
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
@@ -11,148 +12,188 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
import requests
from requests import __version__
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# Insert Requests' path into the system.
sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("_themes"))
import requests
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc']
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]
# The suffix of source filenames.
source_suffix = '.rst'
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
root_doc = "index"
# General information about the project.
project = u'Requests'
copyright = u'2012. A <a href="http://kennethreitz.com/pages/open-projects.html">Kenneth Reitz</a> Project'
project = u"Requests"
copyright = u"Kenneth Reitz and contributors"
author = u"Kenneth Reitz"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = __version__
version = requests.__version__
# The full version, including alpha/beta/rc tags.
release = version
release = requests.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ["_build"]
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
add_function_parentheses = False
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'flask_theme_support.FlaskyStyle'
pygments_style = "flask_theme_support.FlaskyStyle"
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Options for HTML output ---------------------------------------------------
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = "alabaster"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
html_theme_options = {
"show_powered_by": False,
"github_user": "psf",
"github_repo": "requests",
"github_banner": True,
"show_related": False,
"note_bg": "#FFF59C",
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
# html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
html_use_smartypants = False
# Custom sidebar templates, maps document names to template names.
# Custom sidebar templates, maps document names to template names.
html_sidebars = {
'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],
'**': ['sidebarlogo.html', 'localtoc.html', 'relations.html',
'sourcelink.html', 'searchbox.html']
"index": ["sidebar.html", "sourcelink.html", "searchbox.html"],
"**": [
"sidebar.html",
"localtoc.html",
"relations.html",
"sourcelink.html",
"searchbox.html",
],
}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
@@ -161,84 +202,184 @@ html_show_sourcelink = False
html_show_sphinx = False
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Requestsdoc'
htmlhelp_basename = "Requestsdoc"
# -- Options for LaTeX output ---------------------------------------------
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Latex figure (float) alignment
#'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'Requests.tex', u'Requests Documentation',
u'Kenneth Reitz', 'manual'),
(root_doc, "Requests.tex", u"Requests Documentation", u"Kenneth Reitz", "manual")
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'requests', u'Requests Documentation',
[u'Kenneth Reitz'], 1)
]
man_pages = [(root_doc, "requests", u"Requests Documentation", [author], 1)]
# If true, show URL addresses after external links.
#man_show_urls = False
# man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Requests', u'Requests Documentation', u'Kenneth Reitz',
'Requests', 'One line description of project.', 'Miscellaneous'),
(
root_doc,
"Requests",
u"Requests Documentation",
author,
"Requests",
"One line description of project.",
"Miscellaneous",
)
]
# Documents to append as an appendix to all manuals.
texinfo_appendices = []
# texinfo_appendices = []
sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'kr'
# If false, no module index is generated.
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False
# -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
# The basename for the epub file. It defaults to the project name.
# epub_basename = project
# The HTML theme for the epub output. Since the default themes are not
# optimized for small screen space, using the same theme for HTML and epub
# output is usually not wise. This defaults to 'epub', a theme designed to save
# visual space.
# epub_theme = 'epub'
# The language of the text. It defaults to the language option
# or 'en' if the language is not set.
# epub_language = ''
# The scheme of the identifier. Typical schemes are ISBN or URL.
# epub_scheme = ''
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
# epub_identifier = ''
# A unique identification for the text.
# epub_uid = ''
# A tuple containing the cover image and cover page html template filenames.
# epub_cover = ()
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
# epub_guide = ()
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
# epub_pre_files = []
# HTML files that should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
# epub_post_files = []
# A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"]
# The depth of the table of contents in toc.ncx.
# epub_tocdepth = 3
# Allow duplicate toc entries.
# epub_tocdup = True
# Choose between 'default' and 'includehidden'.
# epub_tocscope = 'default'
# Fix unsupported image types using the Pillow.
# epub_fix_images = False
# Scale large images.
# epub_max_image_width = 0
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# epub_show_urls = 'inline'
# If false, no index is generated.
# epub_use_index = True
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"urllib3": ("https://urllib3.readthedocs.io/en/latest", None),
}

View File

@@ -1,5 +1,4 @@
Authors
=======
.. include:: ../../AUTHORS.rst

165
docs/dev/contributing.rst Normal file
View File

@@ -0,0 +1,165 @@
.. _contributing:
Contributor's Guide
===================
If you're reading this, you're probably interested in contributing to Requests.
Thank you very much! Open source projects live-and-die based on the support
they receive from others, and the fact that you're even considering
contributing to the Requests project is *very* generous of you.
This document lays out guidelines and advice for contributing to this project.
If you're thinking of contributing, please start by reading this document and
getting a feel for how contributing to this project works. If you have any
questions, feel free to reach out to either `Nate Prewitt`_, `Ian Cordasco`_,
or `Seth Michael Larson`_, the primary maintainers.
.. _Ian Cordasco: https://www.coglib.com/~icordasc/
.. _Nate Prewitt: https://www.nateprewitt.com/
.. _Seth Michael Larson: https://sethmlarson.dev/
The guide is split into sections based on the type of contribution you're
thinking of making, with a section that covers general guidelines for all
contributors.
Code of Conduct
---------------
The Python community is made up of members from around the globe with a diverse
set of skills, personalities, and experiences. It is through these differences
that our community experiences great successes and continued growth. When you're
working with members of the community, follow the
`Python Software Foundation Code of Conduct`_ to help steer your interactions
and keep Python a positive, successful, and growing community.
.. _Python Software Foundation Code of Conduct: https://policies.python.org/python.org/code-of-conduct/
.. _early-feedback:
Get Early Feedback
------------------
If you are contributing, do not feel the need to sit on your contribution until
it is perfectly polished and complete. It helps everyone involved for you to
seek feedback as early as you possibly can. Submitting an early, unfinished
version of your contribution for feedback in no way prejudices your chances of
getting that contribution accepted, and can save you from putting a lot of work
into a contribution that is not suitable for the project.
Contribution Suitability
------------------------
Our project maintainers have the last word on whether or not a contribution is
suitable for Requests. All contributions will be considered carefully, but from
time to time, contributions will be rejected because they do not suit the
current goals or needs of the project.
If your contribution is rejected, don't despair! As long as you followed these
guidelines, you will have a much better chance of getting your next
contribution accepted.
Code Contributions
------------------
Steps for Submitting Code
~~~~~~~~~~~~~~~~~~~~~~~~~
When contributing code, you'll want to follow this checklist:
1. Fork the repository on GitHub.
2. Run the tests to confirm they all pass on your system. If they don't, you'll
need to investigate why they fail. If you're unable to diagnose this
yourself, raise it as a bug report by following the guidelines in this
document: :ref:`bug-reports`.
3. Write tests that demonstrate your bug or feature. Ensure that they fail.
4. Make your change.
5. Run the entire test suite again, confirming that all tests pass *including
the ones you just added*.
6. Send a GitHub Pull Request to the main repository's ``main`` branch.
GitHub Pull Requests are the expected method of code collaboration on this
project.
The following sub-sections go into more detail on some of the points above.
Code Review
~~~~~~~~~~~
Contributions will not be merged until they've been code reviewed. You should
implement any code review feedback unless you strongly object to it. In the
event that you object to the code review feedback, you should make your case
clearly and calmly. If, after doing so, the feedback is judged to still apply,
you must either apply the feedback or withdraw your contribution.
Code Style
~~~~~~~~~~
Requests uses a collection of tools to ensure the code base has a consistent
style as it grows. We have these orchestrated using a tool called
`pre-commit`_. This can be installed locally and run over your changes prior
to opening a PR, and will also be run as part of the CI approval process
before a change is merged.
You can find the full list of formatting requirements specified in the
`.pre-commit-config.yaml`_ at the top level directory of Requests.
.. _pre-commit: https://pre-commit.com/
.. _.pre-commit-config.yaml: https://github.com/psf/requests/blob/main/.pre-commit-config.yaml
New Contributors
~~~~~~~~~~~~~~~~
If you are new or relatively new to Open Source, welcome! Requests aims to
be a gentle introduction to the world of Open Source. If you're concerned about
how best to contribute, please consider mailing a maintainer (listed above) and
asking for help.
Please also check the :ref:`early-feedback` section.
Documentation Contributions
---------------------------
Documentation improvements are always welcome! The documentation files live in
the ``docs/`` directory of the codebase. They're written in
`reStructuredText`_, and use `Sphinx`_ to generate the full suite of
documentation.
When contributing documentation, please do your best to follow the style of the
documentation files. This means a soft-limit of 79 characters wide in your text
files and a semi-formal, yet friendly and approachable, prose style.
When presenting Python code, use single-quoted strings (``'hello'`` instead of
``"hello"``).
.. _reStructuredText: https://docutils.sourceforge.net/rst.html
.. _Sphinx: https://www.sphinx-doc.org/en/master/
.. _bug-reports:
Bug Reports
-----------
Bug reports are hugely important! Before you raise one, though, please check
through the `GitHub issues`_, **both open and closed**, to confirm that the bug
hasn't been reported before. Duplicate bug reports are a huge drain on the time
of other contributors, and should be avoided as much as possible.
.. _GitHub issues: https://github.com/psf/requests/issues
Feature Requests
----------------
Requests is in a perpetual feature freeze, only the BDFL can add or approve of
new features. The maintainers believe that Requests is a feature-complete
piece of software at this time.
One of the most important skills to have while maintaining a largely-used
open source project is learning the ability to say "no" to suggested changes,
while keeping an open ear and mind.
If you believe there is a feature missing, feel free to raise a feature
request, but please do be aware that the overwhelming likelihood is that your
feature request will not be accepted.

View File

@@ -1,43 +0,0 @@
How to Help
===========
Requests is under active development, and contributions are more than welcome!
#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
There is a Contributor Friendly tag for issues that should be ideal for people who are not very
familiar with the codebase yet.
#. Fork `the repository <https://github.com/kennethreitz/requests>`_ on Github to start making your
changes to the **develop** branch (or branch off of it).
#. Write a test which shows that the bug was fixed or that the feature works as expected.
#. Send a pull request and bug the maintainer until it gets merged and published. :)
Make sure to add yourself to `AUTHORS <https://github.com/kennethreitz/requests/blob/develop/AUTHORS.rst>`_.
Development dependencies
------------------------
You'll need to install ``gunicorn`` and ``httpbin`` and various other dependencies in
order to run requests' test suite::
$ virtualenv env
$ . env/bin/activate
$ make
$ make test
The ``Makefile`` has various useful targets for testing. For example, if you
want to see how your pull request will behave with Travis-CI you would run
``make travis``.
Versions of Python to Test On
-----------------------------
Officially (as of 26-Nov-2012), requests supports python 2.6-3.3. In the
future, support for 3.1 and 3.2 may be dropped. In general you will need to
test on at least one python 2 and one python 3 version. You can also set up
Travis CI for your own fork before you submit a pull request so that you are
assured your fork works. To use Travis CI for your fork and other projects see
their `documentation <http://about.travis-ci.org/docs/user/getting-started/>`_.
What Needs to be Done
---------------------
- Documentation needs a roadmap.

View File

@@ -3,20 +3,37 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Requests: HTTP for Humans
=========================
Requests: HTTP for Humans
==========================
Release v\ |version|. (:ref:`Installation <install>`)
Requests is an :ref:`Apache2 Licensed <apache2>` HTTP library, written in Python, for human beings.
Python's standard **urllib2** module provides most of
the HTTP capabilities you need, but the API is thoroughly **broken**.
It was built for a different time — and a different web. It requires an *enormous* amount of work (even method overrides) to perform the simplest of tasks.
.. image:: https://img.shields.io/pypi/v/requests.svg?maxAge=86400
:target: https://pypi.org/project/requests/
:alt: PyPI Version Badge
Things shouldnt be this way. Not in Python.
.. image:: https://img.shields.io/pypi/pyversions/requests.svg
:target: https://pypi.org/project/requests/
:alt: Supported Versions Badge
::
.. image:: https://static.pepy.tech/badge/requests/month
:target: https://pepy.tech/project/requests
:alt: Downloads Per Month Badge
.. image:: https://img.shields.io/github/contributors/psf/requests.svg
:target: https://github.com/psf/requests/graphs/contributors
:alt: Contributors Badge
.. image:: https://readthedocs.org/projects/requests/badge/?version=latest
:target: https://requests.readthedocs.io
:alt: Documentation Badge
**Requests** is an elegant and simple HTTP library for Python, built for human beings.
-------------------
**Behold, the power of Requests**::
>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
>>> r.status_code
@@ -26,58 +43,44 @@ Things shouldnt be this way. Not in Python.
>>> r.encoding
'utf-8'
>>> r.text
u'{"type":"User"...'
'{"type":"User"...'
>>> r.json()
{u'private_gists': 419, u'total_private_repos': 77, ...}
{'private_gists': 419, 'total_private_repos': 77, ...}
See `similar code, without Requests <https://gist.github.com/973705>`_.
Requests takes all of the work out of Python HTTP/1.1 — making your integration with web services seamless. There's no need to manually add query strings to your URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_, which is embedded within Requests.
See `similar code, sans Requests <https://gist.github.com/973705>`_.
Testimonials
------------
**Requests** allows you to send HTTP/1.1 requests extremely easily.
There's no need to manually add query strings to your
URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling
are 100% automatic, thanks to `urllib3 <https://github.com/urllib3/urllib3>`_.
Amazon, Google, Twilio, Mozilla, Heroku, PayPal, NPR, Obama for America, Transifex, Native Instruments, The Washington Post, Twitter, SoundCloud, Kippt, Readability, and Federal US Institutions use Requests internally. It has been downloaded over 1,000,000 times from PyPI.
**Armin Ronacher**
Requests is the perfect example how beautiful an API can be with the
right level of abstraction.
**Matt DeBoard**
I'm going to get @kennethreitz's Python requests module tattooed
on my body, somehow. The whole thing.
**Daniel Greenfeld**
Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to
@kennethreitz's request library. Today has been AWESOME.
**Kenny Meyers**
Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful,
simple, Pythonic.
Feature Support
---------------
Beloved Features
----------------
Requests is ready for today's web.
- International Domains and URLs
- Keep-Alive & Connection Pooling
- International Domains and URLs
- Sessions with Cookie Persistence
- Browser-style SSL Verification
- Automatic Content Decoding
- Basic/Digest Authentication
- Elegant Key/Value Cookies
- Automatic Decompression
- Unicode Response Bodies
- HTTP(S) Proxy Support
- Multipart File Uploads
- Streaming Downloads
- Connection Timeouts
- ``.netrc`` support
- Thread-safe.
- Chunked Requests
- ``.netrc`` Support
Requests officially supports Python 3.10+, and runs great on PyPy.
User Guide
----------
The User Guide
--------------
This part of the documentation, which is mostly prose, begins with some
background information about Requests, then focuses on step-by-step
@@ -86,31 +89,37 @@ instructions for getting the most out of Requests.
.. toctree::
:maxdepth: 2
user/intro
user/install
user/quickstart
user/advanced
user/authentication
Community Guide
-----------------
The Community Guide
-------------------
This part of the documentation, which is mostly prose, details the
Requests ecosystem and community.
.. toctree::
:maxdepth: 2
community/recommended
community/faq
community/out-there
community/support
community/vulnerabilities
community/release-process
.. toctree::
:maxdepth: 1
community/faq
community/out-there.rst
community/support
community/updates
API Documentation
-----------------
The API Documentation / Guide
-----------------------------
If you are looking for information on a specific function, class or method,
If you are looking for information on a specific function, class, or method,
this part of the documentation is for you.
.. toctree::
@@ -119,15 +128,17 @@ this part of the documentation is for you.
api
Developer Guide
---------------
The Contributor Guide
---------------------
If you want to contribute to the project, this part of the documentation is for
you.
.. toctree::
:maxdepth: 1
:maxdepth: 3
dev/internals
dev/todo
dev/contributing
dev/authors
There are no more guides. You are now guideless.
Good luck.

View File

@@ -1,190 +1,263 @@
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Requests.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Requests.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
:end
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 1>NUL 2>NUL
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Requests.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Requests.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end

3
docs/requirements.txt Normal file
View File

@@ -0,0 +1,3 @@
# Pinning to avoid unexpected breakages.
# Used by RTD to generate docs.
Sphinx==7.2.6

File diff suppressed because it is too large Load Diff

View File

@@ -19,19 +19,42 @@ the simplest kind, and Requests supports it straight out of the box.
Making requests with HTTP Basic Auth is very simple::
>>> from requests.auth import HTTPBasicAuth
>>> requests.get('https://api.github.com/user', auth=HTTPBasicAuth('user', 'pass'))
>>> basic = HTTPBasicAuth('user', 'pass')
>>> requests.get('https://httpbin.org/basic-auth/user/pass', auth=basic)
<Response [200]>
In fact, HTTP Basic Auth is so common that Requests provides a handy shorthand
for using it::
>>> requests.get('https://api.github.com/user', auth=('user', 'pass'))
>>> requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))
<Response [200]>
Providing the credentials in a tuple like this is exactly the same as the
``HTTPBasicAuth`` example above.
netrc Authentication
~~~~~~~~~~~~~~~~~~~~
If no authentication method is given with the ``auth`` argument, Requests will
attempt to get the authentication credentials for the URL's hostname from the
user's netrc file. The netrc file overrides raw HTTP authentication headers
set with `headers=`.
If credentials for the hostname are found, the request is sent with HTTP Basic
Auth.
Requests will search for the netrc file at `~/.netrc`, `~/_netrc`, or at the path
specified by the `NETRC` environment variable. `~` denotes the user's home
directory, which is `$HOME` on Unix based systems and `%USERPROFILE%` on Windows.
Usage of netrc file can be disabled by setting `trust_env` to `False` in the
Requests session::
>>> s = requests.Session()
>>> s.trust_env = False
>>> s.get('https://httpbin.org/basic-auth/user/pass')
Digest Authentication
---------------------
@@ -39,11 +62,43 @@ Another very popular form of HTTP Authentication is Digest Authentication,
and Requests supports this out of the box as well::
>>> from requests.auth import HTTPDigestAuth
>>> url = 'http://httpbin.org/digest-auth/auth/user/pass'
>>> url = 'https://httpbin.org/digest-auth/auth/user/pass'
>>> requests.get(url, auth=HTTPDigestAuth('user', 'pass'))
<Response [200]>
OAuth 1 Authentication
----------------------
A common form of authentication for several web APIs is OAuth. The ``requests-oauthlib``
library allows Requests users to easily make OAuth 1 authenticated requests::
>>> import requests
>>> from requests_oauthlib import OAuth1
>>> url = 'https://api.twitter.com/1.1/account/verify_credentials.json'
>>> auth = OAuth1('YOUR_APP_KEY', 'YOUR_APP_SECRET',
... 'USER_OAUTH_TOKEN', 'USER_OAUTH_TOKEN_SECRET')
>>> requests.get(url, auth=auth)
<Response [200]>
For more information on how to OAuth flow works, please see the official `OAuth`_ website.
For examples and documentation on requests-oauthlib, please see the `requests_oauthlib`_
repository on GitHub
OAuth 2 and OpenID Connect Authentication
-----------------------------------------
The ``requests-oauthlib`` library also handles OAuth 2, the authentication mechanism
underpinning OpenID Connect. See the `requests-oauthlib OAuth2 documentation`_ for
details of the various OAuth 2 credential management flows:
* `Web Application Flow`_
* `Mobile Application Flow`_
* `Legacy Application Flow`_
* `Backend Application Flow`_
Other Authentication
--------------------
@@ -53,12 +108,11 @@ authentication handlers for more complicated or less commonly-used forms of
authentication. Some of the best have been brought together under the
`Requests organization`_, including:
- OAuth_
- Kerberos_
- NTLM_
If you want to use any of these forms of authentication, go straight to their
Github page and follow the instructions.
GitHub page and follow the instructions.
New Forms of Authentication
@@ -68,17 +122,34 @@ If you can't find a good implementation of the form of authentication you
want, you can implement it yourself. Requests makes it easy to add your own
forms of authentication.
To do so, subclass :class:`requests.auth.AuthBase` and implement the
``__call__()`` method. When an authentication handler is attached to a request,
To do so, subclass :class:`AuthBase <requests.auth.AuthBase>` and implement the
``__call__()`` method::
>>> import requests
>>> class MyAuth(requests.auth.AuthBase):
... def __call__(self, r):
... # Implement my authentication
... return r
...
>>> url = 'https://httpbin.org/get'
>>> requests.get(url, auth=MyAuth())
<Response [200]>
When an authentication handler is attached to a request,
it is called during request setup. The ``__call__`` method must therefore do
whatever is required to make the authentication work. Some forms of
authentication will additionally add hooks to provide further functionality.
Examples can be found under the `Requests organization`_ and in the
Further examples can be found under the `Requests organization`_ and in the
``auth.py`` file.
.. _OAuth: https://github.com/requests/requests-oauthlib
.. _OAuth: https://oauth.net/
.. _requests_oauthlib: https://github.com/requests/requests-oauthlib
.. _requests-oauthlib OAuth2 documentation: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html
.. _Web Application Flow: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html#web-application-flow
.. _Mobile Application Flow: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html#mobile-application-flow
.. _Legacy Application Flow: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html#legacy-application-flow
.. _Backend Application Flow: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html#backend-application-flow
.. _Kerberos: https://github.com/requests/requests-kerberos
.. _NTLM: https://github.com/requests/requests-ntlm
.. _Requests organization: https://github.com/requests

View File

@@ -1,56 +1,36 @@
.. _install:
Installation
============
Installation of Requests
========================
This part of the documentation covers the installation of Requests.
The first step to using any software package is getting it properly installed.
Distribute & Pip
----------------
$ python -m pip install requests
--------------------------------
Installing requests is simple with `pip <http://www.pip-installer.org/>`_::
To install Requests, simply run this simple command in your terminal of choice::
$ pip install requests
$ python -m pip install requests
or, with `easy_install <http://pypi.python.org/pypi/setuptools>`_::
$ easy_install requests
But, you really `shouldn't do that <http://www.pip-installer.org/en/latest/other-tools.html#pip-compared-to-easy-install>`_.
Cheeseshop Mirror
-----------------
If the Cheeseshop is down, you can also install Requests from one of the
mirrors. `Crate.io <http://crate.io>`_ is one of them::
$ pip install -i http://simple.crate.io/ requests
Get the Code
------------
Get the Source Code
-------------------
Requests is actively developed on GitHub, where the code is
`always available <https://github.com/kennethreitz/requests>`_.
`always available <https://github.com/psf/requests>`_.
You can either clone the public repository::
git clone git://github.com/kennethreitz/requests.git
$ git clone https://github.com/psf/requests.git
Download the `tarball <https://github.com/kennethreitz/requests/tarball/master>`_::
Or, download the `tarball <https://github.com/psf/requests/tarball/main>`_::
$ curl -OL https://github.com/kennethreitz/requests/tarball/master
$ curl -OL https://github.com/psf/requests/tarball/main
# optionally, zipball is also available (for Windows users).
Or, download the `zipball <https://github.com/kennethreitz/requests/zipball/master>`_::
Once you have a copy of the source, you can embed it in your own Python
package, or install it into your site-packages easily::
$ curl -OL https://github.com/kennethreitz/requests/zipball/master
Once you have a copy of the source, you can embed it in your Python package,
or install it into your site-packages easily::
$ python setup.py install
$ cd requests
$ python -m pip install .

View File

@@ -1,45 +0,0 @@
.. _introduction:
Introduction
============
Philosophy
----------
Requests was developed with a few :pep:`20` idioms in mind.
#. Beautiful is better than ugly.
#. Explicit is better than implicit.
#. Simple is better than complex.
#. Complex is better than complicated.
#. Readability counts.
All contributions to Requests should keep these important rules in mind.
.. _`apache2`:
Apache2 License
-----------
A large number of open source projects you find today are `GPL Licensed`_.
While the GPL has its time and place, it should most certainly not be your
go-to license for your next open source project.
A project that is released as GPL cannot be used in any commercial product
without the product itself also being offered as open source.
The MIT, BSD, ISC, and Apache2 licenses are great alternatives to the GPL
that allow your open-source software to be used freely in proprietary,
closed-source software.
Requests is released under terms of `Apache2 License`_.
.. _`GPL Licensed`: http://www.opensource.org/licenses/gpl-license.php
.. _`Apache2 License`: http://opensource.org/licenses/Apache-2.0
Requests License
----------------
.. include:: ../../LICENSE

View File

@@ -6,8 +6,7 @@ Quickstart
.. module:: requests.models
Eager to get started? This page gives a good introduction in how to get started
with Requests. This assumes you already have Requests installed. If you do not,
head over to the :ref:`Installation <install>` section.
with Requests.
First, make sure that:
@@ -19,7 +18,7 @@ Let's get started with some simple examples.
Make a Request
------------------
--------------
Making a request with Requests is very simple.
@@ -28,25 +27,25 @@ Begin by importing the Requests module::
>>> import requests
Now, let's try to get a webpage. For this example, let's get GitHub's public
timeline ::
timeline::
>>> r = requests.get('https://github.com/timeline.json')
>>> r = requests.get('https://api.github.com/events')
Now, we have a :class:`Response` object called ``r``. We can get all the
information we need from this object.
Now, we have a :class:`Response <requests.Response>` object called ``r``. We can
get all the information we need from this object.
Requests' simple API means that all forms of HTTP request are as obvious. For
example, this is how you make an HTTP POST request::
>>> r = requests.post("http://httpbin.org/post")
>>> r = requests.post('https://httpbin.org/post', data={'key': 'value'})
Nice, right? What about the other HTTP request types: PUT, DELETE, HEAD and
OPTIONS? These are all just as simple::
>>> r = requests.put("http://httpbin.org/put")
>>> r = requests.delete("http://httpbin.org/delete")
>>> r = requests.head("http://httpbin.org/get")
>>> r = requests.options("http://httpbin.org/get")
>>> r = requests.put('https://httpbin.org/put', data={'key': 'value'})
>>> r = requests.delete('https://httpbin.org/delete')
>>> r = requests.head('https://httpbin.org/get')
>>> r = requests.options('https://httpbin.org/get')
That's all well and good, but it's also only the start of what Requests can
do.
@@ -58,19 +57,29 @@ Passing Parameters In URLs
You often want to send some sort of data in the URL's query string. If
you were constructing the URL by hand, this data would be given as key/value
pairs in the URL after a question mark, e.g. ``httpbin.org/get?key=val``.
Requests allows you to provide these arguments as a dictionary, using the
``params`` keyword argument. As an example, if you wanted to pass
Requests allows you to provide these arguments as a dictionary of strings,
using the ``params`` keyword argument. As an example, if you wanted to pass
``key1=value1`` and ``key2=value2`` to ``httpbin.org/get``, you would use the
following code::
>>> payload = {'key1': 'value1', 'key2': 'value2'}
>>> r = requests.get("http://httpbin.org/get", params=payload)
>>> r = requests.get('https://httpbin.org/get', params=payload)
You can see that the URL has been correctly encoded by printing the URL::
>>> print r.url
u'http://httpbin.org/get?key2=value2&key1=value1'
>>> print(r.url)
https://httpbin.org/get?key2=value2&key1=value1
Note that any dictionary key whose value is ``None`` will not be added to the
URL's query string.
You can also pass a list of items as a value::
>>> payload = {'key1': 'value1', 'key2': ['value2', 'value3']}
>>> r = requests.get('https://httpbin.org/get', params=payload)
>>> print(r.url)
https://httpbin.org/get?key1=value1&key2=value2&key2=value3
Response Content
----------------
@@ -79,7 +88,8 @@ We can read the content of the server's response. Consider the GitHub timeline
again::
>>> import requests
>>> r = requests.get('https://github.com/timeline.json')
>>> r = requests.get('https://api.github.com/events')
>>> r.text
'[{"repository":{"open_issues":0,"url":"https://github.com/...
@@ -96,7 +106,12 @@ using, and change it, using the ``r.encoding`` property::
>>> r.encoding = 'ISO-8859-1'
If you change the encoding, Requests will use the new value of ``r.encoding``
whenever you call ``r.text``.
whenever you call ``r.text``. You might want to do this in any situation where
you can apply special logic to work out what the encoding of the content will
be. For example, HTML and XML have the ability to specify their encoding in
their body. In situations like this, you should use ``r.content`` to find the
encoding, and then set ``r.encoding``. This will let you use ``r.text`` with
the correct encoding.
Requests will also use custom encodings in the event that you need them. If
you have created your own encoding and registered it with the ``codecs``
@@ -113,12 +128,16 @@ You can also access the response body as bytes, for non-text requests::
The ``gzip`` and ``deflate`` transfer-encodings are automatically decoded for you.
The ``br`` transfer-encoding is automatically decoded for you if a Brotli library
like `brotli <https://pypi.org/project/brotli>`_ or `brotlicffi <https://pypi.org/project/brotlicffi>`_ is installed.
For example, to create an image from binary data returned by a request, you can
use the following code:
use the following code::
>>> from PIL import Image
>>> from StringIO import StringIO
>>> i = Image.open(StringIO(r.content))
>>> from io import BytesIO
>>> i = Image.open(BytesIO(r.content))
JSON Response Content
@@ -127,11 +146,22 @@ JSON Response Content
There's also a builtin JSON decoder, in case you're dealing with JSON data::
>>> import requests
>>> r = requests.get('https://github.com/timeline.json')
>>> r.json()
[{u'repository': {u'open_issues': 0, u'url': 'https://github.com/...
In case the JSON decoding fails, ``r.json`` raises an exception.
>>> r = requests.get('https://api.github.com/events')
>>> r.json()
[{'repository': {'open_issues': 0, 'url': 'https://github.com/...
In case the JSON decoding fails, ``r.json()`` raises an exception. For example, if
the response gets a 204 (No Content), or if the response contains invalid JSON,
attempting ``r.json()`` raises ``requests.exceptions.JSONDecodeError``. This wrapper exception
provides interoperability for multiple exceptions that may be thrown by different
python versions and json serialization libraries.
It should be noted that the success of the call to ``r.json()`` does **not**
indicate the success of the response. Some servers may return a JSON object in a
failed response (e.g. error details with HTTP 500). Such JSON will be decoded
and returned. To check that a request is successful, use
``r.raise_for_status()`` or check ``r.status_code`` is what you expect.
Raw Response Content
@@ -141,12 +171,37 @@ In the rare case that you'd like to get the raw socket response from the
server, you can access ``r.raw``. If you want to do this, make sure you set
``stream=True`` in your initial request. Once you do, you can do this::
>>> r = requests.get('https:/github.com/timeline.json', stream=True)
>>> r.raw
<requests.packages.urllib3.response.HTTPResponse object at 0x101194810>
>>> r.raw.read(10)
'\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03'
>>> r = requests.get('https://api.github.com/events', stream=True)
>>> r.raw
<urllib3.response.HTTPResponse object at 0x101194810>
>>> r.raw.read(10)
b'\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03'
In general, however, you should use a pattern like this to save what is being
streamed to a file::
with open(filename, 'wb') as fd:
for chunk in r.iter_content(chunk_size=128):
fd.write(chunk)
Using ``Response.iter_content`` will handle a lot of what you would otherwise
have to handle when using ``Response.raw`` directly. When streaming a
download, the above is the preferred and recommended way to retrieve the
content. Note that ``chunk_size`` can be freely adjusted to a number that
may better fit your use cases.
.. note::
An important note about using ``Response.iter_content`` versus ``Response.raw``.
``Response.iter_content`` will automatically decode the ``gzip`` and ``deflate``
transfer-encodings. ``Response.raw`` is a raw stream of bytes -- it does not
transform the response content. If you really need access to the bytes as they
were returned, use ``Response.raw``.
.. _custom-headers:
Custom Headers
--------------
@@ -154,101 +209,169 @@ Custom Headers
If you'd like to add HTTP headers to a request, simply pass in a ``dict`` to the
``headers`` parameter.
For example, we didn't specify our content-type in the previous example::
For example, we didn't specify our user-agent in the previous example::
>>> import json
>>> url = 'https://api.github.com/some/endpoint'
>>> payload = {'some': 'data'}
>>> headers = {'content-type': 'application/json'}
>>> headers = {'user-agent': 'my-app/0.0.1'}
>>> r = requests.post(url, data=json.dumps(payload), headers=headers)
>>> r = requests.get(url, headers=headers)
Note: Custom headers are given less precedence than more specific sources of information. For instance:
* Authorization headers set with `headers=` will be overridden if credentials
are specified in ``.netrc``, which in turn will be overridden by the ``auth=``
parameter. Requests will search for the netrc file at `~/.netrc`, `~/_netrc`,
or at the path specified by the `NETRC` environment variable.
Check details in :ref:`netrc authentication <authentication>`.
* Authorization headers will be removed if you get redirected off-host.
* Proxy-Authorization headers will be overridden by proxy credentials provided in the URL.
* Content-Length headers will be overridden when we can determine the length of the content.
Furthermore, Requests does not change its behavior at all based on which custom headers are specified. The headers are simply passed on into the final request.
Note: All header values must be a ``string``, bytestring, or unicode. While permitted, it's advised to avoid passing unicode header values.
More complicated POST requests
------------------------------
Typically, you want to send some form-encoded data — much like an HTML form.
To do this, simply pass a dictionary to the `data` argument. Your
To do this, simply pass a dictionary to the ``data`` argument. Your
dictionary of data will automatically be form-encoded when the request is made::
>>> payload = {'key1': 'value1', 'key2': 'value2'}
>>> r = requests.post("http://httpbin.org/post", data=payload)
>>> print r.text
>>> r = requests.post('https://httpbin.org/post', data=payload)
>>> print(r.text)
{
// ...snip... //
...
"form": {
"key2": "value2",
"key1": "value1"
},
// ...snip... //
...
}
There are many times that you want to send data that is not form-encoded. If you pass in a ``string`` instead of a ``dict``, that data will be posted directly.
The ``data`` argument can also have multiple values for each key. This can be
done by making ``data`` either a list of tuples or a dictionary with lists
as values. This is particularly useful when the form has multiple elements that
use the same key::
>>> payload_tuples = [('key1', 'value1'), ('key1', 'value2')]
>>> r1 = requests.post('https://httpbin.org/post', data=payload_tuples)
>>> payload_dict = {'key1': ['value1', 'value2']}
>>> r2 = requests.post('https://httpbin.org/post', data=payload_dict)
>>> print(r1.text)
{
...
"form": {
"key1": [
"value1",
"value2"
]
},
...
}
>>> # httpbin may embed non-deterministic metadata,
>>> # so we only compare our submitted data here.
>>> r1.json()['form'] == r2.json()['form']
True
There are times that you may want to send data that is not form-encoded. If
you pass in a ``string`` instead of a ``dict``, that data will be posted directly.
For example, the GitHub API v3 accepts JSON-Encoded POST/PATCH data::
>>> import json
>>> url = 'https://api.github.com/some/endpoint'
>>> payload = {'some': 'data'}
>>> r = requests.post(url, data=json.dumps(payload))
Please note that the above code will NOT add the ``Content-Type`` header
(so in particular it will NOT set it to ``application/json``).
If you need that header set and you don't want to encode the ``dict`` yourself,
you can also pass it directly using the ``json`` parameter (added in version 2.4.2)
and it will be encoded automatically:
>>> url = 'https://api.github.com/some/endpoint'
>>> payload = {'some': 'data'}
>>> r = requests.post(url, json=payload)
Note, the ``json`` parameter is ignored if either ``data`` or ``files`` is passed.
POST a Multipart-Encoded File
-----------------------------
Requests makes it simple to upload Multipart-encoded files::
>>> url = 'http://httpbin.org/post'
>>> url = 'https://httpbin.org/post'
>>> files = {'file': open('report.xls', 'rb')}
>>> r = requests.post(url, files=files)
>>> r.text
{
// ...snip... //
...
"files": {
"file": "<censored...binary...data>"
},
// ...snip... //
...
}
You can set the filename explicitly::
You can set the filename, content_type and headers explicitly::
>>> url = 'http://httpbin.org/post'
>>> files = {'file': ('report.xls', open('report.xls', 'rb'))}
>>> url = 'https://httpbin.org/post'
>>> files = {'file': ('report.xls', open('report.xls', 'rb'), 'application/vnd.ms-excel', {'Expires': '0'})}
>>> r = requests.post(url, files=files)
>>> r.text
{
// ...snip... //
...
"files": {
"file": "<censored...binary...data>"
},
// ...snip... //
...
}
If you want, you can send strings to be received as files::
>>> url = 'http://httpbin.org/post'
>>> url = 'https://httpbin.org/post'
>>> files = {'file': ('report.csv', 'some,data,to,send\nanother,row,to,send\n')}
>>> r = requests.post(url, files=files)
>>> r.text
{
// ...snip... //
...
"files": {
"file": "some,data,to,send\\nanother,row,to,send\\n"
},
// ...snip... //
...
}
In the event you are posting a very large file as a ``multipart/form-data``
request, you may want to stream the request. By default, ``requests`` does not
support this, but there is a separate package which does -
``requests-toolbelt``. You should read `the toolbelt's documentation
<https://toolbelt.readthedocs.io>`_ for more details about how to use it.
For sending multiple files in one request refer to the :ref:`advanced <advanced>`
section.
.. warning:: It is strongly recommended that you open files in :ref:`binary
mode <tut-files>`. This is because Requests may attempt to provide
the ``Content-Length`` header for you, and if it does this value
will be set to the number of *bytes* in the file. Errors may occur
if you open the file in *text mode*.
Response Status Codes
---------------------
We can check the response status code::
>>> r = requests.get('http://httpbin.org/get')
>>> r = requests.get('https://httpbin.org/get')
>>> r.status_code
200
@@ -258,10 +381,11 @@ reference::
>>> r.status_code == requests.codes.ok
True
If we made a bad request (non-200 response), we can raise it with
:class:`Response.raise_for_status()`::
If we made a bad request (a 4XX client error or 5XX server error response), we
can raise it with
:meth:`Response.raise_for_status() <requests.Response.raise_for_status>`::
>>> bad_r = requests.get('http://httpbin.org/status/404')
>>> bad_r = requests.get('https://httpbin.org/status/404')
>>> bad_r.status_code
404
@@ -287,91 +411,117 @@ We can view the server's response headers using a Python dictionary::
>>> r.headers
{
'status': '200 OK',
'content-encoding': 'gzip',
'transfer-encoding': 'chunked',
'connection': 'close',
'server': 'nginx/1.0.4',
'x-runtime': '148ms',
'etag': '"e1ca502697e5c9317743dc078f67693f"',
'content-type': 'application/json; charset=utf-8'
'content-type': 'application/json'
}
The dictionary is special, though: it's made just for HTTP headers. According to
`RFC 2616 <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>`_, HTTP
Headers are case-insensitive.
`RFC 7230 <https://tools.ietf.org/html/rfc7230#section-3.2>`_, HTTP Header names
are case-insensitive.
So, we can access the headers using any capitalization we want::
>>> r.headers['Content-Type']
'application/json; charset=utf-8'
'application/json'
>>> r.headers.get('content-type')
'application/json; charset=utf-8'
'application/json'
If a header doesn't exist in the Response, its value defaults to ``None``::
>>> r.headers['X-Random']
None
It is also special in that the server could have sent the same header multiple
times with different values, but requests combines them so they can be
represented in the dictionary within a single mapping, as per
`RFC 7230 <https://tools.ietf.org/html/rfc7230#section-3.2>`_:
A recipient MAY combine multiple header fields with the same field name
into one "field-name: field-value" pair, without changing the semantics
of the message, by appending each subsequent field value to the combined
field value in order, separated by a comma.
Cookies
-------
If a response contains some Cookies, you can get quick access to them::
If a response contains some Cookies, you can quickly access them::
>>> url = 'http://httpbin.org/cookies/set/requests-is/awesome'
>>> url = 'http://example.com/some/cookie/setting/url'
>>> r = requests.get(url)
>>> r.cookies['requests-is']
'awesome'
>>> r.cookies['example_cookie_name']
'example_cookie_value'
To send your own cookies to the server, you can use the ``cookies``
parameter::
>>> url = 'http://httpbin.org/cookies'
>>> url = 'https://httpbin.org/cookies'
>>> cookies = dict(cookies_are='working')
>>> r = requests.get(url, cookies=cookies)
>>> r.text
'{"cookies": {"cookies_are": "working"}}'
Cookies are returned in a :class:`~requests.cookies.RequestsCookieJar`,
which acts like a ``dict`` but also offers a more complete interface,
suitable for use over multiple domains or paths. Cookie jars can
also be passed in to requests::
>>> jar = requests.cookies.RequestsCookieJar()
>>> jar.set('tasty_cookie', 'yum', domain='httpbin.org', path='/cookies')
>>> jar.set('gross_cookie', 'blech', domain='httpbin.org', path='/elsewhere')
>>> url = 'https://httpbin.org/cookies'
>>> r = requests.get(url, cookies=jar)
>>> r.text
'{"cookies": {"tasty_cookie": "yum"}}'
Redirection and History
-----------------------
Requests will automatically perform location redirection while using the GET
and OPTIONS verbs.
By default Requests will perform location redirection for all verbs except
HEAD.
GitHub redirects all HTTP requests to HTTPS. We can use the ``history`` method
of the Response object to track redirection. Let's see what Github does::
We can use the ``history`` property of the Response object to track redirection.
The :attr:`Response.history <requests.Response.history>` list contains the
:class:`Response <requests.Response>` objects that were created in order to
complete the request. The list is sorted from the oldest to the most recent
response.
For example, GitHub redirects all HTTP requests to HTTPS::
>>> r = requests.get('http://github.com/')
>>> r = requests.get('http://github.com')
>>> r.url
'https://github.com/'
>>> r.status_code
200
>>> r.history
[<Response [301]>]
The :class:`Response.history` list contains a list of the
:class:`Request` objects that were created in order to complete the request. The list is sorted from the oldest to the most recent request.
If you're using GET or OPTIONS, you can disable redirection handling with the
``allow_redirects`` parameter::
If you're using GET, OPTIONS, POST, PUT, PATCH or DELETE, you can disable
redirection handling with the ``allow_redirects`` parameter::
>>> r = requests.get('http://github.com/', allow_redirects=False)
>>> r = requests.get('http://github.com', allow_redirects=False)
>>> r.status_code
301
>>> r.history
[]
If you're using POST, PUT, PATCH, DELETE or HEAD, you can enable
redirection as well::
If you're using HEAD, you can enable redirection as well::
>>> r = requests.head('http://github.com/', allow_redirects=True)
>>> r = requests.post('http://github.com', allow_redirects=True)
>>> r.url
'https://github.com/'
>>> r.history
[<Response [301]>]
@@ -379,42 +529,44 @@ redirection as well::
Timeouts
--------
You can tell requests to stop waiting for a response after a given number of
seconds with the ``timeout`` parameter::
You can tell Requests to stop waiting for a response after a given number of
seconds with the ``timeout`` parameter. Nearly all production code should use
this parameter in nearly all requests. Failure to do so can cause your program
to hang indefinitely::
>>> requests.get('http://github.com', timeout=0.001)
>>> requests.get('https://github.com/', timeout=0.001)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
requests.exceptions.Timeout: Request timed out.
requests.exceptions.Timeout: HTTPConnectionPool(host='github.com', port=80): Request timed out. (timeout=0.001)
.. admonition:: Note:
``timeout`` only effects the connection process itself, not the
downloading of the response body.
.. admonition:: Note
``timeout`` is not a time limit on the entire response download;
rather, an exception is raised if the server has not issued a
response for ``timeout`` seconds (more precisely, if no bytes have been
received on the underlying socket for ``timeout`` seconds). If no timeout is specified explicitly, requests do
not time out.
Errors and Exceptions
---------------------
In the event of a network problem (e.g. DNS failure, refused connection, etc),
Requests will raise a :class:`ConnectionError` exception.
Requests will raise a :exc:`~requests.exceptions.ConnectionError` exception.
In the event of the rare invalid HTTP response, Requests will raise
an :class:`HTTPError` exception.
:meth:`Response.raise_for_status() <requests.Response.raise_for_status>` will
raise an :exc:`~requests.exceptions.HTTPError` if the HTTP request
returned an unsuccessful status code.
If a request times out, a :class:`Timeout` exception is raised.
If a request times out, a :exc:`~requests.exceptions.Timeout` exception is
raised.
If a request exceeds the configured number of maximum redirections, a
:class:`TooManyRedirects` exception is raised.
:exc:`~requests.exceptions.TooManyRedirects` exception is raised.
All exceptions that Requests explicitly raises inherit from
:class:`requests.exceptions.RequestException`.
You can refer to :ref:`Configuration API Docs <configurations>` for immediate
raising of :class:`HTTPError` exceptions via the ``danger_mode`` option or
have Requests catch the majority of
:class:`requests.exceptions.RequestException` exceptions with the ``safe_mode``
option.
:exc:`requests.exceptions.RequestException`.
-----------------------

1
ext/LICENSE Normal file
View File

@@ -0,0 +1 @@
Copyright 2019 Kenneth Reitz. All rights reserved.

BIN
ext/kr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
ext/psf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

File diff suppressed because one or more lines are too long

BIN
ext/requests-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

1
ext/requests-logo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 863 KiB

125
pyproject.toml Normal file
View File

@@ -0,0 +1,125 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "requests"
description = "Python HTTP for Humans."
readme = "README.md"
license = {text = "Apache-2.0"}
authors = [
{ name = "Kenneth Reitz", email = "me@kennethreitz.org" },
]
maintainers = [
{name = "Ian Stapleton Cordasco", email="graffatcolmingov@gmail.com"},
{name = "Nate Prewitt", email="nate.prewitt@gmail.com"}
]
requires-python = ">=3.10"
dependencies = [
"charset_normalizer>=2,<4",
"idna>=2.5,<4",
"urllib3>=1.26,<3",
"certifi>=2023.5.7"
]
dynamic = ["version"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: Free Threading :: 2 - Beta",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries"
]
[project.urls]
Documentation = "https://requests.readthedocs.io"
Source = "https://github.com/psf/requests"
[project.optional-dependencies]
security = []
socks = ["PySocks>=1.5.6, !=1.5.7"]
use_chardet_on_py3 = ["chardet>=3.0.2,<8"]
[dependency-groups]
test = [
"requests[socks]",
"pytest-httpbin==2.1.0",
"httpbin~=0.10.0",
"pytest-cov",
"pytest-mock",
"pytest-xdist",
"pytest>=3",
"trustme",
]
typecheck = [
"pyright",
"typing_extensions",
"chardet",
"cryptography",
"PyOpenSSL",
]
[tool.setuptools]
license-files = ["LICENSE", "NOTICE"]
[tool.setuptools.dynamic]
version = {attr = "requests.__version__.__version__"}
[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
target-version = "py310"
src = ["src/requests", "tests"]
exclude = ["docs/", "ext/"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"T10", # flake8-debugger (replaces debug-statements hook)
]
ignore = ["E203", "E501", "UP031"]
per-file-ignores = {"src/requests/__init__.py" = ["E402", "F401"], "src/requests/compat.py" = ["E402", "F401"], "tests/compat.py" = ["F401"]}
[tool.ruff.lint.isort]
known-first-party = ["requests"]
[tool.ruff.format]
# Use black-compatible formatting
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
addopts = "--doctest-modules"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
minversion = "6.2"
testpaths = ["tests"]
[tool.pyright]
include = ["src/requests"]
typeCheckingMode = "strict"
# linting rules unrelated to type checking
reportPrivateUsage = false
reportPrivateImportUsage = false
reportUnnecessaryIsInstance = false
reportUnusedImport = false # duplicate of Ruff's F401 rule

View File

@@ -1,71 +0,0 @@
# -*- coding: utf-8 -*-
# __
# /__) _ _ _ _ _/ _
# / ( (- (/ (/ (- _) / _)
# /
"""
requests HTTP library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('http://python.org')
>>> r.status_code
200
>>> 'Python is a programming language' in r.content
True
... or POST:
>>> payload = dict(key1='value1', key2='value2')
>>> r = requests.post("http://httpbin.org/post", data=payload)
>>> print r.text
{
...
"form": {
"key2": "value2",
"key1": "value1"
},
...
}
The other HTTP methods are supported - see `requests.api`. Full documentation
is at <http://python-requests.org>.
:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.
"""
__title__ = 'requests'
__version__ = '1.0.3'
__build__ = 0x01003
__author__ = 'Kenneth Reitz'
__license__ = 'Apache 2.0'
__copyright__ = 'Copyright 2012 Kenneth Reitz'
from . import utils
from .models import Request, Response, PreparedRequest
from .api import request, get, head, post, patch, put, delete, options
from .sessions import session, Session
from .status_codes import codes
from .exceptions import (
RequestException, Timeout, URLRequired,
TooManyRedirects, HTTPError, ConnectionError
)
# Set default logging handler to avoid "No handler found" warnings.
import logging
try: # Python 2.7+
from logging import NullHandler
except ImportError:
class NullHandler(logging.Handler):
def emit(self, record):
pass
logging.getLogger(__name__).addHandler(NullHandler())

View File

@@ -1,174 +0,0 @@
# -*- coding: utf-8 -*-
"""
requests.adapters
~~~~~~~~~~~~~~~~~
This module contains the transport adapters that Requests uses to define
and maintain connections.
"""
import socket
from .models import Response
from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
from .hooks import dispatch_hook
from .compat import urlparse
from .utils import DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers
from .structures import CaseInsensitiveDict
from .packages.urllib3.exceptions import MaxRetryError
from .packages.urllib3.exceptions import TimeoutError
from .packages.urllib3.exceptions import SSLError as _SSLError
from .packages.urllib3.exceptions import HTTPError as _HTTPError
from .cookies import extract_cookies_to_jar
from .exceptions import ConnectionError, Timeout, SSLError
DEFAULT_POOLSIZE = 10
DEFAULT_RETRIES = 0
class BaseAdapter(object):
"""The Base Transport Adapter"""
def __init__(self):
super(BaseAdapter, self).__init__()
def send(self):
raise NotImplementedError
def close(self):
raise NotImplementedError
class HTTPAdapter(BaseAdapter):
"""Built-In HTTP Adapter for Urllib3."""
def __init__(self, pool_connections=DEFAULT_POOLSIZE, pool_maxsize=DEFAULT_POOLSIZE):
self.max_retries = DEFAULT_RETRIES
self.config = {}
super(HTTPAdapter, self).__init__()
self.init_poolmanager(pool_connections, pool_maxsize)
def init_poolmanager(self, connections, maxsize):
self.poolmanager = PoolManager(num_pools=connections, maxsize=maxsize)
def cert_verify(self, conn, url, verify, cert):
if url.startswith('https') and verify:
cert_loc = None
# Allow self-specified cert location.
if verify is not True:
cert_loc = verify
if not cert_loc:
cert_loc = DEFAULT_CA_BUNDLE_PATH
if not cert_loc:
raise Exception("Could not find a suitable SSL CA certificate bundle.")
conn.cert_reqs = 'CERT_REQUIRED'
conn.ca_certs = cert_loc
else:
conn.cert_reqs = 'CERT_NONE'
conn.ca_certs = None
if cert:
if len(cert) == 2:
conn.cert_file = cert[0]
conn.key_file = cert[1]
else:
conn.cert_file = cert
def build_response(self, req, resp):
response = Response()
# Fallback to None if there's no status_code, for whatever reason.
response.status_code = getattr(resp, 'status', None)
# Make headers case-insensitive.
response.headers = CaseInsensitiveDict(getattr(resp, 'headers', {}))
# Set encoding.
response.encoding = get_encoding_from_headers(response.headers)
response.raw = resp
if isinstance(req.url, bytes):
response.url = req.url.decode('utf-8')
else:
response.url = req.url
# Add new cookies from the server.
extract_cookies_to_jar(response.cookies, req, resp)
# Give the Response some context.
response.request = req
response.connection = self
# Run the Response hook.
response = dispatch_hook('response', req.hooks, response)
return response
def get_connection(self, url, proxies=None):
"""Returns a connection for the given URL."""
proxies = proxies or {}
proxy = proxies.get(urlparse(url).scheme)
if proxy:
conn = proxy_from_url(proxy)
else:
conn = self.poolmanager.connection_from_url(url)
return conn
def close(self):
"""Dispose of any internal state.
Currently, this just closes the PoolManager, which closes pooled
connections.
"""
self.poolmanager.clear()
def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None):
"""Sends PreparedRequest object. Returns Response object."""
conn = self.get_connection(request.url, proxies)
self.cert_verify(conn, request.url, verify, cert)
try:
# Send the request.
resp = conn.urlopen(
method=request.method,
url=request.path_url,
body=request.body,
headers=request.headers,
redirect=False,
assert_same_host=False,
preload_content=False,
decode_content=False,
retries=self.max_retries,
timeout=timeout,
)
except socket.error as sockerr:
raise ConnectionError(sockerr)
except MaxRetryError as e:
raise ConnectionError(e)
except (_SSLError, _HTTPError) as e:
if isinstance(e, _SSLError):
raise SSLError(e)
elif isinstance(e, TimeoutError):
raise Timeout(e)
else:
raise Timeout('Request timed out.')
r = self.build_response(request, resp)
if not stream:
r.content
return r

View File

@@ -1,113 +0,0 @@
# -*- coding: utf-8 -*-
"""
requests.api
~~~~~~~~~~~~
This module implements the Requests API.
:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.
"""
from . import sessions
def request(method, url, **kwargs):
"""Constructs and sends a :class:`Request <Request>`.
Returns :class:`Response <Response>` object.
:param method: method for the new :class:`Request` object.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.
:param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
:param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
:param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
:param files: (optional) Dictionary of 'name': file-like-objects (or {'name': ('filename', fileobj)}) for multipart encoding upload.
:param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
:param timeout: (optional) Float describing the timeout of the request.
:param allow_redirects: (optional) Boolean. Set to True if POST/PUT/DELETE redirect following is allowed.
:param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
:param verify: (optional) if ``True``, the SSL cert will be verified. A CA_BUNDLE path can also be provided.
:param stream: (optional) if ``False``, the response content will be immediately downloaded.
:param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.
"""
session = sessions.Session()
return session.request(method=method, url=url, **kwargs)
def get(url, **kwargs):
"""Sends a GET request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""
kwargs.setdefault('allow_redirects', True)
return request('get', url, **kwargs)
def options(url, **kwargs):
"""Sends a OPTIONS request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""
kwargs.setdefault('allow_redirects', True)
return request('options', url, **kwargs)
def head(url, **kwargs):
"""Sends a HEAD request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""
return request('head', url, **kwargs)
def post(url, data=None, **kwargs):
"""Sends a POST request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""
return request('post', url, data=data, **kwargs)
def put(url, data=None, **kwargs):
"""Sends a PUT request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""
return request('put', url, data=data, **kwargs)
def patch(url, data=None, **kwargs):
"""Sends a PATCH request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""
return request('patch', url, data=data, **kwargs)
def delete(url, **kwargs):
"""Sends a DELETE request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""
return request('delete', url, **kwargs)

View File

@@ -1,168 +0,0 @@
# -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import time
import hashlib
import logging
from base64 import b64encode
from .compat import urlparse, str
from .utils import parse_dict_header
log = logging.getLogger(__name__)
CONTENT_TYPE_FORM_URLENCODED = 'application/x-www-form-urlencoded'
CONTENT_TYPE_MULTI_PART = 'multipart/form-data'
def _basic_auth_str(username, password):
"""Returns a Basic Auth string."""
return 'Basic ' + b64encode(('%s:%s' % (username, password)).encode('latin1')).strip().decode('latin1')
class AuthBase(object):
"""Base class that all auth implementations derive from"""
def __call__(self, r):
raise NotImplementedError('Auth hooks must be callable.')
class HTTPBasicAuth(AuthBase):
"""Attaches HTTP Basic Authentication to the given Request object."""
def __init__(self, username, password):
self.username = username
self.password = password
def __call__(self, r):
r.headers['Authorization'] = _basic_auth_str(self.username, self.password)
return r
class HTTPProxyAuth(HTTPBasicAuth):
"""Attaches HTTP Proxy Authenetication to a given Request object."""
def __call__(self, r):
r.headers['Proxy-Authorization'] = _basic_auth_str(self.username, self.password)
return r
class HTTPDigestAuth(AuthBase):
"""Attaches HTTP Digest Authentication to the given Request object."""
def __init__(self, username, password):
self.username = username
self.password = password
self.last_nonce = ''
self.nonce_count = 0
self.chal = {}
def build_digest_header(self, method, url):
realm = self.chal['realm']
nonce = self.chal['nonce']
qop = self.chal.get('qop')
algorithm = self.chal.get('algorithm', 'MD5')
opaque = self.chal.get('opaque', None)
algorithm = algorithm.upper()
# lambdas assume digest modules are imported at the top level
if algorithm == 'MD5':
def md5_utf8(x):
if isinstance(x, str):
x = x.encode('utf-8')
return hashlib.md5(x).hexdigest()
hash_utf8 = md5_utf8
elif algorithm == 'SHA':
def sha_utf8(x):
if isinstance(x, str):
x = x.encode('utf-8')
return hashlib.sha1(x).hexdigest()
hash_utf8 = sha_utf8
# XXX MD5-sess
KD = lambda s, d: hash_utf8("%s:%s" % (s, d))
if hash_utf8 is None:
return None
# XXX not implemented yet
entdig = None
p_parsed = urlparse(url)
path = p_parsed.path
if p_parsed.query:
path += '?' + p_parsed.query
A1 = '%s:%s:%s' % (self.username, realm, self.password)
A2 = '%s:%s' % (method, path)
if qop == 'auth':
if nonce == self.last_nonce:
self.nonce_count += 1
else:
self.nonce_count = 1
ncvalue = '%08x' % self.nonce_count
s = str(self.nonce_count).encode('utf-8')
s += nonce.encode('utf-8')
s += time.ctime().encode('utf-8')
s += os.urandom(8)
cnonce = (hashlib.sha1(s).hexdigest()[:16])
noncebit = "%s:%s:%s:%s:%s" % (nonce, ncvalue, cnonce, qop, hash_utf8(A2))
respdig = KD(hash_utf8(A1), noncebit)
elif qop is None:
respdig = KD(hash_utf8(A1), "%s:%s" % (nonce, hash_utf8(A2)))
else:
# XXX handle auth-int.
return None
self.last_nonce = nonce
# XXX should the partial digests be encoded too?
base = 'username="%s", realm="%s", nonce="%s", uri="%s", ' \
'response="%s"' % (self.username, realm, nonce, path, respdig)
if opaque:
base += ', opaque="%s"' % opaque
if entdig:
base += ', digest="%s"' % entdig
base += ', algorithm="%s"' % algorithm
if qop:
base += ', qop=auth, nc=%s, cnonce="%s"' % (ncvalue, cnonce)
return 'Digest %s' % (base)
def handle_401(self, r):
"""Takes the given response and tries digest-auth, if needed."""
num_401_calls = r.request.hooks['response'].count(self.handle_401)
s_auth = r.headers.get('www-authenticate', '')
if 'digest' in s_auth.lower() and num_401_calls < 2:
self.chal = parse_dict_header(s_auth.replace('Digest ', ''))
# Consume content and release the original connection
# to allow our new request to reuse the same one.
r.content
r.raw.release_conn()
r.request.headers['Authorization'] = self.build_digest_header(r.request.method, r.request.url)
_r = r.connection.send(r.request)
_r.history.append(r)
return _r
return r
def __call__(self, r):
# If we have a saved nonce, skip the 401
if self.last_nonce:
r.headers['Authorization'] = self.build_digest_header(r.method, r.url)
r.register_hook('response', self.handle_401)
return r

File diff suppressed because it is too large Load Diff

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ceritfi.py
~~~~~~~~~~
This module returns the installation location of cacert.pem.
"""
import os
try:
import certifi
except ImportError:
certifi = None
def where():
if certifi:
return certifi.where()
else:
f = os.path.split(__file__)[0]
return os.path.join(f, 'cacert.pem')
if __name__ == '__main__':
print(where())

View File

@@ -1,114 +0,0 @@
# -*- coding: utf-8 -*-
"""
pythoncompat
"""
from .packages import charade as chardet
import sys
# -------
# Pythons
# -------
# Syntax sugar.
_ver = sys.version_info
#: Python 2.x?
is_py2 = (_ver[0] == 2)
#: Python 3.x?
is_py3 = (_ver[0] == 3)
#: Python 3.0.x
is_py30 = (is_py3 and _ver[1] == 0)
#: Python 3.1.x
is_py31 = (is_py3 and _ver[1] == 1)
#: Python 3.2.x
is_py32 = (is_py3 and _ver[1] == 2)
#: Python 3.3.x
is_py33 = (is_py3 and _ver[1] == 3)
#: Python 3.4.x
is_py34 = (is_py3 and _ver[1] == 4)
#: Python 2.7.x
is_py27 = (is_py2 and _ver[1] == 7)
#: Python 2.6.x
is_py26 = (is_py2 and _ver[1] == 6)
#: Python 2.5.x
is_py25 = (is_py2 and _ver[1] == 5)
#: Python 2.4.x
is_py24 = (is_py2 and _ver[1] == 4) # I'm assuming this is not by choice.
# ---------
# Platforms
# ---------
# Syntax sugar.
_ver = sys.version.lower()
is_pypy = ('pypy' in _ver)
is_jython = ('jython' in _ver)
is_ironpython = ('iron' in _ver)
# Assume CPython, if nothing else.
is_cpython = not any((is_pypy, is_jython, is_ironpython))
# Windows-based system.
is_windows = 'win32' in str(sys.platform).lower()
# Standard Linux 2+ system.
is_linux = ('linux' in str(sys.platform).lower())
is_osx = ('darwin' in str(sys.platform).lower())
is_hpux = ('hpux' in str(sys.platform).lower()) # Complete guess.
is_solaris = ('solar==' in str(sys.platform).lower()) # Complete guess.
try:
import simplejson as json
except ImportError:
import json
# ---------
# Specifics
# ---------
if is_py2:
from urllib import quote, unquote, quote_plus, unquote_plus, urlencode
from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag
from urllib2 import parse_http_list
import cookielib
from Cookie import Morsel
from StringIO import StringIO
from .packages.urllib3.packages.ordered_dict import OrderedDict
builtin_str = str
bytes = str
str = unicode
basestring = basestring
numeric_types = (int, long, float)
elif is_py3:
from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag
from urllib.request import parse_http_list
from http import cookiejar as cookielib
from http.cookies import Morsel
from io import StringIO
from collections import OrderedDict
builtin_str = str
str = str
bytes = bytes
basestring = (str, bytes)
numeric_types = (int, float)

View File

@@ -1,373 +0,0 @@
# -*- coding: utf-8 -*-
"""
Compatibility code to be able to use `cookielib.CookieJar` with requests.
requests.utils imports from here, so be careful with imports.
"""
import collections
from .compat import cookielib, urlparse, Morsel
try:
import threading
# grr, pyflakes: this fixes "redefinition of unused 'threading'"
threading
except ImportError:
import dummy_threading as threading
class MockRequest(object):
"""Wraps a `requests.Request` to mimic a `urllib2.Request`.
The code in `cookielib.CookieJar` expects this interface in order to correctly
manage cookie policies, i.e., determine whether a cookie can be set, given the
domains of the request and the cookie.
The original request object is read-only. The client is responsible for collecting
the new headers via `get_new_headers()` and interpreting them appropriately. You
probably want `get_cookie_header`, defined below.
"""
def __init__(self, request):
self._r = request
self._new_headers = {}
self.type = urlparse(self._r.url).scheme
def get_type(self):
return self.type
def get_host(self):
return urlparse(self._r.url).netloc
def get_origin_req_host(self):
return self.get_host()
def get_full_url(self):
return self._r.url
def is_unverifiable(self):
return True
def has_header(self, name):
return name in self._r.headers or name in self._new_headers
def get_header(self, name, default=None):
return self._r.headers.get(name, self._new_headers.get(name, default))
def add_header(self, key, val):
"""cookielib has no legitimate use for this method; add it back if you find one."""
raise NotImplementedError("Cookie headers should be added with add_unredirected_header()")
def add_unredirected_header(self, name, value):
self._new_headers[name] = value
def get_new_headers(self):
return self._new_headers
@property
def unverifiable(self):
return self.is_unverifiable()
class MockResponse(object):
"""Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`.
...what? Basically, expose the parsed HTTP headers from the server response
the way `cookielib` expects to see them.
"""
def __init__(self, headers):
"""Make a MockResponse for `cookielib` to read.
:param headers: a httplib.HTTPMessage or analogous carrying the headers
"""
self._headers = headers
def info(self):
return self._headers
def getheaders(self, name):
self._headers.getheaders(name)
def extract_cookies_to_jar(jar, request, response):
"""Extract the cookies from the response into a CookieJar.
:param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar)
:param request: our own requests.Request object
:param response: urllib3.HTTPResponse object
"""
# the _original_response field is the wrapped httplib.HTTPResponse object,
req = MockRequest(request)
# pull out the HTTPMessage with the headers and put it in the mock:
res = MockResponse(response._original_response.msg)
jar.extract_cookies(res, req)
def get_cookie_header(jar, request):
"""Produce an appropriate Cookie header string to be sent with `request`, or None."""
r = MockRequest(request)
jar.add_cookie_header(r)
return r.get_new_headers().get('Cookie')
def remove_cookie_by_name(cookiejar, name, domain=None, path=None):
"""Unsets a cookie by name, by default over all domains and paths.
Wraps CookieJar.clear(), is O(n).
"""
clearables = []
for cookie in cookiejar:
if cookie.name == name:
if domain is None or domain == cookie.domain:
if path is None or path == cookie.path:
clearables.append((cookie.domain, cookie.path, cookie.name))
for domain, path, name in clearables:
cookiejar.clear(domain, path, name)
class CookieConflictError(RuntimeError):
"""There are two cookies that meet the criteria specified in the cookie jar.
Use .get and .set and include domain and path args in order to be more specific."""
class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
"""Compatibility class; is a cookielib.CookieJar, but exposes a dict interface.
This is the CookieJar we create by default for requests and sessions that
don't specify one, since some clients may expect response.cookies and
session.cookies to support dict operations.
Don't use the dict interface internally; it's just for compatibility with
with external client code. All `requests` code should work out of the box
with externally provided instances of CookieJar, e.g., LWPCookieJar and
FileCookieJar.
Caution: dictionary operations that are normally O(1) may be O(n).
Unlike a regular CookieJar, this class is pickleable.
"""
def get(self, name, default=None, domain=None, path=None):
"""Dict-like get() that also supports optional domain and path args in
order to resolve naming collisions from using one cookie jar over
multiple domains. Caution: operation is O(n), not O(1)."""
try:
return self._find_no_duplicates(name, domain, path)
except KeyError:
return default
def set(self, name, value, **kwargs):
"""Dict-like set() that also supports optional domain and path args in
order to resolve naming collisions from using one cookie jar over
multiple domains."""
# support client code that unsets cookies by assignment of a None value:
if value is None:
remove_cookie_by_name(self, name, domain=kwargs.get('domain'), path=kwargs.get('path'))
return
if isinstance(value, Morsel):
c = morsel_to_cookie(value)
else:
c = create_cookie(name, value, **kwargs)
self.set_cookie(c)
return c
def keys(self):
"""Dict-like keys() that returns a list of names of cookies from the jar.
See values() and items()."""
keys = []
for cookie in iter(self):
keys.append(cookie.name)
return keys
def values(self):
"""Dict-like values() that returns a list of values of cookies from the jar.
See keys() and items()."""
values = []
for cookie in iter(self):
values.append(cookie.value)
return values
def items(self):
"""Dict-like items() that returns a list of name-value tuples from the jar.
See keys() and values(). Allows client-code to call "dict(RequestsCookieJar)
and get a vanilla python dict of key value pairs."""
items = []
for cookie in iter(self):
items.append((cookie.name, cookie.value))
return items
def list_domains(self):
"""Utility method to list all the domains in the jar."""
domains = []
for cookie in iter(self):
if cookie.domain not in domains:
domains.append(cookie.domain)
return domains
def list_paths(self):
"""Utility method to list all the paths in the jar."""
paths = []
for cookie in iter(self):
if cookie.path not in paths:
paths.append(cookie.path)
return paths
def multiple_domains(self):
"""Returns True if there are multiple domains in the jar.
Returns False otherwise."""
domains = []
for cookie in iter(self):
if cookie.domain is not None and cookie.domain in domains:
return True
domains.append(cookie.domain)
return False # there is only one domain in jar
def get_dict(self, domain=None, path=None):
"""Takes as an argument an optional domain and path and returns a plain old
Python dict of name-value pairs of cookies that meet the requirements."""
dictionary = {}
for cookie in iter(self):
if (domain is None or cookie.domain == domain) and (path is None
or cookie.path == path):
dictionary[cookie.name] = cookie.value
return dictionary
def __getitem__(self, name):
"""Dict-like __getitem__() for compatibility with client code. Throws exception
if there are more than one cookie with name. In that case, use the more
explicit get() method instead. Caution: operation is O(n), not O(1)."""
return self._find_no_duplicates(name)
def __setitem__(self, name, value):
"""Dict-like __setitem__ for compatibility with client code. Throws exception
if there is already a cookie of that name in the jar. In that case, use the more
explicit set() method instead."""
self.set(name, value)
def __delitem__(self, name):
"""Deletes a cookie given a name. Wraps cookielib.CookieJar's remove_cookie_by_name()."""
remove_cookie_by_name(self, name)
def _find(self, name, domain=None, path=None):
"""Requests uses this method internally to get cookie values. Takes as args name
and optional domain and path. Returns a cookie.value. If there are conflicting cookies,
_find arbitrarily chooses one. See _find_no_duplicates if you want an exception thrown
if there are conflicting cookies."""
for cookie in iter(self):
if cookie.name == name:
if domain is None or cookie.domain == domain:
if path is None or cookie.path == path:
return cookie.value
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
def _find_no_duplicates(self, name, domain=None, path=None):
"""__get_item__ and get call _find_no_duplicates -- never used in Requests internally.
Takes as args name and optional domain and path. Returns a cookie.value.
Throws KeyError if cookie is not found and CookieConflictError if there are
multiple cookies that match name and optionally domain and path."""
toReturn = None
for cookie in iter(self):
if cookie.name == name:
if domain is None or cookie.domain == domain:
if path is None or cookie.path == path:
if toReturn is not None: # if there are multiple cookies that meet passed in criteria
raise CookieConflictError('There are multiple cookies with name, %r' % (name))
toReturn = cookie.value # we will eventually return this as long as no cookie conflict
if toReturn:
return toReturn
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
def __getstate__(self):
"""Unlike a normal CookieJar, this class is pickleable."""
state = self.__dict__.copy()
# remove the unpickleable RLock object
state.pop('_cookies_lock')
return state
def __setstate__(self, state):
"""Unlike a normal CookieJar, this class is pickleable."""
self.__dict__.update(state)
if '_cookies_lock' not in self.__dict__:
self._cookies_lock = threading.RLock()
def copy(self):
"""This is not implemented. Calling this will throw an exception."""
raise NotImplementedError
def create_cookie(name, value, **kwargs):
"""Make a cookie from underspecified parameters.
By default, the pair of `name` and `value` will be set for the domain ''
and sent on every request (this is sometimes called a "supercookie").
"""
result = dict(
version=0,
name=name,
value=value,
port=None,
domain='',
path='/',
secure=False,
expires=None,
discard=True,
comment=None,
comment_url=None,
rest={'HttpOnly': None},
rfc2109=False,)
badargs = set(kwargs) - set(result)
if badargs:
err = 'create_cookie() got unexpected keyword arguments: %s'
raise TypeError(err % list(badargs))
result.update(kwargs)
result['port_specified'] = bool(result['port'])
result['domain_specified'] = bool(result['domain'])
result['domain_initial_dot'] = result['domain'].startswith('.')
result['path_specified'] = bool(result['path'])
return cookielib.Cookie(**result)
def morsel_to_cookie(morsel):
"""Convert a Morsel object into a Cookie containing the one k/v pair."""
c = create_cookie(
name=morsel.key,
value=morsel.value,
version=morsel['version'] or 0,
port=None,
port_specified=False,
domain=morsel['domain'],
domain_specified=bool(morsel['domain']),
domain_initial_dot=morsel['domain'].startswith('.'),
path=morsel['path'],
path_specified=bool(morsel['path']),
secure=bool(morsel['secure']),
expires=morsel['max-age'] or morsel['expires'],
discard=False,
comment=morsel['comment'],
comment_url=bool(morsel['comment']),
rest={'HttpOnly': morsel['httponly']},
rfc2109=False,)
return c
def cookiejar_from_dict(cookie_dict, cookiejar=None):
"""Returns a CookieJar from a key/value dictionary.
:param cookie_dict: Dict of key/values to insert into CookieJar.
"""
if cookiejar is None:
cookiejar = RequestsCookieJar()
if cookie_dict is not None:
for name in cookie_dict:
cookiejar.set_cookie(create_cookie(name, cookie_dict[name]))
return cookiejar

View File

@@ -1,51 +0,0 @@
# -*- coding: utf-8 -*-
"""
requests.exceptions
~~~~~~~~~~~~~~~~~~~
This module contains the set of Requests' exceptions.
"""
class RequestException(RuntimeError):
"""There was an ambiguous exception that occurred while handling your
request."""
class HTTPError(RequestException):
"""An HTTP error occurred."""
response = None
class ConnectionError(RequestException):
"""A Connection error occurred."""
class SSLError(ConnectionError):
"""An SSL error occurred."""
class Timeout(RequestException):
"""The request timed out."""
class URLRequired(RequestException):
"""A valid URL is required to make a request."""
class TooManyRedirects(RequestException):
"""Too many redirects."""
class MissingSchema(RequestException, ValueError):
"""The URL schema (e.g. http or https) is missing."""
class InvalidSchema(RequestException, ValueError):
"""See defaults.py for valid schemas."""
class InvalidURL(RequestException, ValueError):
""" The URL provided was somehow invalid. """

View File

@@ -1,43 +0,0 @@
# -*- coding: utf-8 -*-
"""
requests.hooks
~~~~~~~~~~~~~~
This module provides the capabilities for the Requests hooks system.
Available hooks:
``response``:
The response generated from a Request.
"""
HOOKS = ['response']
def default_hooks():
hooks = {}
for event in HOOKS:
hooks[event] = []
return hooks
# TODO: response is the only one
def dispatch_hook(key, hooks, hook_data):
"""Dispatches a hook dictionary on a given piece of data."""
hooks = hooks or dict()
if key in hooks:
hooks = hooks.get(key)
if hasattr(hooks, '__call__'):
hooks = [hooks]
for hook in hooks:
_hook_data = hook(hook_data)
if _hook_data is not None:
hook_data = _hook_data
return hook_data

View File

@@ -1,571 +0,0 @@
# -*- coding: utf-8 -*-
"""
requests.models
~~~~~~~~~~~~~~~
This module contains the primary objects that power Requests.
"""
import collections
import logging
from io import BytesIO
from .hooks import default_hooks
from .structures import CaseInsensitiveDict
from .status_codes import codes
from .auth import HTTPBasicAuth
from .cookies import cookiejar_from_dict, get_cookie_header
from .packages.urllib3.filepost import encode_multipart_formdata
from .exceptions import HTTPError, RequestException, MissingSchema, InvalidURL
from .utils import (
stream_untransfer, guess_filename, requote_uri,
stream_decode_response_unicode, to_key_val_list, parse_header_links,
iter_slices, guess_json_utf)
from .compat import (
cookielib, urlparse, urlunparse, urlsplit, urlencode, str, bytes, StringIO,
is_py2, chardet, json, builtin_str, basestring)
REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved)
CONTENT_CHUNK_SIZE = 10 * 1024
ITER_CHUNK_SIZE = 10 * 1024
log = logging.getLogger(__name__)
class RequestEncodingMixin(object):
@property
def path_url(self):
"""Build the path URL to use."""
url = []
p = urlsplit(self.url)
path = p.path
if not path:
path = '/'
url.append(path)
query = p.query
if query:
url.append('?')
url.append(query)
return ''.join(url)
@staticmethod
def _encode_params(data):
"""Encode parameters in a piece of data.
Will successfully encode parameters when passed as a dict or a list of
2-tuples. Order is retained if data is a list of 2-tuples but abritrary
if parameters are supplied as a dict.
"""
if isinstance(data, (str, bytes)):
return data
elif hasattr(data, 'read'):
return data
elif hasattr(data, '__iter__'):
result = []
for k, vs in to_key_val_list(data):
if isinstance(vs, basestring) or not hasattr(vs, '__iter__'):
vs = [vs]
for v in vs:
if v is not None:
result.append(
(k.encode('utf-8') if isinstance(k, str) else k,
v.encode('utf-8') if isinstance(v, str) else v))
return urlencode(result, doseq=True)
else:
return data
@staticmethod
def _encode_files(files, data):
"""Build the body for a multipart/form-data request.
Will successfully encode files when passed as a dict or a list of
2-tuples. Order is retained if data is a list of 2-tuples but abritrary
if parameters are supplied as a dict.
"""
if (not files) or isinstance(data, str):
return None
new_fields = []
fields = to_key_val_list(data or {})
files = to_key_val_list(files or {})
for field, val in fields:
if isinstance(val, list):
for v in val:
new_fields.append((field, builtin_str(v)))
else:
new_fields.append((field, builtin_str(val)))
for (k, v) in files:
# support for explicit filename
if isinstance(v, (tuple, list)):
fn, fp = v
else:
fn = guess_filename(v) or k
fp = v
if isinstance(fp, str):
fp = StringIO(fp)
if isinstance(fp, bytes):
fp = BytesIO(fp)
new_fields.append((k, (fn, fp.read())))
body, content_type = encode_multipart_formdata(new_fields)
return body, content_type
class RequestHooksMixin(object):
def register_hook(self, event, hook):
"""Properly register a hook."""
if isinstance(hook, collections.Callable):
self.hooks[event].append(hook)
elif hasattr(hook, '__iter__'):
self.hooks[event].extend(h for h in hook if isinstance(h, collections.Callable))
def deregister_hook(self, event, hook):
"""Deregister a previously registered hook.
Returns True if the hook existed, False if not.
"""
try:
self.hooks[event].remove(hook)
return True
except ValueError:
return False
class Request(RequestHooksMixin):
"""A user-created :class:`Request <Request>` object."""
def __init__(self,
method=None,
url=None,
headers=None,
files=None,
data=dict(),
params=dict(),
auth=None,
cookies=None,
timeout=None,
hooks=None):
# Default empty dicts for dict params.
data = [] if data is None else data
files = [] if files is None else files
headers = {} if headers is None else headers
params = {} if params is None else params
hooks = {} if hooks is None else hooks
self.hooks = default_hooks()
for (k, v) in list(hooks.items()):
self.register_hook(event=k, hook=v)
self.method = method
self.url = url
self.headers = headers
self.files = files
self.data = data
self.params = params
self.auth = auth
self.cookies = cookies
# self.allow_redirects = allow_redirects
# self.proxies = proxies
self.hooks = hooks
def __repr__(self):
return '<Request [%s]>' % (self.method)
def prepare(self):
"""Constructs a PreparedRequest for transmission and returns it."""
p = PreparedRequest()
p.prepare_method(self.method)
p.prepare_url(self.url, self.params)
p.prepare_headers(self.headers)
p.prepare_cookies(self.cookies)
p.prepare_auth(self.auth)
p.prepare_body(self.data, self.files)
return p
class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
"""The :class:`PreparedRequest <PreparedRequest>` object."""
def __init__(self):
self.method = None
self.url = None
self.headers = None
self.body = None
self.params = None
self.auth = None
self.allow_redirects = None
self.proxies = None
self.hooks = default_hooks()
def __repr__(self):
return '<PreparedRequest [%s]>' % (self.method)
def prepare_method(self, method):
"""Prepares the given HTTP method."""
self.method = method
if self.method is not None:
self.method = self.method.upper()
def prepare_url(self, url, params):
"""Prepares the given HTTP URL."""
#: Accept objects that have string representations.
try:
url = unicode(url)
except NameError:
# We're on Python 3.
url = str(url)
except UnicodeDecodeError:
pass
# Support for unicode domain names and paths.
scheme, netloc, path, _params, query, fragment = urlparse(url)
if not scheme:
raise MissingSchema("Invalid URL %r: No schema supplied" % url)
try:
netloc = netloc.encode('idna').decode('utf-8')
except UnicodeError:
raise InvalidURL('URL has an invalid label.')
# Bare domains aren't valid URLs.
if not path:
path = '/'
if is_py2:
if isinstance(scheme, str):
scheme = scheme.encode('utf-8')
if isinstance(netloc, str):
netloc = netloc.encode('utf-8')
if isinstance(path, str):
path = path.encode('utf-8')
if isinstance(_params, str):
_params = _params.encode('utf-8')
if isinstance(query, str):
query = query.encode('utf-8')
if isinstance(fragment, str):
fragment = fragment.encode('utf-8')
enc_params = self._encode_params(params)
if enc_params:
if query:
query = '%s&%s' % (query, enc_params)
else:
query = enc_params
url = requote_uri(urlunparse([scheme, netloc, path, _params, query, fragment]))
self.url = url
def prepare_headers(self, headers):
"""Prepares the given HTTP headers."""
if headers:
self.headers = CaseInsensitiveDict(headers)
else:
self.headers = CaseInsensitiveDict()
def prepare_body(self, data, files):
"""Prepares the given HTTP body data."""
# If a generator is provided, error out.
if isinstance(data, type(_ for _ in [])):
raise NotImplementedError('Generator bodies are not supported yet.')
# Nottin' on you.
body = None
content_type = None
# Multi-part file uploads.
if files:
(body, content_type) = self._encode_files(files, data)
else:
if data:
body = self._encode_params(data)
if isinstance(data, str) or isinstance(data, builtin_str) or hasattr(data, 'read'):
content_type = None
else:
content_type = 'application/x-www-form-urlencoded'
self.headers['Content-Length'] = '0'
if hasattr(body, 'seek') and hasattr(body, 'tell'):
body.seek(0, 2)
self.headers['Content-Length'] = str(body.tell())
body.seek(0, 0)
elif body is not None:
self.headers['Content-Length'] = str(len(body))
# Add content-type if it wasn't explicitly provided.
if (content_type) and (not 'content-type' in self.headers):
self.headers['Content-Type'] = content_type
self.body = body
def prepare_auth(self, auth):
"""Prepares the given HTTP auth data."""
if auth:
if isinstance(auth, tuple) and len(auth) == 2:
# special-case basic HTTP auth
auth = HTTPBasicAuth(*auth)
# Allow auth to make its changes.
r = auth(self)
# Update self to reflect the auth changes.
self.__dict__.update(r.__dict__)
def prepare_cookies(self, cookies):
"""Prepares the given HTTP cookie data."""
if isinstance(cookies, cookielib.CookieJar):
cookies = cookies
else:
cookies = cookiejar_from_dict(cookies)
if 'cookie' not in self.headers:
cookie_header = get_cookie_header(cookies, self)
if cookie_header is not None:
self.headers['Cookie'] = cookie_header
class Response(object):
"""The core :class:`Response <Response>` object. All
:class:`Request <Request>` objects contain a
:class:`response <Response>` attribute, which is an instance
of this class.
"""
def __init__(self):
super(Response, self).__init__()
self._content = False
self._content_consumed = False
#: Integer Code of responded HTTP Status.
self.status_code = None
#: Case-insensitive Dictionary of Response Headers.
#: For example, ``headers['content-encoding']`` will return the
#: value of a ``'Content-Encoding'`` response header.
self.headers = CaseInsensitiveDict()
#: File-like object representation of response (for advanced usage).
#: Requires that ``stream=True` on the request.
# This requirement does not apply for use internally to Requests.
self.raw = None
#: Final URL location of Response.
self.url = None
#: Encoding to decode with when accessing r.text.
self.encoding = None
#: A list of :class:`Response <Response>` objects from
#: the history of the Request. Any redirect responses will end
#: up here. The list is sorted from the oldest to the most recent request.
self.history = []
self.reason = None
#: A CookieJar of Cookies the server sent back.
self.cookies = cookiejar_from_dict({})
def __repr__(self):
return '<Response [%s]>' % (self.status_code)
def __bool__(self):
"""Returns true if :attr:`status_code` is 'OK'."""
return self.ok
def __nonzero__(self):
"""Returns true if :attr:`status_code` is 'OK'."""
return self.ok
@property
def ok(self):
try:
self.raise_for_status()
except RequestException:
return False
return True
@property
def apparent_encoding(self):
"""The apparent encoding, provided by the lovely Charade library."""
return chardet.detect(self.content)['encoding']
def iter_content(self, chunk_size=1, decode_unicode=False):
"""Iterates over the response data. This avoids reading the content
at once into memory for large responses. The chunk size is the number
of bytes it should read into memory. This is not necessarily the
length of each item returned as decoding can take place.
"""
if self._content_consumed:
# simulate reading small chunks of the content
return iter_slices(self._content, chunk_size)
def generate():
while 1:
chunk = self.raw.read(chunk_size)
if not chunk:
break
yield chunk
self._content_consumed = True
gen = stream_untransfer(generate(), self)
if decode_unicode:
gen = stream_decode_response_unicode(gen, self)
return gen
def iter_lines(self, chunk_size=ITER_CHUNK_SIZE, decode_unicode=None):
"""Iterates over the response data, one line at a time. This
avoids reading the content at once into memory for large
responses.
"""
pending = None
for chunk in self.iter_content(
chunk_size=chunk_size,
decode_unicode=decode_unicode):
if pending is not None:
chunk = pending + chunk
lines = chunk.splitlines()
if lines and lines[-1] and chunk and lines[-1][-1] == chunk[-1]:
pending = lines.pop()
else:
pending = None
for line in lines:
yield line
if pending is not None:
yield pending
@property
def content(self):
"""Content of the response, in bytes."""
if self._content is False:
# Read the contents.
try:
if self._content_consumed:
raise RuntimeError(
'The content for this response was already consumed')
if self.status_code is 0:
self._content = None
else:
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
except AttributeError:
self._content = None
self._content_consumed = True
# don't need to release the connection; that's been handled by urllib3
# since we exhausted the data.
return self._content
@property
def text(self):
"""Content of the response, in unicode.
if Response.encoding is None and chardet module is available, encoding
will be guessed.
"""
# Try charset from content-type
content = None
encoding = self.encoding
if not self.content:
return str('')
# Fallback to auto-detected encoding.
if self.encoding is None:
encoding = self.apparent_encoding
# Decode unicode from given encoding.
try:
content = str(self.content, encoding, errors='replace')
except (LookupError, TypeError):
# A LookupError is raised if the encoding was not found which could
# indicate a misspelling or similar mistake.
#
# A TypeError can be raised if encoding is None
#
# So we try blindly encoding.
content = str(self.content, errors='replace')
return content
def json(self):
"""Returns the json-encoded content of a response, if any."""
if not self.encoding and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using chardet to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
return json.loads(self.content.decode(encoding))
return json.loads(self.text or self.content)
@property
def links(self):
"""Returns the parsed header links of the response, if any."""
header = self.headers['link']
# l = MultiDict()
l = {}
if header:
links = parse_header_links(header)
for link in links:
key = link.get('rel') or link.get('url')
l[key] = link
return l
def raise_for_status(self):
"""Raises stored :class:`HTTPError` or :class:`URLError`, if one occurred."""
http_error_msg = ''
if 400 <= self.status_code < 500:
http_error_msg = '%s Client Error: %s' % (self.status_code, self.reason)
elif 500 <= self.status_code < 600:
http_error_msg = '%s Server Error: %s' % (self.status_code, self.reason)
if http_error_msg:
http_error = HTTPError(http_error_msg)
http_error.response = self
raise http_error
def close(self):
return self.raw.release_conn()

View File

@@ -1,3 +0,0 @@
from __future__ import absolute_import
from . import urllib3

View File

@@ -1,27 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
__version__ = "1.0.1"
def detect(aBuf):
from . import universaldetector
u = universaldetector.UniversalDetector()
u.reset()
u.feed(aBuf)
u.close()
return u.result

View File

@@ -1,925 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
# Big5 frequency table
# by Taiwan's Mandarin Promotion Council
# <http://www.edu.tw:81/mandr/>
#
# 128 --> 0.42261
# 256 --> 0.57851
# 512 --> 0.74851
# 1024 --> 0.89384
# 2048 --> 0.97583
#
# Ideal Distribution Ratio = 0.74851/(1-0.74851) =2.98
# Random Distribution Ration = 512/(5401-512)=0.105
#
# Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR
BIG5_TYPICAL_DISTRIBUTION_RATIO = 0.75
#Char to FreqOrder table
BIG5_TABLE_SIZE = 5376
Big5CharToFreqOrder = (
1,1801,1506, 255,1431, 198, 9, 82, 6,5008, 177, 202,3681,1256,2821, 110, # 16
3814, 33,3274, 261, 76, 44,2114, 16,2946,2187,1176, 659,3971, 26,3451,2653, # 32
1198,3972,3350,4202, 410,2215, 302, 590, 361,1964, 8, 204, 58,4510,5009,1932, # 48
63,5010,5011, 317,1614, 75, 222, 159,4203,2417,1480,5012,3555,3091, 224,2822, # 64
3682, 3, 10,3973,1471, 29,2787,1135,2866,1940, 873, 130,3275,1123, 312,5013, # 80
4511,2052, 507, 252, 682,5014, 142,1915, 124, 206,2947, 34,3556,3204, 64, 604, # 96
5015,2501,1977,1978, 155,1991, 645, 641,1606,5016,3452, 337, 72, 406,5017, 80, # 112
630, 238,3205,1509, 263, 939,1092,2654, 756,1440,1094,3453, 449, 69,2987, 591, # 128
179,2096, 471, 115,2035,1844, 60, 50,2988, 134, 806,1869, 734,2036,3454, 180, # 144
995,1607, 156, 537,2907, 688,5018, 319,1305, 779,2145, 514,2379, 298,4512, 359, # 160
2502, 90,2716,1338, 663, 11, 906,1099,2553, 20,2441, 182, 532,1716,5019, 732, # 176
1376,4204,1311,1420,3206, 25,2317,1056, 113, 399, 382,1950, 242,3455,2474, 529, # 192
3276, 475,1447,3683,5020, 117, 21, 656, 810,1297,2300,2334,3557,5021, 126,4205, # 208
706, 456, 150, 613,4513, 71,1118,2037,4206, 145,3092, 85, 835, 486,2115,1246, # 224
1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,5022,2128,2359, 347,3815, 221, # 240
3558,3135,5023,1956,1153,4207, 83, 296,1199,3093, 192, 624, 93,5024, 822,1898, # 256
2823,3136, 795,2065, 991,1554,1542,1592, 27, 43,2867, 859, 139,1456, 860,4514, # 272
437, 712,3974, 164,2397,3137, 695, 211,3037,2097, 195,3975,1608,3559,3560,3684, # 288
3976, 234, 811,2989,2098,3977,2233,1441,3561,1615,2380, 668,2077,1638, 305, 228, # 304
1664,4515, 467, 415,5025, 262,2099,1593, 239, 108, 300, 200,1033, 512,1247,2078, # 320
5026,5027,2176,3207,3685,2682, 593, 845,1062,3277, 88,1723,2038,3978,1951, 212, # 336
266, 152, 149, 468,1899,4208,4516, 77, 187,5028,3038, 37, 5,2990,5029,3979, # 352
5030,5031, 39,2524,4517,2908,3208,2079, 55, 148, 74,4518, 545, 483,1474,1029, # 368
1665, 217,1870,1531,3138,1104,2655,4209, 24, 172,3562, 900,3980,3563,3564,4519, # 384
32,1408,2824,1312, 329, 487,2360,2251,2717, 784,2683, 4,3039,3351,1427,1789, # 400
188, 109, 499,5032,3686,1717,1790, 888,1217,3040,4520,5033,3565,5034,3352,1520, # 416
3687,3981, 196,1034, 775,5035,5036, 929,1816, 249, 439, 38,5037,1063,5038, 794, # 432
3982,1435,2301, 46, 178,3278,2066,5039,2381,5040, 214,1709,4521, 804, 35, 707, # 448
324,3688,1601,2554, 140, 459,4210,5041,5042,1365, 839, 272, 978,2262,2580,3456, # 464
2129,1363,3689,1423, 697, 100,3094, 48, 70,1231, 495,3139,2196,5043,1294,5044, # 480
2080, 462, 586,1042,3279, 853, 256, 988, 185,2382,3457,1698, 434,1084,5045,3458, # 496
314,2625,2788,4522,2335,2336, 569,2285, 637,1817,2525, 757,1162,1879,1616,3459, # 512
287,1577,2116, 768,4523,1671,2868,3566,2526,1321,3816, 909,2418,5046,4211, 933, # 528
3817,4212,2053,2361,1222,4524, 765,2419,1322, 786,4525,5047,1920,1462,1677,2909, # 544
1699,5048,4526,1424,2442,3140,3690,2600,3353,1775,1941,3460,3983,4213, 309,1369, # 560
1130,2825, 364,2234,1653,1299,3984,3567,3985,3986,2656, 525,1085,3041, 902,2001, # 576
1475, 964,4527, 421,1845,1415,1057,2286, 940,1364,3141, 376,4528,4529,1381, 7, # 592
2527, 983,2383, 336,1710,2684,1846, 321,3461, 559,1131,3042,2752,1809,1132,1313, # 608
265,1481,1858,5049, 352,1203,2826,3280, 167,1089, 420,2827, 776, 792,1724,3568, # 624
4214,2443,3281,5050,4215,5051, 446, 229, 333,2753, 901,3818,1200,1557,4530,2657, # 640
1921, 395,2754,2685,3819,4216,1836, 125, 916,3209,2626,4531,5052,5053,3820,5054, # 656
5055,5056,4532,3142,3691,1133,2555,1757,3462,1510,2318,1409,3569,5057,2146, 438, # 672
2601,2910,2384,3354,1068, 958,3043, 461, 311,2869,2686,4217,1916,3210,4218,1979, # 688
383, 750,2755,2627,4219, 274, 539, 385,1278,1442,5058,1154,1965, 384, 561, 210, # 704
98,1295,2556,3570,5059,1711,2420,1482,3463,3987,2911,1257, 129,5060,3821, 642, # 720
523,2789,2790,2658,5061, 141,2235,1333, 68, 176, 441, 876, 907,4220, 603,2602, # 736
710, 171,3464, 404, 549, 18,3143,2398,1410,3692,1666,5062,3571,4533,2912,4534, # 752
5063,2991, 368,5064, 146, 366, 99, 871,3693,1543, 748, 807,1586,1185, 22,2263, # 768
379,3822,3211,5065,3212, 505,1942,2628,1992,1382,2319,5066, 380,2362, 218, 702, # 784
1818,1248,3465,3044,3572,3355,3282,5067,2992,3694, 930,3283,3823,5068, 59,5069, # 800
585, 601,4221, 497,3466,1112,1314,4535,1802,5070,1223,1472,2177,5071, 749,1837, # 816
690,1900,3824,1773,3988,1476, 429,1043,1791,2236,2117, 917,4222, 447,1086,1629, # 832
5072, 556,5073,5074,2021,1654, 844,1090, 105, 550, 966,1758,2828,1008,1783, 686, # 848
1095,5075,2287, 793,1602,5076,3573,2603,4536,4223,2948,2302,4537,3825, 980,2503, # 864
544, 353, 527,4538, 908,2687,2913,5077, 381,2629,1943,1348,5078,1341,1252, 560, # 880
3095,5079,3467,2870,5080,2054, 973, 886,2081, 143,4539,5081,5082, 157,3989, 496, # 896
4224, 57, 840, 540,2039,4540,4541,3468,2118,1445, 970,2264,1748,1966,2082,4225, # 912
3144,1234,1776,3284,2829,3695, 773,1206,2130,1066,2040,1326,3990,1738,1725,4226, # 928
279,3145, 51,1544,2604, 423,1578,2131,2067, 173,4542,1880,5083,5084,1583, 264, # 944
610,3696,4543,2444, 280, 154,5085,5086,5087,1739, 338,1282,3096, 693,2871,1411, # 960
1074,3826,2445,5088,4544,5089,5090,1240, 952,2399,5091,2914,1538,2688, 685,1483, # 976
4227,2475,1436, 953,4228,2055,4545, 671,2400, 79,4229,2446,3285, 608, 567,2689, # 992
3469,4230,4231,1691, 393,1261,1792,2401,5092,4546,5093,5094,5095,5096,1383,1672, # 1008
3827,3213,1464, 522,1119, 661,1150, 216, 675,4547,3991,1432,3574, 609,4548,2690, # 1024
2402,5097,5098,5099,4232,3045, 0,5100,2476, 315, 231,2447, 301,3356,4549,2385, # 1040
5101, 233,4233,3697,1819,4550,4551,5102, 96,1777,1315,2083,5103, 257,5104,1810, # 1056
3698,2718,1139,1820,4234,2022,1124,2164,2791,1778,2659,5105,3097, 363,1655,3214, # 1072
5106,2993,5107,5108,5109,3992,1567,3993, 718, 103,3215, 849,1443, 341,3357,2949, # 1088
1484,5110,1712, 127, 67, 339,4235,2403, 679,1412, 821,5111,5112, 834, 738, 351, # 1104
2994,2147, 846, 235,1497,1881, 418,1993,3828,2719, 186,1100,2148,2756,3575,1545, # 1120
1355,2950,2872,1377, 583,3994,4236,2581,2995,5113,1298,3699,1078,2557,3700,2363, # 1136
78,3829,3830, 267,1289,2100,2002,1594,4237, 348, 369,1274,2197,2178,1838,4552, # 1152
1821,2830,3701,2757,2288,2003,4553,2951,2758, 144,3358, 882,4554,3995,2759,3470, # 1168
4555,2915,5114,4238,1726, 320,5115,3996,3046, 788,2996,5116,2831,1774,1327,2873, # 1184
3997,2832,5117,1306,4556,2004,1700,3831,3576,2364,2660, 787,2023, 506, 824,3702, # 1200
534, 323,4557,1044,3359,2024,1901, 946,3471,5118,1779,1500,1678,5119,1882,4558, # 1216
165, 243,4559,3703,2528, 123, 683,4239, 764,4560, 36,3998,1793, 589,2916, 816, # 1232
626,1667,3047,2237,1639,1555,1622,3832,3999,5120,4000,2874,1370,1228,1933, 891, # 1248
2084,2917, 304,4240,5121, 292,2997,2720,3577, 691,2101,4241,1115,4561, 118, 662, # 1264
5122, 611,1156, 854,2386,1316,2875, 2, 386, 515,2918,5123,5124,3286, 868,2238, # 1280
1486, 855,2661, 785,2216,3048,5125,1040,3216,3578,5126,3146, 448,5127,1525,5128, # 1296
2165,4562,5129,3833,5130,4242,2833,3579,3147, 503, 818,4001,3148,1568, 814, 676, # 1312
1444, 306,1749,5131,3834,1416,1030, 197,1428, 805,2834,1501,4563,5132,5133,5134, # 1328
1994,5135,4564,5136,5137,2198, 13,2792,3704,2998,3149,1229,1917,5138,3835,2132, # 1344
5139,4243,4565,2404,3580,5140,2217,1511,1727,1120,5141,5142, 646,3836,2448, 307, # 1360
5143,5144,1595,3217,5145,5146,5147,3705,1113,1356,4002,1465,2529,2530,5148, 519, # 1376
5149, 128,2133, 92,2289,1980,5150,4003,1512, 342,3150,2199,5151,2793,2218,1981, # 1392
3360,4244, 290,1656,1317, 789, 827,2365,5152,3837,4566, 562, 581,4004,5153, 401, # 1408
4567,2252, 94,4568,5154,1399,2794,5155,1463,2025,4569,3218,1944,5156, 828,1105, # 1424
4245,1262,1394,5157,4246, 605,4570,5158,1784,2876,5159,2835, 819,2102, 578,2200, # 1440
2952,5160,1502, 436,3287,4247,3288,2836,4005,2919,3472,3473,5161,2721,2320,5162, # 1456
5163,2337,2068, 23,4571, 193, 826,3838,2103, 699,1630,4248,3098, 390,1794,1064, # 1472
3581,5164,1579,3099,3100,1400,5165,4249,1839,1640,2877,5166,4572,4573, 137,4250, # 1488
598,3101,1967, 780, 104, 974,2953,5167, 278, 899, 253, 402, 572, 504, 493,1339, # 1504
5168,4006,1275,4574,2582,2558,5169,3706,3049,3102,2253, 565,1334,2722, 863, 41, # 1520
5170,5171,4575,5172,1657,2338, 19, 463,2760,4251, 606,5173,2999,3289,1087,2085, # 1536
1323,2662,3000,5174,1631,1623,1750,4252,2691,5175,2878, 791,2723,2663,2339, 232, # 1552
2421,5176,3001,1498,5177,2664,2630, 755,1366,3707,3290,3151,2026,1609, 119,1918, # 1568
3474, 862,1026,4253,5178,4007,3839,4576,4008,4577,2265,1952,2477,5179,1125, 817, # 1584
4254,4255,4009,1513,1766,2041,1487,4256,3050,3291,2837,3840,3152,5180,5181,1507, # 1600
5182,2692, 733, 40,1632,1106,2879, 345,4257, 841,2531, 230,4578,3002,1847,3292, # 1616
3475,5183,1263, 986,3476,5184, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562, # 1632
4010,4011,2954, 967,2761,2665,1349, 592,2134,1692,3361,3003,1995,4258,1679,4012, # 1648
1902,2188,5185, 739,3708,2724,1296,1290,5186,4259,2201,2202,1922,1563,2605,2559, # 1664
1871,2762,3004,5187, 435,5188, 343,1108, 596, 17,1751,4579,2239,3477,3709,5189, # 1680
4580, 294,3582,2955,1693, 477, 979, 281,2042,3583, 643,2043,3710,2631,2795,2266, # 1696
1031,2340,2135,2303,3584,4581, 367,1249,2560,5190,3585,5191,4582,1283,3362,2005, # 1712
240,1762,3363,4583,4584, 836,1069,3153, 474,5192,2149,2532, 268,3586,5193,3219, # 1728
1521,1284,5194,1658,1546,4260,5195,3587,3588,5196,4261,3364,2693,1685,4262, 961, # 1744
1673,2632, 190,2006,2203,3841,4585,4586,5197, 570,2504,3711,1490,5198,4587,2633, # 1760
3293,1957,4588, 584,1514, 396,1045,1945,5199,4589,1968,2449,5200,5201,4590,4013, # 1776
619,5202,3154,3294, 215,2007,2796,2561,3220,4591,3221,4592, 763,4263,3842,4593, # 1792
5203,5204,1958,1767,2956,3365,3712,1174, 452,1477,4594,3366,3155,5205,2838,1253, # 1808
2387,2189,1091,2290,4264, 492,5206, 638,1169,1825,2136,1752,4014, 648, 926,1021, # 1824
1324,4595, 520,4596, 997, 847,1007, 892,4597,3843,2267,1872,3713,2405,1785,4598, # 1840
1953,2957,3103,3222,1728,4265,2044,3714,4599,2008,1701,3156,1551, 30,2268,4266, # 1856
5207,2027,4600,3589,5208, 501,5209,4267, 594,3478,2166,1822,3590,3479,3591,3223, # 1872
829,2839,4268,5210,1680,3157,1225,4269,5211,3295,4601,4270,3158,2341,5212,4602, # 1888
4271,5213,4015,4016,5214,1848,2388,2606,3367,5215,4603, 374,4017, 652,4272,4273, # 1904
375,1140, 798,5216,5217,5218,2366,4604,2269, 546,1659, 138,3051,2450,4605,5219, # 1920
2254, 612,1849, 910, 796,3844,1740,1371, 825,3845,3846,5220,2920,2562,5221, 692, # 1936
444,3052,2634, 801,4606,4274,5222,1491, 244,1053,3053,4275,4276, 340,5223,4018, # 1952
1041,3005, 293,1168, 87,1357,5224,1539, 959,5225,2240, 721, 694,4277,3847, 219, # 1968
1478, 644,1417,3368,2666,1413,1401,1335,1389,4019,5226,5227,3006,2367,3159,1826, # 1984
730,1515, 184,2840, 66,4607,5228,1660,2958, 246,3369, 378,1457, 226,3480, 975, # 2000
4020,2959,1264,3592, 674, 696,5229, 163,5230,1141,2422,2167, 713,3593,3370,4608, # 2016
4021,5231,5232,1186, 15,5233,1079,1070,5234,1522,3224,3594, 276,1050,2725, 758, # 2032
1126, 653,2960,3296,5235,2342, 889,3595,4022,3104,3007, 903,1250,4609,4023,3481, # 2048
3596,1342,1681,1718, 766,3297, 286, 89,2961,3715,5236,1713,5237,2607,3371,3008, # 2064
5238,2962,2219,3225,2880,5239,4610,2505,2533, 181, 387,1075,4024, 731,2190,3372, # 2080
5240,3298, 310, 313,3482,2304, 770,4278, 54,3054, 189,4611,3105,3848,4025,5241, # 2096
1230,1617,1850, 355,3597,4279,4612,3373, 111,4280,3716,1350,3160,3483,3055,4281, # 2112
2150,3299,3598,5242,2797,4026,4027,3009, 722,2009,5243,1071, 247,1207,2343,2478, # 2128
1378,4613,2010, 864,1437,1214,4614, 373,3849,1142,2220, 667,4615, 442,2763,2563, # 2144
3850,4028,1969,4282,3300,1840, 837, 170,1107, 934,1336,1883,5244,5245,2119,4283, # 2160
2841, 743,1569,5246,4616,4284, 582,2389,1418,3484,5247,1803,5248, 357,1395,1729, # 2176
3717,3301,2423,1564,2241,5249,3106,3851,1633,4617,1114,2086,4285,1532,5250, 482, # 2192
2451,4618,5251,5252,1492, 833,1466,5253,2726,3599,1641,2842,5254,1526,1272,3718, # 2208
4286,1686,1795, 416,2564,1903,1954,1804,5255,3852,2798,3853,1159,2321,5256,2881, # 2224
4619,1610,1584,3056,2424,2764, 443,3302,1163,3161,5257,5258,4029,5259,4287,2506, # 2240
3057,4620,4030,3162,2104,1647,3600,2011,1873,4288,5260,4289, 431,3485,5261, 250, # 2256
97, 81,4290,5262,1648,1851,1558, 160, 848,5263, 866, 740,1694,5264,2204,2843, # 2272
3226,4291,4621,3719,1687, 950,2479, 426, 469,3227,3720,3721,4031,5265,5266,1188, # 2288
424,1996, 861,3601,4292,3854,2205,2694, 168,1235,3602,4293,5267,2087,1674,4622, # 2304
3374,3303, 220,2565,1009,5268,3855, 670,3010, 332,1208, 717,5269,5270,3603,2452, # 2320
4032,3375,5271, 513,5272,1209,2882,3376,3163,4623,1080,5273,5274,5275,5276,2534, # 2336
3722,3604, 815,1587,4033,4034,5277,3605,3486,3856,1254,4624,1328,3058,1390,4035, # 2352
1741,4036,3857,4037,5278, 236,3858,2453,3304,5279,5280,3723,3859,1273,3860,4625, # 2368
5281, 308,5282,4626, 245,4627,1852,2480,1307,2583, 430, 715,2137,2454,5283, 270, # 2384
199,2883,4038,5284,3606,2727,1753, 761,1754, 725,1661,1841,4628,3487,3724,5285, # 2400
5286, 587, 14,3305, 227,2608, 326, 480,2270, 943,2765,3607, 291, 650,1884,5287, # 2416
1702,1226, 102,1547, 62,3488, 904,4629,3489,1164,4294,5288,5289,1224,1548,2766, # 2432
391, 498,1493,5290,1386,1419,5291,2056,1177,4630, 813, 880,1081,2368, 566,1145, # 2448
4631,2291,1001,1035,2566,2609,2242, 394,1286,5292,5293,2069,5294, 86,1494,1730, # 2464
4039, 491,1588, 745, 897,2963, 843,3377,4040,2767,2884,3306,1768, 998,2221,2070, # 2480
397,1827,1195,1970,3725,3011,3378, 284,5295,3861,2507,2138,2120,1904,5296,4041, # 2496
2151,4042,4295,1036,3490,1905, 114,2567,4296, 209,1527,5297,5298,2964,2844,2635, # 2512
2390,2728,3164, 812,2568,5299,3307,5300,1559, 737,1885,3726,1210, 885, 28,2695, # 2528
3608,3862,5301,4297,1004,1780,4632,5302, 346,1982,2222,2696,4633,3863,1742, 797, # 2544
1642,4043,1934,1072,1384,2152, 896,4044,3308,3727,3228,2885,3609,5303,2569,1959, # 2560
4634,2455,1786,5304,5305,5306,4045,4298,1005,1308,3728,4299,2729,4635,4636,1528, # 2576
2610, 161,1178,4300,1983, 987,4637,1101,4301, 631,4046,1157,3229,2425,1343,1241, # 2592
1016,2243,2570, 372, 877,2344,2508,1160, 555,1935, 911,4047,5307, 466,1170, 169, # 2608
1051,2921,2697,3729,2481,3012,1182,2012,2571,1251,2636,5308, 992,2345,3491,1540, # 2624
2730,1201,2071,2406,1997,2482,5309,4638, 528,1923,2191,1503,1874,1570,2369,3379, # 2640
3309,5310, 557,1073,5311,1828,3492,2088,2271,3165,3059,3107, 767,3108,2799,4639, # 2656
1006,4302,4640,2346,1267,2179,3730,3230, 778,4048,3231,2731,1597,2667,5312,4641, # 2672
5313,3493,5314,5315,5316,3310,2698,1433,3311, 131, 95,1504,4049, 723,4303,3166, # 2688
1842,3610,2768,2192,4050,2028,2105,3731,5317,3013,4051,1218,5318,3380,3232,4052, # 2704
4304,2584, 248,1634,3864, 912,5319,2845,3732,3060,3865, 654, 53,5320,3014,5321, # 2720
1688,4642, 777,3494,1032,4053,1425,5322, 191, 820,2121,2846, 971,4643, 931,3233, # 2736
135, 664, 783,3866,1998, 772,2922,1936,4054,3867,4644,2923,3234, 282,2732, 640, # 2752
1372,3495,1127, 922, 325,3381,5323,5324, 711,2045,5325,5326,4055,2223,2800,1937, # 2768
4056,3382,2224,2255,3868,2305,5327,4645,3869,1258,3312,4057,3235,2139,2965,4058, # 2784
4059,5328,2225, 258,3236,4646, 101,1227,5329,3313,1755,5330,1391,3314,5331,2924, # 2800
2057, 893,5332,5333,5334,1402,4305,2347,5335,5336,3237,3611,5337,5338, 878,1325, # 2816
1781,2801,4647, 259,1385,2585, 744,1183,2272,4648,5339,4060,2509,5340, 684,1024, # 2832
4306,5341, 472,3612,3496,1165,3315,4061,4062, 322,2153, 881, 455,1695,1152,1340, # 2848
660, 554,2154,4649,1058,4650,4307, 830,1065,3383,4063,4651,1924,5342,1703,1919, # 2864
5343, 932,2273, 122,5344,4652, 947, 677,5345,3870,2637, 297,1906,1925,2274,4653, # 2880
2322,3316,5346,5347,4308,5348,4309, 84,4310, 112, 989,5349, 547,1059,4064, 701, # 2896
3613,1019,5350,4311,5351,3497, 942, 639, 457,2306,2456, 993,2966, 407, 851, 494, # 2912
4654,3384, 927,5352,1237,5353,2426,3385, 573,4312, 680, 921,2925,1279,1875, 285, # 2928
790,1448,1984, 719,2168,5354,5355,4655,4065,4066,1649,5356,1541, 563,5357,1077, # 2944
5358,3386,3061,3498, 511,3015,4067,4068,3733,4069,1268,2572,3387,3238,4656,4657, # 2960
5359, 535,1048,1276,1189,2926,2029,3167,1438,1373,2847,2967,1134,2013,5360,4313, # 2976
1238,2586,3109,1259,5361, 700,5362,2968,3168,3734,4314,5363,4315,1146,1876,1907, # 2992
4658,2611,4070, 781,2427, 132,1589, 203, 147, 273,2802,2407, 898,1787,2155,4071, # 3008
4072,5364,3871,2803,5365,5366,4659,4660,5367,3239,5368,1635,3872, 965,5369,1805, # 3024
2699,1516,3614,1121,1082,1329,3317,4073,1449,3873, 65,1128,2848,2927,2769,1590, # 3040
3874,5370,5371, 12,2668, 45, 976,2587,3169,4661, 517,2535,1013,1037,3240,5372, # 3056
3875,2849,5373,3876,5374,3499,5375,2612, 614,1999,2323,3877,3110,2733,2638,5376, # 3072
2588,4316, 599,1269,5377,1811,3735,5378,2700,3111, 759,1060, 489,1806,3388,3318, # 3088
1358,5379,5380,2391,1387,1215,2639,2256, 490,5381,5382,4317,1759,2392,2348,5383, # 3104
4662,3878,1908,4074,2640,1807,3241,4663,3500,3319,2770,2349, 874,5384,5385,3501, # 3120
3736,1859, 91,2928,3737,3062,3879,4664,5386,3170,4075,2669,5387,3502,1202,1403, # 3136
3880,2969,2536,1517,2510,4665,3503,2511,5388,4666,5389,2701,1886,1495,1731,4076, # 3152
2370,4667,5390,2030,5391,5392,4077,2702,1216, 237,2589,4318,2324,4078,3881,4668, # 3168
4669,2703,3615,3504, 445,4670,5393,5394,5395,5396,2771, 61,4079,3738,1823,4080, # 3184
5397, 687,2046, 935, 925, 405,2670, 703,1096,1860,2734,4671,4081,1877,1367,2704, # 3200
3389, 918,2106,1782,2483, 334,3320,1611,1093,4672, 564,3171,3505,3739,3390, 945, # 3216
2641,2058,4673,5398,1926, 872,4319,5399,3506,2705,3112, 349,4320,3740,4082,4674, # 3232
3882,4321,3741,2156,4083,4675,4676,4322,4677,2408,2047, 782,4084, 400, 251,4323, # 3248
1624,5400,5401, 277,3742, 299,1265, 476,1191,3883,2122,4324,4325,1109, 205,5402, # 3264
2590,1000,2157,3616,1861,5403,5404,5405,4678,5406,4679,2573, 107,2484,2158,4085, # 3280
3507,3172,5407,1533, 541,1301, 158, 753,4326,2886,3617,5408,1696, 370,1088,4327, # 3296
4680,3618, 579, 327, 440, 162,2244, 269,1938,1374,3508, 968,3063, 56,1396,3113, # 3312
2107,3321,3391,5409,1927,2159,4681,3016,5410,3619,5411,5412,3743,4682,2485,5413, # 3328
2804,5414,1650,4683,5415,2613,5416,5417,4086,2671,3392,1149,3393,4087,3884,4088, # 3344
5418,1076, 49,5419, 951,3242,3322,3323, 450,2850, 920,5420,1812,2805,2371,4328, # 3360
1909,1138,2372,3885,3509,5421,3243,4684,1910,1147,1518,2428,4685,3886,5422,4686, # 3376
2393,2614, 260,1796,3244,5423,5424,3887,3324, 708,5425,3620,1704,5426,3621,1351, # 3392
1618,3394,3017,1887, 944,4329,3395,4330,3064,3396,4331,5427,3744, 422, 413,1714, # 3408
3325, 500,2059,2350,4332,2486,5428,1344,1911, 954,5429,1668,5430,5431,4089,2409, # 3424
4333,3622,3888,4334,5432,2307,1318,2512,3114, 133,3115,2887,4687, 629, 31,2851, # 3440
2706,3889,4688, 850, 949,4689,4090,2970,1732,2089,4335,1496,1853,5433,4091, 620, # 3456
3245, 981,1242,3745,3397,1619,3746,1643,3326,2140,2457,1971,1719,3510,2169,5434, # 3472
3246,5435,5436,3398,1829,5437,1277,4690,1565,2048,5438,1636,3623,3116,5439, 869, # 3488
2852, 655,3890,3891,3117,4092,3018,3892,1310,3624,4691,5440,5441,5442,1733, 558, # 3504
4692,3747, 335,1549,3065,1756,4336,3748,1946,3511,1830,1291,1192, 470,2735,2108, # 3520
2806, 913,1054,4093,5443,1027,5444,3066,4094,4693, 982,2672,3399,3173,3512,3247, # 3536
3248,1947,2807,5445, 571,4694,5446,1831,5447,3625,2591,1523,2429,5448,2090, 984, # 3552
4695,3749,1960,5449,3750, 852, 923,2808,3513,3751, 969,1519, 999,2049,2325,1705, # 3568
5450,3118, 615,1662, 151, 597,4095,2410,2326,1049, 275,4696,3752,4337, 568,3753, # 3584
3626,2487,4338,3754,5451,2430,2275, 409,3249,5452,1566,2888,3514,1002, 769,2853, # 3600
194,2091,3174,3755,2226,3327,4339, 628,1505,5453,5454,1763,2180,3019,4096, 521, # 3616
1161,2592,1788,2206,2411,4697,4097,1625,4340,4341, 412, 42,3119, 464,5455,2642, # 3632
4698,3400,1760,1571,2889,3515,2537,1219,2207,3893,2643,2141,2373,4699,4700,3328, # 3648
1651,3401,3627,5456,5457,3628,2488,3516,5458,3756,5459,5460,2276,2092, 460,5461, # 3664
4701,5462,3020, 962, 588,3629, 289,3250,2644,1116, 52,5463,3067,1797,5464,5465, # 3680
5466,1467,5467,1598,1143,3757,4342,1985,1734,1067,4702,1280,3402, 465,4703,1572, # 3696
510,5468,1928,2245,1813,1644,3630,5469,4704,3758,5470,5471,2673,1573,1534,5472, # 3712
5473, 536,1808,1761,3517,3894,3175,2645,5474,5475,5476,4705,3518,2929,1912,2809, # 3728
5477,3329,1122, 377,3251,5478, 360,5479,5480,4343,1529, 551,5481,2060,3759,1769, # 3744
2431,5482,2930,4344,3330,3120,2327,2109,2031,4706,1404, 136,1468,1479, 672,1171, # 3760
3252,2308, 271,3176,5483,2772,5484,2050, 678,2736, 865,1948,4707,5485,2014,4098, # 3776
2971,5486,2737,2227,1397,3068,3760,4708,4709,1735,2931,3403,3631,5487,3895, 509, # 3792
2854,2458,2890,3896,5488,5489,3177,3178,4710,4345,2538,4711,2309,1166,1010, 552, # 3808
681,1888,5490,5491,2972,2973,4099,1287,1596,1862,3179, 358, 453, 736, 175, 478, # 3824
1117, 905,1167,1097,5492,1854,1530,5493,1706,5494,2181,3519,2292,3761,3520,3632, # 3840
4346,2093,4347,5495,3404,1193,2489,4348,1458,2193,2208,1863,1889,1421,3331,2932, # 3856
3069,2182,3521, 595,2123,5496,4100,5497,5498,4349,1707,2646, 223,3762,1359, 751, # 3872
3121, 183,3522,5499,2810,3021, 419,2374, 633, 704,3897,2394, 241,5500,5501,5502, # 3888
838,3022,3763,2277,2773,2459,3898,1939,2051,4101,1309,3122,2246,1181,5503,1136, # 3904
2209,3899,2375,1446,4350,2310,4712,5504,5505,4351,1055,2615, 484,3764,5506,4102, # 3920
625,4352,2278,3405,1499,4353,4103,5507,4104,4354,3253,2279,2280,3523,5508,5509, # 3936
2774, 808,2616,3765,3406,4105,4355,3123,2539, 526,3407,3900,4356, 955,5510,1620, # 3952
4357,2647,2432,5511,1429,3766,1669,1832, 994, 928,5512,3633,1260,5513,5514,5515, # 3968
1949,2293, 741,2933,1626,4358,2738,2460, 867,1184, 362,3408,1392,5516,5517,4106, # 3984
4359,1770,1736,3254,2934,4713,4714,1929,2707,1459,1158,5518,3070,3409,2891,1292, # 4000
1930,2513,2855,3767,1986,1187,2072,2015,2617,4360,5519,2574,2514,2170,3768,2490, # 4016
3332,5520,3769,4715,5521,5522, 666,1003,3023,1022,3634,4361,5523,4716,1814,2257, # 4032
574,3901,1603, 295,1535, 705,3902,4362, 283, 858, 417,5524,5525,3255,4717,4718, # 4048
3071,1220,1890,1046,2281,2461,4107,1393,1599, 689,2575, 388,4363,5526,2491, 802, # 4064
5527,2811,3903,2061,1405,2258,5528,4719,3904,2110,1052,1345,3256,1585,5529, 809, # 4080
5530,5531,5532, 575,2739,3524, 956,1552,1469,1144,2328,5533,2329,1560,2462,3635, # 4096
3257,4108, 616,2210,4364,3180,2183,2294,5534,1833,5535,3525,4720,5536,1319,3770, # 4112
3771,1211,3636,1023,3258,1293,2812,5537,5538,5539,3905, 607,2311,3906, 762,2892, # 4128
1439,4365,1360,4721,1485,3072,5540,4722,1038,4366,1450,2062,2648,4367,1379,4723, # 4144
2593,5541,5542,4368,1352,1414,2330,2935,1172,5543,5544,3907,3908,4724,1798,1451, # 4160
5545,5546,5547,5548,2936,4109,4110,2492,2351, 411,4111,4112,3637,3333,3124,4725, # 4176
1561,2674,1452,4113,1375,5549,5550, 47,2974, 316,5551,1406,1591,2937,3181,5552, # 4192
1025,2142,3125,3182, 354,2740, 884,2228,4369,2412, 508,3772, 726,3638, 996,2433, # 4208
3639, 729,5553, 392,2194,1453,4114,4726,3773,5554,5555,2463,3640,2618,1675,2813, # 4224
919,2352,2975,2353,1270,4727,4115, 73,5556,5557, 647,5558,3259,2856,2259,1550, # 4240
1346,3024,5559,1332, 883,3526,5560,5561,5562,5563,3334,2775,5564,1212, 831,1347, # 4256
4370,4728,2331,3909,1864,3073, 720,3910,4729,4730,3911,5565,4371,5566,5567,4731, # 4272
5568,5569,1799,4732,3774,2619,4733,3641,1645,2376,4734,5570,2938, 669,2211,2675, # 4288
2434,5571,2893,5572,5573,1028,3260,5574,4372,2413,5575,2260,1353,5576,5577,4735, # 4304
3183, 518,5578,4116,5579,4373,1961,5580,2143,4374,5581,5582,3025,2354,2355,3912, # 4320
516,1834,1454,4117,2708,4375,4736,2229,2620,1972,1129,3642,5583,2776,5584,2976, # 4336
1422, 577,1470,3026,1524,3410,5585,5586, 432,4376,3074,3527,5587,2594,1455,2515, # 4352
2230,1973,1175,5588,1020,2741,4118,3528,4737,5589,2742,5590,1743,1361,3075,3529, # 4368
2649,4119,4377,4738,2295, 895, 924,4378,2171, 331,2247,3076, 166,1627,3077,1098, # 4384
5591,1232,2894,2231,3411,4739, 657, 403,1196,2377, 542,3775,3412,1600,4379,3530, # 4400
5592,4740,2777,3261, 576, 530,1362,4741,4742,2540,2676,3776,4120,5593, 842,3913, # 4416
5594,2814,2032,1014,4121, 213,2709,3413, 665, 621,4380,5595,3777,2939,2435,5596, # 4432
2436,3335,3643,3414,4743,4381,2541,4382,4744,3644,1682,4383,3531,1380,5597, 724, # 4448
2282, 600,1670,5598,1337,1233,4745,3126,2248,5599,1621,4746,5600, 651,4384,5601, # 4464
1612,4385,2621,5602,2857,5603,2743,2312,3078,5604, 716,2464,3079, 174,1255,2710, # 4480
4122,3645, 548,1320,1398, 728,4123,1574,5605,1891,1197,3080,4124,5606,3081,3082, # 4496
3778,3646,3779, 747,5607, 635,4386,4747,5608,5609,5610,4387,5611,5612,4748,5613, # 4512
3415,4749,2437, 451,5614,3780,2542,2073,4388,2744,4389,4125,5615,1764,4750,5616, # 4528
4390, 350,4751,2283,2395,2493,5617,4391,4126,2249,1434,4127, 488,4752, 458,4392, # 4544
4128,3781, 771,1330,2396,3914,2576,3184,2160,2414,1553,2677,3185,4393,5618,2494, # 4560
2895,2622,1720,2711,4394,3416,4753,5619,2543,4395,5620,3262,4396,2778,5621,2016, # 4576
2745,5622,1155,1017,3782,3915,5623,3336,2313, 201,1865,4397,1430,5624,4129,5625, # 4592
5626,5627,5628,5629,4398,1604,5630, 414,1866, 371,2595,4754,4755,3532,2017,3127, # 4608
4756,1708, 960,4399, 887, 389,2172,1536,1663,1721,5631,2232,4130,2356,2940,1580, # 4624
5632,5633,1744,4757,2544,4758,4759,5634,4760,5635,2074,5636,4761,3647,3417,2896, # 4640
4400,5637,4401,2650,3418,2815, 673,2712,2465, 709,3533,4131,3648,4402,5638,1148, # 4656
502, 634,5639,5640,1204,4762,3649,1575,4763,2623,3783,5641,3784,3128, 948,3263, # 4672
121,1745,3916,1110,5642,4403,3083,2516,3027,4132,3785,1151,1771,3917,1488,4133, # 4688
1987,5643,2438,3534,5644,5645,2094,5646,4404,3918,1213,1407,2816, 531,2746,2545, # 4704
3264,1011,1537,4764,2779,4405,3129,1061,5647,3786,3787,1867,2897,5648,2018, 120, # 4720
4406,4407,2063,3650,3265,2314,3919,2678,3419,1955,4765,4134,5649,3535,1047,2713, # 4736
1266,5650,1368,4766,2858, 649,3420,3920,2546,2747,1102,2859,2679,5651,5652,2000, # 4752
5653,1111,3651,2977,5654,2495,3921,3652,2817,1855,3421,3788,5655,5656,3422,2415, # 4768
2898,3337,3266,3653,5657,2577,5658,3654,2818,4135,1460, 856,5659,3655,5660,2899, # 4784
2978,5661,2900,3922,5662,4408, 632,2517, 875,3923,1697,3924,2296,5663,5664,4767, # 4800
3028,1239, 580,4768,4409,5665, 914, 936,2075,1190,4136,1039,2124,5666,5667,5668, # 4816
5669,3423,1473,5670,1354,4410,3925,4769,2173,3084,4137, 915,3338,4411,4412,3339, # 4832
1605,1835,5671,2748, 398,3656,4413,3926,4138, 328,1913,2860,4139,3927,1331,4414, # 4848
3029, 937,4415,5672,3657,4140,4141,3424,2161,4770,3425, 524, 742, 538,3085,1012, # 4864
5673,5674,3928,2466,5675, 658,1103, 225,3929,5676,5677,4771,5678,4772,5679,3267, # 4880
1243,5680,4142, 963,2250,4773,5681,2714,3658,3186,5682,5683,2596,2332,5684,4774, # 4896
5685,5686,5687,3536, 957,3426,2547,2033,1931,2941,2467, 870,2019,3659,1746,2780, # 4912
2781,2439,2468,5688,3930,5689,3789,3130,3790,3537,3427,3791,5690,1179,3086,5691, # 4928
3187,2378,4416,3792,2548,3188,3131,2749,4143,5692,3428,1556,2549,2297, 977,2901, # 4944
2034,4144,1205,3429,5693,1765,3430,3189,2125,1271, 714,1689,4775,3538,5694,2333, # 4960
3931, 533,4417,3660,2184, 617,5695,2469,3340,3539,2315,5696,5697,3190,5698,5699, # 4976
3932,1988, 618, 427,2651,3540,3431,5700,5701,1244,1690,5702,2819,4418,4776,5703, # 4992
3541,4777,5704,2284,1576, 473,3661,4419,3432, 972,5705,3662,5706,3087,5707,5708, # 5008
4778,4779,5709,3793,4145,4146,5710, 153,4780, 356,5711,1892,2902,4420,2144, 408, # 5024
803,2357,5712,3933,5713,4421,1646,2578,2518,4781,4782,3934,5714,3935,4422,5715, # 5040
2416,3433, 752,5716,5717,1962,3341,2979,5718, 746,3030,2470,4783,4423,3794, 698, # 5056
4784,1893,4424,3663,2550,4785,3664,3936,5719,3191,3434,5720,1824,1302,4147,2715, # 5072
3937,1974,4425,5721,4426,3192, 823,1303,1288,1236,2861,3542,4148,3435, 774,3938, # 5088
5722,1581,4786,1304,2862,3939,4787,5723,2440,2162,1083,3268,4427,4149,4428, 344, # 5104
1173, 288,2316, 454,1683,5724,5725,1461,4788,4150,2597,5726,5727,4789, 985, 894, # 5120
5728,3436,3193,5729,1914,2942,3795,1989,5730,2111,1975,5731,4151,5732,2579,1194, # 5136
425,5733,4790,3194,1245,3796,4429,5734,5735,2863,5736, 636,4791,1856,3940, 760, # 5152
1800,5737,4430,2212,1508,4792,4152,1894,1684,2298,5738,5739,4793,4431,4432,2213, # 5168
479,5740,5741, 832,5742,4153,2496,5743,2980,2497,3797, 990,3132, 627,1815,2652, # 5184
4433,1582,4434,2126,2112,3543,4794,5744, 799,4435,3195,5745,4795,2113,1737,3031, # 5200
1018, 543, 754,4436,3342,1676,4796,4797,4154,4798,1489,5746,3544,5747,2624,2903, # 5216
4155,5748,5749,2981,5750,5751,5752,5753,3196,4799,4800,2185,1722,5754,3269,3270, # 5232
1843,3665,1715, 481, 365,1976,1857,5755,5756,1963,2498,4801,5757,2127,3666,3271, # 5248
433,1895,2064,2076,5758, 602,2750,5759,5760,5761,5762,5763,3032,1628,3437,5764, # 5264
3197,4802,4156,2904,4803,2519,5765,2551,2782,5766,5767,5768,3343,4804,2905,5769, # 5280
4805,5770,2864,4806,4807,1221,2982,4157,2520,5771,5772,5773,1868,1990,5774,5775, # 5296
5776,1896,5777,5778,4808,1897,4158, 318,5779,2095,4159,4437,5780,5781, 485,5782, # 5312
938,3941, 553,2680, 116,5783,3942,3667,5784,3545,2681,2783,3438,3344,2820,5785, # 5328
3668,2943,4160,1747,2944,2983,5786,5787, 207,5788,4809,5789,4810,2521,5790,3033, # 5344
890,3669,3943,5791,1878,3798,3439,5792,2186,2358,3440,1652,5793,5794,5795, 941, # 5360
2299, 208,3546,4161,2020, 330,4438,3944,2906,2499,3799,4439,4811,5796,5797,5798, # 5376 #last 512
#Everything below is of no interest for detection purpose
2522,1613,4812,5799,3345,3945,2523,5800,4162,5801,1637,4163,2471,4813,3946,5802, # 5392
2500,3034,3800,5803,5804,2195,4814,5805,2163,5806,5807,5808,5809,5810,5811,5812, # 5408
5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828, # 5424
5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844, # 5440
5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856,5857,5858,5859,5860, # 5456
5861,5862,5863,5864,5865,5866,5867,5868,5869,5870,5871,5872,5873,5874,5875,5876, # 5472
5877,5878,5879,5880,5881,5882,5883,5884,5885,5886,5887,5888,5889,5890,5891,5892, # 5488
5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904,5905,5906,5907,5908, # 5504
5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920,5921,5922,5923,5924, # 5520
5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936,5937,5938,5939,5940, # 5536
5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952,5953,5954,5955,5956, # 5552
5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968,5969,5970,5971,5972, # 5568
5973,5974,5975,5976,5977,5978,5979,5980,5981,5982,5983,5984,5985,5986,5987,5988, # 5584
5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6000,6001,6002,6003,6004, # 5600
6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016,6017,6018,6019,6020, # 5616
6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035,6036, # 5632
6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052, # 5648
6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6068, # 5664
6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084, # 5680
6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6100, # 5696
6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116, # 5712
6117,6118,6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,6132, # 5728
6133,6134,6135,6136,6137,6138,6139,6140,6141,6142,6143,6144,6145,6146,6147,6148, # 5744
6149,6150,6151,6152,6153,6154,6155,6156,6157,6158,6159,6160,6161,6162,6163,6164, # 5760
6165,6166,6167,6168,6169,6170,6171,6172,6173,6174,6175,6176,6177,6178,6179,6180, # 5776
6181,6182,6183,6184,6185,6186,6187,6188,6189,6190,6191,6192,6193,6194,6195,6196, # 5792
6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,6211,6212, # 5808
6213,6214,6215,6216,6217,6218,6219,6220,6221,6222,6223,3670,6224,6225,6226,6227, # 5824
6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,6242,6243, # 5840
6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,6254,6255,6256,6257,6258,6259, # 5856
6260,6261,6262,6263,6264,6265,6266,6267,6268,6269,6270,6271,6272,6273,6274,6275, # 5872
6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,4815,6286,6287,6288,6289,6290, # 5888
6291,6292,4816,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,6303,6304,6305, # 5904
6306,6307,6308,6309,6310,6311,4817,4818,6312,6313,6314,6315,6316,6317,6318,4819, # 5920
6319,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,6334, # 5936
6335,6336,6337,4820,6338,6339,6340,6341,6342,6343,6344,6345,6346,6347,6348,6349, # 5952
6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,6364,6365, # 5968
6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,6380,6381, # 5984
6382,6383,6384,6385,6386,6387,6388,6389,6390,6391,6392,6393,6394,6395,6396,6397, # 6000
6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,3441,6411,6412, # 6016
6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,4440,6426,6427, # 6032
6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443, # 6048
6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,4821,6455,6456,6457,6458, # 6064
6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,6473,6474, # 6080
6475,6476,6477,3947,3948,6478,6479,6480,6481,3272,4441,6482,6483,6484,6485,4442, # 6096
6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,4822,6497,6498,6499,6500, # 6112
6501,6502,6503,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516, # 6128
6517,6518,6519,6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532, # 6144
6533,6534,6535,6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548, # 6160
6549,6550,6551,6552,6553,6554,6555,6556,2784,6557,4823,6558,6559,6560,6561,6562, # 6176
6563,6564,6565,6566,6567,6568,6569,3949,6570,6571,6572,4824,6573,6574,6575,6576, # 6192
6577,6578,6579,6580,6581,6582,6583,4825,6584,6585,6586,3950,2785,6587,6588,6589, # 6208
6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605, # 6224
6606,6607,6608,6609,6610,6611,6612,4826,6613,6614,6615,4827,6616,6617,6618,6619, # 6240
6620,6621,6622,6623,6624,6625,4164,6626,6627,6628,6629,6630,6631,6632,6633,6634, # 6256
3547,6635,4828,6636,6637,6638,6639,6640,6641,6642,3951,2984,6643,6644,6645,6646, # 6272
6647,6648,6649,4165,6650,4829,6651,6652,4830,6653,6654,6655,6656,6657,6658,6659, # 6288
6660,6661,6662,4831,6663,6664,6665,6666,6667,6668,6669,6670,6671,4166,6672,4832, # 6304
3952,6673,6674,6675,6676,4833,6677,6678,6679,4167,6680,6681,6682,3198,6683,6684, # 6320
6685,6686,6687,6688,6689,6690,6691,6692,6693,6694,6695,6696,6697,4834,6698,6699, # 6336
6700,6701,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6712,6713,6714,6715, # 6352
6716,6717,6718,6719,6720,6721,6722,6723,6724,6725,6726,6727,6728,6729,6730,6731, # 6368
6732,6733,6734,4443,6735,6736,6737,6738,6739,6740,6741,6742,6743,6744,6745,4444, # 6384
6746,6747,6748,6749,6750,6751,6752,6753,6754,6755,6756,6757,6758,6759,6760,6761, # 6400
6762,6763,6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777, # 6416
6778,6779,6780,6781,4168,6782,6783,3442,6784,6785,6786,6787,6788,6789,6790,6791, # 6432
4169,6792,6793,6794,6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806, # 6448
6807,6808,6809,6810,6811,4835,6812,6813,6814,4445,6815,6816,4446,6817,6818,6819, # 6464
6820,6821,6822,6823,6824,6825,6826,6827,6828,6829,6830,6831,6832,6833,6834,6835, # 6480
3548,6836,6837,6838,6839,6840,6841,6842,6843,6844,6845,6846,4836,6847,6848,6849, # 6496
6850,6851,6852,6853,6854,3953,6855,6856,6857,6858,6859,6860,6861,6862,6863,6864, # 6512
6865,6866,6867,6868,6869,6870,6871,6872,6873,6874,6875,6876,6877,3199,6878,6879, # 6528
6880,6881,6882,4447,6883,6884,6885,6886,6887,6888,6889,6890,6891,6892,6893,6894, # 6544
6895,6896,6897,6898,6899,6900,6901,6902,6903,6904,4170,6905,6906,6907,6908,6909, # 6560
6910,6911,6912,6913,6914,6915,6916,6917,6918,6919,6920,6921,6922,6923,6924,6925, # 6576
6926,6927,4837,6928,6929,6930,6931,6932,6933,6934,6935,6936,3346,6937,6938,4838, # 6592
6939,6940,6941,4448,6942,6943,6944,6945,6946,4449,6947,6948,6949,6950,6951,6952, # 6608
6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6964,6965,6966,6967,6968, # 6624
6969,6970,6971,6972,6973,6974,6975,6976,6977,6978,6979,6980,6981,6982,6983,6984, # 6640
6985,6986,6987,6988,6989,6990,6991,6992,6993,6994,3671,6995,6996,6997,6998,4839, # 6656
6999,7000,7001,7002,3549,7003,7004,7005,7006,7007,7008,7009,7010,7011,7012,7013, # 6672
7014,7015,7016,7017,7018,7019,7020,7021,7022,7023,7024,7025,7026,7027,7028,7029, # 6688
7030,4840,7031,7032,7033,7034,7035,7036,7037,7038,4841,7039,7040,7041,7042,7043, # 6704
7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,7059, # 6720
7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,2985,7071,7072,7073,7074, # 6736
7075,7076,7077,7078,7079,7080,4842,7081,7082,7083,7084,7085,7086,7087,7088,7089, # 6752
7090,7091,7092,7093,7094,7095,7096,7097,7098,7099,7100,7101,7102,7103,7104,7105, # 6768
7106,7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,4450,7119,7120, # 6784
7121,7122,7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136, # 6800
7137,7138,7139,7140,7141,7142,7143,4843,7144,7145,7146,7147,7148,7149,7150,7151, # 6816
7152,7153,7154,7155,7156,7157,7158,7159,7160,7161,7162,7163,7164,7165,7166,7167, # 6832
7168,7169,7170,7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183, # 6848
7184,7185,7186,7187,7188,4171,4172,7189,7190,7191,7192,7193,7194,7195,7196,7197, # 6864
7198,7199,7200,7201,7202,7203,7204,7205,7206,7207,7208,7209,7210,7211,7212,7213, # 6880
7214,7215,7216,7217,7218,7219,7220,7221,7222,7223,7224,7225,7226,7227,7228,7229, # 6896
7230,7231,7232,7233,7234,7235,7236,7237,7238,7239,7240,7241,7242,7243,7244,7245, # 6912
7246,7247,7248,7249,7250,7251,7252,7253,7254,7255,7256,7257,7258,7259,7260,7261, # 6928
7262,7263,7264,7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277, # 6944
7278,7279,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293, # 6960
7294,7295,7296,4844,7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308, # 6976
7309,7310,7311,7312,7313,7314,7315,7316,4451,7317,7318,7319,7320,7321,7322,7323, # 6992
7324,7325,7326,7327,7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339, # 7008
7340,7341,7342,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,4173,7354, # 7024
7355,4845,7356,7357,7358,7359,7360,7361,7362,7363,7364,7365,7366,7367,7368,7369, # 7040
7370,7371,7372,7373,7374,7375,7376,7377,7378,7379,7380,7381,7382,7383,7384,7385, # 7056
7386,7387,7388,4846,7389,7390,7391,7392,7393,7394,7395,7396,7397,7398,7399,7400, # 7072
7401,7402,7403,7404,7405,3672,7406,7407,7408,7409,7410,7411,7412,7413,7414,7415, # 7088
7416,7417,7418,7419,7420,7421,7422,7423,7424,7425,7426,7427,7428,7429,7430,7431, # 7104
7432,7433,7434,7435,7436,7437,7438,7439,7440,7441,7442,7443,7444,7445,7446,7447, # 7120
7448,7449,7450,7451,7452,7453,4452,7454,3200,7455,7456,7457,7458,7459,7460,7461, # 7136
7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,7472,7473,7474,4847,7475,7476, # 7152
7477,3133,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,7488,7489,7490,7491, # 7168
7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,3347,7503,7504,7505,7506, # 7184
7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,7520,7521,4848, # 7200
7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,7536,7537, # 7216
7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,3801,4849,7550,7551, # 7232
7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567, # 7248
7568,7569,3035,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582, # 7264
7583,7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598, # 7280
7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614, # 7296
7615,7616,4850,7617,7618,3802,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628, # 7312
7629,7630,7631,7632,4851,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643, # 7328
7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659, # 7344
7660,7661,7662,7663,7664,7665,7666,7667,7668,7669,7670,4453,7671,7672,7673,7674, # 7360
7675,7676,7677,7678,7679,7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690, # 7376
7691,7692,7693,7694,7695,7696,7697,3443,7698,7699,7700,7701,7702,4454,7703,7704, # 7392
7705,7706,7707,7708,7709,7710,7711,7712,7713,2472,7714,7715,7716,7717,7718,7719, # 7408
7720,7721,7722,7723,7724,7725,7726,7727,7728,7729,7730,7731,3954,7732,7733,7734, # 7424
7735,7736,7737,7738,7739,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7750, # 7440
3134,7751,7752,4852,7753,7754,7755,4853,7756,7757,7758,7759,7760,4174,7761,7762, # 7456
7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,7777,7778, # 7472
7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,7792,7793,7794, # 7488
7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,4854,7806,7807,7808,7809, # 7504
7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824,7825, # 7520
4855,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840, # 7536
7841,7842,7843,7844,7845,7846,7847,3955,7848,7849,7850,7851,7852,7853,7854,7855, # 7552
7856,7857,7858,7859,7860,3444,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870, # 7568
7871,7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886, # 7584
7887,7888,7889,7890,7891,4175,7892,7893,7894,7895,7896,4856,4857,7897,7898,7899, # 7600
7900,2598,7901,7902,7903,7904,7905,7906,7907,7908,4455,7909,7910,7911,7912,7913, # 7616
7914,3201,7915,7916,7917,7918,7919,7920,7921,4858,7922,7923,7924,7925,7926,7927, # 7632
7928,7929,7930,7931,7932,7933,7934,7935,7936,7937,7938,7939,7940,7941,7942,7943, # 7648
7944,7945,7946,7947,7948,7949,7950,7951,7952,7953,7954,7955,7956,7957,7958,7959, # 7664
7960,7961,7962,7963,7964,7965,7966,7967,7968,7969,7970,7971,7972,7973,7974,7975, # 7680
7976,7977,7978,7979,7980,7981,4859,7982,7983,7984,7985,7986,7987,7988,7989,7990, # 7696
7991,7992,7993,7994,7995,7996,4860,7997,7998,7999,8000,8001,8002,8003,8004,8005, # 7712
8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,8016,4176,8017,8018,8019,8020, # 7728
8021,8022,8023,4861,8024,8025,8026,8027,8028,8029,8030,8031,8032,8033,8034,8035, # 7744
8036,4862,4456,8037,8038,8039,8040,4863,8041,8042,8043,8044,8045,8046,8047,8048, # 7760
8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063,8064, # 7776
8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,8080, # 7792
8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,8096, # 7808
8097,8098,8099,4864,4177,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110, # 7824
8111,8112,8113,8114,8115,8116,8117,8118,8119,8120,4178,8121,8122,8123,8124,8125, # 7840
8126,8127,8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141, # 7856
8142,8143,8144,8145,4865,4866,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155, # 7872
8156,8157,8158,8159,8160,8161,8162,8163,8164,8165,4179,8166,8167,8168,8169,8170, # 7888
8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181,4457,8182,8183,8184,8185, # 7904
8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201, # 7920
8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215,8216,8217, # 7936
8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229,8230,8231,8232,8233, # 7952
8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249, # 7968
8250,8251,8252,8253,8254,8255,8256,3445,8257,8258,8259,8260,8261,8262,4458,8263, # 7984
8264,8265,8266,8267,8268,8269,8270,8271,8272,4459,8273,8274,8275,8276,3550,8277, # 8000
8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,4460,8290,8291,8292, # 8016
8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,4867, # 8032
8308,8309,8310,8311,8312,3551,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322, # 8048
8323,8324,8325,8326,4868,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337, # 8064
8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353, # 8080
8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,4869,4461,8364,8365,8366,8367, # 8096
8368,8369,8370,4870,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382, # 8112
8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398, # 8128
8399,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,4871,8411,8412,8413, # 8144
8414,8415,8416,8417,8418,8419,8420,8421,8422,4462,8423,8424,8425,8426,8427,8428, # 8160
8429,8430,8431,8432,8433,2986,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443, # 8176
8444,8445,8446,8447,8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459, # 8192
8460,8461,8462,8463,8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475, # 8208
8476,8477,8478,4180,8479,8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490, # 8224
8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506, # 8240
8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522, # 8256
8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538, # 8272
8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554, # 8288
8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,4872,8565,8566,8567,8568,8569, # 8304
8570,8571,8572,8573,4873,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584, # 8320
8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597,8598,8599,8600, # 8336
8601,8602,8603,8604,8605,3803,8606,8607,8608,8609,8610,8611,8612,8613,4874,3804, # 8352
8614,8615,8616,8617,8618,8619,8620,8621,3956,8622,8623,8624,8625,8626,8627,8628, # 8368
8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,2865,8639,8640,8641,8642,8643, # 8384
8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,4463,8657,8658, # 8400
8659,4875,4876,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672, # 8416
8673,8674,8675,8676,8677,8678,8679,8680,8681,4464,8682,8683,8684,8685,8686,8687, # 8432
8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703, # 8448
8704,8705,8706,8707,8708,8709,2261,8710,8711,8712,8713,8714,8715,8716,8717,8718, # 8464
8719,8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,4181, # 8480
8734,8735,8736,8737,8738,8739,8740,8741,8742,8743,8744,8745,8746,8747,8748,8749, # 8496
8750,8751,8752,8753,8754,8755,8756,8757,8758,8759,8760,8761,8762,8763,4877,8764, # 8512
8765,8766,8767,8768,8769,8770,8771,8772,8773,8774,8775,8776,8777,8778,8779,8780, # 8528
8781,8782,8783,8784,8785,8786,8787,8788,4878,8789,4879,8790,8791,8792,4880,8793, # 8544
8794,8795,8796,8797,8798,8799,8800,8801,4881,8802,8803,8804,8805,8806,8807,8808, # 8560
8809,8810,8811,8812,8813,8814,8815,3957,8816,8817,8818,8819,8820,8821,8822,8823, # 8576
8824,8825,8826,8827,8828,8829,8830,8831,8832,8833,8834,8835,8836,8837,8838,8839, # 8592
8840,8841,8842,8843,8844,8845,8846,8847,4882,8848,8849,8850,8851,8852,8853,8854, # 8608
8855,8856,8857,8858,8859,8860,8861,8862,8863,8864,8865,8866,8867,8868,8869,8870, # 8624
8871,8872,8873,8874,8875,8876,8877,8878,8879,8880,8881,8882,8883,8884,3202,8885, # 8640
8886,8887,8888,8889,8890,8891,8892,8893,8894,8895,8896,8897,8898,8899,8900,8901, # 8656
8902,8903,8904,8905,8906,8907,8908,8909,8910,8911,8912,8913,8914,8915,8916,8917, # 8672
8918,8919,8920,8921,8922,8923,8924,4465,8925,8926,8927,8928,8929,8930,8931,8932, # 8688
4883,8933,8934,8935,8936,8937,8938,8939,8940,8941,8942,8943,2214,8944,8945,8946, # 8704
8947,8948,8949,8950,8951,8952,8953,8954,8955,8956,8957,8958,8959,8960,8961,8962, # 8720
8963,8964,8965,4884,8966,8967,8968,8969,8970,8971,8972,8973,8974,8975,8976,8977, # 8736
8978,8979,8980,8981,8982,8983,8984,8985,8986,8987,8988,8989,8990,8991,8992,4885, # 8752
8993,8994,8995,8996,8997,8998,8999,9000,9001,9002,9003,9004,9005,9006,9007,9008, # 8768
9009,9010,9011,9012,9013,9014,9015,9016,9017,9018,9019,9020,9021,4182,9022,9023, # 8784
9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9035,9036,9037,9038,9039, # 8800
9040,9041,9042,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055, # 8816
9056,9057,9058,9059,9060,9061,9062,9063,4886,9064,9065,9066,9067,9068,9069,4887, # 8832
9070,9071,9072,9073,9074,9075,9076,9077,9078,9079,9080,9081,9082,9083,9084,9085, # 8848
9086,9087,9088,9089,9090,9091,9092,9093,9094,9095,9096,9097,9098,9099,9100,9101, # 8864
9102,9103,9104,9105,9106,9107,9108,9109,9110,9111,9112,9113,9114,9115,9116,9117, # 8880
9118,9119,9120,9121,9122,9123,9124,9125,9126,9127,9128,9129,9130,9131,9132,9133, # 8896
9134,9135,9136,9137,9138,9139,9140,9141,3958,9142,9143,9144,9145,9146,9147,9148, # 8912
9149,9150,9151,4888,9152,9153,9154,9155,9156,9157,9158,9159,9160,9161,9162,9163, # 8928
9164,9165,9166,9167,9168,9169,9170,9171,9172,9173,9174,9175,4889,9176,9177,9178, # 8944
9179,9180,9181,9182,9183,9184,9185,9186,9187,9188,9189,9190,9191,9192,9193,9194, # 8960
9195,9196,9197,9198,9199,9200,9201,9202,9203,4890,9204,9205,9206,9207,9208,9209, # 8976
9210,9211,9212,9213,9214,9215,9216,9217,9218,9219,9220,9221,9222,4466,9223,9224, # 8992
9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240, # 9008
9241,9242,9243,9244,9245,4891,9246,9247,9248,9249,9250,9251,9252,9253,9254,9255, # 9024
9256,9257,4892,9258,9259,9260,9261,4893,4894,9262,9263,9264,9265,9266,9267,9268, # 9040
9269,9270,9271,9272,9273,4467,9274,9275,9276,9277,9278,9279,9280,9281,9282,9283, # 9056
9284,9285,3673,9286,9287,9288,9289,9290,9291,9292,9293,9294,9295,9296,9297,9298, # 9072
9299,9300,9301,9302,9303,9304,9305,9306,9307,9308,9309,9310,9311,9312,9313,9314, # 9088
9315,9316,9317,9318,9319,9320,9321,9322,4895,9323,9324,9325,9326,9327,9328,9329, # 9104
9330,9331,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345, # 9120
9346,9347,4468,9348,9349,9350,9351,9352,9353,9354,9355,9356,9357,9358,9359,9360, # 9136
9361,9362,9363,9364,9365,9366,9367,9368,9369,9370,9371,9372,9373,4896,9374,4469, # 9152
9375,9376,9377,9378,9379,4897,9380,9381,9382,9383,9384,9385,9386,9387,9388,9389, # 9168
9390,9391,9392,9393,9394,9395,9396,9397,9398,9399,9400,9401,9402,9403,9404,9405, # 9184
9406,4470,9407,2751,9408,9409,3674,3552,9410,9411,9412,9413,9414,9415,9416,9417, # 9200
9418,9419,9420,9421,4898,9422,9423,9424,9425,9426,9427,9428,9429,3959,9430,9431, # 9216
9432,9433,9434,9435,9436,4471,9437,9438,9439,9440,9441,9442,9443,9444,9445,9446, # 9232
9447,9448,9449,9450,3348,9451,9452,9453,9454,9455,9456,9457,9458,9459,9460,9461, # 9248
9462,9463,9464,9465,9466,9467,9468,9469,9470,9471,9472,4899,9473,9474,9475,9476, # 9264
9477,4900,9478,9479,9480,9481,9482,9483,9484,9485,9486,9487,9488,3349,9489,9490, # 9280
9491,9492,9493,9494,9495,9496,9497,9498,9499,9500,9501,9502,9503,9504,9505,9506, # 9296
9507,9508,9509,9510,9511,9512,9513,9514,9515,9516,9517,9518,9519,9520,4901,9521, # 9312
9522,9523,9524,9525,9526,4902,9527,9528,9529,9530,9531,9532,9533,9534,9535,9536, # 9328
9537,9538,9539,9540,9541,9542,9543,9544,9545,9546,9547,9548,9549,9550,9551,9552, # 9344
9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568, # 9360
9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9581,9582,9583,9584, # 9376
3805,9585,9586,9587,9588,9589,9590,9591,9592,9593,9594,9595,9596,9597,9598,9599, # 9392
9600,9601,9602,4903,9603,9604,9605,9606,9607,4904,9608,9609,9610,9611,9612,9613, # 9408
9614,4905,9615,9616,9617,9618,9619,9620,9621,9622,9623,9624,9625,9626,9627,9628, # 9424
9629,9630,9631,9632,4906,9633,9634,9635,9636,9637,9638,9639,9640,9641,9642,9643, # 9440
4907,9644,9645,9646,9647,9648,9649,9650,9651,9652,9653,9654,9655,9656,9657,9658, # 9456
9659,9660,9661,9662,9663,9664,9665,9666,9667,9668,9669,9670,9671,9672,4183,9673, # 9472
9674,9675,9676,9677,4908,9678,9679,9680,9681,4909,9682,9683,9684,9685,9686,9687, # 9488
9688,9689,9690,4910,9691,9692,9693,3675,9694,9695,9696,2945,9697,9698,9699,9700, # 9504
9701,9702,9703,9704,9705,4911,9706,9707,9708,9709,9710,9711,9712,9713,9714,9715, # 9520
9716,9717,9718,9719,9720,9721,9722,9723,9724,9725,9726,9727,9728,9729,9730,9731, # 9536
9732,9733,9734,9735,4912,9736,9737,9738,9739,9740,4913,9741,9742,9743,9744,9745, # 9552
9746,9747,9748,9749,9750,9751,9752,9753,9754,9755,9756,9757,9758,4914,9759,9760, # 9568
9761,9762,9763,9764,9765,9766,9767,9768,9769,9770,9771,9772,9773,9774,9775,9776, # 9584
9777,9778,9779,9780,9781,9782,4915,9783,9784,9785,9786,9787,9788,9789,9790,9791, # 9600
9792,9793,4916,9794,9795,9796,9797,9798,9799,9800,9801,9802,9803,9804,9805,9806, # 9616
9807,9808,9809,9810,9811,9812,9813,9814,9815,9816,9817,9818,9819,9820,9821,9822, # 9632
9823,9824,9825,9826,9827,9828,9829,9830,9831,9832,9833,9834,9835,9836,9837,9838, # 9648
9839,9840,9841,9842,9843,9844,9845,9846,9847,9848,9849,9850,9851,9852,9853,9854, # 9664
9855,9856,9857,9858,9859,9860,9861,9862,9863,9864,9865,9866,9867,9868,4917,9869, # 9680
9870,9871,9872,9873,9874,9875,9876,9877,9878,9879,9880,9881,9882,9883,9884,9885, # 9696
9886,9887,9888,9889,9890,9891,9892,4472,9893,9894,9895,9896,9897,3806,9898,9899, # 9712
9900,9901,9902,9903,9904,9905,9906,9907,9908,9909,9910,9911,9912,9913,9914,4918, # 9728
9915,9916,9917,4919,9918,9919,9920,9921,4184,9922,9923,9924,9925,9926,9927,9928, # 9744
9929,9930,9931,9932,9933,9934,9935,9936,9937,9938,9939,9940,9941,9942,9943,9944, # 9760
9945,9946,4920,9947,9948,9949,9950,9951,9952,9953,9954,9955,4185,9956,9957,9958, # 9776
9959,9960,9961,9962,9963,9964,9965,4921,9966,9967,9968,4473,9969,9970,9971,9972, # 9792
9973,9974,9975,9976,9977,4474,9978,9979,9980,9981,9982,9983,9984,9985,9986,9987, # 9808
9988,9989,9990,9991,9992,9993,9994,9995,9996,9997,9998,9999,10000,10001,10002,10003, # 9824
10004,10005,10006,10007,10008,10009,10010,10011,10012,10013,10014,10015,10016,10017,10018,10019, # 9840
10020,10021,4922,10022,4923,10023,10024,10025,10026,10027,10028,10029,10030,10031,10032,10033, # 9856
10034,10035,10036,10037,10038,10039,10040,10041,10042,10043,10044,10045,10046,10047,10048,4924, # 9872
10049,10050,10051,10052,10053,10054,10055,10056,10057,10058,10059,10060,10061,10062,10063,10064, # 9888
10065,10066,10067,10068,10069,10070,10071,10072,10073,10074,10075,10076,10077,10078,10079,10080, # 9904
10081,10082,10083,10084,10085,10086,10087,4475,10088,10089,10090,10091,10092,10093,10094,10095, # 9920
10096,10097,4476,10098,10099,10100,10101,10102,10103,10104,10105,10106,10107,10108,10109,10110, # 9936
10111,2174,10112,10113,10114,10115,10116,10117,10118,10119,10120,10121,10122,10123,10124,10125, # 9952
10126,10127,10128,10129,10130,10131,10132,10133,10134,10135,10136,10137,10138,10139,10140,3807, # 9968
4186,4925,10141,10142,10143,10144,10145,10146,10147,4477,4187,10148,10149,10150,10151,10152, # 9984
10153,4188,10154,10155,10156,10157,10158,10159,10160,10161,4926,10162,10163,10164,10165,10166, #10000
10167,10168,10169,10170,10171,10172,10173,10174,10175,10176,10177,10178,10179,10180,10181,10182, #10016
10183,10184,10185,10186,10187,10188,10189,10190,10191,10192,3203,10193,10194,10195,10196,10197, #10032
10198,10199,10200,4478,10201,10202,10203,10204,4479,10205,10206,10207,10208,10209,10210,10211, #10048
10212,10213,10214,10215,10216,10217,10218,10219,10220,10221,10222,10223,10224,10225,10226,10227, #10064
10228,10229,10230,10231,10232,10233,10234,4927,10235,10236,10237,10238,10239,10240,10241,10242, #10080
10243,10244,10245,10246,10247,10248,10249,10250,10251,10252,10253,10254,10255,10256,10257,10258, #10096
10259,10260,10261,10262,10263,10264,10265,10266,10267,10268,10269,10270,10271,10272,10273,4480, #10112
4928,4929,10274,10275,10276,10277,10278,10279,10280,10281,10282,10283,10284,10285,10286,10287, #10128
10288,10289,10290,10291,10292,10293,10294,10295,10296,10297,10298,10299,10300,10301,10302,10303, #10144
10304,10305,10306,10307,10308,10309,10310,10311,10312,10313,10314,10315,10316,10317,10318,10319, #10160
10320,10321,10322,10323,10324,10325,10326,10327,10328,10329,10330,10331,10332,10333,10334,4930, #10176
10335,10336,10337,10338,10339,10340,10341,10342,4931,10343,10344,10345,10346,10347,10348,10349, #10192
10350,10351,10352,10353,10354,10355,3088,10356,2786,10357,10358,10359,10360,4189,10361,10362, #10208
10363,10364,10365,10366,10367,10368,10369,10370,10371,10372,10373,10374,10375,4932,10376,10377, #10224
10378,10379,10380,10381,10382,10383,10384,10385,10386,10387,10388,10389,10390,10391,10392,4933, #10240
10393,10394,10395,4934,10396,10397,10398,10399,10400,10401,10402,10403,10404,10405,10406,10407, #10256
10408,10409,10410,10411,10412,3446,10413,10414,10415,10416,10417,10418,10419,10420,10421,10422, #10272
10423,4935,10424,10425,10426,10427,10428,10429,10430,4936,10431,10432,10433,10434,10435,10436, #10288
10437,10438,10439,10440,10441,10442,10443,4937,10444,10445,10446,10447,4481,10448,10449,10450, #10304
10451,10452,10453,10454,10455,10456,10457,10458,10459,10460,10461,10462,10463,10464,10465,10466, #10320
10467,10468,10469,10470,10471,10472,10473,10474,10475,10476,10477,10478,10479,10480,10481,10482, #10336
10483,10484,10485,10486,10487,10488,10489,10490,10491,10492,10493,10494,10495,10496,10497,10498, #10352
10499,10500,10501,10502,10503,10504,10505,4938,10506,10507,10508,10509,10510,2552,10511,10512, #10368
10513,10514,10515,10516,3447,10517,10518,10519,10520,10521,10522,10523,10524,10525,10526,10527, #10384
10528,10529,10530,10531,10532,10533,10534,10535,10536,10537,10538,10539,10540,10541,10542,10543, #10400
4482,10544,4939,10545,10546,10547,10548,10549,10550,10551,10552,10553,10554,10555,10556,10557, #10416
10558,10559,10560,10561,10562,10563,10564,10565,10566,10567,3676,4483,10568,10569,10570,10571, #10432
10572,3448,10573,10574,10575,10576,10577,10578,10579,10580,10581,10582,10583,10584,10585,10586, #10448
10587,10588,10589,10590,10591,10592,10593,10594,10595,10596,10597,10598,10599,10600,10601,10602, #10464
10603,10604,10605,10606,10607,10608,10609,10610,10611,10612,10613,10614,10615,10616,10617,10618, #10480
10619,10620,10621,10622,10623,10624,10625,10626,10627,4484,10628,10629,10630,10631,10632,4940, #10496
10633,10634,10635,10636,10637,10638,10639,10640,10641,10642,10643,10644,10645,10646,10647,10648, #10512
10649,10650,10651,10652,10653,10654,10655,10656,4941,10657,10658,10659,2599,10660,10661,10662, #10528
10663,10664,10665,10666,3089,10667,10668,10669,10670,10671,10672,10673,10674,10675,10676,10677, #10544
10678,10679,10680,4942,10681,10682,10683,10684,10685,10686,10687,10688,10689,10690,10691,10692, #10560
10693,10694,10695,10696,10697,4485,10698,10699,10700,10701,10702,10703,10704,4943,10705,3677, #10576
10706,10707,10708,10709,10710,10711,10712,4944,10713,10714,10715,10716,10717,10718,10719,10720, #10592
10721,10722,10723,10724,10725,10726,10727,10728,4945,10729,10730,10731,10732,10733,10734,10735, #10608
10736,10737,10738,10739,10740,10741,10742,10743,10744,10745,10746,10747,10748,10749,10750,10751, #10624
10752,10753,10754,10755,10756,10757,10758,10759,10760,10761,4946,10762,10763,10764,10765,10766, #10640
10767,4947,4948,10768,10769,10770,10771,10772,10773,10774,10775,10776,10777,10778,10779,10780, #10656
10781,10782,10783,10784,10785,10786,10787,10788,10789,10790,10791,10792,10793,10794,10795,10796, #10672
10797,10798,10799,10800,10801,10802,10803,10804,10805,10806,10807,10808,10809,10810,10811,10812, #10688
10813,10814,10815,10816,10817,10818,10819,10820,10821,10822,10823,10824,10825,10826,10827,10828, #10704
10829,10830,10831,10832,10833,10834,10835,10836,10837,10838,10839,10840,10841,10842,10843,10844, #10720
10845,10846,10847,10848,10849,10850,10851,10852,10853,10854,10855,10856,10857,10858,10859,10860, #10736
10861,10862,10863,10864,10865,10866,10867,10868,10869,10870,10871,10872,10873,10874,10875,10876, #10752
10877,10878,4486,10879,10880,10881,10882,10883,10884,10885,4949,10886,10887,10888,10889,10890, #10768
10891,10892,10893,10894,10895,10896,10897,10898,10899,10900,10901,10902,10903,10904,10905,10906, #10784
10907,10908,10909,10910,10911,10912,10913,10914,10915,10916,10917,10918,10919,4487,10920,10921, #10800
10922,10923,10924,10925,10926,10927,10928,10929,10930,10931,10932,4950,10933,10934,10935,10936, #10816
10937,10938,10939,10940,10941,10942,10943,10944,10945,10946,10947,10948,10949,4488,10950,10951, #10832
10952,10953,10954,10955,10956,10957,10958,10959,4190,10960,10961,10962,10963,10964,10965,10966, #10848
10967,10968,10969,10970,10971,10972,10973,10974,10975,10976,10977,10978,10979,10980,10981,10982, #10864
10983,10984,10985,10986,10987,10988,10989,10990,10991,10992,10993,10994,10995,10996,10997,10998, #10880
10999,11000,11001,11002,11003,11004,11005,11006,3960,11007,11008,11009,11010,11011,11012,11013, #10896
11014,11015,11016,11017,11018,11019,11020,11021,11022,11023,11024,11025,11026,11027,11028,11029, #10912
11030,11031,11032,4951,11033,11034,11035,11036,11037,11038,11039,11040,11041,11042,11043,11044, #10928
11045,11046,11047,4489,11048,11049,11050,11051,4952,11052,11053,11054,11055,11056,11057,11058, #10944
4953,11059,11060,11061,11062,11063,11064,11065,11066,11067,11068,11069,11070,11071,4954,11072, #10960
11073,11074,11075,11076,11077,11078,11079,11080,11081,11082,11083,11084,11085,11086,11087,11088, #10976
11089,11090,11091,11092,11093,11094,11095,11096,11097,11098,11099,11100,11101,11102,11103,11104, #10992
11105,11106,11107,11108,11109,11110,11111,11112,11113,11114,11115,3808,11116,11117,11118,11119, #11008
11120,11121,11122,11123,11124,11125,11126,11127,11128,11129,11130,11131,11132,11133,11134,4955, #11024
11135,11136,11137,11138,11139,11140,11141,11142,11143,11144,11145,11146,11147,11148,11149,11150, #11040
11151,11152,11153,11154,11155,11156,11157,11158,11159,11160,11161,4956,11162,11163,11164,11165, #11056
11166,11167,11168,11169,11170,11171,11172,11173,11174,11175,11176,11177,11178,11179,11180,4957, #11072
11181,11182,11183,11184,11185,11186,4958,11187,11188,11189,11190,11191,11192,11193,11194,11195, #11088
11196,11197,11198,11199,11200,3678,11201,11202,11203,11204,11205,11206,4191,11207,11208,11209, #11104
11210,11211,11212,11213,11214,11215,11216,11217,11218,11219,11220,11221,11222,11223,11224,11225, #11120
11226,11227,11228,11229,11230,11231,11232,11233,11234,11235,11236,11237,11238,11239,11240,11241, #11136
11242,11243,11244,11245,11246,11247,11248,11249,11250,11251,4959,11252,11253,11254,11255,11256, #11152
11257,11258,11259,11260,11261,11262,11263,11264,11265,11266,11267,11268,11269,11270,11271,11272, #11168
11273,11274,11275,11276,11277,11278,11279,11280,11281,11282,11283,11284,11285,11286,11287,11288, #11184
11289,11290,11291,11292,11293,11294,11295,11296,11297,11298,11299,11300,11301,11302,11303,11304, #11200
11305,11306,11307,11308,11309,11310,11311,11312,11313,11314,3679,11315,11316,11317,11318,4490, #11216
11319,11320,11321,11322,11323,11324,11325,11326,11327,11328,11329,11330,11331,11332,11333,11334, #11232
11335,11336,11337,11338,11339,11340,11341,11342,11343,11344,11345,11346,11347,4960,11348,11349, #11248
11350,11351,11352,11353,11354,11355,11356,11357,11358,11359,11360,11361,11362,11363,11364,11365, #11264
11366,11367,11368,11369,11370,11371,11372,11373,11374,11375,11376,11377,3961,4961,11378,11379, #11280
11380,11381,11382,11383,11384,11385,11386,11387,11388,11389,11390,11391,11392,11393,11394,11395, #11296
11396,11397,4192,11398,11399,11400,11401,11402,11403,11404,11405,11406,11407,11408,11409,11410, #11312
11411,4962,11412,11413,11414,11415,11416,11417,11418,11419,11420,11421,11422,11423,11424,11425, #11328
11426,11427,11428,11429,11430,11431,11432,11433,11434,11435,11436,11437,11438,11439,11440,11441, #11344
11442,11443,11444,11445,11446,11447,11448,11449,11450,11451,11452,11453,11454,11455,11456,11457, #11360
11458,11459,11460,11461,11462,11463,11464,11465,11466,11467,11468,11469,4963,11470,11471,4491, #11376
11472,11473,11474,11475,4964,11476,11477,11478,11479,11480,11481,11482,11483,11484,11485,11486, #11392
11487,11488,11489,11490,11491,11492,4965,11493,11494,11495,11496,11497,11498,11499,11500,11501, #11408
11502,11503,11504,11505,11506,11507,11508,11509,11510,11511,11512,11513,11514,11515,11516,11517, #11424
11518,11519,11520,11521,11522,11523,11524,11525,11526,11527,11528,11529,3962,11530,11531,11532, #11440
11533,11534,11535,11536,11537,11538,11539,11540,11541,11542,11543,11544,11545,11546,11547,11548, #11456
11549,11550,11551,11552,11553,11554,11555,11556,11557,11558,11559,11560,11561,11562,11563,11564, #11472
4193,4194,11565,11566,11567,11568,11569,11570,11571,11572,11573,11574,11575,11576,11577,11578, #11488
11579,11580,11581,11582,11583,11584,11585,11586,11587,11588,11589,11590,11591,4966,4195,11592, #11504
11593,11594,11595,11596,11597,11598,11599,11600,11601,11602,11603,11604,3090,11605,11606,11607, #11520
11608,11609,11610,4967,11611,11612,11613,11614,11615,11616,11617,11618,11619,11620,11621,11622, #11536
11623,11624,11625,11626,11627,11628,11629,11630,11631,11632,11633,11634,11635,11636,11637,11638, #11552
11639,11640,11641,11642,11643,11644,11645,11646,11647,11648,11649,11650,11651,11652,11653,11654, #11568
11655,11656,11657,11658,11659,11660,11661,11662,11663,11664,11665,11666,11667,11668,11669,11670, #11584
11671,11672,11673,11674,4968,11675,11676,11677,11678,11679,11680,11681,11682,11683,11684,11685, #11600
11686,11687,11688,11689,11690,11691,11692,11693,3809,11694,11695,11696,11697,11698,11699,11700, #11616
11701,11702,11703,11704,11705,11706,11707,11708,11709,11710,11711,11712,11713,11714,11715,11716, #11632
11717,11718,3553,11719,11720,11721,11722,11723,11724,11725,11726,11727,11728,11729,11730,4969, #11648
11731,11732,11733,11734,11735,11736,11737,11738,11739,11740,4492,11741,11742,11743,11744,11745, #11664
11746,11747,11748,11749,11750,11751,11752,4970,11753,11754,11755,11756,11757,11758,11759,11760, #11680
11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,11776, #11696
11777,11778,11779,11780,11781,11782,11783,11784,11785,11786,11787,11788,11789,11790,4971,11791, #11712
11792,11793,11794,11795,11796,11797,4972,11798,11799,11800,11801,11802,11803,11804,11805,11806, #11728
11807,11808,11809,11810,4973,11811,11812,11813,11814,11815,11816,11817,11818,11819,11820,11821, #11744
11822,11823,11824,11825,11826,11827,11828,11829,11830,11831,11832,11833,11834,3680,3810,11835, #11760
11836,4974,11837,11838,11839,11840,11841,11842,11843,11844,11845,11846,11847,11848,11849,11850, #11776
11851,11852,11853,11854,11855,11856,11857,11858,11859,11860,11861,11862,11863,11864,11865,11866, #11792
11867,11868,11869,11870,11871,11872,11873,11874,11875,11876,11877,11878,11879,11880,11881,11882, #11808
11883,11884,4493,11885,11886,11887,11888,11889,11890,11891,11892,11893,11894,11895,11896,11897, #11824
11898,11899,11900,11901,11902,11903,11904,11905,11906,11907,11908,11909,11910,11911,11912,11913, #11840
11914,11915,4975,11916,11917,11918,11919,11920,11921,11922,11923,11924,11925,11926,11927,11928, #11856
11929,11930,11931,11932,11933,11934,11935,11936,11937,11938,11939,11940,11941,11942,11943,11944, #11872
11945,11946,11947,11948,11949,4976,11950,11951,11952,11953,11954,11955,11956,11957,11958,11959, #11888
11960,11961,11962,11963,11964,11965,11966,11967,11968,11969,11970,11971,11972,11973,11974,11975, #11904
11976,11977,11978,11979,11980,11981,11982,11983,11984,11985,11986,11987,4196,11988,11989,11990, #11920
11991,11992,4977,11993,11994,11995,11996,11997,11998,11999,12000,12001,12002,12003,12004,12005, #11936
12006,12007,12008,12009,12010,12011,12012,12013,12014,12015,12016,12017,12018,12019,12020,12021, #11952
12022,12023,12024,12025,12026,12027,12028,12029,12030,12031,12032,12033,12034,12035,12036,12037, #11968
12038,12039,12040,12041,12042,12043,12044,12045,12046,12047,12048,12049,12050,12051,12052,12053, #11984
12054,12055,12056,12057,12058,12059,12060,12061,4978,12062,12063,12064,12065,12066,12067,12068, #12000
12069,12070,12071,12072,12073,12074,12075,12076,12077,12078,12079,12080,12081,12082,12083,12084, #12016
12085,12086,12087,12088,12089,12090,12091,12092,12093,12094,12095,12096,12097,12098,12099,12100, #12032
12101,12102,12103,12104,12105,12106,12107,12108,12109,12110,12111,12112,12113,12114,12115,12116, #12048
12117,12118,12119,12120,12121,12122,12123,4979,12124,12125,12126,12127,12128,4197,12129,12130, #12064
12131,12132,12133,12134,12135,12136,12137,12138,12139,12140,12141,12142,12143,12144,12145,12146, #12080
12147,12148,12149,12150,12151,12152,12153,12154,4980,12155,12156,12157,12158,12159,12160,4494, #12096
12161,12162,12163,12164,3811,12165,12166,12167,12168,12169,4495,12170,12171,4496,12172,12173, #12112
12174,12175,12176,3812,12177,12178,12179,12180,12181,12182,12183,12184,12185,12186,12187,12188, #12128
12189,12190,12191,12192,12193,12194,12195,12196,12197,12198,12199,12200,12201,12202,12203,12204, #12144
12205,12206,12207,12208,12209,12210,12211,12212,12213,12214,12215,12216,12217,12218,12219,12220, #12160
12221,4981,12222,12223,12224,12225,12226,12227,12228,12229,12230,12231,12232,12233,12234,12235, #12176
4982,12236,12237,12238,12239,12240,12241,12242,12243,12244,12245,4983,12246,12247,12248,12249, #12192
4984,12250,12251,12252,12253,12254,12255,12256,12257,12258,12259,12260,12261,12262,12263,12264, #12208
4985,12265,4497,12266,12267,12268,12269,12270,12271,12272,12273,12274,12275,12276,12277,12278, #12224
12279,12280,12281,12282,12283,12284,12285,12286,12287,4986,12288,12289,12290,12291,12292,12293, #12240
12294,12295,12296,2473,12297,12298,12299,12300,12301,12302,12303,12304,12305,12306,12307,12308, #12256
12309,12310,12311,12312,12313,12314,12315,12316,12317,12318,12319,3963,12320,12321,12322,12323, #12272
12324,12325,12326,12327,12328,12329,12330,12331,12332,4987,12333,12334,12335,12336,12337,12338, #12288
12339,12340,12341,12342,12343,12344,12345,12346,12347,12348,12349,12350,12351,12352,12353,12354, #12304
12355,12356,12357,12358,12359,3964,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369, #12320
12370,3965,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384, #12336
12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400, #12352
12401,12402,12403,12404,12405,12406,12407,12408,4988,12409,12410,12411,12412,12413,12414,12415, #12368
12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431, #12384
12432,12433,12434,12435,12436,12437,12438,3554,12439,12440,12441,12442,12443,12444,12445,12446, #12400
12447,12448,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462, #12416
12463,12464,4989,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477, #12432
12478,12479,12480,4990,12481,12482,12483,12484,12485,12486,12487,12488,12489,4498,12490,12491, #12448
12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507, #12464
12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523, #12480
12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,12535,12536,12537,12538,12539, #12496
12540,12541,12542,12543,12544,12545,12546,12547,12548,12549,12550,12551,4991,12552,12553,12554, #12512
12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570, #12528
12571,12572,12573,12574,12575,12576,12577,12578,3036,12579,12580,12581,12582,12583,3966,12584, #12544
12585,12586,12587,12588,12589,12590,12591,12592,12593,12594,12595,12596,12597,12598,12599,12600, #12560
12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616, #12576
12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632, #12592
12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,4499,12647, #12608
12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663, #12624
12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679, #12640
12680,12681,12682,12683,12684,12685,12686,12687,12688,12689,12690,12691,12692,12693,12694,12695, #12656
12696,12697,12698,4992,12699,12700,12701,12702,12703,12704,12705,12706,12707,12708,12709,12710, #12672
12711,12712,12713,12714,12715,12716,12717,12718,12719,12720,12721,12722,12723,12724,12725,12726, #12688
12727,12728,12729,12730,12731,12732,12733,12734,12735,12736,12737,12738,12739,12740,12741,12742, #12704
12743,12744,12745,12746,12747,12748,12749,12750,12751,12752,12753,12754,12755,12756,12757,12758, #12720
12759,12760,12761,12762,12763,12764,12765,12766,12767,12768,12769,12770,12771,12772,12773,12774, #12736
12775,12776,12777,12778,4993,2175,12779,12780,12781,12782,12783,12784,12785,12786,4500,12787, #12752
12788,12789,12790,12791,12792,12793,12794,12795,12796,12797,12798,12799,12800,12801,12802,12803, #12768
12804,12805,12806,12807,12808,12809,12810,12811,12812,12813,12814,12815,12816,12817,12818,12819, #12784
12820,12821,12822,12823,12824,12825,12826,4198,3967,12827,12828,12829,12830,12831,12832,12833, #12800
12834,12835,12836,12837,12838,12839,12840,12841,12842,12843,12844,12845,12846,12847,12848,12849, #12816
12850,12851,12852,12853,12854,12855,12856,12857,12858,12859,12860,12861,4199,12862,12863,12864, #12832
12865,12866,12867,12868,12869,12870,12871,12872,12873,12874,12875,12876,12877,12878,12879,12880, #12848
12881,12882,12883,12884,12885,12886,12887,4501,12888,12889,12890,12891,12892,12893,12894,12895, #12864
12896,12897,12898,12899,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,12910,12911, #12880
12912,4994,12913,12914,12915,12916,12917,12918,12919,12920,12921,12922,12923,12924,12925,12926, #12896
12927,12928,12929,12930,12931,12932,12933,12934,12935,12936,12937,12938,12939,12940,12941,12942, #12912
12943,12944,12945,12946,12947,12948,12949,12950,12951,12952,12953,12954,12955,12956,1772,12957, #12928
12958,12959,12960,12961,12962,12963,12964,12965,12966,12967,12968,12969,12970,12971,12972,12973, #12944
12974,12975,12976,12977,12978,12979,12980,12981,12982,12983,12984,12985,12986,12987,12988,12989, #12960
12990,12991,12992,12993,12994,12995,12996,12997,4502,12998,4503,12999,13000,13001,13002,13003, #12976
4504,13004,13005,13006,13007,13008,13009,13010,13011,13012,13013,13014,13015,13016,13017,13018, #12992
13019,13020,13021,13022,13023,13024,13025,13026,13027,13028,13029,3449,13030,13031,13032,13033, #13008
13034,13035,13036,13037,13038,13039,13040,13041,13042,13043,13044,13045,13046,13047,13048,13049, #13024
13050,13051,13052,13053,13054,13055,13056,13057,13058,13059,13060,13061,13062,13063,13064,13065, #13040
13066,13067,13068,13069,13070,13071,13072,13073,13074,13075,13076,13077,13078,13079,13080,13081, #13056
13082,13083,13084,13085,13086,13087,13088,13089,13090,13091,13092,13093,13094,13095,13096,13097, #13072
13098,13099,13100,13101,13102,13103,13104,13105,13106,13107,13108,13109,13110,13111,13112,13113, #13088
13114,13115,13116,13117,13118,3968,13119,4995,13120,13121,13122,13123,13124,13125,13126,13127, #13104
4505,13128,13129,13130,13131,13132,13133,13134,4996,4506,13135,13136,13137,13138,13139,4997, #13120
13140,13141,13142,13143,13144,13145,13146,13147,13148,13149,13150,13151,13152,13153,13154,13155, #13136
13156,13157,13158,13159,4998,13160,13161,13162,13163,13164,13165,13166,13167,13168,13169,13170, #13152
13171,13172,13173,13174,13175,13176,4999,13177,13178,13179,13180,13181,13182,13183,13184,13185, #13168
13186,13187,13188,13189,13190,13191,13192,13193,13194,13195,13196,13197,13198,13199,13200,13201, #13184
13202,13203,13204,13205,13206,5000,13207,13208,13209,13210,13211,13212,13213,13214,13215,13216, #13200
13217,13218,13219,13220,13221,13222,13223,13224,13225,13226,13227,4200,5001,13228,13229,13230, #13216
13231,13232,13233,13234,13235,13236,13237,13238,13239,13240,3969,13241,13242,13243,13244,3970, #13232
13245,13246,13247,13248,13249,13250,13251,13252,13253,13254,13255,13256,13257,13258,13259,13260, #13248
13261,13262,13263,13264,13265,13266,13267,13268,3450,13269,13270,13271,13272,13273,13274,13275, #13264
13276,5002,13277,13278,13279,13280,13281,13282,13283,13284,13285,13286,13287,13288,13289,13290, #13280
13291,13292,13293,13294,13295,13296,13297,13298,13299,13300,13301,13302,3813,13303,13304,13305, #13296
13306,13307,13308,13309,13310,13311,13312,13313,13314,13315,13316,13317,13318,13319,13320,13321, #13312
13322,13323,13324,13325,13326,13327,13328,4507,13329,13330,13331,13332,13333,13334,13335,13336, #13328
13337,13338,13339,13340,13341,5003,13342,13343,13344,13345,13346,13347,13348,13349,13350,13351, #13344
13352,13353,13354,13355,13356,13357,13358,13359,13360,13361,13362,13363,13364,13365,13366,13367, #13360
5004,13368,13369,13370,13371,13372,13373,13374,13375,13376,13377,13378,13379,13380,13381,13382, #13376
13383,13384,13385,13386,13387,13388,13389,13390,13391,13392,13393,13394,13395,13396,13397,13398, #13392
13399,13400,13401,13402,13403,13404,13405,13406,13407,13408,13409,13410,13411,13412,13413,13414, #13408
13415,13416,13417,13418,13419,13420,13421,13422,13423,13424,13425,13426,13427,13428,13429,13430, #13424
13431,13432,4508,13433,13434,13435,4201,13436,13437,13438,13439,13440,13441,13442,13443,13444, #13440
13445,13446,13447,13448,13449,13450,13451,13452,13453,13454,13455,13456,13457,5005,13458,13459, #13456
13460,13461,13462,13463,13464,13465,13466,13467,13468,13469,13470,4509,13471,13472,13473,13474, #13472
13475,13476,13477,13478,13479,13480,13481,13482,13483,13484,13485,13486,13487,13488,13489,13490, #13488
13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13501,13502,13503,13504,13505,13506, #13504
13507,13508,13509,13510,13511,13512,13513,13514,13515,13516,13517,13518,13519,13520,13521,13522, #13520
13523,13524,13525,13526,13527,13528,13529,13530,13531,13532,13533,13534,13535,13536,13537,13538, #13536
13539,13540,13541,13542,13543,13544,13545,13546,13547,13548,13549,13550,13551,13552,13553,13554, #13552
13555,13556,13557,13558,13559,13560,13561,13562,13563,13564,13565,13566,13567,13568,13569,13570, #13568
13571,13572,13573,13574,13575,13576,13577,13578,13579,13580,13581,13582,13583,13584,13585,13586, #13584
13587,13588,13589,13590,13591,13592,13593,13594,13595,13596,13597,13598,13599,13600,13601,13602, #13600
13603,13604,13605,13606,13607,13608,13609,13610,13611,13612,13613,13614,13615,13616,13617,13618, #13616
13619,13620,13621,13622,13623,13624,13625,13626,13627,13628,13629,13630,13631,13632,13633,13634, #13632
13635,13636,13637,13638,13639,13640,13641,13642,5006,13643,13644,13645,13646,13647,13648,13649, #13648
13650,13651,5007,13652,13653,13654,13655,13656,13657,13658,13659,13660,13661,13662,13663,13664, #13664
13665,13666,13667,13668,13669,13670,13671,13672,13673,13674,13675,13676,13677,13678,13679,13680, #13680
13681,13682,13683,13684,13685,13686,13687,13688,13689,13690,13691,13692,13693,13694,13695,13696, #13696
13697,13698,13699,13700,13701,13702,13703,13704,13705,13706,13707,13708,13709,13710,13711,13712, #13712
13713,13714,13715,13716,13717,13718,13719,13720,13721,13722,13723,13724,13725,13726,13727,13728, #13728
13729,13730,13731,13732,13733,13734,13735,13736,13737,13738,13739,13740,13741,13742,13743,13744, #13744
13745,13746,13747,13748,13749,13750,13751,13752,13753,13754,13755,13756,13757,13758,13759,13760, #13760
13761,13762,13763,13764,13765,13766,13767,13768,13769,13770,13771,13772,13773,13774,3273,13775, #13776
13776,13777,13778,13779,13780,13781,13782,13783,13784,13785,13786,13787,13788,13789,13790,13791, #13792
13792,13793,13794,13795,13796,13797,13798,13799,13800,13801,13802,13803,13804,13805,13806,13807, #13808
13808,13809,13810,13811,13812,13813,13814,13815,13816,13817,13818,13819,13820,13821,13822,13823, #13824
13824,13825,13826,13827,13828,13829,13830,13831,13832,13833,13834,13835,13836,13837,13838,13839, #13840
13840,13841,13842,13843,13844,13845,13846,13847,13848,13849,13850,13851,13852,13853,13854,13855, #13856
13856,13857,13858,13859,13860,13861,13862,13863,13864,13865,13866,13867,13868,13869,13870,13871, #13872
13872,13873,13874,13875,13876,13877,13878,13879,13880,13881,13882,13883,13884,13885,13886,13887, #13888
13888,13889,13890,13891,13892,13893,13894,13895,13896,13897,13898,13899,13900,13901,13902,13903, #13904
13904,13905,13906,13907,13908,13909,13910,13911,13912,13913,13914,13915,13916,13917,13918,13919, #13920
13920,13921,13922,13923,13924,13925,13926,13927,13928,13929,13930,13931,13932,13933,13934,13935, #13936
13936,13937,13938,13939,13940,13941,13942,13943,13944,13945,13946,13947,13948,13949,13950,13951, #13952
13952,13953,13954,13955,13956,13957,13958,13959,13960,13961,13962,13963,13964,13965,13966,13967, #13968
13968,13969,13970,13971,13972) #13973
# flake8: noqa

View File

@@ -1,42 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .mbcharsetprober import MultiByteCharSetProber
from .codingstatemachine import CodingStateMachine
from .chardistribution import Big5DistributionAnalysis
from .mbcssm import Big5SMModel
class Big5Prober(MultiByteCharSetProber):
def __init__(self):
MultiByteCharSetProber.__init__(self)
self._mCodingSM = CodingStateMachine(Big5SMModel)
self._mDistributionAnalyzer = Big5DistributionAnalysis()
self.reset()
def get_charset_name(self):
return "Big5"

View File

@@ -1,230 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .euctwfreq import (EUCTWCharToFreqOrder, EUCTW_TABLE_SIZE,
EUCTW_TYPICAL_DISTRIBUTION_RATIO)
from .euckrfreq import (EUCKRCharToFreqOrder, EUCKR_TABLE_SIZE,
EUCKR_TYPICAL_DISTRIBUTION_RATIO)
from .gb2312freq import (GB2312CharToFreqOrder, GB2312_TABLE_SIZE,
GB2312_TYPICAL_DISTRIBUTION_RATIO)
from .big5freq import (Big5CharToFreqOrder, BIG5_TABLE_SIZE,
BIG5_TYPICAL_DISTRIBUTION_RATIO)
from .jisfreq import (JISCharToFreqOrder, JIS_TABLE_SIZE,
JIS_TYPICAL_DISTRIBUTION_RATIO)
from .compat import wrap_ord
ENOUGH_DATA_THRESHOLD = 1024
SURE_YES = 0.99
SURE_NO = 0.01
class CharDistributionAnalysis:
def __init__(self):
# Mapping table to get frequency order from char order (get from
# GetOrder())
self._mCharToFreqOrder = None
self._mTableSize = None # Size of above table
# This is a constant value which varies from language to language,
# used in calculating confidence. See
# http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html
# for further detail.
self._mTypicalDistributionRatio = None
self.reset()
def reset(self):
"""reset analyser, clear any state"""
# If this flag is set to True, detection is done and conclusion has
# been made
self._mDone = False
self._mTotalChars = 0 # Total characters encountered
# The number of characters whose frequency order is less than 512
self._mFreqChars = 0
def feed(self, aBuf, aCharLen):
"""feed a character with known length"""
if aCharLen == 2:
# we only care about 2-bytes character in our distribution analysis
order = self.get_order(aBuf)
else:
order = -1
if order >= 0:
self._mTotalChars += 1
# order is valid
if order < self._mTableSize:
if 512 > self._mCharToFreqOrder[order]:
self._mFreqChars += 1
def get_confidence(self):
"""return confidence based on existing data"""
# if we didn't receive any character in our consideration range,
# return negative answer
if self._mTotalChars <= 0:
return SURE_NO
if self._mTotalChars != self._mFreqChars:
r = (self._mFreqChars / ((self._mTotalChars - self._mFreqChars)
* self._mTypicalDistributionRatio))
if r < SURE_YES:
return r
# normalize confidence (we don't want to be 100% sure)
return SURE_YES
def got_enough_data(self):
# It is not necessary to receive all data to draw conclusion.
# For charset detection, certain amount of data is enough
return self._mTotalChars > ENOUGH_DATA_THRESHOLD
def get_order(self, aBuf):
# We do not handle characters based on the original encoding string,
# but convert this encoding string to a number, here called order.
# This allows multiple encodings of a language to share one frequency
# table.
return -1
class EUCTWDistributionAnalysis(CharDistributionAnalysis):
def __init__(self):
CharDistributionAnalysis.__init__(self)
self._mCharToFreqOrder = EUCTWCharToFreqOrder
self._mTableSize = EUCTW_TABLE_SIZE
self._mTypicalDistributionRatio = EUCTW_TYPICAL_DISTRIBUTION_RATIO
def get_order(self, aBuf):
# for euc-TW encoding, we are interested
# first byte range: 0xc4 -- 0xfe
# second byte range: 0xa1 -- 0xfe
# no validation needed here. State machine has done that
first_char = wrap_ord(aBuf[0])
if first_char >= 0xC4:
return 94 * (first_char - 0xC4) + wrap_ord(aBuf[1]) - 0xA1
else:
return -1
class EUCKRDistributionAnalysis(CharDistributionAnalysis):
def __init__(self):
CharDistributionAnalysis.__init__(self)
self._mCharToFreqOrder = EUCKRCharToFreqOrder
self._mTableSize = EUCKR_TABLE_SIZE
self._mTypicalDistributionRatio = EUCKR_TYPICAL_DISTRIBUTION_RATIO
def get_order(self, aBuf):
# for euc-KR encoding, we are interested
# first byte range: 0xb0 -- 0xfe
# second byte range: 0xa1 -- 0xfe
# no validation needed here. State machine has done that
first_char = wrap_ord(aBuf[0])
if first_char >= 0xB0:
return 94 * (first_char - 0xB0) + wrap_ord(aBuf[1]) - 0xA1
else:
return -1
class GB2312DistributionAnalysis(CharDistributionAnalysis):
def __init__(self):
CharDistributionAnalysis.__init__(self)
self._mCharToFreqOrder = GB2312CharToFreqOrder
self._mTableSize = GB2312_TABLE_SIZE
self._mTypicalDistributionRatio = GB2312_TYPICAL_DISTRIBUTION_RATIO
def get_order(self, aBuf):
# for GB2312 encoding, we are interested
# first byte range: 0xb0 -- 0xfe
# second byte range: 0xa1 -- 0xfe
# no validation needed here. State machine has done that
first_char, second_char = wrap_ord(aBuf[0]), wrap_ord(aBuf[1])
if (first_char >= 0xB0) and (second_char >= 0xA1):
return 94 * (first_char - 0xB0) + second_char - 0xA1
else:
return -1
class Big5DistributionAnalysis(CharDistributionAnalysis):
def __init__(self):
CharDistributionAnalysis.__init__(self)
self._mCharToFreqOrder = Big5CharToFreqOrder
self._mTableSize = BIG5_TABLE_SIZE
self._mTypicalDistributionRatio = BIG5_TYPICAL_DISTRIBUTION_RATIO
def get_order(self, aBuf):
# for big5 encoding, we are interested
# first byte range: 0xa4 -- 0xfe
# second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe
# no validation needed here. State machine has done that
first_char, second_char = wrap_ord(aBuf[0]), wrap_ord(aBuf[1])
if first_char >= 0xA4:
if second_char >= 0xA1:
return 157 * (first_char - 0xA4) + second_char - 0xA1 + 63
else:
return 157 * (first_char - 0xA4) + second_char - 0x40
else:
return -1
class SJISDistributionAnalysis(CharDistributionAnalysis):
def __init__(self):
CharDistributionAnalysis.__init__(self)
self._mCharToFreqOrder = JISCharToFreqOrder
self._mTableSize = JIS_TABLE_SIZE
self._mTypicalDistributionRatio = JIS_TYPICAL_DISTRIBUTION_RATIO
def get_order(self, aBuf):
# for sjis encoding, we are interested
# first byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe
# second byte range: 0x40 -- 0x7e, 0x81 -- oxfe
# no validation needed here. State machine has done that
first_char, second_char = wrap_ord(aBuf[0]), wrap_ord(aBuf[1])
if (first_char >= 0x81) and (first_char <= 0x9F):
order = 188 * (first_char - 0x81)
elif (first_char >= 0xE0) and (first_char <= 0xEF):
order = 188 * (first_char - 0xE0 + 31)
else:
return -1
order = order + second_char - 0x40
if second_char > 0x7F:
order = -1
return order
class EUCJPDistributionAnalysis(CharDistributionAnalysis):
def __init__(self):
CharDistributionAnalysis.__init__(self)
self._mCharToFreqOrder = JISCharToFreqOrder
self._mTableSize = JIS_TABLE_SIZE
self._mTypicalDistributionRatio = JIS_TYPICAL_DISTRIBUTION_RATIO
def get_order(self, aBuf):
# for euc-JP encoding, we are interested
# first byte range: 0xa0 -- 0xfe
# second byte range: 0xa1 -- 0xfe
# no validation needed here. State machine has done that
char = wrap_ord(aBuf[0])
if char >= 0xA0:
return 94 * (char - 0xA1) + wrap_ord(aBuf[1]) - 0xa1
else:
return -1

View File

@@ -1,106 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from . import constants
import sys
from .charsetprober import CharSetProber
class CharSetGroupProber(CharSetProber):
def __init__(self):
CharSetProber.__init__(self)
self._mActiveNum = 0
self._mProbers = []
self._mBestGuessProber = None
def reset(self):
CharSetProber.reset(self)
self._mActiveNum = 0
for prober in self._mProbers:
if prober:
prober.reset()
prober.active = True
self._mActiveNum += 1
self._mBestGuessProber = None
def get_charset_name(self):
if not self._mBestGuessProber:
self.get_confidence()
if not self._mBestGuessProber:
return None
# self._mBestGuessProber = self._mProbers[0]
return self._mBestGuessProber.get_charset_name()
def feed(self, aBuf):
for prober in self._mProbers:
if not prober:
continue
if not prober.active:
continue
st = prober.feed(aBuf)
if not st:
continue
if st == constants.eFoundIt:
self._mBestGuessProber = prober
return self.get_state()
elif st == constants.eNotMe:
prober.active = False
self._mActiveNum -= 1
if self._mActiveNum <= 0:
self._mState = constants.eNotMe
return self.get_state()
return self.get_state()
def get_confidence(self):
st = self.get_state()
if st == constants.eFoundIt:
return 0.99
elif st == constants.eNotMe:
return 0.01
bestConf = 0.0
self._mBestGuessProber = None
for prober in self._mProbers:
if not prober:
continue
if not prober.active:
if constants._debug:
sys.stderr.write(prober.get_charset_name()
+ ' not active\n')
continue
cf = prober.get_confidence()
if constants._debug:
sys.stderr.write('%s confidence = %s\n' %
(prober.get_charset_name(), cf))
if bestConf < cf:
bestConf = cf
self._mBestGuessProber = prober
if not self._mBestGuessProber:
return 0.0
return bestConf
# else:
# self._mBestGuessProber = self._mProbers[0]
# return self._mBestGuessProber.get_confidence()

View File

@@ -1,62 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
# Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from . import constants
import re
class CharSetProber:
def __init__(self):
pass
def reset(self):
self._mState = constants.eDetecting
def get_charset_name(self):
return None
def feed(self, aBuf):
pass
def get_state(self):
return self._mState
def get_confidence(self):
return 0.0
def filter_high_bit_only(self, aBuf):
aBuf = re.sub(b'([\x00-\x7F])+', b' ', aBuf)
return aBuf
def filter_without_english_letters(self, aBuf):
aBuf = re.sub(b'([A-Za-z])+', b' ', aBuf)
return aBuf
def filter_with_english_letters(self, aBuf):
# TODO
return aBuf

View File

@@ -1,61 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from .constants import eStart
from .compat import wrap_ord
class CodingStateMachine:
def __init__(self, sm):
self._mModel = sm
self._mCurrentBytePos = 0
self._mCurrentCharLen = 0
self.reset()
def reset(self):
self._mCurrentState = eStart
def next_state(self, c):
# for each byte we get its class
# if it is first byte, we also get byte length
# PY3K: aBuf is a byte stream, so c is an int, not a byte
byteCls = self._mModel['classTable'][wrap_ord(c)]
if self._mCurrentState == eStart:
self._mCurrentBytePos = 0
self._mCurrentCharLen = self._mModel['charLenTable'][byteCls]
# from byte's class and stateTable, we get its next state
curr_state = (self._mCurrentState * self._mModel['classFactor']
+ byteCls)
self._mCurrentState = self._mModel['stateTable'][curr_state]
self._mCurrentBytePos += 1
return self._mCurrentState
def get_current_charlen(self):
return self._mCurrentCharLen
def get_coding_state_machine(self):
return self._mModel['name']

View File

@@ -1,26 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
# Ian Cordasco - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
def wrap_ord(a):
if isinstance(a, str):
return ord(a)
elif isinstance(a, int):
return a

View File

@@ -1,39 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
# Shy Shalom - original C code
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
_debug = 0
eDetecting = 0
eFoundIt = 1
eNotMe = 2
eStart = 0
eError = 1
eItsMe = 2
SHORTCUT_THRESHOLD = 0.95

View File

@@ -1,86 +0,0 @@
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Pilgrim - port to Python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
######################### END LICENSE BLOCK #########################
from . import constants
from .escsm import (HZSMModel, ISO2022CNSMModel, ISO2022JPSMModel,
ISO2022KRSMModel)
from .charsetprober import CharSetProber
from .codingstatemachine import CodingStateMachine
from .compat import wrap_ord
class EscCharSetProber(CharSetProber):
def __init__(self):
CharSetProber.__init__(self)
self._mCodingSM = [
CodingStateMachine(HZSMModel),
CodingStateMachine(ISO2022CNSMModel),
CodingStateMachine(ISO2022JPSMModel),
CodingStateMachine(ISO2022KRSMModel)
]
self.reset()
def reset(self):
CharSetProber.reset(self)
for codingSM in self._mCodingSM:
if not codingSM:
continue
codingSM.active = True
codingSM.reset()
self._mActiveSM = len(self._mCodingSM)
self._mDetectedCharset = None
def get_charset_name(self):
return self._mDetectedCharset
def get_confidence(self):
if self._mDetectedCharset:
return 0.99
else:
return 0.00
def feed(self, aBuf):
for c in aBuf:
# PY3K: aBuf is a byte array, so c is an int, not a byte
for codingSM in self._mCodingSM:
if not codingSM:
continue
if not codingSM.active:
continue
codingState = codingSM.next_state(wrap_ord(c))
if codingState == constants.eError:
codingSM.active = False
self._mActiveSM -= 1
if self._mActiveSM <= 0:
self._mState = constants.eNotMe
return self.get_state()
elif codingState == constants.eItsMe:
self._mState = constants.eFoundIt
self._mDetectedCharset = codingSM.get_coding_state_machine() # nopep8
return self.get_state()
return self.get_state()

Some files were not shown because too many files have changed in this diff Show More