Andrey Rakhmatullin
52147017b4
Cleanup cookie handling in request_to_curl() ( #7684 )
...
* Adjust CookiesT.
* Drop list of plain cookie dicts support from request_to_curl().
* Extract _decode_cookie().
* Unify logging.
* Extract _to_verbose_cookies().
* Sync and type hint _cookie_to_set_cookie_value() in tests.
* Add tests for bytes in Request.cookies.
* Type hint assertCookieValEqual().
2026-06-29 21:49:09 +05:00
Adrian
dd4549e6f9
Improve test coverage for downloader middlewares ( #7655 )
...
* Improve test coverage for downloader middlewares
* Improve coverage further
2026-06-25 01:48:28 +05:00
Fardin Alizadeh
44406806f8
fix typos ( #7564 )
2026-06-02 11:04:38 +02:00
Andrey Rakhmatullin
2ad81a0ef8
Deprecate the spider arg of downloader middleware methods. ( #7037 )
...
* Deprecate the spider arg of downloader middleware methods.
* Add a test for deprecated spider args in downloader mws.
2025-09-02 21:51:47 +05:00
Andrey Rakhmatullin
1843a4f753
Converting tests to plain asserts, part 3. ( #6700 )
2025-03-06 20:50:14 +01:00
Andrey Rakhmatullin
8d92c28a16
Switch to pytest.raises(). ( #6680 )
...
* Switch to pytest.raises().
* Add matches= to broad pytest.raises().
* Adjust the test_nonserializable_object() regex for Python <= 3.11.
* Adjust the test_nonserializable_object() regex for PyPy.
* Adjust other test exception regexes for PyPy.
* Cleanup.
2025-02-27 23:13:04 +05:00
Andrey Rakhmatullin
b042ad255d
Address some previously ignored pylint messages. ( #6531 )
2024-11-11 11:49:52 +01:00
Andrey Rakhmatullin
feb0b8f7dc
Add pyupgrade.
2024-06-05 22:57:18 +05:00
Andrey Rakhmatullin
631fc65fad
Update expectations of cookies after redirects. ( #6367 )
2024-05-16 16:42:09 +02:00
Adrián Chaves
812fd2368f
Allow user-defined secure cookies ( #6357 )
2024-05-15 11:48:43 +02:00
Laerte Pereira
26a16f2c43
Fix tests
2024-02-28 16:36:19 -03:00
Jalil SA
a5c1ef8276
sort imports with isort
2023-01-25 14:25:15 -06:00
Emmanuel Rondan
e211ec0aa2
adding black formatter to all the code
2022-11-29 11:30:46 -03:00
Mark Mayo
f9a29f03d9
Address some issues reported by Pylint ( #5677 )
...
Co-authored-by: Felipe Boff Nunes <51033921+felipeboffnunes@users.noreply.github.com>
Co-authored-by: Andrey Rahmatullin <wrar@wrar.name>
2022-11-27 11:00:13 +01:00
Adrián Chaves
e865c4430e
Merge pull request from GHSA-mfjm-vh54-3f96
...
* Ignore cookies with a public suffix as domain unless it matches the request domain
* Fix the merge of 1.8.2 release notes
* Re-apply removal of tldextract restriction
2022-03-01 12:38:19 +01:00
Adrián Chaves
8ce01b3b76
Merge pull request from GHSA-cjvr-mfj7-j4j8
...
* Do not carry over cookies to a different domain on redirect
* Cover the cookie-domain redirect fix in the release notes
* Cover 1.8.2 in the release notes
* Fix redirect Cookie handling when the cookie middleware is disabled
* Update the 1.8.2 release date
2022-03-01 12:26:05 +01:00
Laerte
6c858cec91
Cookies: Cast primitive types to str ( #5253 )
...
* cast primitive types to str
* add tests
2021-10-06 12:32:04 -03:00
Eugenio Lacuesta
744f352d09
Do not process cookies from headers
2020-10-01 14:52:23 -03:00
Eugenio Lacuesta
307e35c664
Improve check for invalid cookie in CookiesMiddleware ( #4772 )
2020-09-01 11:04:00 +02:00
Adrián Chaves
890b2138a6
Remove the u prefix from strings
2020-07-30 13:39:30 +02:00
Eugenio Lacuesta
f6ed5edc31
CookiesMiddleware: keep cookies from 'Cookie' request header
2020-05-21 11:07:41 -03:00
Eugenio Lacuesta
df8a1d1c01
Flake8: Remove E741
2020-05-14 10:40:50 -03:00
Eugenio Lacuesta
4c12a234ae
Flake8: Remove E126
2020-05-06 16:10:21 -03:00
Adrián Chaves
d323a57381
Merge branch 'master' into fix-pycodestyle-e731
2020-04-15 14:16:15 +02:00
Eugenio Lacuesta
94d7ad76cb
Fix pycodestyle E2XX (whitespace) ( #4468 )
2020-04-15 14:11:37 +02:00
Eugenio Lacuesta
4270e0a0da
Fix E731: do not assign a lambda expression
2020-04-04 21:54:55 -03:00
Marc Hernández
91bbc70bc1
fix E30X flake8 ( #4355 )
2020-02-21 06:05:31 +01:00
Eugenio Lacuesta
40086dabb8
Prevent more DeprecationWarnings
2019-07-13 22:14:00 -03:00
Chomba Ng'ang'a
4ca61a2051
Update deprecated test aliases
...
- change ``failIf`` to ``assertFalse``
- change ``asertEquals`` to ``assertEqual``
- change ``assert_`` to ``assertTrue``
https://docs.python.org/2/library/unittest.html#deprecated-aliases
2017-08-09 12:52:10 +02:00
Daniel Graña
f4fc05c2a1
Do not propagate cookie log messages in tests so TopLevelFormatter does not rewrite them
2015-08-03 17:18:08 -03:00
Daniel Graña
c6adf648dc
PY3 port COOKIES_DEBUG and add tests
2015-08-03 16:28:29 -03:00
Daniel Graña
dba7e39f61
Do not break cookie parsing on non-utf8 headers
2015-08-03 10:53:40 -03:00
Daniel Graña
5f02ef82e8
PY3 port http cookies handling
2015-08-02 22:28:45 -03:00
Julia Medina
d3f576a816
Move scrapy/spider.py to scrapy/spiders/__init__.py
2015-05-09 04:20:09 -03:00
Julia Medina
d7c444fefb
Move scrapy/contrib/downloadermiddleware to scrapy/downloadermiddlewares
2015-04-29 21:24:30 -03:00
Mikhail Korobov
49645d4bf9
TST small cleanup of a cookie test
2014-09-21 05:31:34 +06:00
andrewshir
e583c030db
Test for local domains (without dots) added
2014-09-14 14:24:16 +06:00
Rocio Aramberri
51b0bd281d
fix dont settings on meta behaviour, add docs and tests
2014-08-15 13:47:42 -07:00
Daniel Graña
242c08553f
move tests under root dir
2014-07-30 19:45:08 -03:00