[{"data":1,"prerenderedAt":263},["ShallowReactive",2],{"project-11659707":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":40,"post_text":42,"what":43,"said":79,"maker_in_thread":160,"shape":168,"grid":172,"attempts":227,"same_week":228,"maker_shows":161,"maker_hidden":255,"reader_version":256,"card":257},"11659707","Pur","Update your requirements.txt file with Pur in Python","title","Show HN: Update your requirements.txt file with Pur in Python","https:\u002F\u002Fgithub.com\u002Falanhamlett\u002Fpip-update-requirements","github.com","welder",1462801062,2016,35,26,915,2264,41,"shown","dev_tools","dependency management","cli",[24,25,26,27],"requirements.txt","pip","python dependencies","pip upgrade","debated",-0.058,{"positive":31,"neutral":32,"mixed":33,"critical":34},3,4,0,5,12,{"design":37,"idea":39},{"positive":33,"critical":38},2,{"positive":31,"critical":31},[41,33,33,33,33,41,31,34,41,33,41,33,33,33,31,41,33,33,33,31,33,34,33,34,33,31],1,null,{"problem":44,"audience":57,"pricing":42,"motivation":67,"time_to_build":42,"stack":72,"openness":78,"stage":78,"team_size":78},{"value":45,"source":46,"evidence":47},"Keeping requirements.txt versions up to date without installing packages first","maker",[48,51,54],{"id":49,"by":11,"text":50},"11663411","What about comments, packages installed via git, recursive packages?",{"id":52,"by":11,"text":53},"11663478","I explained in more detail in another comment here, but I don't directly install requirements so install first solutions like pip-review and pip list --outdated don't work for me.",{"id":55,"by":11,"text":56},"11661503","pip-tools and pip-review just look at your installed dependencies and upgrade them, they don't update your requirements.txt file. Upgrading packages doesn't work for me because I…",{"value":58,"source":59,"evidence":60},"Python developers who manage requirements.txt files","inferred",[61,64],{"id":62,"by":11,"text":63},"11661366","Some of my projects have double digits dependencies in their requirements.txt file so upgrading one at a time, even with pip list --outdated, would take too long. I prefer to…",{"id":65,"by":11,"text":66},"11661298","Same here, needed this for a long time. I wasn't going to keep a duplicate requirements-to-freeze.txt file around [1] so created this tool. [1]…",{"value":68,"source":46,"evidence":69},"Maker needed to update requirements without a duplicate requirements file or direct installs",[70,71],{"id":65,"by":11,"text":66},{"id":52,"by":11,"text":53},[73],{"value":74,"source":59,"evidence":75},"Python",[76],{"id":77},"post","unknown",{"praise":80,"objections":97,"requests":122,"questions":127,"alternatives":132},[81,90],{"value":82,"source":83,"evidence":84},"Fills a long-needed gap in pip workflows","commenter",[85,89],{"id":86,"by":87,"text":88},"11660818","vanesa-","Finally! I've been needing this for a long time. Great that it doesn't force package installs on you...",{"id":65,"by":11,"text":66},{"value":91,"source":83,"evidence":92},"Makes updating all package versions easy with tests",[93],{"id":94,"by":95,"text":96},"11662497","michaelmior","This makes updating all versions easy. You run a tool like Pur then run your tests. If they pass, you commit and push the requirements.txt changes.",[98,112],{"value":99,"source":83,"evidence":100},"Upgrading one package at a time is safer for finding breakage",[101,105,109],{"id":102,"by":103,"text":104},"11661332","tedmiston","Why would you want to update requirements.txt before testing against the new package version first? My dependency upgrade workflow for a Python web app is usually: ``` run pip…",{"id":106,"by":107,"text":108},"11662056","orf","Testing packages 1 by 1 finds any bugs and the exact package that caused it immediately, but you could just upgrade all of them and see if it fails. If it does a git-bisect could…",{"id":110,"by":103,"text":111},"11661566","My main project has ~30. But still I prefer to go one at a time, especially with a major version bump, for the sake of understanding exactly what breaks. Perhaps it's just a…",{"value":113,"source":83,"evidence":114},"Existing tools like pip-review and pip-tools already cover this",[115,119],{"id":116,"by":117,"text":118},"11661391","di","Seems similar to the features offered by pip-tools [1] and pip-review [2]. If you want to automate updating your requirements file, take a look at requires.io [3]. [1]…",{"id":120,"by":103,"text":121},"11663160","If that's the desired behavior, it's already pretty easy by piping the outdated package list into upgrade. ``` pip list --outdated | sed 's\u002F(.*\u002F\u002Fg' | xargs pip install -U pip…",[123],{"value":124,"source":83,"evidence":125},"Handle comments, git-installed packages and recursive dependencies",[126],{"id":49,"by":11,"text":50},[128],{"value":129,"source":83,"evidence":130},"Why update requirements.txt before testing against new versions",[131],{"id":102,"by":103,"text":104},[133,138,146,153],{"value":134,"source":83,"evidence":135},"pip-review",[136,137],{"id":116,"by":117,"text":118},{"id":120,"by":103,"text":121},{"value":139,"source":83,"evidence":140},"pip-tools",[141,142],{"id":116,"by":117,"text":118},{"id":143,"by":144,"text":145},"11680229","kennell","There is a popular tool for this approach: https:\u002F\u002Fgithub.com\u002Fnvie\u002Fpip-tools",{"value":147,"source":83,"evidence":148},"requires.io",[149,150],{"id":116,"by":117,"text":118},{"id":151,"by":117,"text":152},"11661657","If you use requires.io with Github, it can optionally make a PR to update your requirements.txt for you.",{"value":154,"source":83,"evidence":155},"hashin",[156],{"id":157,"by":158,"text":159},"11662787","peterbe","hashin does something similar but supports cryptographic hashes that pip 8 understands. https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fhashin",{"comments":161,"answered":38,"key":162},8,[163,164,167],{"id":62,"text":63},{"id":165,"text":166},"11661620","Yes perhaps :) I still look at the changelogs of all updated packages before running the upgrades.",{"id":52,"text":53},{"commenters":169,"max_depth":32,"maker_replies":161,"first_comment_mins":170,"lifespan_hours":171},14,143,58,[173,175,177,178,179,183,184,188,190,192,194,195,196,197,200,203,204,208,210,212,215,217,218,219,222,226],[102,33,41,174,103,33],"project\u002Fcritical\u002Fdesign",[62,33,33,176,11,41],"commenter\u002Fneutral\u002Fnone",[110,33,33,176,103,33],[165,33,33,176,11,41],[180,33,33,181,182,33],"11664046","other\u002Fneutral\u002Fnone","ubernostrum",[106,33,41,174,107,33],[185,33,31,186,187,33],"11662374","project\u002Fneutral\u002Fidea","emidln",[94,33,34,189,95,33],"project\u002Fpositive\u002Fidea",[120,33,41,191,103,33],"project\u002Fcritical\u002Fidea",[52,33,33,193,11,41],"maker\u002Fneutral\u002Fnone",[116,41,41,191,117,33],[55,41,33,191,11,41],[151,41,33,181,117,33],[198,41,33,199,11,41],"11663448","other\u002Fneutral\u002Fpricing",[201,38,31,186,202,33],"11663419","nicois",[143,38,41,191,144,33],[205,31,33,206,207,33],"11662116","other\u002Fneutral\u002Fidea","michaelmcmillan",[209,31,33,191,11,41],"11663462",[211,31,33,176,207,33],"11665483",[213,32,31,186,214,33],"11663046","SilasX",[49,32,33,216,11,41],"project\u002Fcritical\u002Fexecution",[86,34,34,189,87,33],[65,34,33,189,11,41],[220,221,34,189,144,33],"11680240",6,[223,224,33,181,225,33],"11661414",7,"Chris2048",[157,161,31,186,158,33],[],[229,233,237,242,247,251],{"id":230,"name":231,"points":232,"category":20},"11667494","BitKeeper",384,{"id":234,"name":235,"points":236,"category":20},"11662057","Minoca OS",168,{"id":238,"name":239,"points":240,"category":241},"11664933","Hydrogen",154,"infrastructure",{"id":243,"name":244,"points":245,"category":246},"11652454","dial2verify-twilio",147,"security_privacy",{"id":248,"name":249,"points":250,"category":20},"11658444","Gitsome",85,{"id":252,"name":253,"points":254,"category":246},"11660781","Hackchain",83,false,"v2",{"id":258,"name":5,"line":6,"ai":255,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":259,"top":18,"kw":260,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":261,"url":9,"mix":262,"praise":82,"objection":99,"sub":21},11659707,-0.06,[24,25,26,27],"10000135101000310003050503",[31,32,33,34],1794036544081]