Skip to content

Commit 66dde44

Browse files
authored
Add an Acceptable Use Policy (#12550)
1 parent 32dc0e6 commit 66dde44

File tree

4 files changed

+352
-1
lines changed

4 files changed

+352
-1
lines changed

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ volumes:
44
simple:
55
packages:
66
sponsorlogos:
7+
policies:
78
vault:
89

910
services:
@@ -95,6 +96,7 @@ services:
9596
- .coveragerc:/opt/warehouse/src/.coveragerc:z
9697
- packages:/var/opt/warehouse/packages
9798
- sponsorlogos:/var/opt/warehouse/sponsorlogos
99+
- policies:/var/opt/warehouse/policies
98100
- simple:/var/opt/warehouse/simple
99101
- ./bin:/opt/warehouse/src/bin:z
100102
- ./requirements:/opt/warehouse/src/requirements:z

policies/acceptable-use-policy.md

Lines changed: 345 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,345 @@
1+
# Acceptable Use Policy
2+
3+
**Short version:** _PyPI is a critical resource for the Python ecosystem, which
4+
hosts a variety of projects from a diverse group of users. That resource is
5+
only effective when our users are able to work together as part of a community
6+
in good faith. While using PyPI, you must comply with our Acceptable Use
7+
Policies, which include some restrictions on content and conduct on PyPI
8+
related to user safety, intellectual property, privacy, authenticity, and other
9+
limitations. In short, be excellent to each other._
10+
11+
We do not allow content or activity on PyPI that:
12+
13+
- is unlawful or promotes unlawful activities;
14+
- is sexually obscene or relates to sexual exploitation or abuse, including of
15+
minors;
16+
- is libelous, defamatory, or fraudulent;
17+
- is discriminatory or abusive toward any individual or group;
18+
- is false, inaccurate, or intentionally deceptive information and likely to
19+
adversely affect the public interest (including health, safety, election
20+
integrity, and civic participation);
21+
- harasses or abuses another individual or group, including our employees,
22+
officers, and agents, or other users;
23+
- threatens or incites violence toward any individual or group, especially on
24+
the basis of who they are;
25+
- gratuitously depicts or glorifies violence, including violent images; or
26+
- is off-topic, or interacts with platform features in a way that significantly
27+
or repeatedly disrupts the experience of other users.
28+
- infringes any proprietary right of any party, including patent, trademark,
29+
trade secret, copyright, right of publicity, or other right;
30+
- unlawfully shares unauthorized product licensing keys, software for
31+
generating unauthorized product licensing keys, or software for bypassing
32+
checks for product licensing keys, including extension of a free license beyond
33+
its trial period;
34+
- impersonates any person or entity, including any of our employees or
35+
representatives, including through false association with PyPI, or by
36+
fraudulently misrepresenting your identity or site's purpose; or
37+
- violates the privacy of any third party, such as by posting another person's
38+
personal information without consent.
39+
- automated excessive bulk activity and coordinated inauthentic activity, such
40+
as
41+
- spamming
42+
- cryptocurrency mining;
43+
- bulk distribution of promotions and advertising prohibited by PyPI terms and
44+
policies;
45+
- inauthentic interactions, such as fake accounts and automated inauthentic
46+
activity;
47+
- creation of or participation in secondary markets for the purpose of the
48+
proliferation of inauthentic activity;
49+
- using PyPI as a platform for propagating abuse on other platforms;
50+
- phishing or attempted phishing; or
51+
- using our servers for any form of excessive automated bulk activity, to place
52+
undue burden on our servers through automated means, or to relay any form of
53+
unsolicited advertising or solicitation through our servers, such as
54+
get-rich-quick schemes.
55+
56+
You are responsible for using PyPI in compliance with all applicable laws,
57+
regulations, and all of our Acceptable Use Policies. These policies may be
58+
updated from time to time and are provided below, as well as in our [Terms of
59+
Use](https://pypi.org/policy/terms-of-use/). You must not engage in activity
60+
that significantly harms other users. We will interpret our policies and
61+
resolve disputes in favor of protecting users as a whole.
62+
63+
64+
## Active Malware or Exploits
65+
66+
Being part of a community includes not taking advantage of other members of the
67+
community. We do not allow anyone to use our platform in direct support of
68+
unlawful attacks that cause technical harms, such as using PyPI as a means to
69+
deliver malicious executables or as attack infrastructure, for example by
70+
organizing denial of service attacks or managing command and control servers.
71+
Technical harms means overconsumption of resources, physical damage, downtime,
72+
denial of service, or data loss, with no implicit or explicit dual-use purpose
73+
prior to the abuse occurring.
74+
75+
Note that this includes dual-use content, including content that is used for
76+
research into vulnerabilities, malware, or exploits, including bug bounties. We
77+
consider PyPI to be a platform used primarily for installation and run-time use
78+
of code, and not for research.
79+
80+
81+
## Advertising
82+
83+
While we understand that you may want to promote your Content by posting
84+
supporters' names or logos in your Account, the primary focus of the Content
85+
posted in or through your Account to PyPI should not be advertising or
86+
promotional marketing. You may include static images, links, and promotional
87+
text in the project descriptions associated with your Account, but they must be
88+
related to the project you are hosting on PyPI.
89+
90+
You may not promote or distribute content or activity that is illegal or
91+
otherwise prohibited by our [Terms of Service](TODO) or Acceptable Use
92+
Policies, including excessive automated bulk activity (for example, spamming),
93+
get-rich-quick schemes, and misrepresentation or deception related to your
94+
promotion.
95+
96+
If you decide to post any promotional materials in your Account, you are solely
97+
responsible for complying with all applicable laws and regulations, including
98+
without limitation the U.S. Federal Trade Commission's Guidelines on
99+
Endorsements and Testimonials. We reserve the right to remove any promotional
100+
materials or advertisements that, in our sole discretion, violate any PyPI
101+
terms or policies.
102+
103+
104+
## Bullying and Harassment
105+
106+
We do not tolerate harassment, bullying, or abuse of any kind, whether directly
107+
or by encouraging others to take part in the prohibited conduct. This includes:
108+
109+
- Targeted personal attacks
110+
- Piling on to or orchestrating disruptive activity in a way that amounts to
111+
abuse
112+
- Following another user around the platform in a manner that causes
113+
intimidation
114+
- Making sexual advances or comments directed at another individual
115+
- Disingenuously participating in conversation in a way that instigates
116+
conflict or undermines sincere discussion
117+
- Creating alternative accounts specifically to evade moderation action taken
118+
by PyPI staff or users
119+
120+
Please note, not all unwelcome conduct is necessarily considered harassment.
121+
For example, disagreeing with another user may not rise to the level of
122+
harassment on our platform. In addition, sharing criticism of public figures or
123+
projects, or topics of public interest, does not necessarily fall under this
124+
policy. However, we encourage you to be mindful in how you engage with other
125+
users and the platform, as this activity may still violate our restriction on
126+
disrupting the experience of other users.
127+
128+
129+
## Disrupting the Experience of Other Users
130+
131+
Being part of a community includes recognizing how your behavior affects others
132+
and engaging in meaningful and productive interactions with people and the
133+
platform they rely on.
134+
135+
We do not allow behavior that significantly or continually disrupts the
136+
experience of other users.
137+
138+
Please note that disruptive conduct may also violate other restrictions in our
139+
Acceptable Use Policies. For example, depending on the nature and severity of
140+
the activity, it may rise to the level of bullying and harassment.
141+
142+
143+
## Doxxing and Invasion of Privacy
144+
145+
Misuse of personal information is prohibited.
146+
147+
Any person, entity, or service collecting data from PyPI must comply with the
148+
[Python Software Foundation Privacy Policy](https://www.python.org/privacy/),
149+
particularly in regards to the collection of personal information. If you
150+
collect any personal information from PyPI, you agree that you will only use
151+
that personal information for the purpose for which that User has authorized
152+
it. You agree that you will reasonably secure any personal information you have
153+
gathered from PyPI, and you will respond promptly to complaints, removal
154+
requests, and "do not contact" requests from us or other users.
155+
156+
Additionally, don't post other people's personal information. This includes:
157+
158+
- Personal, private email addresses
159+
- Phone numbers
160+
- Physical addresses or other private location information
161+
- Bank account information or credit card numbers
162+
- Social Security/National Identity numbers
163+
- Passwords
164+
- Voter information
165+
- Medical information and personal biometric data
166+
- Other private information that may pose a safety or security risk
167+
168+
We may consider other information, such as photos or videos that were taken or
169+
distributed without the subject's consent, to be an invasion of privacy,
170+
especially when such material presents a safety risk to the subject, such as in
171+
the case of intimidation or harassment.
172+
173+
PyPI will take context into account as well as whether the reported content is
174+
publicly available elsewhere. Please note, however, that while sharing publicly
175+
available content may not be a violation of this policy, if the information is
176+
shared with the intent to harass or incite other abusive behavior, it may
177+
violate our prohibition against bullying and harassment.
178+
179+
For more information, or to learn how to report a violation, see our [Code of
180+
Conduct](https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md).
181+
182+
183+
## Hate Speech and Discrimination
184+
185+
PyPI does not tolerate speech that attacks or promotes hate toward an
186+
individual or group of people on the basis of who they are, including age, body
187+
size, ability, ethnicity, gender identity and expression, level of experience,
188+
nationality, personal appearance, race, religion, sexual identity, or sexual
189+
orientation. This includes:
190+
191+
- Mocking, attacking, or excluding a person or group based on their beliefs or
192+
the characteristics listed above
193+
- Displaying clear affiliation or identification with known terrorist or
194+
violent extremist organizations
195+
- Supporting or promoting hate groups or hate-based conspiracy theories
196+
- Sharing symbols or images synonymous with hate
197+
- Using harmful stereotypes, slurs, or dehumanizing speech
198+
- Attacking an individual based on their perceived gender
199+
- Dog whistling; or using coded or suggestive language and/or symbols to
200+
promote abuse or hate
201+
202+
While PyPI takes all instances of abuse and harassment on the platform
203+
seriously, we are especially committed to fighting hate-based abuse where it
204+
disproportionately affects communities that have historically been targeted by
205+
such abuse. We aim to make PyPI a place where all individuals feel welcome and
206+
safe.
207+
208+
209+
## Impersonation
210+
211+
You may not misrepresent your identity or your association with another person
212+
or organization. This includes doing any of the following in a way that
213+
misleads or deceives others:
214+
215+
- Copying another user's avatar or other personal profile information
216+
- Posting content under another user's email address
217+
- Using a deceptively similar username, organization name, or project name
218+
- Otherwise posing as another individual or organization
219+
220+
Impersonation is a form of harassment and violation of this policy may lead to
221+
loss of access to your account.
222+
223+
Please note, having a username similar to another is not necessarily
224+
impersonation. PyPI will take context into account.
225+
226+
227+
## Misinformation and Disinformation
228+
229+
You may not post content that presents a distorted view of reality, whether it
230+
is inaccurate or false (misinformation) or is intentionally deceptive
231+
(disinformation), where such content is likely to result in harm to the public
232+
or to interfere with fair and equal opportunities for all to take part in a
233+
free and open society. This may include:
234+
- Inaccurate or scientifically unsupported medical claims that endanger public
235+
health or safety
236+
- Manipulated media, whether audio or visual, likely to mislead or deceive in a
237+
way that may harm the public interest
238+
- False or misleading content likely to interfere with an individual's ability
239+
to participate in civic activities
240+
- Unsubstantiated claims that could promote hate or targeted harassment of
241+
specific groups of people
242+
243+
We encourage active participation in the expression of ideas, perspectives, and
244+
experiences and may not be in a position to dispute personal accounts or
245+
observations. When reviewing content under this policy, PyPI will consider the
246+
impact of various factors that may help to orient the viewer, such as whether
247+
the content has been provided with clear disclaimers, citations to credible
248+
sources, or includes other details that clarify the accuracy of the information
249+
being shared.
250+
251+
252+
## Sexually Obscene Content
253+
254+
We do not tolerate content associated with sexual exploitation or abuse of
255+
another individual, including where minors are concerned. We do not allow
256+
sexually themed or suggestive content that serves little or no purpose other
257+
than to solicit an erotic or shocking response, particularly where that content
258+
is amplified by its placement in profiles or other social contexts. This
259+
includes:
260+
261+
- Pornographic content
262+
- Non-consensual intimate imagery
263+
- Graphic depictions of sexual acts including photographs, video, animation,
264+
drawings, computer-generated images, or text-based content
265+
266+
We recognize that not all nudity or content related to sexuality is obscene. We
267+
may allow visual and/or textual depictions in artistic, educational, historical
268+
or journalistic contexts, or as it relates to victim advocacy. In some cases a
269+
disclaimer can help communicate the context of the project. However, please
270+
understand that we may choose to limit the content by giving users the option
271+
to opt in before viewing.
272+
273+
274+
## Threats of Violence and Gratuitously Violent Content
275+
276+
You may not use PyPI to organize, promote, encourage, threaten, or incite acts
277+
of violence. You may not post content that depicts or glorifies violence or
278+
physical harm against human beings or animals. This includes:
279+
280+
- Threatening another individual or group with abuse, harm, sexual violence, or
281+
death
282+
- Posting text, imagery, or audio content glorifying or containing a graphic
283+
depiction of violence toward oneself, another individual, group, or animal
284+
- Encouraging another individual to engage in self harm
285+
286+
287+
## Usage Limits
288+
289+
You will not reproduce, duplicate, copy, sell, resell or exploit any portion of
290+
PyPI, use of PyPI, or access to PyPI without our express written permission.
291+
292+
You may use information from PyPI for the following reasons, regardless of
293+
whether the information was scraped, collected through our API, or obtained
294+
otherwise:
295+
296+
- Researchers may use public, non-personal information from PyPI for research
297+
purposes, only if any publications resulting from that research are [open
298+
access](https://en.wikipedia.org/wiki/Open_access).
299+
- Archivists may use public information from PyPI for archival purposes.
300+
301+
Scraping refers to extracting information from PyPI via an automated process,
302+
such as a bot or webcrawler. Scraping does not refer to the collection of
303+
information through our API.
304+
305+
You may not use information from PyPI (whether scraped, collected through our
306+
API, or obtained otherwise) for spamming purposes, including for the purposes
307+
of sending unsolicited emails to users or selling personal information, such as
308+
to recruiters, headhunters, and job boards.
309+
310+
Your use of information from PyPI must comply with the [Python Software
311+
Foundation Privacy Policy](https://www.python.org/privacy/).
312+
313+
PyPI generally does not impose resource limitations on any features. If we
314+
determine your usage of PyPI to be significantly excessive in relation to other
315+
users of similar features, we reserve the right to suspend your Account,
316+
throttle your requests, or otherwise limit your activity until you can reduce
317+
your usage.
318+
319+
You may not use our servers to disrupt or to attempt to disrupt, or to gain or
320+
to attempt to gain unauthorized access to, any service, device, data, account
321+
or network.
322+
323+
324+
## Violations and Enforcement
325+
326+
PyPI retains full discretion to take action in response to a violation of these
327+
policies, including account suspension, account termination, or removal of
328+
content.
329+
330+
While the majority of interactions between individuals in PyPI’s community fall
331+
within our Acceptable Use Policies and Community Guidelines, violations of
332+
those policies do occur at times. When they do, PyPI staff may need to take
333+
enforcement action to address the violations. In all cases, these actions are
334+
permanent and there is no basis to reverse a moderation action taken by PyPI
335+
Staff.
336+
337+
338+
## Credits & License
339+
340+
This policy is based on [GitHub’s Acceptable Use
341+
Policies](https://docs.github.com/en/site-policy/acceptable-use-policies/) and
342+
modified from its original form.
343+
344+
Licensed under the [Creative Commons Attribution 4.0 International
345+
license](https://creativecommons.org/licenses/by/4.0/).

tests/unit/test_routes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,4 +656,7 @@ def add_policy(name, filename):
656656
),
657657
]
658658

659-
assert config.add_policy.calls == [pretend.call("terms-of-use", "terms.md")]
659+
assert config.add_policy.calls == [
660+
pretend.call("terms-of-use", "terms.md"),
661+
pretend.call("acceptable-use-policy", "acceptable-use-policy.md"),
662+
]

warehouse/routes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def includeme(config):
5757

5858
# Our legal policies
5959
config.add_policy("terms-of-use", "terms.md")
60+
config.add_policy("acceptable-use-policy", "acceptable-use-policy.md")
6061
config.add_template_view(
6162
"trademarks",
6263
"/trademarks/",

0 commit comments

Comments
 (0)