set pypi package 7 day limit
isaiahbuilds
PROOP

20 days ago

How can i set railway to use a limit for dependency age. something like this:

pip install -r requirements.txt --uploaded-prior-to=P7D

i've tried a bunch of things, none of which have worked, it just does plain old pip install

$10 Bounty

2 Replies

cannamuffinman
PRO

20 days ago

pip install has no native “only packages older than X days” option, so Railway won’t enforce that by default.

That’s why all attempts still behave like a normal install.

Two workable approaches:

Lock dependencies before deploy

Generate a pinned lock/requirements file in CI (weekly/daily), then deploy from that file only.

Railway just installs pinned versions, so age is indirectly enforced by your lock refresh policy.

Use uv with a cutoff date, then install from the generated lock

uv supports excluding newer uploads (date cutoff).

Build the lock with cutoff, commit it, then Railway installs from that lock.

So the key is: Railway won’t do “dependency age filtering” by itself during pip install; you have to pre-resolve and pin the dependency set before deploy.


jozefbonnar
PRO

18 days ago

You need a more modern version of pip try this dockerfile


FROM python:3.13

WORKDIR /app

COPY requirements.txt .

RUN python -m pip install --upgrade pip \

 && python -m pip install -r requirements.txt --uploaded-prior-to=P7D

COPY . .

CMD ["python", "main.py"]

Welcome!

Sign in to your Railway account to join the conversation.

Loading...