-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ItemLoader
fields initialized from item
are reprocessed
#3976
Comments
@alexander-matsievsky Cheers, thanks for taking the time! I believe this issue is also related to the discussion in #3897 so this was the reason I didn't open another issue myself. I also couldn't figure out why this commit was discarded in favour of the next one. The only thing I can think of is the failed tests that made the author of the pull request make the change. But then again, it seems to me that the test itself is not being correctly asserting? |
Yeah, it was mostly because of failing test. Just came back from my vacation, will take a fresh look. |
@ava7 It seems there's a web of related issues around it+) I've tried to make a focused reproduction, I hope it'll help. |
Checked, fixable, will ship new pull request with new tests this week. |
I got to the same problem, I'll just add my case here as an example
It works in scrapy 1.6, but breaks in 1.7 |
@ejulio Can you add more details, please? Tested in scrapy 1.6.0, got this:
|
@sortafreel , it is python3 also. |
For the record, I think what we should do (and what is done in #3998 and #4036) is to avoid input reprocessing. The code samples posted by @alexander-matsievsky and @ejulio fail in 1.7.3 because the initial values are stored as they are and not as iterables. |
Description
#3804 introduced a bug where
ItemLoader
fields are reprocessed.Related #3897.
Steps to Reproduce
Expected behavior:
ItemLoader
initialized from thex
item does not reprocess its fields and loads{'x': 'value1'}
.Actual behavior:
ItemLoader
initialized from thex
item reprocesses its fields and loads{'x': 'v'}
.Versions
Additional context
Here's the behavior of the previous version:
The text was updated successfully, but these errors were encountered: