Adrián Chaves
e1450799ce
Remove debug test case variable
2020-07-07 14:11:37 +02:00
Adrián Chaves
a3afff4a0e
Fix style issue
2020-07-07 14:11:02 +02:00
Adrián Chaves
79b4dfc53e
Fix permission handling on project generation from template files
2020-07-07 14:07:04 +02:00
Aditya
1c40dfa740
fix: handle CONNECTION_LOST & RESET separately
2020-07-07 15:36:41 +05:30
ajaymittur28
770a8127e8
Added basic `scrapy check` tests
2020-07-07 15:23:29 +05:30
Adrián Chaves
17aec5944c
Update tests/CrawlerRunner/ip_address.py
...
Co-authored-by: Eugenio Lacuesta <1731933+elacuesta@users.noreply.github.com>
2020-07-06 10:47:25 +02:00
Adrián Chaves
ec06cf79a6
Update tests/CrawlerRunner/ip_address.py
...
Co-authored-by: Eugenio Lacuesta <1731933+elacuesta@users.noreply.github.com>
2020-07-06 10:47:11 +02:00
Aditya
a94b30342a
test: reduce test data size to 1MB
2020-07-06 12:49:12 +05:30
BroodingKangaroo
6454d456d2
Make check of placeholder less strict
2020-07-03 10:24:13 +03:00
Adrián Chaves
eb93774256
TrackrefTestCase.test_get_oldest: protect from lack of precision
2020-07-03 01:41:47 +02:00
Adrián Chaves
3199048520
Complete Azure Pipelines CI setup
2020-07-03 00:56:24 +02:00
Adrián Chaves
6e58da1dcd
Merge branch 'master' into azure-pipelines
2020-07-02 17:49:42 +02:00
BroodingKangaroo
1e245046ed
Change setting name. Add leading zeroes to batch_id. Minor fixes.
2020-07-02 12:38:08 +03:00
Aditya
4acdc2e5d6
refactor: use __qualname__, () for large strings
2020-07-01 20:15:33 +05:30
Aditya
c361fe0d3b
feat: check for invalid hostname
...
- Initiating requests having hostname or (ip_address, port) different
from the peer to which HTTP/2 connection is made can lead to closing the
whole connection and close out all the pending streams.
- This change aims to fix that problem
- Add required tests
- Save hostname & port in H2ConnectionMetadataDict
2020-07-01 18:14:44 +05:30
BroodingKangaroo
7b1d3c35ea
Minor updates
2020-07-01 12:24:31 +03:00
ajaymittur28
006a945214
Update schemaless http proxy test
2020-07-01 13:32:58 +05:30
Aditya
7b1ad995a4
test: query params, certificate & ip_address
...
- refactor from str.format() to f-strings
2020-07-01 10:45:36 +05:30
Aditya
50dd9271b4
fix: disable redundant logs
...
- while testing the job exceeded the maximum log length
and was terminated
- reduce the number of requests from 20 to 10
2020-06-30 07:36:56 +05:30
Aditya
26ab3e4137
feat: FIFO policy to handle large no. of requests
...
- add required test -- test by sending 1000 requests
- increase test timeout to 180 seconds to account for tests taking long
time
2020-06-30 06:44:20 +05:30
Aditya
d17417b03a
Merge branch 'master' of https://github.com/scrapy/scrapy into h2-client-protocol
2020-06-29 18:43:42 +05:30
Aditya Kumar
e46b47c365
Renew the localhost certificate for tests ( #4650 )
...
Validity
Not Before: Jun 28 12:54:15 2020 GMT
Not After : Jun 28 12:54:15 2021 GMT
Subject: C = IE, O = Scrapy, CN = localhost
2020-06-29 15:05:13 +02:00
Aditya
90a7007f88
test: warnsize logs, no content header, dataloss
2020-06-29 18:29:31 +05:30
Marc Hernández
464f24f8c1
Add --data-raw to utils.curl and fix missing method with data ( #4612 )
2020-06-29 14:20:29 +02:00
Aditya
690dd7f38b
test: GET & POST request test for h2 client
...
- Remove repeated dependency Twisted from setup.py
- Test for both GET & POST when
- Only 1 request
- Large number (=20) of requests
and
- Small Data (10 KB) per request
- Large Data (10 MB) per request
- Test when request is cancelled by the client'
BREAKING CHANGES
Tests raises OpenSSL.SSL.Error when run using tox. However, all tests
passes when ran using `python -m unittest`.
2020-06-28 16:38:49 +05:30
BroodingKangaroo
05c2587c6a
Docs update and tiny fixes
2020-06-28 09:45:45 +03:00
ajaymittur28
f53f06020b
Test http schemaless proxy
2020-06-27 23:28:40 +05:30
BroodingKangaroo
88a52198b9
Add batch_item_count support in FEEDS setting
2020-06-27 12:45:08 +03:00
BroodingKangaroo
c3cee74fd4
Change default value of FEED_STORAGE_BATCH_ITEM_COUNT to 0
2020-06-26 18:45:21 +03:00
BroodingKangaroo
77333666f1
resolve conflicts
2020-06-26 14:55:46 +03:00
Aditya
065b3153fe
Merge branch 'master' of https://github.com/scrapy/scrapy into h2-client-protocol
2020-06-24 07:51:41 +05:30
Aditya
a97ac0adf8
test: GET request for HTTP2Client using mockserver
2020-06-24 06:40:20 +05:30
Lukas Anzinger
3672f5f988
Spider constructor expects name as argument, not start_urls.
...
Fixes #4644
2020-06-23 14:56:12 +02:00
Eugenio Lacuesta
c7f1c7e3f3
Merge branch 'master' into feat-685
2020-06-19 21:30:54 -03:00
Stanislau Hluboki
a4bfd5ab6f
Fix duplicated feed logs
2020-06-19 17:51:56 +03:00
Adrián Chaves
f9c63384c0
Merge branch 'master' into allow-customizing-export-column-names
2020-06-18 14:09:20 +02:00
Aditya
700df3eeb7
test: mockserver with h2 protocol for tests
...
- add Twisted[http2] in setup.py requirements
- add test_protocol.py to test the current implementation
BREAKING CHANGES
test_download times out because of no protocol negotiated between
Mockserver and HTTP/2 client
2020-06-17 21:02:14 +05:30
Stas Glubokiy
3d027fb578
Fix missing storage.store calls in FeedExporter.close_spider ( #4626 )
2020-06-17 17:08:14 +02:00
Eugenio Lacuesta
ec98dabfab
Support for dataclass and attrs items ( #3881 )
2020-06-14 11:45:27 +02:00
Eugenio Lacuesta
91e505edfe
Return single element from coroutine callback ( #4609 )
2020-06-02 10:32:14 +02:00
Bulat Khabibullin
5cef927944
Implement TextResponse.json() ( #4574 )
2020-06-01 06:57:23 +02:00
Mikhail Korobov
13215cfb71
Merge pull request #4559 from elacuesta/cancel-request-download
...
Stop response download from signal handler
2020-05-27 21:46:00 +05:00
Andrey Rahmatullin
ff699eb1f8
Merge pull request #4599 from elacuesta/LocalWeakReferencedCache-getitem-fix
...
Fix KeyError in LocalWeakReferencedCache
2020-05-27 21:42:04 +05:00
Andrey Rahmatullin
7bf375098e
Merge pull request #2400 from elacuesta/keep_cookie_header
...
[MRG+1] CookiesMiddleware: keep cookies from 'Cookie' request header, fix encoding
2020-05-27 21:41:43 +05:00
Eugenio Lacuesta
44d5801b05
Fix KeyError in LocalWeakReferencedCache
2020-05-27 11:15:33 -03:00
Eugenio Lacuesta
492197e477
StopDownload: store response in the exception instead of the failure
2020-05-27 10:45:07 -03:00
Eugenio Lacuesta
634ad5ebca
Merge remote-tracking branch 'upstream/master' into cancel-request-download
2020-05-27 10:27:45 -03:00
Kyle Altendorf
5b2af85289
Link to issue describing troublesome pytest versions
2020-05-22 15:09:58 -04:00
Eugenio Lacuesta
f6ed5edc31
CookiesMiddleware: keep cookies from 'Cookie' request header
2020-05-21 11:07:41 -03:00
BroodingKangaroo
677e619d37
Fix too long lines
2020-05-21 14:57:03 +03:00
BroodingKangaroo
5f6c1dceb1
Merge remote-tracking branch 'upstream/master' into ISSUE-4250-add_batch_deliveries
2020-05-21 12:43:04 +03:00
Eugenio Lacuesta
fbe915d9cb
StopDownload: check partial response contents
2020-05-20 20:20:30 -03:00
Eugenio Lacuesta
276721a5dc
Stop response download
2020-05-20 14:46:26 -03:00
Kyle Altendorf
eb8493f09c
Incompatible with pytest 5.4 and 5.4.1
2020-05-20 09:21:34 -04:00
Mikhail Korobov
febe82a907
Merge pull request #4486 from ilias-ant/add-file-status-on-media-pipelines-file-info
...
Add status (downloaded, uptodate) to files information
2020-05-18 22:30:30 +05:00
Mikhail Korobov
314adf6c38
Merge pull request #4237 from elacuesta/flake8-max-line-length
...
Set flake8-max-line-length to 119
2020-05-16 03:26:45 +05:00
Mikhail Korobov
14612fc3d3
Merge pull request #4534 from elacuesta/deprecate-baseitem
...
Deprecate scrapy.item.BaseItem
2020-05-16 03:24:06 +05:00
BroodingKangaroo
10ae1a284f
Minor fixes
2020-05-15 22:50:54 +03:00
Adrián Chaves
36c3c9713e
Run tests with Python 3.5.0 ( #4518 )
...
* Run tests with Python 3.5.0
* Use Ubuntu Trusty 14.04 to test Python 3.5.0
* Use mitmproxy<3.0.0 on Python 3.5.0
* Skip tests requiring mitmproxy in Python 3.5.0
* Change the minimum Python version from 3.5 to 3.5.1
* Do not prevent Scrapy from working with Python 3.5.0
* Force system Python 3.5.1
* Do not install a non-system Python in Python 3.5.1 jobs
* Switch to Trusty to be able to test Xenial’s Python version ¯\_(ツ)_/¯
* Add missing trusty
* Stop breaking old PyPy
* Allow installing Scrapy on Python 3.5.0
2020-05-15 22:37:56 +05:00
Eugenio Lacuesta
3eeecb4273
Merge branch 'master' into flake8-max-line-length
2020-05-15 11:11:20 -03:00
Marc Hernández
fffb0a5b6a
replace set constructor with set literals ( #4573 )
2020-05-15 15:23:09 +02:00
BroodingKangaroo
0627bf476e
Merge remote-tracking branch 'upstream/master' into ISSUE-4250-add_batch_deliveries
2020-05-14 20:59:22 +03:00
Eugenio Lacuesta
ee13c3e95f
Merge branch 'master' into deprecate-baseitem
2020-05-14 13:31:16 -03:00
Eugenio Lacuesta
89d0c98f7a
Merge remote-tracking branch 'upstream/master' into flake8-remove-e128
2020-05-14 11:35:30 -03:00
Eugenio Lacuesta
df8a1d1c01
Flake8: Remove E741
2020-05-14 10:40:50 -03:00
BroodingKangaroo
111a58fe3d
Merge remote-tracking branch 'upstream/master' into ISSUE-4250-add_batch_deliveries
2020-05-14 09:53:14 +03:00
Adrián Chaves
e31b6ccc45
Merge branch 'master' into flake8-remove-e128
2020-05-13 22:39:45 +02:00
BroodingKangaroo
2327ecead0
Rename FEED_STORAGE_BATCH_SIZE to FEED_STORAGE_BATCH_ITEM_COUNT
2020-05-13 22:50:04 +03:00
Adrián Chaves
7dac99bb12
Merge branch 'master' into deprecate-baseitem
2020-05-13 20:35:03 +02:00
Andrey Rahmatullin
519f752d6d
Merge pull request #4566 from elacuesta/flake8-remove-f841
...
Flake8: remove F841
2020-05-13 11:46:48 +05:00
Aditya Kumar
97532a9144
test(spiderloader): no duplicate spider names ( #4560 )
2020-05-12 17:10:09 +02:00
willbeaufoy
cf9be5344a
Prevent create_instance() returning None ( #4532 )
...
Currently create_instance() can return None if an extension is
incorrectly implemented, but the extension will still show up as
enabled in the logs. This can cause confusion, as in the linked bug.
This change prevents this occurring by throwing an error if
create_instance() will return None.
2020-05-11 20:35:25 +02:00
nsirletti
cb8140a42a
Deprecate Response.body_as_unicode() ( #4555 )
...
Co-authored-by: Nicolas Sirletti <n.sirletti@gmail.com>
2020-05-11 20:20:31 +02:00
Eugenio Lacuesta
6f8758624c
Flake8: remove F841
2020-05-11 13:50:34 -03:00
Eugenio Lacuesta
25e9bc2d0d
Merge branch 'master' into flake8-remove-e128
2020-05-11 13:23:57 -03:00
Eugenio Lacuesta
fb7ba6964d
Merge branch 'master' into deprecate-baseitem
2020-05-11 10:21:56 -03:00
Mikhail Korobov
892467cb8a
Merge pull request #4541 from elacuesta/pickle-adjustments
...
Pickle: use protocol 4, update tests
2020-05-11 15:16:14 +05:00
Mikhail Korobov
b183579564
Merge pull request #4205 from elacuesta/bytes_received_signal
...
Add bytes_received signal
2020-05-11 15:09:55 +05:00
Eugenio Lacuesta
9485724d98
Merge branch 'master' into deprecate-baseitem
2020-05-08 19:32:47 -03:00
Eugenio Lacuesta
be39f274b8
Merge branch 'master' into flake8-remove-e128
2020-05-08 18:33:29 -03:00
Mikhail Korobov
333910f6c8
Merge pull request #4554 from elacuesta/linkextractor-remove-lambdas
...
Remove lambda attributes in default link extractor
2020-05-09 02:11:59 +05:00
Eugenio Lacuesta
c2c3054ac1
Flake8: remove E121
2020-05-08 16:43:47 -03:00
Eugenio Lacuesta
3ebf2a0d82
Remove lambdas in link extractor
2020-05-08 15:24:37 -03:00
Antonio Gordillo Toledo
cf09af787e
Remove Python 2 encoding header from files ( #4553 )
2020-05-08 15:45:19 +02:00
Eugenio Lacuesta
6160370927
Merge remote-tracking branch 'upstream/master' into deprecate-baseitem
2020-05-07 14:38:54 -03:00
Eugenio Lacuesta
5256eae60d
Meta class to handle isinstance checks for BaseItem
2020-05-07 14:37:41 -03:00
Eugenio Lacuesta
8b4485134e
Merge branch 'flake8-remove-e126' into flake8-remove-e128
2020-05-07 12:50:20 -03:00
Eugenio Lacuesta
8659b0d896
Merge remote-tracking branch 'upstream/master' into flake8-remove-e126
2020-05-07 09:24:38 -03:00
Mikhail Korobov
a8f61e909f
Merge pull request #4544 from elacuesta/flake8-remove-e129
...
Flake8: remove E129
2020-05-07 15:08:11 +05:00
Mikhail Korobov
a18bfccac2
Merge pull request #4542 from elacuesta/flake8-remove-e122-e124
...
Flake8: remove E122 and E124
2020-05-07 15:05:01 +05:00
Eugenio Lacuesta
7fd2085725
Merge remote-tracking branch 'upstream/master' into bytes_received_signal
2020-05-06 22:41:16 -03:00
Eugenio Lacuesta
d472402a02
Fix pickle test for pypy
2020-05-06 20:30:22 -03:00
Eugenio Lacuesta
881b4f417f
Flake8: Remove E128 (tests, part 3)
2020-05-06 19:33:22 -03:00
Eugenio Lacuesta
bf56517abf
Flake8: Remove E128 (tests, part 2)
2020-05-06 19:18:29 -03:00
Mikhail Korobov
2da952b928
Merge pull request #4519 from Gallaecio/test-ubuntu-bionic
...
Test the latest Ubuntu along the latest Python
2020-05-07 03:12:19 +05:00
Eugenio Lacuesta
9c6d13075a
Flake8: Remove E128 (tests, part 1)
2020-05-06 18:56:14 -03:00
Eugenio Lacuesta
25eeb77ba6
Merge remote-tracking branch 'upstream/master' into flake8-max-line-length
2020-05-06 16:52:17 -03:00
Eugenio Lacuesta
88efc98847
Flake8: remove E129
2020-05-06 16:42:47 -03:00
Eugenio Lacuesta
4c12a234ae
Flake8: Remove E126
2020-05-06 16:10:21 -03:00
Eugenio Lacuesta
cc23d1cb58
Flake8: Remove E124
2020-05-06 15:40:37 -03:00
Eugenio Lacuesta
d71804ef29
Flake8: Remove E122
2020-05-06 15:23:36 -03:00
Adrián Chaves
a859ea0c8b
Merge remote-tracking branch 'upstream/master' into allow-customizing-export-column-names
2020-05-06 19:48:32 +02:00
Eugenio Lacuesta
0e382c8160
Remove unused import
2020-05-06 14:09:10 -03:00
Eugenio Lacuesta
93436f9d3a
Chain pickling exception, test_squeues.py updates
2020-05-06 14:05:27 -03:00
Eugenio Lacuesta
b1ddd7bd7b
Refactor test_squeues.py
2020-05-06 13:44:02 -03:00
Eugenio Lacuesta
8643e8d355
Flake8: remove E123 (Closing bracket does not match indentation of opening bracket's line)
2020-05-06 12:26:04 -03:00
Eugenio Lacuesta
63600243e0
Flake8: remove E125 (Continuation line with same indent as next logical line)
...
Also remove E401 from pytest.ini - no occurrences in the codebase
2020-05-06 10:26:52 -03:00
Eugenio Lacuesta
fe0c582ee0
Flake8: remove E127 in tests (continuation line over-indented for visual indent)
2020-05-06 09:49:10 -03:00
Adrián Chaves
98835a0d40
Merge branch 'master' into test-ubuntu-bionic
2020-05-06 13:59:01 +02:00
Eugenio Lacuesta
17c0cf64ae
Flake8: remove W504 code ( #4525 )
...
Co-authored-by: Mikhail Korobov <kmike84@gmail.com>
2020-05-06 00:14:48 +02:00
Eugenio Lacuesta
7988c676a9
Update Item docstring, update BaseItem occurrences
2020-05-05 13:11:01 -03:00
Eugenio Lacuesta
622ce86066
Test: make sure scrapy.item.Item does not issue a deprecation warning
2020-05-04 16:22:24 -03:00
Eugenio Lacuesta
f75941f79d
Deprecate scrapy.item.BaseItem
2020-05-04 08:53:32 -03:00
BroodingKangaroo
dad2ea7522
Change time_id to batch_time
2020-05-02 01:21:03 +03:00
Eugenio Lacuesta
4d625afda5
Merge branch 'master' into bytes_received_signal
2020-05-01 16:11:32 -03:00
BroodingKangaroo
3f9874fac9
Add test s3 export
2020-05-01 11:52:16 +03:00
Eugenio Lacuesta
f787b8483c
IPv6 test: check for the absence of DNSLookupError
2020-04-28 17:50:06 +02:00
BroodingKangaroo
a18621552f
Merge branch 'master' of https://github.com/BroodingKangaroo/scrapy into ISSUE-4250-add_batch_deliveries
2020-04-27 10:34:36 +03:00
BroodingKangaroo
f0f1be76d1
Using time_id instead of time as a timestamp
2020-04-27 09:56:57 +03:00
Eugenio Lacuesta
efb6f13deb
Remove assertions from production code ( #4440 )
2020-04-23 12:40:10 +02:00
Eugenio Lacuesta
1fecacbb1a
IPv6 test: check for the absence of DNSLookupError
2020-04-20 12:05:15 -03:00
ilias-ant
773ddf77ba
added more tests to cover the (downloaded, uptodate, cached) status functionality
2020-04-19 14:14:17 +03:00
BroodingKangaroo
ec76445dd6
Update tests
2020-04-18 09:29:23 +03:00
Mikhail Korobov
209ab05315
Merge pull request #4500 from victor-torres/reference-callback
...
Serialize requests with callback references as spider attribute
2020-04-17 18:58:28 +05:00
Victor Torres
1ade3fc723
trying to improve test coverage
2020-04-17 10:34:34 -03:00
Eugenio Lacuesta
7926da4bd0
Merge branch 'master' into flake8-max-line-length
2020-04-16 16:05:09 -03:00
Mikhail Korobov
cf39602c30
Merge pull request #4471 from elacuesta/fix-pycodestyle-e731
...
Fix pycodestyle E731 ("do not assign a lambda expression, use a def")
2020-04-16 23:17:31 +05:00
Adrián Chaves
ea3e675801
test_utils_iterators: use os.linesep
2020-04-16 17:10:45 +02:00
Adrián Chaves
cf41803089
Skip test_reactor_poll on Windows
2020-04-16 17:07:29 +02:00
Adrián Chaves
7cc9601029
Improve reporting on test_ipv6_alternative_name_resolver
2020-04-16 16:57:48 +02:00
Eugenio Lacuesta
c922992277
Tests: Move code inside __main__ block
2020-04-16 11:37:37 -03:00
Eugenio Lacuesta
1f2e2a6006
Merge branch 'master' into response_ip_address
2020-04-16 11:32:37 -03:00
Victor Torres
e0921cab66
remove not used code
...
This code is not needed anymore because we're getting the
already mangled name when matching func with spider attributes.
2020-04-16 11:18:59 -03:00
Adrián Chaves
94ee68695a
Mock server: use 127.0.0.1 also for HTTPS
...
Windows throws an error about 0.0.0.0 being external:
https://stackoverflow.com/a/23857995/939364
2020-04-16 15:37:06 +02:00
Adrián Chaves
1d77eac950
Fix Flake8-reported issues
2020-04-16 14:57:55 +02:00
BroodingKangaroo
5980ae72c6
Some minor fixes and refactoring
2020-04-16 10:13:39 +03:00
Victor Torres
47a992615a
serialize requests with callback references as spider attribute
...
You could define a spider attribute that references a callback method
but if this method has a different name than your spider attribute,
the request serializer is not able to find it on the spider class.
With this commit we're fixing this behavior as we're searching for
callback references in the spider object itself instead of looking
for attributes with the same function's name, that could be different.
2020-04-15 20:03:58 -03:00
BroodingKangaroo
16836e9e77
Merge branch 'ISSUE-4250-add_batch_deliveries' of https://github.com/BroodingKangaroo/scrapy into ISSUE-4250-add_batch_deliveries
2020-04-16 00:41:21 +03:00
BroodingKangaroo
963580463b
Update tests
2020-04-15 23:39:46 +03:00
BroodingKangaroo
39d0d13d3f
Add partial deliveries tests
2020-04-15 23:38:27 +03:00
Adrián Chaves
2f510fd47d
Fix ShellTest.test_local_file on Windows
2020-04-15 21:10:05 +02:00
Mikhail Korobov
2d46777d0a
Merge pull request #4489 from elacuesta/remove-returnValue-function
...
Remove twisted.internet.defer.returnValue occurrences
2020-04-15 22:45:52 +05:00
Adrián Chaves
c28dd0cedb
Merge branch 'master' into duplicate_key
2020-04-15 16:22:59 +02:00
Eugenio Lacuesta
01d73dd3f0
Merge branch 'master' into flake8-max-line-length
2020-04-15 09:24:33 -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
4023d5db33
Replace _DefGen_Return exception handling
...
Handle StopIteration instead
2020-04-13 06:35:26 -03:00
Eugenio Lacuesta
1bd8f392c9
Initial removal of twisted.internet.defer.returnValue
2020-04-13 06:12:30 -03:00
ilias-ant
83a0cc6cdf
Add status to files information
2020-04-12 23:22:17 +03:00
Eugenio Lacuesta
950a52468c
Merge branch 'master' into flake8-max-line-length
2020-04-10 15:24:22 -03:00
Eugenio Lacuesta
2265c1fda9
Merge branch 'master' into fix-pycodestyle-e731
2020-04-10 14:32:30 -03:00
Eugenio Lacuesta
c4a5e3f0da
Simplify bytes_received signal
...
Remove "source" parameter
2020-04-06 09:26:13 -03:00
Eugenio Lacuesta
e3342669ae
Merge branch 'master' into bytes_received_signal
2020-04-06 09:17:35 -03:00
Eugenio Lacuesta
4270e0a0da
Fix E731: do not assign a lambda expression
2020-04-04 21:54:55 -03:00
Eugenio Lacuesta
e2d5d357a7
Fix pycodestyle E502
2020-04-01 14:24:30 -03:00
Adrián Chaves
bdb28ac600
Merge remote-tracking branch 'origin/sybil' into azure-pipelines
2020-03-30 20:25:40 +02:00
Adrián Chaves
3fb0027138
Require sybil ≥ 1.3.0 for tests
2020-03-28 17:36:50 +01:00
Daniel Graña
02206e5ffe
Run tox
2020-03-27 02:20:39 -03:00
Eugenio Lacuesta
182394bcec
E501 compliance (tests)
2020-03-22 23:29:30 -03:00
Eugenio Lacuesta
34d607194b
Merge branch 'master' into feat-685
2020-03-18 21:24:36 -03:00
elacuesta
dfbe1d9507
Remove object base class ( #4430 )
2020-03-16 20:12:46 +01:00
Andrey Rahmatullin
ecd3a976d2
Merge pull request #4398 from nyov/remove-crawler-spiders
...
Remove deprecated Crawler.spiders property
2020-03-16 17:21:07 +05:00
Eugenio Lacuesta
aa6075e08c
Merge branch 'master' into bytes_received_signal
2020-03-15 18:05:04 -03:00
Eugenio Lacuesta
bde0384dfd
Merge branch 'master' into spider.parse
2020-03-14 19:53:36 -03:00
Adrián Chaves
3f6cdcabce
Restrict pytest to versions prior to 5.4
2020-03-13 13:25:53 +01:00
Lukas Anzinger
ccc4d88779
Ignore a domain in allowed_domains with port and issue a warning ( #4413 )
2020-03-12 20:42:14 +01:00
nyov
3b0820d747
Deprecate Spider.make_requests_from_url, part 2 ( #4412 )
2020-03-12 20:15:49 +01:00
Mikhail Korobov
db9198bc20
Merge pull request #4409 from nyov/remove-deprecation-warning
...
Remove a 'twisted.test.proto_helpers' deprecation warning
2020-03-12 18:46:47 +05:00
Eugenio Lacuesta
8d30dc0888
Response.follow_all: return empty generators for empty sequences
2020-03-12 09:36:15 -03:00
Andrey Rahmatullin
388f23c30c
Merge pull request #3858 from elacuesta/multiple_feed_export_formats
...
[MRG+1] Support for exporting to multiple feeds in a single crawl
2020-03-12 14:31:57 +05:00
Eugenio Lacuesta
21f1eddc90
Merge branch 'master' into bytes_received_signal
2020-03-11 21:16:35 -03:00
Eugenio Lacuesta
f3bab819ab
Add tests for scrapy.utils.conf.feed_complete_default_values_from_settings
2020-03-11 20:57:31 -03:00
Eugenio Lacuesta
ac73bcc79c
Merge branch 'master' into response_ip_address
2020-03-08 22:30:59 -03:00
Lukas Anzinger
9d9dea0d69
Fix handling of None in allowed_domains.
...
Nones in allowed_domains ought to be ignored and there are also tests
for that scenario. This commit fixes the handling of None and also the
accompanying tests which are now executed again.
2020-03-07 20:34:18 +01:00
nyov
915e363db5
Remove a 'twisted.test.proto_helpers' deprecation warning
2020-03-07 18:03:25 +00:00
Eugenio Lacuesta
ada37c5409
Export to multiple formats in a single crawl
2020-03-05 09:33:57 -03:00
nyov
b1566a6962
Remove deprecated Crawler.spiders property
...
Deprecated since 419026615 (2014, Scrapy 0.25)
2020-03-04 21:23:42 +00:00
Eugenio Lacuesta
3aa5eab993
Merge branch 'master' into response_ip_address
2020-03-03 13:53:43 -03:00
nyov
1b591ff061
Obsolete deprecated settings
...
Obsolete REDIRECT_MAX_METAREFRESH_DELAY
which has been deprecated since Scrapy 0.18
Obsolete LOG_UNSERIALIZABLE_REQUESTS
which has been deprecated since Scrapy 1.2.0
and is replaced by SCHEDULER_DEBUG
2020-03-03 14:03:30 +00:00
Adrián Chaves
6aa0ba4553
Write release notes for Scrapy 2.0.0 ( #4329 )
2020-03-03 09:11:11 +01:00
sakshamb2113
c411a51f42
Fix random failures from test_fixed_delay in some machines ( #4372 )
2020-02-28 13:17:02 +01:00
Adrián Chaves
9aae4c0be7
Add tests for envvar setting warnings
2020-02-27 16:31:43 +01:00
gunblues
034e2c31c7
Use a non-zero exit code when a pipeline's open_spider method throws an exception ( #4207 )
...
* fix issue 4175 - Scrapy does not use a non-zero exit code when pipeline's open_spider throws the exception
* remove extra blank lines
* remove redundant code
* remove blank line at end of file
* more suitable naming for response and make if-condition shorter
* avoid error - AttributeError: 'Deferred' object has no attribute 'result'
* use getattr to make code concisely
* add test
* remove useless file
* modify test class name
* remove unneccessary files
* Fix Flake8-reported issue
* fix these items which are suggested by Gallaecio
・Sort those imports at tests/test_cmdline_crawl_with_pipeline/__init__.py
・Remove the unused setUp method.
・Remove comments generated by Scrapy’s project generation tool.
・Remove the [deploy] section from the scrapy.cfg file (I don’t think it’s needed here)
・Remove BOT_NAME and NEWSPIDER_MODULE from settings.py (I think there are not needed either, although I’m less sure about NEWSPIDER_MODULE)
* have to reserve BOT_NAME, SPIDER_MODULES in settings.py
* Remove unneeded empty lines
* Empty __init__.py file with unneeded comments
* Remove an unneeded empty line at the end
* Remove unneeed empty line from __init__.py file
* Update __init__.py
* Update __init__.py
* Update exception.py
* Update normal.py
* Update __init__.py
* Update __init__.py
* fix W391 blank line at end of file
Co-authored-by: Adrián Chaves <adrian@chaves.io>
2020-02-26 00:46:05 +05:00
Eugenio Lacuesta
889b471852
Import changes
2020-02-23 18:40:43 -03:00
Eugenio Lacuesta
a44942d27d
Merge branch 'master' into response_ip_address
2020-02-23 18:13:52 -03:00
Mikhail Korobov
49480225d7
Merge pull request #4365 from noviluni/fix_flake8_E701_E271
...
Fix flake8 E131, E211, E251, E271, E701
2020-02-23 15:52:52 +05:00
elacuesta
9d983c1b99
Expose certificate for HTTPS responses ( #4054 )
...
* Expose certificate for HTTPS responses
* Fix test (missing inlineCallbacks decorator)
* Note about Response.certificate
* Explicitly cover None as the default value of Response.certificate
Co-authored-by: Adrián Chaves <adrian@chaves.io>
2020-02-22 17:20:31 +05:00
Vostretsov Nikita
67ee0b097f
Remove specifics of downstream request queues from scheduler ( #3884 )
...
* move serialization/deserialization logic to downstream queues
* make memory queues conform to common interface
* make ScrapyPriorityQueue conform common interface
* ScrapyPriorityQueue works with disk
* make key as string
* return list instead of dict as earlier
* downloader aware pq works with new interface
* we don`t need these methods anymore
* create directories for files
* remove dummy priority
* remove priority as parameter, let every queue decide for itself
* rename obj to request
* DownloaderAwarePriorityQueue is too thin wrapper around _SlotPriorityQueues, just remove second one
* remove priority as parameter, let every queue decide for itself
* rename argument
* more granular class separation
* python2 compatible
* one more argument for common interface
* more simple downstream queue interface
* single place for easier customization
* rename function
* shorter
* shorter
* use named arguments
* fix typo
* add docstring
* Update scrapy/pqueues.py
Co-Authored-By: Mikhail Korobov <kmike84@gmail.com>
* Update scrapy/pqueues.py
Co-Authored-By: Mikhail Korobov <kmike84@gmail.com>
* 4 spaces indentation
* we ok with existing directories
* remove unused import
* rename method
* remove unused imports
* it has no sense now
* relining
* note about queues
* add value
* Revert "it has no sense now"
This reverts commit b61604275b .
* pep8 E261
* pep8 E303
* pep8 E501
* pep8 E123
* pep8 E123
* use create instance
* remove excessive import
Co-authored-by: Mikhail Korobov <kmike84@gmail.com>
2020-02-22 17:02:57 +05:00
Marc Hernandez Cabot
6e8e117aee
fix flake E211
2020-02-22 12:32:38 +01:00
Marc Hernandez Cabot
69a8648bef
fix E251
2020-02-22 12:32:38 +01:00
Marc Hernandez Cabot
9ad10bb6f7
fix E131
2020-02-22 12:32:38 +01:00
Marc Hernandez Cabot
b49ece0b87
fix E701 and E271 flake8
2020-02-22 12:32:38 +01:00
Mikhail Korobov
e551bc5170
Merge pull request #4318 from wRAR/asyncio-parse-asyncgen
...
Support yield in async def callbacks.
2020-02-21 23:50:01 +05:00
Marc Hernandez Cabot
6fb85951ce
fix E22X flake8
2020-02-21 08:39:14 +01:00
Marc Hernández
91bbc70bc1
fix E30X flake8 ( #4355 )
2020-02-21 06:05:31 +01:00
Andrey Rahmatullin
88179027de
Merge pull request #4331 from Gallaecio/response-cb-kwargs
...
Implement Response.cb_kwargs
2020-02-19 22:40:14 +05:00
Andrey Rahmatullin
f558df2558
Merge pull request #4188 from elacuesta/logformatter-error-formatting
...
LogFormatter error formatting
2020-02-19 19:05:08 +05:00
Andrey Rahmatullin
528b894f28
Merge pull request #4321 from Gallaecio/link-extractor-encoding
...
Use safe_url_string in link extraction
2020-02-19 18:19:21 +05:00
Adrián Chaves
5834088e67
Apply feedback
2020-02-18 14:18:15 +01:00
Adrián Chaves
43b43654a1
Add tests for meta and cb_kwargs not being available
2020-02-13 22:39:58 +01:00
Adrián Chaves
5ff9eb90ea
Add a test for the copy of cb_kwargs from Request to Response
2020-02-13 22:36:18 +01:00
Adrián Chaves
b4958358e8
Update tests to account for link extractors escaping spaces
2020-02-12 19:00:04 +01:00
Adrián Chaves
e1be078eaa
Fix Flake8-reported issues
2020-02-12 17:38:06 +01:00
Mikhail Korobov
a6ef065eb5
Merge pull request #4271 from wRAR/asyncio-signals
...
async def support for signal handlers that already supported Deferreds
2020-02-11 02:05:45 +05:00
Andrey Rakhmatullin
1f0f52cbf7
Improve async signal tests.
2020-02-11 01:05:45 +05:00
Andrey Rakhmatullin
36dcf90184
Also test non-default async callbacks.
2020-02-11 01:00:16 +05:00
Abhishek Pratap Singh
4626e90df8
Allow updating flags in follow and follow_all ( #4279 )
2020-02-10 19:48:31 +01:00
Adrián Chaves
96bb3b5144
Merge branch 'master' into feat-685
2020-02-10 19:45:09 +01:00
Eugenio Lacuesta
122ce6d6fb
Check bytes are received in order (bytes_received signal)
2020-02-10 10:20:26 -03:00
Adrián Chaves
35723d76c0
Use canonicalize_url in link extraction
2020-02-07 22:59:53 +01:00
Adrián Chaves
c2f484de88
Merge branch 'master' into response_ip_address
2020-02-07 21:49:38 +01:00
Adrián Chaves
4c6993f264
Merge branch 'master' into asyncio-parse-asyncgen
2020-02-07 21:34:54 +01:00
Adrián Chaves
aae4935605
Merge branch 'master' into spider.parse
2020-02-07 21:17:56 +01:00
Mikhail Korobov
957681bcfa
Merge pull request #4272 from elacuesta/spider-middleware
...
Spider middleware: catch spider callback exceptions early
2020-02-07 23:40:50 +05:00
Mikhail Korobov
afbaf9d430
Merge pull request #4303 from whalebot-helmsman/request_left_downloader_signal
...
request_left_downloader signal
2020-02-07 23:33:51 +05:00
Andrey Rakhmatullin
7323780c97
Support yield in async def callbacks.
2020-02-07 21:32:45 +05:00
Andrey Rakhmatullin
31f6c7112f
Add a test for an async callbacks that returns requests.
2020-02-07 17:14:52 +05:00
Andrey Rakhmatullin
4a7c7340a0
Merge remote-tracking branch 'origin/master' into asyncio-signals
2020-02-07 16:58:59 +05:00
Eugenio Lacuesta
6c333491a8
Merge branch 'master' into response_ip_address
2020-02-06 18:53:11 -03:00
Eugenio Lacuesta
7f2d3051fe
Fix Flake8 issue
2020-02-06 18:19:40 -03:00
Lane Shaw
3263441fbc
Update RFPDupeFilter line separator for correct universal newlines mode usage ( #4283 )
2020-02-06 22:14:40 +01:00
Adrián Chaves
24bb9fd5f7
Merge branch 'master' into spider.parse
2020-02-06 21:39:09 +01:00
Mikhail Korobov
042e71e2b8
Merge pull request #4311 from Gallaecio/metarefresh-ignore-tags
...
Make METAREFRESH_IGNORE_TAGS an empty list by default
2020-02-06 23:40:45 +05:00
elacuesta
35dafef7f1
Specify Twisted reactor (TWISTED_REACTOR setting) ( #4294 )
...
* Add the ability to install a specific reactor
* Add docs for the TWISTED_REACTOR setting
* Add tests for the TWISTED_REACTOR setting
* Update asyncio reactor test
* Ignore W503 globally
W503 is not PEP8-compliant:
c59c4376ad
* Line length adjustment
* Adjust asyncio reactor tests
* Merge ASYNCIO_ENABLED and TWISTED_REACTOR settings
* More docs about TWISTED_REACTOR
* Fix asyncio reactor test
* Docs: fix title
* Reword docs
* Check the TWISTED_REACTOR setting outside of the installing function
* Remove unrelated change
* Update scrapy/utils/log.py
Co-Authored-By: Adrián Chaves <adrian@chaves.io>
* Update docs/topics/settings.rst
Co-Authored-By: Adrián Chaves <adrian@chaves.io>
* Update docs/topics/settings.rst
Co-Authored-By: Adrián Chaves <adrian@chaves.io>
Co-authored-by: Adrián Chaves <adrian@chaves.io>
2020-02-06 22:42:34 +05:00
Andrey Rakhmatullin
489ffcda51
Add a test for an async item_scraped handler.
2020-02-06 22:40:11 +05:00
Vostretsov Nikita
4be19e443e
name signla catcher in accord with signal name
2020-02-06 13:46:23 +00:00
Vostretsov Nikita
4a91a5427d
fix typo
2020-02-06 13:44:51 +00:00
Adrián Chaves
576663e5a7
Make METAREFRESH_IGNORE_TAGS an empty list by default
2020-02-06 10:43:20 +01:00
Vostretsov Nikita
3769f75386
pep8 E302
2020-02-05 12:08:08 +00:00
Vostretsov Nikita
9916f6e556
tests for new signal
2020-02-05 11:32:54 +00:00
Eugenio Lacuesta
ad70497416
Remove unnecessary parentheses in class definition
2020-02-04 13:30:13 -03:00
Eugenio Lacuesta
e0ef8ad2d6
CrawlerRunner test for Response.ip_address
2020-02-03 15:52:15 -03:00
Eugenio Lacuesta
4851efdfb0
Flake8 adjustments
2020-02-03 14:50:54 -03:00
Eugenio Lacuesta
bb8f7dc609
Mock DNS server
2020-02-03 14:50:14 -03:00
Eugenio Lacuesta
a2ae380efc
Remove unnecessary commas
2020-02-03 13:23:52 -03:00
Eugenio Lacuesta
b9e3a6201b
Merge branch 'master' into response_ip_address
2020-02-03 04:07:44 -03:00
Mikhail Korobov
22f7934fcc
Merge pull request #4269 from wRAR/asyncio-parse
...
Support for async def callbacks.
2020-01-31 23:50:19 +05:00
Andrey Rakhmatullin
7687564c73
Merge remote-tracking branch 'origin/master' into asyncio-signals
2020-01-30 17:42:03 +05:00
Andrey Rakhmatullin
cc825c21de
Test returning items from an async def callback.
2020-01-30 16:17:06 +05:00
Eugenio Lacuesta
6f02a8dccb
Add source parameter to bytes_received signal
2020-01-29 15:51:25 -03:00
Eugenio Lacuesta
2c9643d38c
Test: bytes_received signal fired multiple times
2020-01-29 14:17:06 -03:00
Evgeny Dorofeev
4e56571a19
[HttpCompressionMiddleware] fix delimiter for Accept-Encoding header
2020-01-29 15:49:22 +03:00
Eugenio Lacuesta
613fd41f44
bytes_received signal: improve test performance
2020-01-27 13:25:06 -03:00
Eugenio Lacuesta
dbe20a863f
bytes_received signal: send spider argument
2020-01-27 12:28:54 -03:00
Adrián Chaves
89483ce9f7
Fix Flake8 issues
2020-01-27 12:08:56 -03:00
Eugenio Lacuesta
bda37e38bd
[Tests] bytes_received signal
2020-01-27 12:08:56 -03:00
Eugenio Lacuesta
cab449b195
Typo fix
2020-01-27 12:08:34 -03:00
Eugenio Lacuesta
e8da7e2966
Test DNS resolution using CrawlerProcess
2020-01-26 17:53:39 -03:00
Eugenio Lacuesta
80925ab845
Get server IP address for HTTP/1.1 responses
2020-01-26 16:57:04 -03:00
Mikhail Korobov
8b8df31961
Merge pull request #4227 from elacuesta/name-resolver
...
Name resolver with IPv6 support
2020-01-25 05:03:13 +05:00
Mikhail Korobov
5f407cf657
Merge pull request #3961 from OmarFarrag/ftp_files#3928
...
Add FTPFileStore to FilesPipeline
2020-01-25 04:58:23 +05:00
Mikhail Korobov
7a62bd310c
Merge pull request #4126 from elacuesta/from_crawler_downloader_handlers
...
Download handlers: from_crawler factory method, take crawler in __init__
2020-01-25 04:52:56 +05:00
OmarFarrag
40e0a11aa8
Fix Flake8 errors
2020-01-24 15:51:48 +02:00
OmarFarrag
fc98aa6b67
Merge branch 'master' into ftp_files#3928
2020-01-24 14:52:40 +02:00
Mikhail Korobov
f80c7776ae
Merge pull request #4008 from elacuesta/docs_request_errback
...
Request: remove restriction about errback without callback
2020-01-23 23:12:44 +05:00
Mikhail Korobov
c0a7dfbc01
Merge pull request #4057 from elacuesta/response_follow_all
...
Response.follow_all
2020-01-23 02:15:24 +05:00
Eugenio Lacuesta
dee420a69c
Fix name resolvers tests
2020-01-16 23:48:16 -03:00
Eugenio Lacuesta
d487498cff
Update name resolvers tests
2020-01-16 22:02:01 -03:00
Eugenio Lacuesta
90e3bd8715
[test] Name resolvers
2020-01-16 20:32:40 -03:00
Eugenio Lacuesta
6ce1ad3107
[test] Spider middleware: catch exceptions right after the spider callback
2020-01-10 04:20:37 -03:00
Andrey Rakhmatullin
a91a13b443
Support for async def callbacks.
2020-01-09 15:59:19 +05:00
Andrey Rakhmatullin
3faef2d082
Add async def support to signal handlers that already supported Deferreds.
2020-01-09 15:17:45 +05:00
Andrey Rakhmatullin
7d85984880
Use get_from_asyncio_queue in the pipeline test.
2020-01-09 14:49:16 +05:00
Andrey Rakhmatullin
bdef948aae
Mark the asyncio pipelines test as only_asyncio.
2020-01-09 14:19:02 +05:00
Andrey Rakhmatullin
bfdd552a32
Add a test for pipelines using asyncio.
2020-01-09 14:19:02 +05:00
Andrey Rakhmatullin
1f9cef787d
Add async def support to pipelines.
2020-01-09 14:19:02 +05:00
Eugenio Lacuesta
2e405d2d5c
Merge branch 'master' into response_follow_all
2020-01-05 00:33:19 -03:00
Andrey Rakhmatullin
2b9254c2bd
Add a test function that uses asyncio.Queue().
2019-12-31 17:54:41 +05:00
Andrey Rakhmatullin
16787f5bf4
Merge middleware tests back as we don't need to set the setting anymore.
2019-12-30 12:02:19 +05:00
Andrey Rakhmatullin
5cf1ac0005
Move the asyncio downloader mw test to a separate class.
2019-12-30 11:46:45 +05:00
Andrey Rakhmatullin
3603644552
Add a non-asyncio async def middleware test.
2019-12-30 11:46:45 +05:00
Andrey Rakhmatullin
21f50c795a
Add async def support to downloader middlewares.
2019-12-30 11:46:45 +05:00
Mikhail Korobov
bb991cd303
Merge pull request #4010 from scrapy/asyncio-base
...
Base support for asyncio
2019-12-30 00:51:28 +05:00
Andrey Rakhmatullin
dc1ee09481
Rename ASYNCIO_ENABLED to ASYNCIO_REACTOR, change the logic accordingly.
2019-12-27 21:56:28 +05:00
Eugenio Lacuesta
c54df8253a
[test] Handle keyword args in CrawlSpider.parse
2019-12-26 15:12:19 -03:00
Eugenio Lacuesta
8d4948f6ca
[test] Override CrawlSpider.parse
2019-12-26 14:38:11 -03:00
Andrey Rakhmatullin
37ac47ff80
Fix a deprecation warning.
2019-12-26 20:46:54 +05:00
Eugenio Lacuesta
982a66f9fb
[test] Download handler: avoid passing settings if not necessary
2019-12-23 20:28:17 -03:00
nyov
b9a58798ee
change Scraper API to call internal `_parse` method
...
A Spider class using internal pre-processing can have first dibs
at this and then call a public `parse` method for subclass hooking.
2019-12-23 13:55:06 -03:00
Eugenio Lacuesta
a6ec89251e
Downloader handlers: crawler=None in __init__
2019-12-23 10:47:08 -03:00
Eugenio Lacuesta
8a567e98bb
Remove unnecessary __init__ methods in downloader handler tests
2019-12-23 10:36:46 -03:00
Eugenio Lacuesta
7e6387de40
Use create_instance in FTPDownloadHandler/DataURIDownloadHandler tests
2019-12-23 10:02:58 -03:00
Eugenio Lacuesta
fa21d8687a
Use create_instance in S3DownloadHandler tests
2019-12-23 10:00:25 -03:00
Eugenio Lacuesta
9e5d945ef2
Use create_instance in downloader handler tests
2019-12-23 09:55:47 -03:00
Eugenio Lacuesta
931b7e68d3
Update FileDownloadHandler test
2019-12-23 09:50:28 -03:00
Eugenio Lacuesta
310cc081d0
Merge branch 'master' into from_crawler_downloader_handlers
2019-12-21 17:24:45 -03:00
Andrey Rakhmatullin
8de80f59db
Raise an exception if ASYNCIO_ENABLED but the reactor is wrong.
2019-12-21 13:08:29 +05:00
Mikhail Korobov
5577d4d2be
Merge pull request #3869 from elacuesta/detect_return_in_generator_callbacks
...
[MRG+1][Py3] Check for 'return' with arguments inside generators
2019-12-20 22:46:46 +05:00
Andrey Rakhmatullin
e342de5038
Remove a stray newline.
2019-12-20 19:37:50 +05:00
Andrey Rakhmatullin
20289be810
Merge remote-tracking branch 'origin/master' into asyncio-base
2019-12-20 19:31:20 +05:00
Mikhail Korobov
fb3fb17c28
Merge pull request #4045 from Gallaecio/documentation-coverage
...
Deprecate FilteringLinkExtractor direct usage; add API docs for scrapy.linkextractors
2019-12-20 02:01:45 +05:00
Mikhail Korobov
3bcb14fe4d
Merge pull request #4164 from Gallaecio/speed-up-tests-2
...
Improve the performance of the DOWNLOAD_DELAY test
2019-12-18 23:56:56 +05:00
Marc Hernandez Cabot
a5de2c64e6
fix W291, W292, W293 (whitespaces)
2019-12-18 16:33:46 +01:00
elacuesta
916382e109
Add errback parameter to scrapy.spiders.crawl.Rule ( #4000 )
...
* Add errback parameter to scrapy.spiders.crawl.Rule
* CrawlSpider: optimize by reducing iterations
* [test] Rule.errback
* [doc] Rule.errback
* [doc] Use autoclass in docs/topics/spiders.rst
Co-Authored-By: Adrián Chaves <adrian@chaves.io>
* Rule.process_links takes a list
* Fix aesthetic issue reported by Flake8
2019-12-18 20:05:33 +05:00
Andrey Rakhmatullin
7ccb169a27
Split a long test in test_engine.py into three.
2019-12-18 19:41:16 +05:00
Mikhail Korobov
e90f276903
Merge pull request #4198 from wRAR/deprecate-noconnect
...
Deprecate the HTTPS proxy noconnect mode.
2019-12-18 16:11:24 +05:00
Adrián Chaves
1f689b50c6
Merge remote-tracking branch 'origin/documentation-coverage' into documentation-coverage
2019-12-18 12:09:34 +01:00
Adrián Chaves
174769a3f0
Use a better name for the LxmlLinkExtractor subclassing test
2019-12-18 12:09:03 +01:00
Andrey Rakhmatullin
ac302c3f61
Fix a flake8 problem.
2019-12-18 15:43:05 +05:00
Andrey Rakhmatullin
bb2ff13e4c
Skip Http10ProxyTestCase.test_download_with_proxy_https_noconnect
2019-12-18 15:39:08 +05:00
Andrey Rakhmatullin
2d92a39003
Restore test_download_with_proxy_https_noconnect, check for a warning there.
2019-12-18 12:07:08 +05:00
Adrián Chaves
607815dfc2
Merge branch 'master' into documentation-coverage
2019-12-17 16:54:27 +01:00
Andrey Rahmatullin
bb3f164280
Merge pull request #4236 from wRAR/pipeline-tests
...
Add simple tests for pipelines.
2019-12-17 19:38:06 +05:00
Adrián Chaves
ab13221b0b
Merge remote-tracking branch 'upstream/master' into allow-customizing-export-column-names
2019-12-17 14:06:14 +01:00
Marc Hernández
63cf5c75c8
Fix E502: backslash is redundant between brackets ( #4238 )
2019-12-17 13:53:15 +01:00
Andrey Rakhmatullin
5980d3bbff
Add simple tests for pipelines.
2019-12-16 22:41:28 +05:00
Eugenio Lacuesta
451e7a616e
Scan callbacks/errbacks for return statements with values different than None
2019-12-16 11:30:40 -03:00
Adrián Chaves
a4ef9750f9
Fix Flake8-reported issues
2019-12-13 14:32:06 +01:00
Adrián Chaves
b5c4c2cae8
Keep 2 spaces between code and inline comments ( #4195 )
2019-12-13 14:20:48 +01:00
Andrey Rakhmatullin
bfb78b8dea
Add CrawlerProcess tests for ASYNCIO_ENABLED.
2019-12-13 18:12:07 +05:00
Andrey Rakhmatullin
3560123090
Rename ASYNCIO_SUPPORT to ASYNCIO_ENABLED.
2019-12-13 18:07:47 +05:00
Andrey Rakhmatullin
352ddbb336
Merge remote-tracking branch 'origin/master' into asyncio-base
2019-12-13 18:07:23 +05:00
Andrey Rahmatullin
02cdc53fb8
Add a test for a CrawlerProcess script. ( #4218 )
...
* Add a test for a CrawlerProcess script.
* Add tests/CrawlerProcess to collect_ignore.
* Remove an extra line.
* Fix/improve conftest.py.
2019-12-13 18:04:05 +05:00
Eugenio Lacuesta
21a2f8c6f8
Merge branch 'master' into response_follow_all
2019-12-10 17:30:59 -03:00
Adrián Chaves
1fc2b140c1
Merge branch 'master' into documentation-coverage
2019-12-05 14:43:36 +01:00
Andrey Rahmatullin
076f0764b7
Merge pull request #4121 from scrapy/remove-six-code
...
Remove six-related code and __future__ imports
2019-12-05 18:20:14 +05:00
Mikhail Korobov
250da28952
Merge pull request #4170 from mabelvj/4133-handle-start_url
...
Raise error when start_url found instead of start_urls.
2019-12-05 17:47:03 +05:00
Andrey Rakhmatullin
ed34ce14c0
Add the ASYNCIO_SUPPORT setting, reshuffle other logic accordingly.
2019-12-04 21:32:56 +05:00
Andrey Rakhmatullin
cc19ab5439
Add tests that check asyncio support.
2019-12-04 21:32:56 +05:00
Andrey Rakhmatullin
b04b541372
Install the asyncio reactor only in scrapy.cmdline.
2019-12-04 21:32:56 +05:00
Andrey Rakhmatullin
8d8fbddbde
Switch to the released version of pytest-twisted.
2019-12-04 21:32:56 +05:00
Andrey Rakhmatullin
9777639533
Run tests using the asyncio reactor.
2019-12-04 21:32:56 +05:00
Andrey Rakhmatullin
1b35260625
Add a test for downloader middlewares using Deferreds.
2019-12-04 21:32:56 +05:00
Eugenio Lacuesta
62778cf23f
Request: remove restriction about errback without callback
2019-12-04 08:53:38 -03:00
Eugenio Lacuesta
2a9f5a0aef
Skip invalid links when passing SelectorLists to Response.follow_all
2019-12-03 16:01:42 -03:00
Eugenio Lacuesta
e43f37fff3
Pass args/kwargs in S3DownloadHandler.from_crawler, update tests
2019-12-02 17:36:31 -03:00
Eugenio Lacuesta
3d77f74e40
Download handlers: from_crawler factory method, take crawler instead of settings in __init__
2019-12-02 17:36:31 -03:00
Andrey Rakhmatullin
63546cbf3e
Deprecate the HTTPS proxy noconnect mode.
2019-11-27 22:42:52 +05:00
Adrián Chaves
6d9ed6146d
Merge branch 'master' into remove-six-code
2019-11-25 10:34:21 +01:00
Eugenio Lacuesta
03af8885ff
LogFormatter.download_error
2019-11-23 20:02:44 -03:00
Eugenio Lacuesta
4756e7c587
LogFormatter.spider_error
2019-11-23 19:33:29 -03:00
Eugenio Lacuesta
facb926542
Remove quotes from item_error message
2019-11-23 19:16:41 -03:00
Eugenio Lacuesta
7a7d13b112
Rename LogFormatter.error to item_error
2019-11-23 19:12:03 -03:00
Eugenio Lacuesta
40b5cfc0a4
Item loaders: allow single-argument processors (unbound methods)
2019-11-22 20:47:22 -03:00
Eugenio Lacuesta
6fa8f06b64
Merge remote-tracking branch 'upstream/master' into response_follow_all
2019-11-22 13:05:06 -03:00
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
Anubhav Patel
2994b624e0
makes suggested changes
2019-05-17 12:14:43 +00:00
Anubhav Patel
653ac3eebe
makes suggested changes
2019-05-16 06:20:39 +00:00
Adrián Chaves
611249bb7f
Implement the METAREFRESH_IGNORE_TAGS setting
2019-05-08 12:52:29 +02:00
Anubhav Patel
881bade2c1
tests for new API
2019-05-07 16:12:26 +05:30
Anubhav Patel
33925a7761
test for deprecation warning
2019-05-07 15:44:21 +05:30
Matthijs Vos
f6485e6697
Restore alphabetic order and two lines between import and code
2019-05-03 13:55:18 +02:00
Anubhav Patel
2a6bcdb413
makes fix backward compatible
2019-04-29 21:21:02 +05:30
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
Anubhav Patel
6039b66f42
aesthetic changes
2019-04-13 10:17:26 +05:30
Anubhav Patel
c6769d6887
make suggested changes
2019-04-13 10:10:08 +05:30
Anubhav Patel
398639a0bf
fix test
2019-04-08 12:27:36 +05:30
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
Adrián Chaves
484bd0d22a
Allow customizing export column names
2019-03-29 15:16:54 +01: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
Anubhav Patel
ca882d8d9f
include test
2019-03-27 19:10:44 +05:30
Maram Sumanth
2fd8b7c28c
[MRG+1] redirect_reasons in Request.meta ( #3687 )
2019-03-27 00:15:53 +05:00
Maram Sumanth
5f2ad5377e
fixed typo
2019-03-26 16:46:15 +05:30
Maram Sumanth
ae856e8ba8
corrected tests
2019-03-26 16:21:52 +05:30
Maram Sumanth
213b9eb879
Update test_http_request.py
2019-03-26 15:59:38 +05:30
Maram Sumanth
dc8310e292
changed tests
2019-03-26 15:42:58 +05:30
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
Maram Sumanth
4c89e53e68
Update test_http_request.py
2019-03-20 18:46:25 +05:30
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
Anubhav Patel
07487dd487
make tests work with new convert_image
2019-03-15 23:29:53 +05:30
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
Maram Sumanth
8831fafabc
Update test_http_request.py
2019-03-04 15:42:48 +05:30
Maram Sumanth
fdf03a6d0d
correcting tests
2019-03-04 15:12:44 +05:30
Maram Sumanth
d75b61b96a
Update test_http_request.py
2019-03-04 15:07:12 +05:30
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
Maram Sumanth
722a30ac2b
Update test_http_request.py
2019-01-19 13:20:05 +05:30
Júlio César Batista
8eade7d864
Testing stats and log messages from RFPDupeFilter
2019-01-18 11:39:35 -02:00
Maram Sumanth
6be73f06c3
Updated tests
2019-01-17 23:50:58 +05:30
Maram Sumanth
6f86c93f36
Increased test cases
2019-01-16 23:54:35 +05:30
Maram Sumanth
9f1f4df966
Update test_http_request.py
2019-01-16 22:59:41 +05:30
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
Maram Sumanth
023290dabc
Update test_http_request.py
2019-01-13 23:50:31 +05:30
Maram Sumanth
4abcdcb306
Update test_http_request.py
2019-01-13 23:22:53 +05:30
Maram Sumanth
b5e454809e
Included test
2019-01-13 20:12:31 +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
Eugenio Lacuesta
4090cc3990
Spider middleware: use Mockserver to test process_spider_exception
2017-03-08 18:11:20 -03:00
Paul Tremberth
7be773e14a
Add SPIDER_LOADER_WARN_ONLY to toggle between spiderloader failure and warning
2017-03-07 17:40:40 +01:00
Mikhail Korobov
d3f8f3d38a
Merge pull request #2612 from redapple/dupe-spider-name-tests
...
[WIP] Add warning on duplicate spider name
2017-03-07 20:08:42 +05:00
Eugenio Lacuesta
c7bb2fa8ce
Feed exports: consistent and backwards compatible behaviour on indent
2017-03-07 11:56:00 -03:00
Eugenio Lacuesta
766b2c8453
Feed exports: enforce difference between None and 0 on indent
...
Also rename params and settings from "indent_width" to just "indent"
2017-03-07 11:56:00 -03:00
Eugenio Lacuesta
7e9153b38d
Feed exports: beautify JSON and XML
2017-03-07 11:56:00 -03:00
Paul Tremberth
0b9a18e1a1
Warn only once for all spiders
2017-03-07 15:41:17 +01:00
Paul Tremberth
978306a223
Fix dupe spider name warning string tests
2017-03-07 14:48:16 +01:00
Paul Tremberth
b6378c7ef6
Revert to using self.assert methods
2017-03-07 12:28:24 +01:00
Konstantin Lopuhin
6f55ca4643
Revert unneeded test_crawl changes
2017-03-07 14:20:52 +03:00
Paul Tremberth
11cdf58abe
Always decompress Content-Encoding: gzip at HttpCompression stage
...
Let SitemapSpider handle decoding of .xml.gz files if necessary
2017-03-07 11:02:46 +01:00
Paul Tremberth
e42b846a9f
Use body to chose response type after decompression content
2017-03-06 23:10:38 +01:00
Paul Tremberth
768f3155e5
Fix referrer policy from response headers and support explicit empty string
2017-03-06 16:20:37 +01:00
Paul Tremberth
0a17f9b55c
Merge pull request #2334 from ArturGaspar/data_uri
...
[MRG+1] data URI download handler.
2017-03-06 13:50:46 +01:00
Paul Tremberth
c68f99eed8
Refactor settings tests
2017-03-03 17:03:25 +01:00
Konstantin Lopuhin
ef04cfd237
Respect log settings in custom_settings: fixes GH-1612
...
A new root logger is installed when a crawler is created
if one was already installed before.
This allows to respect custom settings related to logging,
such as LOG_LEVEL, LOG_FILE, etc.
2017-03-03 18:01:11 +03:00
Paul Tremberth
f7e11b198e
Cleanup
2017-03-03 16:00:59 +01:00
Paul Tremberth
ecde166ee1
Refactor without MEDIA_HTTPSTATUS_LIST setting
2017-03-03 15:52:05 +01:00
Bernardas
11b31c9fbd
fix redirect change
2017-03-03 15:52:05 +01:00
Bernardas
3cef1cd451
adjust variable wording and redirect logic
2017-03-03 15:52:05 +01:00
Bernardas
6a42214716
add tests for media pipeline MEDIA_ALLOW_REDIRECTS and MEDIA_HTTPSTATUS_LIST settings
2017-03-03 15:52:05 +01:00
Mikhail Korobov
7e8453cf1e
Merge pull request #2306 from redapple/referrer-policy
...
[MRG] Referrer policies in RefererMiddleware
2017-03-03 04:05:13 +05:00
Mikhail Korobov
93024c242b
Merge pull request #2537 from scrapy/no-canonicalize
...
[MRG+1] Set canonicalize=False for LinkExtractor
2017-03-03 02:53:36 +05:00
Artur Gaspar
b50d0370f4
Test response attributes in data URI download handler.
2017-03-02 14:46:33 -03:00
Paul Tremberth
12a8ddecab
Fix tests
2017-03-02 13:03:18 +01:00
Paul Tremberth
e71803c833
Add tests for duplicate spider name warnings
2017-03-02 12:48:47 +01:00
Paul Tremberth
2d55d838ca
Fix strip_url() tests
2017-03-01 20:59:52 +01:00
Paul Tremberth
efa50039ec
Add tests for policy fallback on unknown policies from meta and headers
2017-03-01 17:51:23 +01:00
Paul Tremberth
8226e77010
Add test for Referer header on HTTP redirections
2017-03-01 17:51:23 +01:00
Paul Tremberth
d2aa51c0fb
Update tests
2017-03-01 17:51:23 +01:00
Paul Tremberth
bc200d1155
Rename setting to REFERRER_POLICY (with 2 Rs)
2017-03-01 17:51:23 +01:00
Paul Tremberth
b6c761d2b4
Fix tests
2017-03-01 17:50:39 +01:00
Paul Tremberth
5cef67ae75
Update Referrer tests for "strict-" policies
2017-03-01 17:50:39 +01:00
Paul Tremberth
0a0b60a59f
Add tests for stripping userinfo with percent-encoded delimiters
2017-03-01 17:50:39 +01:00
Paul Tremberth
8864d0e8c1
Rename helper function to strip_url() + add more tests
2017-03-01 17:50:39 +01:00
Paul Tremberth
5dd7311cd4
Move URL credentials stripping to a helper function
2017-03-01 17:50:39 +01:00
Paul Tremberth
d3d4d66ce8
Add tests for referrer-policy set in response HTTP headers
2017-03-01 17:50:39 +01:00
Paul Tremberth
e50e670eff
Add test for custom referrer policy via settings
2017-03-01 17:50:39 +01:00
Paul Tremberth
0344f57fef
Support case-insensitive policy names in settings
2017-03-01 17:50:39 +01:00
Paul Tremberth
e72b6e3361
Add tests for referrer policy via settings and via Request meta
2017-03-01 17:50:39 +01:00
Paul Tremberth
7ec1b5f6c3
Add tests for the different referrer policies
2017-03-01 17:50:38 +01:00
Paul Tremberth
baed7c436f
WIP Add Referrer policies
2017-03-01 17:50:38 +01:00
Eugenio Lacuesta
706ed0e049
Spider middleware: process_spider_exception on generators
2017-03-01 12:01:53 -03:00
Rolando Espinoza
f01ae6ffcd
Handle data loss gracefully.
...
Websites that return a wrong ``Content-Length`` header may cause a data
loss error. Also when a chunked response is not finished properly.
This change adds a new setting ``DOWNLOAD_FAIL_ON_DATALOSS`` (default:
``True``) and request.meta key ``download_fail_on_dataloss``.
2017-03-01 11:43:53 -03:00
Mikhail Korobov
0e5ed21397
Merge pull request #2599 from redapple/py3-ignores-cleanup-ftp
...
Fix FTP downloader and re-enable FTP tests on Python 3
2017-02-28 15:39:42 +05:00
Paul Tremberth
0b90c3b43c
Re-enable FTP tests on Python 3
2017-02-27 17:42:00 +01:00
Mikhail Korobov
c72ba07326
Merge pull request #2543 from scrapy/retry-stats
...
[MRG+1] Retry stats
2017-02-27 21:03:35 +05:00
Artur Gaspar
121a668a47
Rename data URI downloader module.
2017-02-22 12:30:56 -03:00
Artur Gaspar
3397d27574
Test for binary body content from data URI downloader.
2017-02-22 12:30:56 -03:00
Artur Gaspar
d60642e175
data URI download handler.
2017-02-22 12:30:56 -03:00
Mikhail Korobov
26c1256f95
HttpErrorMiddleware stats
2017-02-22 17:36:25 +05:00
Mikhail Korobov
2b4d46315f
TST fixed compatibility with new link extractor whitespace handling
2017-02-21 00:05:40 +05:00
Mikhail Korobov
df446d167f
fix deprecated link extractors
2017-02-20 23:01:14 +05:00
Mikhail Korobov
47f7da8724
canonicalize=False by default for LinkExtractor. Fixes GH-1941.
2017-02-20 22:58:11 +05:00
Mikhail Korobov
93e449f1f6
Merge pull request #2343 from redapple/anonymous-ftp
...
[MRG+1] Support Anonymous FTP
2017-02-20 23:19:54 +06:00
Omer Schleifer
ff3e299eb0
[MRG+2] add flags to request ( #2082 )
...
* add flags to request
* fxi test - add flags to request
* fix test(2) - add flags to request
* fix test(2) - add flags to request
* Updated test to reqser with flags field of request
* Updated documntation with flags field of request
* fix test identation
* fix test failed
* make the change backward comptaible
* remove unrequired spaces, fix documentation request flags
* remove unrequired space
* fx assert equal
* flags default is empty list
* Add flags to request
* add flags to request
* fxi test - add flags to request
* fix test(2) - add flags to request
* fix test(2) - add flags to request
* Updated test to reqser with flags field of request
* Updated documntation with flags field of request
* fix test identation
* fix test failed
* make the change backward comptaible
* remove unrequired spaces, fix documentation request flags
* remove unrequired space
* fx assert equal
* flags default is empty list
* add flags to request squashed commits
2017-02-20 20:42:29 +06:00
Daniel Graña
b0388e49b4
Merge pull request #1728 from scrapy/deprecate-make-requests-from-url
...
deprecate Spider.make_requests_from_url.
2017-02-20 11:23:49 -03:00
Daniel Graña
c68140e68a
Merge pull request #2540 from scrapy/response-follow
...
response.follow
2017-02-20 11:21:21 -03:00
Daniel Graña
b15b4541d1
Merge pull request #2569 from scrapy/fix-project-util-test-osx
...
TST fixed ProjectUtilsTest on OS X
2017-02-20 11:15:21 -03:00
Daniel Graña
322fd68e4c
Merge pull request #2548 from scrapy/formrequest-whitespaces
...
[MRG+1] FormRequest: handle whitespaces in action attribute properly
2017-02-20 11:09:50 -03:00
Daniel Graña
4a93be4ad8
Merge pull request #2547 from scrapy/linkextractor-strip-whitespaces
...
[MRG+1] LinkExtractors: strip whitespaces
2017-02-20 11:08:32 -03:00
Daniel Graña
58a18e3007
Merge pull request #2535 from pawelmhm/brotli
...
[MRG+1] [httpcompression] add support for br - brotli content encoding
2017-02-20 11:04:55 -03:00
Paul Tremberth
f2e200120b
Explicitly remove test directories in FTP tests
2017-02-20 14:50:05 +01:00
Paul Tremberth
26b7c039a9
Remove debug print statement
2017-02-20 14:19:36 +01:00
Paul Tremberth
3ffa2c5759
Support Anonymous FTP
...
Fixes GH-2342
2017-02-20 14:19:36 +01:00
Mikhail Korobov
a1e8a8525d
fix make_requests_from_url deprcation implementation, add tests
2017-02-17 00:18:29 +05:00
Mikhail Korobov
78cb46a079
TST fix a weird OS X testing issue
...
pytest intercepts temp file creation to provide readable file/folder
names; path is built from method name; in case of conflicts
pytests uses increasing numbers, but it seems it doesn’t account
for case-insensitive (but case preserving) OS X filesystem. There
are methods named test_encoding, pytest thinks test_Encoding is
different and fails to create a test folder
2017-02-16 18:22:04 +05:00
Mikhail Korobov
b9928558b2
TST remove temporary files and folders
2017-02-16 17:50:38 +05:00
Mikhail Korobov
f0c4e5dfd5
TST fixed ProjectUtilsTest on OS X
...
Temp folder can be a symlink on OS X.
2017-02-16 16:32:23 +05:00
Mikhail Korobov
692975acb4
deprecate Spider.make_requests_from_url. Fixes #1495 .
2017-02-16 03:39:34 +05:00
Mikhail Korobov
d079e15fe2
Strip leading/trailing whitespaces in link extractors. Fixes GH-838.
2017-02-16 02:22:17 +05:00
Mikhail Korobov
074caf434e
FormRequest: handle whitespaces in action attribute properly
2017-02-16 02:13:39 +05:00
Mikhail Korobov
fade5763af
TST more response.follow tests
2017-02-16 02:02:50 +05:00
Mikhail Korobov
160da6abab
fixed tests in Python 2
2017-02-15 04:41:53 +05:00
Mikhail Korobov
2674f317df
Response.follow
2017-02-15 04:39:47 +05:00
Mikhail Korobov
608c3f0c45
handle whitespace in response.follow; add tests
2017-02-15 04:17:41 +05:00
Mikhail Korobov
e285b1d6c2
retry stats
2017-02-14 20:27:49 +05:00
Mikhail Korobov
afac3fd2c2
Merge pull request #2530 from elacuesta/proxy_credentials
...
[MRG+1] Use credentials from request.meta['proxy']
2017-02-14 20:58:39 +06:00
Eugenio Lacuesta
ae0ea31abd
Add HTTPPROXY_ENABLED setting (default True)
2017-02-14 11:33:01 -03:00
Paul Tremberth
f32a229e3d
Merge pull request #2510 from elacuesta/reqser_request_class
...
[MRG+1] Preserve request class when converting to/from dicts (utils.reqser)
2017-02-08 18:30:07 +01:00
Eugenio Lacuesta
9c0aae724e
Use credentials from request.meta['proxy'] if present
2017-02-08 13:22:30 -03:00
Paul Tremberth
a8893190a1
Merge pull request #2464 from elacuesta/component_order_integer
...
[MRG+2] Validate numeric values (components order)
2017-02-08 13:01:02 +01:00
Paul Tremberth
3becb861af
Merge pull request #2544 from scrapy/twisted-version-cleanup
...
[MRG+1] Remove code required to support ancient twisted versions.
2017-02-08 12:59:45 +01:00
Rolando Espinoza
4e765acaed
BUG: Fix __classcell__ propagation.
...
Python 3.6 added simpler customization of class creation but this
requires to propagate correctly the __classcell__ attribute in custom
__new__ methods.
See https://docs.python.org/3.6/whatsnew/3.6.html#pep-487-simpler-
customization-of-class-creation
2017-02-08 02:12:52 -04:00
Mikhail Korobov
04b2f79e7a
Remove code required to support ancient twisted versions. See GH-1887.
2017-02-07 22:30:58 +05:00
Eugenio Lacuesta
24e82bfe75
Validate values for components order
2017-02-07 09:13:57 -03:00
Pawel Miech
fb4ef21a1d
[httpcompression] minor style edits
2017-02-07 10:22:42 +01:00
Pawel Miech
af802bad14
[httpcompression] add brotlipy for python 3
2017-02-06 15:45:21 +01:00
Pawel Miech
3daf473686
[httpcompression] skip test if no brotli
2017-02-06 13:49:41 +01:00