scrapy / itemloaders

Library to populate items using XPath and CSS with a convenient API
BSD 3-Clause "New" or "Revised" License
45 stars 16 forks source link

Mark dataclass and attrs support as experimental #15

Closed Gallaecio closed 4 years ago

Gallaecio commented 4 years ago

Suggested by @kmike during an internal meeting.

If we do this, we should also open a ticket to do something similar in Scrapy.

kmike commented 4 years ago

Hm, I was thinking about making their support experimental in itemloaders, not in itemadapter

elacuesta commented 4 years ago

I agree with @kmike, dataclass objects do work for all intended purposes within itemadapter. The problem in https://github.com/scrapy/itemloaders/issues/14 is about creating objects without all fields being present, but ItemAdapter doesn't create items internally.

Gallaecio commented 4 years ago

Makes sense.

ejulio commented 4 years ago

I guess we can close this one, right? At leas there is a warning in the current documentation..

Gallaecio commented 4 years ago

Yeah, I believe https://github.com/scrapy/itemloaders/commit/7f288f016274adec1dbd0632cc9f73637fe9e17a#diff-caf2a6b8f4947d018f68893c695b5202R20 does the trick.