emmett-framework / emmett

The web framework for inventors
Other
1.04k stars 70 forks source link

h2 dependency conflict with scrapy (twisted?) #315

Closed Triquetra closed 3 years ago

Triquetra commented 3 years ago

I'm trying to develop some web scrapers to provide data for the app I'm building with emmett. Unfortunately, poetry throws an error when trying to install them both:

(env) λ poetry add emmett                                                                                              
Using version ^2.2.0 for emmett                                                                                        

Updating dependencies                                                                                                  
Resolving dependencies... (2.9s)                                                                                       

  SolverProblemError                                                                                                   

  Because no versions of emmett match >2.2.0,<3.0.0                                                                    
   and emmett (2.2.0) depends on h2 (>=4.0.0,<4.1.0), emmett (>=2.2.0,<3.0.0) requires h2 (>=4.0.0,<4.1.0).            
  And because scrapy (2.5.0) depends on h2 (>=3.0,<4.0)                                                                
   and no versions of scrapy match >2.5.0,<3.0.0, emmett (>=2.2.0,<3.0.0) is incompatible with Scrapy (>=2.5.0,<3.0.0).
  So, because yourproject depends on both Scrapy (^2.5.0) and emmett (^2.2.0), version solving failed.   

Looking on the scrapy github issues, it seems this h2 < 4.0 requirement may be imposed by twisted.

Is h2 >= 4.0 a hard requirement for emmett?

gi0baro commented 3 years ago

@Triquetra I'm not sure about the >= 4.0 constraint, I can try to downgrade the dependency and make some tests.

The other option I see on the table is to make the h2 dependency optional in Emmett, but this also require some time to review the protocols code.

I gonna make some tests and get back to you.

gi0baro commented 3 years ago

@Triquetra I run some tests and did not experienced any issues with 3.2.0 of h2.

This should now be solved with current master and 2.2.1 release.