I'm also against the idea, unless done in a very minimal fashion.

Many tools in the ecosystem put "ignore everything here" .gitignore files
into their not-normally-committed directories: at least Coverage.py, Mypy,
pytest, and virtualenv. So the trend is that less and less .gitignore
patterns are needed for a Python project. I am not sure there are general
Django patterns we could add except *.pyc , and maybe Python will start
dropped .gitignore files in __pycache__ dirs at some point.

I don't think we could even add a pattern for ignoring .mo files from
translations, since according to a poll I did last year, about 50% of devs
commit them: https://twitter.com/AdamChainz/status/1557058307592015878 .

 we could easily just use github's Python default, declare that the
> policay, and call it day
>

GitHub’s Python default file is seriously bloated:
https://github.com/github/gitignore/blob/main/Python.gitignore . Their
maintenance policy seems to be “accept any suggestion, append-only”. We
generally set a higher bar for Django.

The GitHub file includes patterns to ignore files generated by tools that
have fallen out of favour (e.g. nosetests.xml for nose test runner). And it
also includes low-specificity patterns that could confuse new Git users,
such as target/ ignoring *all* directories named "target". Also the "Django
stuff" patterns in there are related to non-universal ways of using Django.

I wouldn't want to burden all Django projects with so many irrelevant
patterns. It takes work to understand and remove them.

Enough people are using GitHub that they create the repo first with one of
> GH's provided gitignores, or copy it in after.
>

Agree here that people can set up or use Git templates if they wish. Git
itself has a repository template mechanism.

On Fri, Mar 10, 2023 at 4:07 PM Tom Carrick <t...@carrick.eu> wrote:

> I don't really like the idea of this for a number of reasons.
>
> A lot of people create the project in a subdirectory. For them, the
> gitignore is in the wrong place.
>
> Enough people are using GitHub that they create the repo first with one of
> GH's provided gitignores, or copy it in after.
>
> As Python changes, as new tools come out, the gitignore needs to be
> constantly updated. There will be a lot of bikeshedding about what should
> and shouldn't go in. For example, the .vscode directory sometimes has
> project specific code that should be included. Sometimes it should be
> excluded because devs are expected to set their own up or use whatever
> editor they prefer. Many users (such as myself) have .vscode in a global
> gitignore expressly so it doesn't need to be added to every project.
>
> A lot of people are using a frontend framework, that won't be covered by
> our gitignore, and this framework might itself want to set up a gitignore.
>
> The biggest problem for me is that it would just be a maintenance burden.
>
> Cheers,
> Tom
>
>
> On Fri, 10 Mar 2023 at 16:01, Bogdan Barna <foo.ba...@gmail.com> wrote:
>
>> Just want to say that I agree with Cory. Being a non-core feature/issue,
>> I don't see a reason of why not to re-evaluate the "denied" decisions.
>>
>> On Friday, March 10, 2023 at 9:11:03 AM UTC+2 Cory Zue wrote:
>>
>>> Is there a more nuanced discussion of this issue anywhere? The reasons
>>> stated in the linked PR that it's "not for the project template to provide
>>> configuration for source code management tools" feels more like an opinion
>>> than a fact.
>>>
>>>  I know one of the goals that emerged from recent discussions was how to
>>> get more wide adoption of the Django project. This strikes me as one of
>>> those simple little things that helps 95% of beginners and doesn't hurt the
>>> remaining 5%. If you don't want a .gitignore file, then you're also
>>> probably advanced enough to figure out how to build without it, or just
>>> delete it.
>>>
>>> I just checked a few other frameworks:
>>>
>>> Rails new automatically
>>> <https://gist.github.com/eliotsykes/ace0222174804372b51a> generates a
>>> .gitignore by default, has an option to exclude it
>>> <https://gist.github.com/eliotsykes/ace0222174804372b51a>.
>>> Drupal / composer added it in 2020 <https://www.drupal.org/node/3108432>
>>> .
>>> create-react-app <https://github.com/facebook/create-react-app>
>>> generates one.
>>> create-vue <https://github.com/vuejs/create-vue> generates one
>>>
>>> Perhaps it's time for Django to reconsider and catch up with the times?
>>>
>>> Cory
>>>
>>>
>>>
>>>
>>> On Fri, Mar 10, 2023 at 7:03 AM Mariusz Felisiak <felisiak...@gmail.com>
>>> wrote:
>>>
>>>> Hi Daniel,
>>>>
>>>>     Adding .gitignore to the project template has been discussed and
>>>> rejected multiple times, e.g.
>>>> https://github.com/django/django/pull/13847
>>>>
>>>> Best,
>>>> Mariusz
>>>>
>>>> --
>>>>
>>> You received this message because you are subscribed to the Google
>>>> Groups "Django developers (Contributions to Django itself)" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django-develop...@googlegroups.com.
>>>>
>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-developers/fd500891-f348-488a-863b-04c372d1bf4bn%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-developers/fd500891-f348-488a-863b-04c372d1bf4bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/eda6005e-a4f0-4f15-85dc-d78740227300n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-developers/eda6005e-a4f0-4f15-85dc-d78740227300n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAHoz%3DMZvOnWQQ6n0MLPZAY%3DwDvM%3DNutGKbReVOVbyd5khgdi0w%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-developers/CAHoz%3DMZvOnWQQ6n0MLPZAY%3DwDvM%3DNutGKbReVOVbyd5khgdi0w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM0J-_RHgfTDe%3DMg4TZH6gP9Uz1_0WZ%3D%2BJnKmJkT%2B8DW4A%40mail.gmail.com.
  • Re:... James Bennett
    • ... Daniel Azubuine
      • ... Arthur Pemberton
        • ... Daniel Azubuine
          • ... Mariusz Felisiak
            • ... Cory Zue
            • ... Mariusz Felisiak
            • ... Cory Zue
            • ... Bogdan Barna
            • ... Tom Carrick
            • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
            • ... Tega Ukavwe
            • ... Arthur Pemberton
            • ... Tega Ukavwe
            • ... Jörg Breitbart

Reply via email to