Eugenio Lacuesta
5bab3c0261
Merge remote-tracking branch 'upstream/master' into remove-six-code
2019-11-22 12:12:29 -03:00
Mikhail Korobov
16e0636dcf
Merge pull request #4186 from Gallaecio/lgtm
...
Remove unused imports
2019-11-22 12:28:29 +05:00
Mabel Villalba
070b3a4e84
Merge branch 'master' into 4133-handle-start_url
2019-11-21 17:10:31 +01:00
Mabel Villalba
1718e450ef
[start_url] Fixes #4133 : Raise AttributeError error when empty 'start_urls' and 'start_url' found. Added test.
2019-11-21 17:06:47 +01:00
Mikhail Korobov
d2b73b8e21
Merge pull request #4114 from scrapy/remove-py2-tests
...
Remove py2 tests
2019-11-21 18:22:10 +05:00
Adrián Chaves
a2bf340bab
Remove unused imports
2019-11-21 14:21:17 +01:00
Eugenio Lacuesta
714e0d3ac9
Merge remote-tracking branch 'upstream/master' into remove-six-code
2019-11-20 12:41:38 -03:00
Mikhail Korobov
65e2fb7d89
Merge pull request #4153 from Gallaecio/lgtm
...
MutableChain: return self from __iter__
2019-11-20 19:46:20 +05:00
Mikhail Korobov
e96ca89a1d
Merge pull request #4174 from Gallaecio/flake8
...
Add missing blank lines between functions and classes
2019-11-20 19:34:04 +05:00
Eugenio Lacuesta
6781d2f5b2
Update sample file references
2019-11-20 09:58:25 -03:00
Eugenio Lacuesta
48223c107a
Merge remote-tracking branch 'upstream/master' into response_follow_all
2019-11-20 09:41:42 -03:00
Eugenio Lacuesta
b602c61e1c
[Test] Rename outdated sample files
2019-11-20 09:38:54 -03:00
Eugenio Lacuesta
6f6426559d
Merge remote-tracking branch 'upstream/remove-py2-tests' into remove-six-code
2019-11-19 11:04:46 -03:00
Eugenio Lacuesta
05785c1c17
Merge remote-tracking branch 'upstream/master' into remove-six-code
2019-11-19 11:01:34 -03:00
Andrey Rahmatullin
78ad01632f
Fix flake8 problems in PR #3989 ( #4176 )
2019-11-19 10:43:30 +01:00
Andrey Rakhmatullin
beb7d80d6a
Add a comment about the noconnect tests.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
922a66cf07
Fix or ignore flake8 problems.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
a7b640991d
Rename tests/py3-ignores.txt to tests/ignores.txt.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
8b730a3670
Use self.proc.communicate() after killing mitmdump.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
5970d00eb9
Only xfail test_https_connect_tunnel_error on 3.6+.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
5080180c75
Improve the test_https_tunnel_without_leak_proxy_authorization_header change.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
c4ef950efd
Use an older mitmproxy for py3.5.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
3ec6960732
Fix test_proxy_connect.py for py3.5.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
c327ad9ba6
Remove an unused six import.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
cbb6d0c6a7
Mark failing proxy tests.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
f066257e95
Restore tests/test_proxy_connect.py and update it to modern mitmproxy.
2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin
e18014d84d
Remove Python 2-only tests.
2019-11-19 13:52:49 +05:00
Andrey Rahmatullin
25cd7ac7ab
Merge pull request #4094 from victor-torres/invalid-url
...
Improve URL schema validation on scrapy.Request initialization
2019-11-19 13:50:08 +05:00
Andrey Rahmatullin
3408b757c1
Merge pull request #3989 from elacuesta/logformatter_error_method
...
LogFormatter improvements
2019-11-19 13:44:43 +05:00
Adrián Chaves
f261cf65e9
Add missing blank lines between functions and classes
...
Also fixed 2 unrelated Flake8 issues
2019-11-18 17:16:09 +01:00
Adrián Chaves
99d8b05a0b
Deprecate scrapy.utils.python.MutableChain.next
2019-11-18 10:58:47 +01:00
Marc Hernandez Cabot
0e252f5a13
fix E711 and E713
2019-11-15 19:12:43 +01:00
Mikhail Korobov
550d8046fd
Merge pull request #4157 from Gallaecio/flake8
...
Add missing whitespace after ‘,’, ‘;’ or ‘:’
2019-11-14 23:42:06 +05:00
Andrey Rakhmatullin
3b2289ad01
Rename test_non_str_url_py2 to test_bytes_url.
2019-11-14 22:53:28 +05:00
Andrey Rakhmatullin
fe3a121f13
Use kwargs when calling get_func_args.
2019-11-14 22:50:53 +05:00
Adrián Chaves
058bdda0af
Improve the performance of the DOWNLOAD_DELAY test
2019-11-14 16:53:20 +01:00
Andrey Rakhmatullin
e291460db6
Fix flake8-detected errors.
2019-11-14 15:24:37 +05:00
Adrián Chaves
1a4a77d49f
Remove Python 2 check from MutableChainTest
2019-11-14 10:24:31 +01:00
Andrey Rakhmatullin
87c23ba22d
Remove Py2-only code that checks sys.version_info.
2019-11-14 13:45:39 +05:00
Andrey Rakhmatullin
a138fb05d4
Replace to_native_str calls with to_unicode.
2019-11-14 13:45:39 +05:00
Andrey Rakhmatullin
92ffd2f249
Simplify some more imports.
2019-11-14 13:45:39 +05:00
Andrey Rakhmatullin
85e79ae792
Remove cStringIO imports.
2019-11-14 13:45:39 +05:00
Andrey Rakhmatullin
1d7c8cb0b1
Remove six.PY2 and six.PY3 conditionals.
2019-11-14 13:45:37 +05:00
Adrián Chaves
33ef24c757
Add missing whitespace after ‘,’, ‘;’ or ‘:’
2019-11-13 10:52:05 +01:00
Andrey Rahmatullin
c911e80209
Merge pull request #4088 from ammarnajjar/4086-constructor-initializer-docs
...
docs: use __init__ method instead of constructor
2019-11-12 21:48:16 +05:00
Andrey Rahmatullin
c91390558d
Merge pull request #4074 from purvaudai/master
...
Added Pathlib.Path support: Issue #3731
2019-11-12 21:43:28 +05:00
purvaudai
4b8b0345e5
Mades Changes as per review
2019-11-12 18:17:15 +05:30
Andrey Rahmatullin
93385e647a
Merge pull request #4123 from elacuesta/utils-local-cache-limit
...
Fix LocalCache limit issue, add tests
2019-11-12 16:05:22 +05:00
purvaudai
50eaabe1fc
Added Test
2019-11-11 20:00:26 +05:30
purvaudai
f39ff49458
Added Test
2019-11-11 18:54:21 +05:30
purvaudai
970c3be160
Added Test
2019-11-11 18:34:15 +05:30
purvaudai
9e6e2dde2b
Adding test
2019-11-11 16:10:37 +05:30
purvaudai
0042c389eb
Adding test
2019-11-11 15:57:58 +05:30
purvaudai
084a1cda6d
Adding test
2019-11-11 15:41:00 +05:30
Eugenio Lacuesta
07fa768d33
Merge branch 'remove-six-code' of github.com:scrapy/scrapy into remove-six-code
2019-11-08 22:17:12 -03:00
Eugenio Lacuesta
b6bbb28197
PEP8 adjustments
2019-11-08 22:13:03 -03:00
Eugenio Lacuesta
342e3b5bd5
Merge remote-tracking branch 'upstream/master' into remove-six-code
2019-11-08 12:29:15 -03:00
Adrián Chaves
1df5755699
Set the bases for testing code examples from the documentation
2019-11-08 16:00:10 +01:00
elacuesta
44f19df311
[test] Update mitmproxy version
...
Co-Authored-By: Adrián Chaves <adrian@chaves.io>
2019-11-08 11:32:50 -03:00
Marc Hernández
c377c14e32
Fix W391 Blank line at end of file ( #4137 )
2019-11-07 17:47:35 +01:00
elacuesta
fe31695ba0
Remove unused import (urllib.parse.unquote)
...
Co-Authored-By: Adrián Chaves <adrian@chaves.io>
2019-11-05 15:36:19 -03:00
Eugenio Lacuesta
613c66a034
Do not override built-in max function
2019-11-05 09:45:51 -03:00
elacuesta
fed9fbe62d
Update tests/test_utils_datatypes.py
...
Co-Authored-By: Adrián Chaves <adrian@chaves.io>
2019-11-04 15:34:27 -03:00
Eugenio Lacuesta
439a3e59b8
Fix scrapy.utils.datatypes.LocalCache limit issue
2019-11-04 10:35:58 -03:00
Eugenio Lacuesta
00b793dc59
Remove elluding six occurrences
2019-11-03 12:26:38 -03:00
Eugenio Lacuesta
5797aefd4c
Remove six.assertCountEqual
2019-11-03 12:18:35 -03:00
Eugenio Lacuesta
586b25d27e
Remove six types
2019-11-03 12:10:37 -03:00
Eugenio Lacuesta
7f3cb05d8e
Remove metaclass-related six code
2019-11-03 12:03:02 -03:00
Eugenio Lacuesta
cca1959c07
Merge remote-tracking branch 'upstream/remove-py2-tests' into remove-six-code
2019-11-03 01:20:08 -03:00
Eugenio Lacuesta
d72444b9c8
Remove more six imports
2019-11-03 01:11:28 -03:00
Eugenio Lacuesta
eaeaa40b99
Remove six.PY* checks
2019-11-03 01:08:08 -03:00
Eugenio Lacuesta
5d8abdde59
Remove six.text_type from tests
2019-11-03 01:01:23 -03:00
Eugenio Lacuesta
54a786b102
Remove six imports
2019-11-03 00:58:47 -03:00
Eugenio Lacuesta
1aba513693
Remove six.iter* occurrences
2019-11-03 00:26:44 -03:00
Eugenio Lacuesta
5ab0f189ce
Remove six.moves occurrences from tests
2019-11-03 00:01:09 -03:00
Eugenio Lacuesta
c0bfaef37a
Remove __future__ imports from tests
2019-11-02 23:27:04 -03:00
Andrey Rakhmatullin
350aa67c3d
Rename tests/py3-ignores.txt to tests/ignores.txt.
2019-11-01 19:52:57 +05:00
Andrey Rakhmatullin
4b0cdf7f3e
Use self.proc.communicate() after killing mitmdump.
2019-11-01 19:51:52 +05:00
Andrey Rakhmatullin
3c9963ab04
Only xfail test_https_connect_tunnel_error on 3.6+.
2019-11-01 19:47:12 +05:00
Andrey Rakhmatullin
e0c5c72496
Improve the test_https_tunnel_without_leak_proxy_authorization_header change.
2019-11-01 19:46:19 +05:00
Andrey Rakhmatullin
5eb01b617d
Use an older mitmproxy for py3.5.
2019-10-31 23:21:30 +05:00
Andrey Rakhmatullin
a5eb59b92d
Fix test_proxy_connect.py for py3.5.
2019-10-31 23:21:14 +05:00
Adrián Chaves
f02c3d1dcf
Use communicate() instead of wait() after killing the mock server ( #4095 )
2019-10-31 13:31:33 +01:00
Andrey Rakhmatullin
7299e91b1f
Remove Py2-only code that checks sys.version_info.
2019-10-31 15:22:53 +05:00
Andrey Rakhmatullin
397e883556
Replace to_native_str calls with to_unicode.
2019-10-31 15:22:53 +05:00
Andrey Rakhmatullin
75b1d051d9
Simplify some more imports.
2019-10-31 15:22:45 +05:00
Andrey Rakhmatullin
3ac4b430ae
Remove an unused six import.
2019-10-31 15:20:28 +05:00
Andrey Rakhmatullin
cea2f5e244
Remove cStringIO imports.
2019-10-31 15:07:54 +05:00
Andrey Rakhmatullin
bbd9f4be90
Remove six.PY2 and six.PY3 conditionals.
2019-10-31 15:07:10 +05:00
Andrey Rakhmatullin
186f9d88ac
Fix the skip message for test_download_gzip_response.
2019-10-31 15:03:44 +05:00
Andrey Rakhmatullin
439e37fc7b
Mark failing proxy tests.
2019-10-31 15:03:44 +05:00
Andrey Rakhmatullin
b0d6f4917d
Restore tests/test_proxy_connect.py and update it to modern mitmproxy.
2019-10-31 15:03:44 +05:00
Andrey Rakhmatullin
b44bd6f825
Remove Python 2-only tests.
2019-10-31 15:03:09 +05:00
Adrián Chaves
15c55d0c1d
Remove LevelDB support ( #4112 )
2019-10-31 10:47:29 +01:00
Andrey Rahmatullin
229e722a03
Initial Python 2 removal ( #4091 )
2019-10-31 10:46:02 +01:00
Benjamin Ooghe-Tabanou
6d6da78eda
Add a keep_fragments parameter to the request_fingerprint function ( #4104 )
2019-10-30 09:13:36 +01:00
Amardeep Bhowmick
66cbceeb0a
Fix redirection error when the Location header value starts with 3 slashes ( #4042 )
2019-10-30 09:09:12 +01:00
Andrey Rahmatullin
18b808b2e9
Merge pull request #4092 from further-reading/master
...
Add Python 3.8 official support
2019-10-29 16:30:58 +05:00
Roy
93e3dc1b82
[test_downloadermiddleware_httpcache.py] Cleaning text
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-28 16:12:03 +00:00
Roy
b73d217de5
[test_downloadermiddleware_httpcache.py] Fixing pytest mark behaviour
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-28 12:55:54 +00:00
Roy
c51fb959e2
[test_downloadermiddleware_httpcache] Fixing pytest skip behaviour
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-28 12:36:54 +00:00
Roy
4432136fff
[test_downloadermiddleware_httpcache] Fixing pytest skip behaviour
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-28 12:22:21 +00:00
Roy
16bb3ac20d
[test_downloadermiddleware_httpcache] Using skipif approach
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-28 11:24:09 +00:00
elacuesta
7731814cc2
ItemLoader: improve handling of initial item ( #4036 )
2019-10-28 10:53:53 +01:00
Roy
20ea912513
[test_downloadermiddleware_httpcache] Making xfails more informative
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-27 18:52:01 +00:00
Roy
70b2854590
[test_downloadermiddleware_httpcache] Making xfails more informative
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-27 18:51:26 +00:00
Roy
b3df0a8415
[test_downloadermiddleware_httpcache] Adding xfails to impacted tests following hack fix
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-27 18:28:47 +00:00
Roy
11942c436c
[test_downloadermiddleware_httpcache] Trying hack to handle systemerror whjen importing leveldb
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-27 18:02:13 +00:00
Roy
deacd34c8d
[test_downloadermiddleware_httpcache] Attempting to add xfail for leveldb related tests
...
https://github.com/scrapy/scrapy/issues/4085
2019-10-27 17:39:47 +00:00
Roy Healy
4068797558
Update test_downloadermiddleware_httpcache.py
...
Adding xfail denoting that leveldb is not supported in 3.8
2019-10-27 17:02:17 +00:00
Victor Torres
f701f5b0db
fix #2552 by improving request schema check on its initialization
2019-10-22 10:48:02 -03:00
Ammar Najjar
7a84a4bdba
docs: use "constructor" for from_settings() & rom_crawler() factory methods
...
Issue #4086
2019-10-22 15:31:34 +02:00
Adrián Chaves
1d5c270ce8
Fix dangling file descriptor in FeedExporter when FEED_STORE_EMPTY is False ( #4023 )
2019-10-22 15:12:52 +02:00
purvaudai
4184bac068
Added Pathlib.Path test
2019-10-22 16:57:14 +05:30
purvaudai
85f56a92f0
Added Pathlib.Path test
2019-10-22 16:43:17 +05:30
purvaudai
7031e3a124
Added Pathlib.Path test
2019-10-22 16:31:14 +05:30
purvaudai
cd4c211f4b
Added Pathlib.Path test
2019-10-22 15:38:06 +05:30
purvaudai
a776554282
Added Pathlib.Path test
2019-10-22 15:31:55 +05:30
purvaudai
ad96d6ef59
Added Pathlib.Path test correctly
2019-10-22 14:53:59 +05:30
purvaudai
2ee38e8ddb
Added Pathlib.Path test
2019-10-22 14:43:47 +05:30
Ammar Najjar
da8cd9448d
docs: always surround __init__ with `` in docs
...
Issue #4086
2019-10-21 19:56:58 +02:00
Ammar Najjar
68a7d05ed8
docs: use __init__ method instead of constructor
...
Issue #4086
2019-10-21 15:42:24 +02:00
Eugenio Lacuesta
e1fa1fd8ad
TextResponse.follow_all: skip invalid links
2019-10-10 00:37:30 -03:00
Eugenio Lacuesta
5f168cd459
Response.follow_all
2019-10-08 16:32:56 -03:00
Eugenio Lacuesta
e0fabab5cc
Fix TypeError when using DummyStatsCollector
2019-10-01 18:03:22 -03:00
Eugenio Lacuesta
07a31b13db
Update LogFormatter tests
2019-10-01 17:55:57 -03:00
Adrián Chaves
7f4f98fd38
Provide complete API documentation coverage of scrapy.linkextractors
2019-09-30 18:22:28 +02:00
s-sanjay
2c14692e60
remove .keys() to avoid creating a tmp list/keyview obj ( #4031 )
...
Also add --verbose and --nolinks for code coverage
2019-09-27 09:56:43 +02:00
Mikhail Korobov
31c631f9ee
Merge pull request #3999 from Gallaecio/documentation-coverage
...
Provide complete API documentation coverage of scrapy.item
2019-09-25 16:13:13 +01:00
Adrián Chaves
1236e9e81e
Provide complete API documentation coverage of scrapy.item
2019-09-25 13:24:56 +02:00
Mikhail Korobov
1364e92007
Merge pull request #4015 from elacuesta/remove_deprecated_xlib
...
Remove deprecated xlib module
2019-09-20 15:28:07 +01:00
Mikhail Korobov
17c0d72d04
Merge pull request #4016 from elacuesta/rule_default_link_extractor
...
Crawling rules: make link extractors optional
2019-09-20 15:27:17 +01:00
Eugenio Lacuesta
27436cbbc9
[test] LogFormatter.error
2019-09-16 12:12:10 -03:00
watsta
0b52fa6ca9
LogFormatter: Add the ability to skip log messages ( #3987 )
2019-09-16 14:12:04 +02:00
OmarFarrag
13735bcf34
Disallow media extensions unregistered with IANA ( #3954 )
...
Co-Authored-By: s-sanjay <sanjay537@gmail.com>
2019-09-16 14:04:06 +02:00
Eugenio Lacuesta
21ad8e20b9
Crawling rules: make link extractors optional
2019-09-13 17:32:42 -03:00
Eugenio Lacuesta
c5612f387b
Remove deprecated xlib module
2019-09-13 14:32:05 -03:00
Mikhail Korobov
534de7395d
Merge pull request #3988 from elacuesta/contracts_cb_kwargs
...
CallbackKeywordArgumentsContract
2019-09-08 04:23:16 +05:00
OmarFarrag
0e8770a2f4
test for files pipeline ftp store
2019-09-06 15:47:57 +02:00
Eugenio Lacuesta
b92b114633
[test] cb_kwargs contract
2019-08-31 02:44:09 -03:00
Marc Hernández
ace2df3d14
Fix JSONRequest naming ( #3982 )
2019-08-30 11:03:44 +02:00
Júlio César Batista
b84f99ff5d
Merge
2019-08-29 11:11:56 -03:00
Júlio César Batista
110bc92e6b
Fix default value of FEED_STORAGE_GCS_ACL
2019-08-29 11:10:00 -03:00
Mikhail Korobov
ede91478e5
Merge pull request #3966 from anubhavp28/robotstxt_useragent
...
Adds ROBOTSTXT_USER_AGENT setting
2019-08-28 22:00:17 +05:00
Anubhav Patel
3a7b949d6d
Adds integration with Protego robots.txt parser ( #3935 )
2019-08-27 09:41:31 +02:00
Anubhav Patel
00fe05e536
adds ROBOTSTXT_USER_AGENT setting
2019-08-19 09:24:16 +05:30
Andrey Rakhmatullin
aaa5229e5d
Fixes and improvements for DOWNLOADER_CLIENT_TLS_CIPHERS.
2019-08-13 16:56:26 +05:00
Andrey Rakhmatullin
9a8edf2bf1
Tests for setting SSL ciphers.
2019-08-13 16:53:19 +05:00
Mikhail Korobov
73d1b4b748
Merge pull request #3939 from Gallaecio/improve-scrapes-contract
...
Report all missing fields when a scrapes contract fails
2019-08-08 13:49:09 +05:00
Mikhail Korobov
b4556d6508
Merge pull request #3941 from starrify/ftp-storage-uri-unquote
...
[MRG+1] Added: Properly handling quoted passwords in FEED_URI for FTP
2019-08-08 13:38:17 +05:00
Adrián Chaves
9119798a5c
Add test coverage for contract failures involving multiple missing fields
2019-08-08 09:52:03 +02:00
Marc Hernández
d76b6944c9
Create Request from curl command ( #3862 )
2019-08-08 09:43:42 +02:00
elacuesta
5dbeece8da
[MRG+1] Drop py34 support - Update CI envs ( #3892 )
...
* Drop py34 support
* Travis experiments
* More Travis experiments
* Bump Twisted version for py35+ (stretch)
* Remove Debian build
* Remove pinned lxml for Py34
* Fix merge error
* Remove unused tox env
* Add environment with pinned versions for py36
* Bump minimum Twisted version in py27; Envs with pinned versions for py27 and py35
* Add botocore as extra dep for py27 tests
* Update requirements-py2.txt
* Add botocore and Pillow as extra dependencies
2019-08-07 12:36:52 +05:00
Pengyu Chen
7b755a41a1
Added: Properly handling quoted passwords in FEED_URI for FTP
2019-08-06 15:19:57 +01:00
Anubhav Patel
8e813953bd
[MRG+1] [GSoC 2019] Interface for robots.txt parsers ( #3796 )
...
Make the robots.txt parser configurable through the new ROBOTSTXT_PARSER setting, support the Reppy and Robotexclusionrulesparser parsers, and allow implementing custom robots.txt parsers.
2019-08-02 09:43:29 +02:00
Renne Rocha
a25e09ecdd
Added constrain on lxml version based on Python version
2019-07-30 23:24:41 -03:00
Mikhail Korobov
9c514b976f
Merge pull request #3450 from wRAR/tls-logging
...
Log cipher, certificate and temp key info on establishing an SSL connection
2019-07-24 01:45:40 +05:00
Eugenio Lacuesta
7e3a602d56
Suggested changes
2019-07-15 12:37:09 -03:00
Eugenio Lacuesta
d5a2a70329
Fix import
2019-07-13 23:47:41 -03:00
Eugenio Lacuesta
ef9a619214
More DeprecationWarnings
2019-07-13 23:36:39 -03:00
Eugenio Lacuesta
eced544d64
Prevent even more DeprecationWarnings
2019-07-13 22:16:23 -03:00
Eugenio Lacuesta
40086dabb8
Prevent more DeprecationWarnings
2019-07-13 22:14:00 -03:00
Eugenio Lacuesta
92d624c161
[Tests] Prevent more TestCase DeprecationWarnings
...
* assertRegexpMatches -> assertRegex
2019-07-13 20:55:45 -03:00
Eugenio Lacuesta
b714a372e2
[Tests] Prevent more DeprecationWarnings
...
* assertRegexpMatches -> assertRegex
* invalid escape sequence \[
2019-07-13 20:23:15 -03:00
Eugenio Lacuesta
09e27d2d2e
[Tests] Monkey patch unittest.TestCase to prevent DeprecationWarning(s)
2019-07-13 19:26:59 -03:00
Andrey Rakhmatullin
a96a07bc76
Add a test for DOWNLOADER_CLIENT_TLS_VERBOSE_LOGGING.
2019-07-12 18:44:45 +05:00
Luiz Francisco Rodrigues da Silva
df68c4b9b1
Add a setting to use active mode in FTPFeedStorage ( #3829 )
...
Add a setting to use active mode in FTPFeedStorage
FTP servers can be configured in active and passive mode, by default
Python and Scrapy use passive mode and there was no way to use active.
This commit adds a setting FEED_STORAGE_FTP_ACTIVE to allow a feed
to be exported to a FTP server configured in active mode.
2019-07-10 14:25:52 +02:00
nyov
5442c2d3c3
Updating S3FeedStorage instancing without AWS key.
2019-07-06 13:41:56 +00:00
nyov
7a398b7086
Deprecation removals for Scrapy 1.7
...
Removing deprecations of 2015 and prior (pre-1.1)
2019-07-06 13:41:56 +00:00
Daniel Graña
3d8f075b0a
Merge pull request #3840 from mabelvj/itemloader-errors
...
[MRG+1] Itemloader errors #3836
2019-07-05 08:55:43 -03:00
Mikhail Korobov
9aec7856b0
Merge pull request #3794 from csalazar/whitelist-form-methods-in-fromresponse
...
[MRG+1] Fix form methods in FormRequest.from_response (#3777 )
2019-07-02 20:08:14 +05:00
Eugenio Lacuesta
312e57382c
Request.cb_kwargs: update in spider middleware
2019-06-26 12:48:00 -03:00
Eugenio Lacuesta
d4d68cf321
Request.cb_kwargs: update in downloader middleware
2019-06-26 12:31:41 -03:00
Eugenio Lacuesta
1f9f41b850
Move request.cb_kwargs tests to their own test file
2019-06-26 12:31:12 -03:00
Eugenio Lacuesta
428309ba1a
Merge remote-tracking branch 'origin/master' into callback_kwargs
2019-06-26 11:03:31 -03:00
Mikhail Korobov
c81d120bde
Merge pull request #3768 from Gallaecio/meta-ignore-tags
...
Implement the METAREFRESH_IGNORE_TAGS setting
2019-06-25 23:25:58 +03:00
Mabel Villalba
b1e348b281
[itemloader-errors] updated Compose and MapCompose messages and added tests
...
#3836
2019-06-25 17:11:14 +02:00
Mabel Villalba
a753ea7e16
[itemloader-errors] added test for Compose and MapCompose
...
#3836
2019-06-25 14:35:49 +02:00
Mabel Villalba
99eb03a810
[itemloader-errors] adapted compose test for the new error being returned by compose
...
#3836
2019-06-25 14:24:27 +02:00
Victor Torres
f4f2b1695c
Fix a memory leak on the Media Pipeline (Files and Images) ( #3813 )
...
We're storing exceptions captured by Twisted on the media pipeline
cache, but we're also using the defer.returnValue method with our
own methods decorated with @defer.inlineCallbacks.
The defer.returnValue method passes returned values forward by
throwing a defer._DefGen_Return exception, which in its turn
extends the BaseException class and is captured by Twisted.
This way, the latest exception stored in the Failure's object may
also have an HtmlResponse object in its __context__ attribute. As
the Response object also keeps track of the Request object that
has originated it, you could figure it out how many RAM we're
wasting here.
This could easily lead to a Memory Leak problem when running
spiders with Media Pipeline enabled and a particular Request set
that tends to raise a significant number of exceptions.
Example triggers:
- media requests with 404 status responses
- user land exceptins coming from custom middlewares
- etc.
2019-06-24 12:38:05 +02:00
Daniel Graña
b53ff59a22
Merge pull request #3790 from andrewbaxter/master
...
[MRG+1] Account for mangling when serializing requests with private callbacks
2019-06-17 12:33:21 -03:00
Daniel Graña
31cdb940ff
Merge pull request #3833 from anubhavp28/remove_unused_var
...
removes unused var
2019-06-17 11:50:49 -03:00
Anubhav Patel
b8900ec6a6
removes unused var
2019-06-17 00:06:44 +05:30
Daniel Graña
cdfb20aee8
Merge pull request #3739 from Matthijsy/feature/scrapy_check_env
...
[MRG+1] Add SCRAPY_CHECK environment variable
2019-06-13 19:43:01 -03:00
sortafreel
cdeccac6d6
Linting (return previous indentation).
2019-06-11 17:38:06 +03:00
sortafreel
7dad2f7b13
Add more tests.
2019-06-11 07:43:03 +03:00
sortafreel
a1bca6a8e7
Add tests.
2019-06-11 07:36:29 +03:00
Claudio Salazar
0c50879568
Change behavior to use method GET when there are unknown methods
...
in the form
2019-06-06 22:10:59 +02:00
Andrew Baxter
6af1dc89aa
Fix mangling test
2019-06-06 04:25:19 +09:00
Andrew Baxter
3dd3e8c298
Restrict different class mangling tests to Py 3+
2019-06-05 23:49:54 +09:00
Andrew Baxter
9c81721c40
Add tests for private method name mangling
2019-06-05 23:43:56 +09:00
Andrew Baxter
bcad8947e8
Support inherited private method names
2019-06-03 20:41:02 +09:00
Andrew Baxter
9af91a26b0
Replace regex usage
2019-05-28 01:40:26 +09:00
Andrew Baxter
72b7d3e90a
Make the regex align to the spec better; add unit tests for name variations
2019-05-27 23:30:23 +09:00
Claudio Salazar
461682fc3d
Whitelist form methods in FormRequest.from_response method
2019-05-25 11:01:19 +02:00
Andrew Baxter
e667ca7682
Account for mangling when serializing requests with private callbacks
2019-05-24 21:45:53 +09:00
Adrián Chaves
611249bb7f
Implement the METAREFRESH_IGNORE_TAGS setting
2019-05-08 12:52:29 +02:00
Matthijs Vos
f6485e6697
Restore alphabetic order and two lines between import and code
2019-05-03 13:55:18 +02:00
Matthijs Vos
6d52708579
Add reset case
2019-04-18 15:19:23 +02:00
Matthijs Vos
2973998947
Add set_environ test
2019-04-18 14:50:02 +02:00
Mikhail Korobov
5b667b6156
Merge pull request #3707 from Gallaecio/pytest-xdist
...
Use pytest-xdist
2019-04-17 13:20:37 +05:00
Adrián Chaves
5a6fb3daa6
Use pytest-xdist
2019-04-17 09:02:34 +02:00
Mikhail Korobov
9280185054
Merge pull request #3520 from whalebot-helmsman/round-robin-scheduler-tested
...
[MRG+1] Downloader-aware Priority Queue for Scrapy
2019-04-07 00:06:08 +05:00
Maram Sumanth
aa46e1995c
[MRG+1] Show elapsed time in statscollector ( #3638 )
...
* Update corestats.py
* Update corestats.py
* corrected tests
* Update corestats.py
* Update scrapy/extensions/corestats.py
2019-04-07 00:03:40 +05:00
Kostis Anagnostopoulos
3a493b6066
fix: do not catch system exceptions like KeyboardInterrupt
2019-04-05 11:52:00 +02:00
Konstantin Lopuhin
b5c552d17f
Merge pull request #2061 from elacuesta/process_spider_exception_generator
...
[MRG+1] process_spider_exception on generators
2019-04-01 10:43:19 +03:00
Eugenio Lacuesta
f5e0b6b89a
parse command: rename cb_kwargs option to cbkwargs
2019-03-29 14:03:26 -03:00
Eugenio Lacuesta
e8af6331b5
Add cb_kwargs option to the parse command
2019-03-28 15:03:40 -03:00
Eugenio Lacuesta
70a4d93aa3
Callback kwargs: more tests
2019-03-28 13:28:19 -03:00
Mikhail Korobov
ec719f55e7
Merge pull request #3682 from elacuesta/rule_process_request_response_parameter
...
[MRG+1] Rule.process_request: access Response object
2019-03-28 01:39:54 +05:00
Eugenio Lacuesta
c43a23152b
Merge remote-tracking branch 'upstream/master' into callback_kwargs
2019-03-27 14:42:41 -03:00
Maram Sumanth
2fd8b7c28c
[MRG+1] redirect_reasons in Request.meta ( #3687 )
2019-03-27 00:15:53 +05:00
Adrián Chaves
ba13de29e1
Merge branch 'master' into feat-685
2019-03-26 10:38:38 +01:00
Vostretsov Nikita
73e4ff5304
report warnings
2019-03-25 13:48:58 +00:00
Vostretsov Nikita
103fdc40c1
Merge remote-tracking branch 'upstream/master' into round-robin-scheduler-tested
2019-03-25 16:16:42 +03:00
Vostretsov Nikita
31b8a6b33a
report warnings
2019-03-25 16:08:40 +03:00
Lucy Wang
df574de8cc
improve tests and fix some lint warnings ( #6 )
...
* refactor downloader-aware test cases
* fix lint
* add doctest for _path_safe
* remove unused code
* better doctest
2019-03-25 16:08:40 +03:00
Vostretsov Nikita
8afffb7234
Tests Cleanup
...
add doctest for function
no need in this variables
move common assertion inside function
rename variable
rename variables
rename function
use function
this is not a method of public API
correct name for test
Update docs/topics/settings.rst
Co-Authored-By: whalebot-helmsman <whalebot.helmsman@gmail.com>
2019-03-25 16:08:40 +03:00
Vostretsov Nikita
989bba6cb3
Revert "new signal"
...
This reverts commit 646164fd7d6dd52061804d2df7424cff929bf739.
remove tests
Revert "emit new signal"
This reverts commit fcde0c6880678957a76af6083b6248f430a00fcf.
Revert "documentation for new signal"
This reverts commit 8aeb9f696ece95c16499a96767a7afa3d9c4abf4.
2019-03-25 16:08:40 +03:00
Vostretsov Nikita
443fb98a47
Use downloader directly
...
rename variable
remove old write function
remove unused imports
remove old read function
remove unused function
use mock methods
mock downloader
close downloader
add parse method
use new PQ class
create mock downloader
use downloader directly
remove mark/unmark mechanism
2019-03-25 16:08:40 +03:00
Vostretsov Nikita
3b1db71dac
New signal
...
update signature
documentation for new signal
utilize new signal
correct signal handler signature
emit new signal
test another signal
new signal
rename test file
faster test
rename test case
tests for signal emitting in bad cases
2019-03-25 16:08:40 +03:00
Vostretsov Nikita
757f53a324
Address Lucy's comments
...
add tests to check correctness of slot setermination
unmark requests after downloading
shorter
better exception message
2019-03-25 16:08:40 +03:00
Mikhail Korobov
90934959d0
actually apply __slots__ suggestion
...
[wip] refactoring
* SlotPriorityQueues doesn't care about objects inside, it is now just
a container for multiple priority queues
* assorted variable renames
* don't inherit DownloaderAwarePriorityQueue from SlotBasedPriorityQueue
* apply @whalebot-helmsman's suggestions for __slots__ and meta issues
more bike-shedding
* remove mutable default arguments
* more verbose variable names
remove unneeded code
* PriorityAsTupleQueue.is_empty does the same as len(self) == 0
* custom PriorityAsTupleQueue.close is not needed after a switch
to namedtuples
* is_new and is_empty return values are unused
* "url" local variable is unused
PrioritySlot.__str__ shouldn't return unicode in Python 2
also, do some bike-shedding: _pathable -> _path_safe
use namedtuple for PrioritySlot
cleanup: _get_from_request does the same here
Request.meta is always a dict
2019-03-25 16:08:40 +03:00
Eugenio Lacuesta
1b4385b7e3
Rule.process_request: move deprecation warnings and compiling code, update tests
2019-03-22 19:46:17 -03:00
Mikhail Korobov
729580dae2
Merge pull request #3671 from Gallaecio/item-deepcopy
...
Implement Item.deepcopy()
2019-03-22 22:56:39 +05:00
Adrián Chaves
7c148fce5a
Implement Item.deepcopy()
2019-03-22 17:07:10 +01:00
Konstantin Lopuhin
af2b666595
Merge pull request #3505 from kasun/json_request
...
[MRG+2] Request subclass for json requests #3504
2019-03-22 18:25:54 +03:00
Vostretsov Nikita
987c2ae4a9
test ip concurrency incompatibility with DAPQ
2019-03-22 15:40:37 +03:00
Vostretsov Nikita
4163a7a1c7
no need for this
2019-03-22 15:40:37 +03:00
Vostretsov Nikita
d970be64cc
Integration test
...
integration testing only everything is working, not logic of PQ
use method
create slot attribute in constructor
corect class for test case
stop crawler in teardown method
use class
correct entity naming
python 2 adaptation
integration test with crawler and spider
2019-03-22 15:40:36 +03:00
Vostretsov Nikita
a23e1894b3
Fix boto problem
...
another way to fix boto problem
Revert "fix for travis ci based on https://github.com/boto/boto/issues/3717 "
This reverts commit 150d2564ff0ea994652da7f5be333d72e0b38d93.
fix for travis ci based on https://github.com/boto/boto/issues/3717
2019-03-22 15:40:36 +03:00
Vostretsov Nikita
f56079f6c7
Test cleanups
...
PEP8 fixes
no need to close implicitly
do not use pytest
need to put it into class
remove round-robin queue
additional check for empty queue
use pytest tmpdir fixture
2019-03-22 15:40:36 +03:00
Vostretsov Nikita
821f5bb260
First implementation
...
handle exception
use O(N) instead of O(NlogN)
here we have request as struct
additional check for meptiness
small performance improvement
do not consume another request
test number of responses
mark requests
back to 3 slots test case
raise exceptions in case of missed meta
add marks to requests and work only with your own requests
only disk queue should obtain signals
separate functions for slot rasd/write
use signlas without variable
stop crawler
get signals in correct place
logic test for download-aware priority queue
update comment for structure
ensure text type
transform slot name to path
use implicit structure
use unicode type implicitly
use real crawler
add signals
more slot accounting
simple implementation of pop
small slot accounting code
no need for custom len function
ability to call super in py27
add slots
generic tests for downloader aware queue
dummy implementation of crawler aware priority queue
move common logic to base class
rename class
pass crawler to pqclass constructor
do not copy quelib.PriorityQueue code
add comment about new class
remove obsolete function
modify behaviour of queuelib.PriorityQueue to dodge very complex priority
better way to get name
remove obsolete commentary
check boundaries
function for priority convertion with known limits
correct import path
move file
do not switch on by deffault as ip concurrency not supported
set scheduler slot in case of empty slot
use constant
single place for added urls
single place for constants
use as default queue
correct format for error text
test migration from old version with on disk queue
in these tests we have only two inflection points - jobdir and priority_queue_cls
we do not need separate mock spider, use usual one
do not rely on order of dict elements, imply order of list
test round robiness of priority queue
add comments and requirements for our magick function
remove debug logging
put queues into slot
as we fabricate priorities we do not need special types anymore
fabricate priority for priority queue
more versatile priorities
Scheduler class is not inflection point
wrap correct types
check for emptinees before initialization
tests for new priority queue
correct default type for startprios
use exact values
put common settings to base class
test priorities for disk scheduler
test dequeue for disk scheduler
test length for disk scheduler
setUp/tearDown methods for on disk schedulers
new methods
remove excessive line
base class to handle scheduler creation
correct method names
test priorities
deque test
close scheduler on test end
enqueue some requests
test template for scheduler
use downloader slot
I/O implementation for RoundRobin queue
round-robin implementation without I/O and slot detection
wrappers for every disk queue class
2019-03-22 15:40:36 +03:00
Eugenio Lacuesta
6760bca74b
Rename Request.kwargs to Request.cb_kwargs
2019-03-15 22:42:29 +00:00
Eugenio Lacuesta
645e8d16a4
Count keyword argument checks
2019-03-15 22:20:36 +00:00
Eugenio Lacuesta
01ed605d02
PEP8 changes to test_spider.py
2019-03-15 16:54:14 +00:00
Victor Torres
fda1d04b81
Merge branch 'master' into feed-storage-s3-acl
2019-03-15 13:26:45 -03:00
Adrián Chaves
70a0f1f2e4
Merge pull request #3610 from Gallaecio/spidercls-check
...
[MRG+1] Check that spidercls arguments in scrapy.crawler classes are not spid…
2019-03-15 08:25:16 +01:00
Adrián Chaves
1f7413dc88
Merge pull request #3635 from matthieucham/feature-filteringlinkextractor-restrict-text
...
[MRG+1] Feature filteringlinkextractor restrict text
2019-03-15 07:58:28 +01:00
Mikhail Korobov
5dc94db847
Merge branch 'master' into backward
2019-03-14 22:21:09 +05:00
Eugenio Lacuesta
22fda61d62
Rule.process_request: tests
2019-03-13 10:54:38 +00:00
Adrián Chaves
75d6f56c8a
Switch from ` to `` where inline code formatting is desired
2019-03-01 16:56:58 +01:00
Adrián Chaves
858f5be747
backwards → backward (adj.)
2019-03-01 16:10:23 +01:00
Matthieu Grandrie
e3b15252c8
New constructor arg *restrict_text* for FilteringLinkExtractor.
...
Same as allow and deny args, it holds a string, a regex or an iterable of. Links whose text don't match one of the regex are filtered out.
DOC restrict_text in LxmlLinkExtractor
2019-02-28 17:21:17 +01:00
Júlio César Batista
0bb3d8ca93
Updating Google Cloud Storage scheme to gs instead of gcs
2019-02-27 18:41:01 -03:00
Victor Torres
9b8ba4c383
try to import botocore before runing some tests
2019-02-14 16:20:56 -02:00
Victor Torres
ea8be627d1
botocore is not supported on debian jessie
2019-02-13 20:32:36 -02:00
Victor Torres
dc0b643832
refactoring tests to avoid mocking private method
2019-02-13 19:44:50 -02:00
Adrián Chaves
03e61b9908
Check that spidercls arguments in scrapy.crawler classes are not spider objects
2019-02-12 14:46:27 +01:00
Victor Torres
1eac2a163c
simplifying how we deal with threads.deferToThread calls
2019-02-08 16:50:39 -02:00
Victor Torres
f824f5b2d1
testing public method store instead of private method _store_in_thread
...
need to mock deferToThread function
2019-02-08 15:51:23 -02:00
Victor Torres
079af889e7
also testing without botocore
2019-02-08 15:51:23 -02:00
Victor Torres
126207fb7b
PEP8: use short name for mock method
2019-02-08 15:51:23 -02:00
Victor Torres
ad83ffdf1f
refactoring
2019-02-08 15:51:23 -02:00
Júlio César Batista
2bbbd02bda
Adding an option to set ACL while uploading the blob to GCS
2019-02-08 09:45:10 -02:00
Júlio César Batista
a4059851e7
Refactoring tests
2019-01-31 18:29:15 -02:00
Júlio César Batista
5a55c4269d
Adding GCSFeedStorage
2019-01-31 17:20:29 -02:00
Daniel Graña
65d631329a
Be consistent with domain used for links to documentation website
2019-01-31 01:28:53 -03:00
Júlio César Batista
8eade7d864
Testing stats and log messages from RFPDupeFilter
2019-01-18 11:39:35 -02:00
kasun Herath
f3813e376c
Merge remote-tracking branch 'origin/master' into json_request
2019-01-14 23:03:21 +05:30
kasun Herath
3f914f6d8c
made jsonrequest dump into private method
2019-01-14 23:03:14 +05:30
Eugenio Lacuesta
57e7c76977
Test callback kwargs
2019-01-09 10:40:44 -03:00
Eugenio Lacuesta
770a501fb3
Test request kwargs (copy, serialization)
2019-01-09 10:40:03 -03:00
Eugenio Lacuesta
9759112a3a
Merge branch 'master' into process_spider_exception_generator
2019-01-03 11:34:07 -03:00
Victor Torres
fe283bcd05
add test case for sitemap filter with alternate links
2018-12-27 11:40:14 -03:00
Victor Torres
5e7ecf9dc1
add tests for sitemapindex
2018-12-27 11:40:14 -03:00
Victor Torres
657f0663b3
rename param from urls to entries
2018-12-27 11:40:14 -03:00
Victor Torres
d7d5917ff1
add tests for the sitemap_filter method in the SitemapSpider class
2018-12-27 11:40:14 -03:00
Daniel Graña
93cf38354d
Merge pull request #3394 from hcoura/dh-lazyloading-optional
...
Make lazy loading Download Handlers optional
2018-12-26 11:16:19 -03:00
Daniel Graña
f6ce716372
Merge pull request #3476 from elacuesta/deque_appendleft
...
[MRG+1] Use collections.deque instead of list to store MiddlewareManager's methods
2018-12-26 11:13:52 -03:00
Mikhail Korobov
dbfabf02e8
Merge branch 'master' into telnet-auth
2018-12-26 01:04:34 +05:00
kasun Herath
8f1507a4a5
dumps_kwargs
2018-12-17 23:14:06 +05:30
kasun Herath
ecda69130e
allow to send empty data values and docs changes
2018-12-10 22:34:49 +05:30
kasun Herath
c347acbff6
warning if body and data are provided
2018-12-09 11:27:09 +05:30
kasun Herath
cd619c1d4f
removed overriden replace method
2018-12-08 22:10:45 +05:30
kasun Herath
1b2b8b4bf0
fix tests under py3
2018-11-27 08:57:44 +05:30
kasun Herath
1ce6662a9d
Implement Request subclass for json requests
2018-11-24 20:02:00 +05:30
Eugenio Lacuesta
f97e3e90f2
Use collections.deque instead of list to store methods
2018-10-29 12:40:20 -03:00
Eugenio Lacuesta
e0360e5223
Add tests for MutableChain
2018-10-11 11:55:13 -03:00
Eugenio Lacuesta
2396356a82
Merge branch 'master' into process_spider_exception_generator
2018-10-10 11:37:43 -03:00
Henrique Coura
441e1e750f
Style changes
2018-09-26 13:28:34 -03:00
Henrique Coura
e57a629efc
Generate only password, encode username/password only on login
2018-09-26 11:54:57 -03:00
Henrique Coura
37cfb49805
Randomly generate telnet credentials by default
2018-09-24 16:42:49 -03:00
Mikhail Korobov
2c3b2158c9
DOC address @stummjr's review comments
...
* fixed several small issues
* re-written "Creating Selectors" section
* fixed remaining .extract usage in tests
2018-09-18 05:02:17 +05:00
Mikhail Korobov
53da56c8dc
TST update tests to use get/getall/attrib instead of extract
2018-09-12 17:57:27 +05:00
Daniel Graña
7223978594
Merge pull request #3381 from StasDeep/fix/issue-3380
...
[MRG+1] Use dont_filter=True for contracts requests
2018-09-06 11:41:02 -03:00
Daniel Graña
2aae514f99
Merge branch 'master' into fix/issue-3380
2018-09-05 12:25:07 -03:00
Daniel Graña
d7b98a3714
Merge branch 'master' into feature/issue-3364
2018-09-05 11:26:59 -03:00
Daniel Graña
ae8a0dc77c
Merge pull request #3383 from StasDeep/feature/issue-3382
...
[MRG+1] Add ability to use FormRequest in contracts
2018-09-05 11:21:26 -03:00
Daniel Graña
4da0b59cd7
Merge pull request #3393 from whalebot-helmsman/singal-request-added-to-downloader-slot
...
[MRG+1] New signal for reqeuests reached downloader
2018-09-05 11:17:13 -03:00
Stas Glubokiy
8dbbbd1395
Use request_cls attribute in contract definition
2018-09-03 20:07:37 +03:00
Henrique Coura
167211ffb0
Default is lazy, load_object exception handling, code improvements
2018-08-20 15:54:04 -03:00
Stas Glubokiy
9ab85fe788
Merge branch 'master' of github.com:StasDeep/scrapy into feature/issue-3382
2018-08-19 17:21:28 +03:00
Stas Glubokiy
57824600a8
Use six.get_unbound_function in test_same_url
2018-08-19 16:56:41 +03:00
Stas Glubokiy
0467737cf0
Fix mockserver usage
2018-08-18 15:43:46 +03:00
Stas Glubokiy
1311f6b536
Merge branch 'master' of github.com:StasDeep/scrapy into fix/issue-3380
2018-08-18 15:42:10 +03:00
Stas Glubokiy
11576f5c8f
Merge branch 'master' of github.com:StasDeep/scrapy into feature/issue-3364
2018-08-18 15:24:07 +03:00
Henrique Coura
5bac436764
Make lazy loading Download Handlers optional
2018-08-17 15:07:37 -03:00
Vostretsov Nikita
afb1458bd3
tests for new signal
2018-08-17 14:39:54 +00:00
Mikhail Korobov
c7654f7cb1
Merge pull request #3379 from StasDeep/fix/issue-3378
...
Use inspect.getmembers in tested_methods_from_spidercls
2018-08-17 19:25:41 +05:00
Stas Glubokiy
ddd69f4c10
Use MockServer in test_same_url
2018-08-15 20:39:43 +03:00
Stas Glubokiy
2cb4decb6a
Move TestSameUrlSpider to test method
2018-08-15 20:36:10 +03:00
Stas Glubokiy
4de493efdd
Add test_same_url
2018-08-15 20:24:00 +03:00
Daniel Graña
38608bc249
Use ignore_errors option from rmtree
2018-08-15 11:59:09 -03:00
Daniel Graña
4eaf8690b1
Twisted's unittest.Testcase assertRaiess can't be used as context manager
2018-08-15 08:54:18 -03:00
Daniel Grana
a304d6b692
Workaround to pass tests/test_feedexporter.py under windows
2018-08-15 02:23:07 -07:00
Daniel Grana
e7fe243c3e
Fix test_crawler under windows
2018-08-15 01:09:23 -07:00
Daniel Grana
96517cb7de
Fix test_command_parse under windows
2018-08-15 01:08:40 -07:00
Daniel Graña
d93d960319
Fix test_utils_project under Windows
2018-08-15 01:53:20 -03:00
Jakob de Maeyer
cb28175750
Fix csviter tests by explicitly using newline only
2018-08-15 01:35:01 -03:00
Daniel Graña
ca53a8699a
Fix presentation of template directory in startproject command
2018-08-15 01:35:01 -03:00
Daniel Graña
0e532e3dd8
Creating a connection to 0.0.0.0 fails on windows but not on linux nor mac
2018-08-15 01:35:01 -03:00
Daniel Graña
a21abac743
fix ftp tests on windows
2018-08-15 01:35:01 -03:00
Daniel Graña
fb09148c91
Fix bad merge on ParseCommandTest
2018-08-15 01:35:01 -03:00
Jakob de Maeyer
22505a34a9
Fix cmdline profiling test on Windows by using proper path composing
2018-08-15 01:35:01 -03:00
Jakob de Maeyer
034152961d
Fix Feedexport test in Windows by using proper file URI
2018-08-15 01:35:01 -03:00
Daniel Graña
ed8255bde0
Fix merge issues with stderr/out fixes for windows buffering
2018-08-15 01:33:38 -03:00
Jakob de Maeyer
57a1d66c61
Fix test issues caused by Windows pipe buffer filling up
2018-08-15 01:33:38 -03:00
Jakob de Maeyer
152fde70b1
Fix FTPTestCase by using Windows-friendly temporary file name
2018-08-15 01:33:38 -03:00
Daniel Graña
19ad94105f
pywin32 is required to run tests under windows
2018-08-15 01:33:38 -03:00
Daniel Graña
4c53957f5b
Skip leveldb tests on windows
2018-08-15 01:33:38 -03:00
Stas Glubokiy
b4b1e48343
Add ability to use FormRequest in contracts
2018-08-11 22:18:43 +03:00
Stas Glubokiy
76220e8733
Use inspect.getmembers in tested_methods_from_spidercls
2018-08-11 18:49:12 +03:00
Stas Glubokiy
8bc536d88b
Merge branch 'master' of github.com:StasDeep/scrapy into feature/issue-3364
2018-08-11 18:34:37 +03:00
Stas Glubokiy
ebbde57eca
Add custom contracts tests
2018-08-11 18:21:07 +03:00
Stas Glubokiy
16dad81715
Fix contract errback
2018-08-09 21:07:25 +03:00
Eugenio Lacuesta
40449fa0eb
Update docs, add tests, remove FIXME comment
2018-08-03 18:20:25 -03:00
Eugenio Lacuesta
8c55f5eb15
Simplify check for re-raised exception. Add tests.
2018-08-03 15:16:26 -03:00
Daniel Graña
db714f5a07
Merge pull request #3283 from CCInCharge/issue3247
...
Fix #3247 : Allow scrapy.FormRequest.from_response method to handle duplicate keys
2018-08-02 14:49:14 -03:00
Eugenio Lacuesta
801d3c07b4
Fix bad exception handling, add tests
2018-07-27 15:06:37 -03:00
Eugenio Lacuesta
d6d3e87e3a
Rename test file
2018-07-27 14:47:52 -03:00
Eugenio Lacuesta
9e14f8c7e4
Fix test for dupefilter
2018-07-26 16:24:58 -03:00
Eugenio Lacuesta
0089a4ab31
Add test for direct creation of dupefilter (no from_crawler/from_settings)
2018-07-26 16:24:58 -03:00
Eugenio Lacuesta
d306fe30ac
Test dupefilter creation by the Scheduler
2018-07-26 16:24:58 -03:00
Eugenio Lacuesta
701cd2ff9d
Add from_crawler support to dupefilters
2018-07-26 16:24:58 -03:00
CCInCharge
782f866572
Fix #3247 : Allow scrapy.FormRequest.from_response method to handle duplicate keys
2018-07-25 21:46:42 -07:00
Daniel Graña
b6abd45926
Merge pull request #3342 from elacuesta/copy-request-flags
...
[MRG+1] Include flags when copying requests
2018-07-25 11:58:25 -03:00
Eugenio Lacuesta
784eed1130
Improve test coverage (downloader middleware)
2018-07-20 19:08:46 -03:00
Eugenio Lacuesta
917c1fde68
Merge branch 'master' into enhancement/alternate-feedexport-constructors
2018-07-20 12:09:50 -03:00
Eugenio Lacuesta
98d74d1083
Requested changes
2018-07-20 12:08:49 -03:00
Eugenio Lacuesta
6a38fc39f8
Include flags when copying requests
2018-07-19 11:56:23 -03:00
Eugenio Lacuesta
71a1406c99
Logging changes
2018-07-18 17:43:05 -03:00
Eugenio Lacuesta
6329441c82
ModuleNotFoundError was added in py3.6
2018-07-18 17:31:31 -03:00
Eugenio Lacuesta
a3af0bfd56
More tests
2018-07-18 15:15:55 -03:00
Eugenio Lacuesta
56e92d90fd
Update tests
2018-07-17 15:15:38 -03:00
Eugenio Lacuesta
e96b7782bc
Merge branch 'master' into process_spider_exception_generator_experiment
2018-07-15 18:17:37 -03:00
Eugenio Lacuesta
b8e8922d54
Simplify stuff. Add more tests.
2018-07-15 18:17:00 -03:00
Eugenio Lacuesta
cff9e87625
Fix tests
2018-07-15 16:21:08 -03:00
Eugenio Lacuesta
e7e18db179
Fix tests
2018-07-13 16:40:30 -03:00
Daniel Graña
01e317e79b
Merge pull request #3327 from nyov/deprecations
...
[MRG+1] Remove deprecated CrawlerSettings class and Settings attributes
2018-07-11 12:01:49 -03:00
Daniel Graña
9c6d265280
Merge pull request #3152 from nctl144/ftp_linkextractors
...
[MRG+1] add ftp to the scheme list
2018-07-11 11:50:02 -03:00
nyov
4f6778aa73
Remove deprecated CrawlerSettings class and Settings attributes
2018-07-09 17:16:31 +00:00
Konstantin Lopuhin
92b504eae5
Fix telnet warnings in tests
...
Disable telnet console if it's not available, else we'll get an extra
warning about failure to enable it, and tests will fail.
2018-07-09 13:44:02 +03:00
Konstantin Lopuhin
722e1afcdb
Update ancient pytest on python 3
...
2.9 gives collection errors on python 3.7 due to PEP 479.
2018-07-09 12:21:19 +03:00
Eugenio Lacuesta
0a0e62272e
New tests
2018-07-04 16:19:19 -03:00
Eugenio Lacuesta
0b2870634a
Do not inherit from object
2018-07-04 16:14:51 -03:00
chainly
74ce156154
add item_error to be catchable ( #3256 )
2018-07-03 16:00:59 -03:00
Eugenio Lacuesta
4fca9aba85
Recover from a callback exception
2018-07-01 13:45:18 -03:00
Eugenio Lacuesta
6ed9440ed5
Tests for exceptions on spider callbacks
2018-07-01 13:45:18 -03:00
Eugenio Lacuesta
735de8167d
Test for exceptions on process_spider_input
2018-07-01 13:45:18 -03:00
Mikhail Korobov
f11d65f7d6
TST make it clear which requirements are Python 2-only
...
* rename requirements.txt to requirements-py2.txt, to make it clear they are Python 2-only
* make requirements-py3.txt consistent with requirements-py2.txt
2018-06-29 18:34:11 +05:00
Daniel Graña
64f48efa26
Merge pull request #3308 from scrapy/fix-build
...
TST exclude lxml==4.2.2 from tests
2018-06-27 23:42:32 -03:00
Mikhail Korobov
45f67eb64d
TST exclude lxml==4.2.2 from tests, as it doesn't play well with Pillow
2018-06-28 01:02:30 +05:00
Mikhail Korobov
fac1b2f351
TST remove workaround for old Pillow versions which don't support BytesIO
2018-06-28 01:01:27 +05:00
Eugenio Lacuesta
ab48837f09
Merge branch 'master'
2018-06-24 20:31:37 -03:00
Grammy Jiang
9ad3af9d88
Update requirements.txt
...
make the version of ipython less than 6.0 in python 2.7
2018-06-23 17:31:54 +08:00
Grammy Jiang
88bd067912
fix the test case name of HttpProxyMiddleware
2018-06-20 16:56:46 +08:00
Vostretsov Nikita
72d0899bce
Return non-zero exit code from scrapy commands in case of spider bootstrap errors
...
* method to detect spider creation in crawler
* correct method name
* method to know if crawlers has spiders
* we do not need to issue requests
* set exit code accordingly to spiders in crawlers
* more portable way to check ofr exceptions
* more clear way
* test cases for several spiders per crawler
* grammatically correct name for method
* method is private
* grammatically correct name for method
* method is private
* remove unused import
* correct order of imports
* changes mechanism of obtaining spider status from method to object member
* rename tests
2018-06-14 19:58:48 +05:00
Vostretsov Nikita
b364d27247
[MRG+1] Automatic port selection for servicies in unit tests ( #3210 )
...
* ability to pass port as a parameter
* try to find free ports
* use environment variables to pass mock server address
* get mock server address from environment variables
* ability to select ports for proxy in runtime
* use common method for URLs from mock server
* https support
* get mock server address
* get mock address
* replace hand-written mechanism by kernel-based one
* use ephemeral ports in mockserver
* strip EOL from addresses
* use ephemeral port in proxy
* no need to restore environment as it is restored in tearDown
* decode bytes
* use mockserver address as a variable
* ability to pass address as variable
* per test-case mockserver
* use base class
* remove obsolete environment manipulation
* return usage of proxy for http cases
* common method for broking proxy auth credentials
* python version-independent url methods
2018-05-23 21:25:50 +03:00
Konstantin Lopuhin
bac1e2d47d
Merge pull request #3263 from whalebot-helmsman/no_twisted_18_4_0
...
[MRG+1] Blacklist twisted version with regression
2018-05-17 13:21:42 +03:00
Vostretsov Nikita
c5ddfddb7e
blacklist twisted version with regression in constraints file
2018-05-17 08:53:42 +00:00
rhoboro
5254ac393b
added test for gcs policy
2018-04-03 18:06:34 +09:00
Daniel Graña
6c3970e672
Merge pull request #3153 from virmht/new_bug
...
[MRG+1] Fixed bug FormRequest.from_response() clickdata ignores input[type=image]
2018-03-21 16:32:12 -03:00
Lucy Wang
1a2f0193a3
fix tests on jessie
2018-03-13 19:14:52 +08:00
Lucy Wang
d9e6c73fb3
revert wrong changes
2018-03-13 13:05:37 +08:00
Lucy Wang
e487100987
add a test case
2018-03-13 08:59:03 +08:00
Viral Mehta
65744c2199
Corrected Test
2018-03-03 20:07:50 +05:30
Viral Mehta
d5b7ebcfdc
Fixed bug FormRequest.from_response() clickdata ignores input[type=image]
2018-03-03 18:17:49 +05:30
nctl144
4c05441450
add ftp to the scheme list
2018-03-03 00:00:03 -05:00
NewUserHa
acd2b8d43b
[MRG+1] Fix part of issue #3128 - None should not be a valid type for 'url' in Response.follow ( #3131 )
...
* fix one issue of issue#3128
because @kmike posted: 'If url is '', Scrapy should follow the same page, this is an intended behavior.'
* fix one issue of issue#3128
because @kmike posted: 'If url is '', Scrapy should follow the same page, this is an intended behavior.'
2018-02-22 03:37:26 +05:00
Eugenio Lacuesta
e4558cb27e
Update test for unpickable objects
2018-02-08 15:03:57 -03:00
Eugenio Lacuesta
a56540877c
Do not serialize unpickable objects (py3)
2018-02-08 15:03:57 -03:00
Mikhail Korobov
ba15b63ed6
TST fix tests to account for changes in w3lib 1.19
2018-01-26 02:11:49 +05:00
Konstantin Lopuhin
041308afe7
Fix get_func_args test for pypy3
...
These built-in functions are exposed as methods in PyPy3.
For scrapy this does not matter as:
1) they do not work for CPython at all
2) get_func_args is checked for presense of an argument in scrapy,
extra "self" does not matter.
But it still makes sense to leave these tests so that we know we
shouldn't use get_func_args for built-in functions/methods.
2017-12-25 14:48:10 +03:00
Konstantin Lopuhin
a21b800419
Merge pull request #3011 from Jane222/master
...
[MRG+1] Issues a warning when user puts a URL into allowed_domains (#2250 )
2017-12-08 15:45:16 +03:00
Daniel Graña
3cf0332ec3
Merge pull request #2957 from ScrapingLab/add_meta_json_to_parse_command
...
[MRG+1] Scrapy Command: add --meta/-m to the "parse" command to pass additional meta data into the request
2017-11-29 16:26:48 -03:00
Jana Cavojska
454d5e5733
checking for subclass of URLWarning instead of checking error message text when URL in allowed_domains
2017-11-26 20:07:04 +01:00
Jana Cavojska
8ec3b476b0
triggering a warning when user puts URL in allowed_domains now covered by test
2017-11-26 16:36:15 +01:00
IAlwaysBeCoding
846fd83512
removed commented out code, wrapped line to pep-8 and removed backlashes
2017-11-11 18:30:01 -05:00
Aditya
9d9d83a8c3
Use https links wherever possible
2017-10-28 16:24:40 +05:30
Daniel Graña
5fac2d7b90
Merge pull request #2923 from rhoboro/fixes-685
...
[MRG+2] Fixes #685 FilesPipeline support for Google Cloud Storage.
2017-10-02 13:52:20 -03:00
Lucas Moauro
59c3f6f095
Fix typos in tests
2017-10-01 12:24:56 -03:00
Paul Tremberth
e733f51d4b
Fix test
2017-09-25 12:49:27 +02:00
rhoboro
e5d4364b2a
Add tests for GCS Storage
2017-09-13 16:24:16 +09:00
Mikhail Korobov
1ba77f0837
Merge pull request #2869 from cclauss/patch-3
...
# noqa to close #2836
2017-08-21 19:15:30 +05:00
Mikhail Korobov
885289f497
Merge pull request #2854 from jenya/2853-sitemap-follow-alternate-fix
...
[MRG+1] Follow alternate link for all types of sitemaps #2853
2017-08-21 19:15:03 +05:00
Daniel Graña
d5f3543d77
Merge pull request #2865 from kirankoduru/2831-explicit-msg-for-scrapy-parse-callback
...
[MRG+1] Explicit message for scrapy parse callback
2017-08-09 07:56:57 -03:00
Chomba Ng'ang'a
fd27cde24d
Update asserts to use more generic ones
2017-08-09 12:52:10 +02: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
Kiran Koduru
12409a0cf6
Fix broken encoding on text for py 3
2017-08-05 15:40:38 -04:00
kirankoduru
7adab61a7a
Added test for NotImplemented Spider.parse method
2017-08-05 15:40:38 -04:00
cclauss
0a69a32b5a
Force Travis CI to test again
2017-08-04 14:35:43 +02:00
cclauss
c016a4309d
# noqa to close #2836
...
Marks #2836 as will not fix.
2017-08-04 01:44:23 +02:00
Paul Tremberth
0cb3085f84
Add test for alternate links
2017-08-03 16:55:09 +02:00
Paul Tremberth
15a5c533fa
Add tests for HTTP 307 permanent redirects
2017-07-26 19:07:57 +02:00
Paul Tremberth
1fdc10684f
HTTP Cache: treat 308 as 301
2017-07-26 19:01:48 +02:00
Paul Tremberth
5dc9a88c34
Handle HTTP 308 Permanent Redirect
2017-07-26 19:01:48 +02:00
Jakob de Maeyer
4d77c3084e
Add from_crawler constructor to S3FeedStorage
2017-07-25 09:41:51 +02:00
Jakob de Maeyer
815d6160cf
Add from_crawler constructor for feed exporters and storages
2017-07-25 09:41:29 +02:00
Daniel Graña
2371a2a0df
Merge pull request #2789 from starrify/add-response-follow-tag-link
...
[MRG+1] Added: Now supporting <link> tags in Response.follow
2017-07-24 15:41:30 -03:00
Daniel Graña
45b81693b4
Merge pull request #2769 from stummjr/issue-2766
...
[MRG+1] Add verification to check if Request callback is callable
2017-07-24 15:14:33 -03:00
Paul Tremberth
1f08d9a648
Add test for DNS cache disabling
2017-07-04 23:10:19 +02:00
Konstantin Lopuhin
7c67047e77
Fix get_func_args tests under PyPy
...
On CPython get_func_args does not work correctly for built-in
methods.
2017-06-15 13:07:59 +03:00
Konstantin Lopuhin
5abb70c8d7
Fix test_weakkeycache on PyPy: run gc.collect()
...
One gc.collect() seems to be enough, but it's more reliable
to run it several times (at most 100), until all objects are collected.
2017-06-15 13:06:30 +03:00
Konstantin Lopuhin
c3d17659b3
Fix queue serialization test on PyPy
...
It is not affected by Twisted bug #7989 and is more permissive
with pickling (especially with protocol=2).
2017-06-15 13:05:45 +03:00
Konstantin Lopuhin
6014856df5
Fix test_output_processor_error undere PyPy
...
For float(u'$10') PyPy includes "u'" in the error message,
and it's more fair to check error message on input we are really
passing.
2017-06-15 12:57:32 +03:00
Pengyu CHEN
b33e0d5a54
Added: Now supporting <link> tags in Response.follow
2017-06-14 17:09:42 +08:00
Valdir Stumm Junior
4b6f68b9ee
make reqser tests create Request with proper callback/errback
2017-06-05 17:26:52 -03:00
Valdir Stumm Junior
60727dedf6
verify if Request callback is callable
2017-05-31 15:00:38 -03:00
Daniel Graña
25f609e2a3
Merge pull request #2675 from simongartz/png-p-to-jpg-conversion-fix
...
[MRG+1] Fixes conversion of transparent PNG with palette images to jpg #2452
2017-05-18 16:34:02 -03:00
Mikhail Korobov
532400f993
Merge pull request #2643 from harshasrinivas/set-retry-times-per-request
...
[MRG+1] Add feature to set RETRY_TIMES per request (#2642 )
2017-05-17 15:46:33 +05:00
Daniel Graña
73668ce407
Merge pull request #2721 from HarrisonGregg/feature-drop-from-response-field
...
[MRG+1] Allow dropping field in from_response formdata
2017-05-16 09:47:45 -03:00
Harrison Gregg
ffef828a8d
Add test for dropping fields in from_response request body
2017-05-15 12:25:32 -04:00
Paul Tremberth
dfe6d3d59a
Merge pull request #2456 from elacuesta/feed_export_beautify
...
[MRG+1] Feed exports: beautify JSON and XML
2017-05-12 18:12:48 +02:00
Eugenio Lacuesta
63b8caf5de
Feed exports: rewrite indentation test without .strip()
2017-05-09 11:58:53 -03:00
Daniel Graña
362d6f2d20
Merge pull request #2622 from rolando-contrib/download-maxsize-abort
...
[MRG+1] Abort connection earlier and avoid to buffer data when max size limit is reached
2017-05-04 11:44:51 -03:00
Paul Tremberth
6d14e392f1
Remove old test certificate+key
2017-04-27 23:35:01 +02:00
Paul Tremberth
e6ab8bc9a5
Change "localhost" test server certificate
2017-04-27 23:22:25 +02:00
Rolando Espinoza
2b34c6edff
Abort connection earlier and avoid to buffer data
...
A symptom of this issue was having the log message "Received (X) bytes
larger than download max size (Y)" several times printed, with increased
X values.
2017-04-27 13:28:16 -03:00
Paul Tremberth
c3d0f9b6c1
Add test for non-duplicated `Content-Length: 0` for bodyless POST
2017-04-25 17:03:41 +02:00
Paul Tremberth
b1a0a6e258
Make mockserver runnable outside of tox
...
Add POST support for Echo resource
2017-04-25 17:01:54 +02:00
harshasrinivas
38e6857c95
Improvise the clarity of test cases
2017-03-23 19:45:04 +05:30
Simon Diviani Gartz
21d794d35a
Fixes conversion of transparent PNG with palette images to jpg #2452
2017-03-22 13:29:15 +01:00
Mikhail Korobov
b040df5ac0
TST cleanup spider middleware tests
2017-03-21 15:56:18 +05:00
Paul Tremberth
776129a951
Merge pull request #2649 from pawelmhm/logformatter-2647
...
[MRG+2] [logformatter] 'flags' format spec backward compatibility
2017-03-21 10:51:31 +01:00
harshasrinivas
0d9ebd6e1e
Update tests for max_retry_times
2017-03-19 06:15:46 +05:30
Pawel Miech
4345eaf1b6
[logformatter] backward compat comments
2017-03-17 08:11:20 +01:00
Mikhail Korobov
ec55799d5e
Merge pull request #2616 from redapple/mediapipeline-redirect-fix-continued
...
[MRG] Allow redirections in media files downloads
2017-03-16 15:31:28 +05:00
woxcab
a84652e775
Init tests are split by initializer' input
2017-03-15 12:39:48 +03:00
harshasrinivas
e321ac9931
Update unittests for max_retry_times
2017-03-15 04:12:32 +05:30
harshasrinivas
966bd49c42
Update unittest for meta['max_retry_times']
2017-03-14 16:23:47 +05:30
Pawel Miech
0f2a5cdb8e
[logformatter] 'flags' format spec backward compatibility
...
pass 'flags' kwarg to logger so that it is compatible with old
format of CRAWLEDMSG.
2017-03-13 15:16:38 +01:00
woxcab
fbb411a805
Allowed passing objects of Mapping class or its subclass to the CaselessDict initializer
2017-03-13 14:16:39 +03:00
Paul Tremberth
871134ee22
Refactor to also test FilesPipeline
2017-03-12 17:30:24 +01:00
Paul Tremberth
708f1b009b
Add integration tests for MEDIA_ALLOW_REDIRECTS
2017-03-10 21:36:33 +01:00
Paul Tremberth
7dcc86e61a
Add file listing resource + redirecting resource to MockServer
2017-03-10 21:35:25 +01:00
Eugenio Lacuesta
9c256cf693
Undocument _InvalidOutput exception
2017-03-10 15:41:57 -03:00
Mikhail Korobov
9c69e90056
Merge pull request #2632 from redapple/spider-loader-warn-or-fail
...
[MRG] Add SPIDER_LOADER_WARN_ONLY to toggle between spiderloader failure or warning
2017-03-09 23:01:27 +05:00
Paul Tremberth
c0cbaccb7b
Merge pull request #2581 from lopuhin/respect-custom-log-level
...
[MRG+1] Respect custom log level: fixes GH-1612
2017-03-09 12:47:20 +01:00
Paul Tremberth
9cfe9ae098
Do not use self.assertRaises() as context manager
2017-03-09 12:21:03 +01:00