Commit Graph

3926 Commits

Author SHA1 Message Date
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
kennethreitz 868625532d Merge remote-tracking branch 'origin/master' 2015-05-06 12:42:47 -07:00
kennethreitz 74609c5c8f cleanup styles a bit 2015-05-06 12:42:43 -07:00
kennethreitz ab84f9be57 removed poor code 2015-05-06 12:36:26 -07:00
kennethreitz 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 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
kennethreitz ff71b25efc release and version history 2015-04-25 17:50:03 -04:00
kennethreitz c8004e3dd7 Merge remote-tracking branch 'origin/master' 2015-04-25 17:49:14 -04:00
kennethreitz e859204554 new community 2015-04-25 17:49:12 -04:00
kennethreitz 5d722bd0f5 Merge pull request #2570 from sigmavirus24/release-process-docs
Add new release process to docs
2015-04-25 17:46:31 -04:00
kennethreitz 1f85ce8670 be cordial 2015-04-25 17:44:25 -04:00
kennethreitz 51938de6b7 improve contributing section 2015-04-25 17:42:48 -04:00
kennethreitz 535c51f548 style of contributing.rst 2015-04-25 17:36:14 -04:00
kennethreitz 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
Ian Cordasco ca66267d2c Add release notes for 2.6.2
Closes #2561
v2.6.2
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
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
kennethreitz 1f0e5775f2 add betamax 2015-04-21 17:18:04 -04:00
kennethreitz 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
kennethreitz 16eeee1436 and extensions 2015-04-17 08:52:47 -04:00
kennethreitz 576e18a796 recommended packages and extensions 2015-04-17 08:51:02 -04:00
kennethreitz d0e64d32ba Merge pull request #2550 from Lukasa/recommended
Recommended packages.
2015-04-17 08:44:38 -04:00