{"title":"Ranníocaí a chur isteach","version":"6.0","locale":"ga","docname":"internals/contributing/writing-code/submitting-patches","url":"/ga/6.0/internals/contributing/writing-code/submitting-patches/","canonical":"https://djangodocs.dev/ga/6.0/internals/contributing/writing-code/submitting-patches/","summary":"Táimid buíoch i gcónaí as ranníocaíochtaí le cód Django. Go deimhin, socraítear tuairiscí fabhtanna le ranníocaíochtaí gaolmhara * i bhfad níos gasta ná iad siúd…","html":"<h1>Ranníocaí a chur isteach<a class=\"heading-anchor\" href=\"#submitting-contributions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>Táimid buíoch i gcónaí as ranníocaíochtaí le cód Django. Go deimhin, socraítear tuairiscí fabhtanna le ranníocaíochtaí gaolmhara <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">*</span></a>i bhfad níos gasta ná iad siúd gan réiteach.</p>\n<section id=\"typo-fixes-and-trivial-documentation-changes\">\n<span id=\"trivial-change\"></span><h2>Socruithe clóscríbe agus athruithe doiciméadaithe<a class=\"heading-anchor\" href=\"#typo-fixes-and-trivial-documentation-changes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Má tá saincheist fíor-thábhachtach á shocrú agat, mar shampla focal a athrú sa dhoiciméadú, is é an bealach is fearr chun an paiste a sholáthar ná iarratais tarraingthe GitHub a úsáid gan ticéad Trac.</p>\n<p>See <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/writing-code/working-with-git/\"><span class=\"doc\">Ag obair le Git agus GitHub</span></a> for more\ndetails on how to use pull requests.</p>\n</section>\n<section id=\"claiming-tickets\">\n<span id=\"id1\"></span><h2>Ticéid “Éileamh”<a class=\"heading-anchor\" href=\"#claiming-tickets\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>I dtionscadal foinse oscailte leis na céadta ranníocóirí ar fud an domhain, tá sé tábhachtach an chumarsáid a bhainistiú go héifeachtach ionas nach ndúblaítear an obair agus gur féidir le rannpháirtithe a bheith chomh héifeachtach agus is féidir.</p>\n<p>Dá bhrí sin, is é ár mbeartas ná do rannpháirtithe ticéid a “éileamh” d'fhonn a chur in iúl d'fhorbróirí eile go bhfuil fabht nó gné áirithe á n-oibriú air.</p>\n<p>Má aithníodh tú ranníocaíocht a theastaíonn uait a dhéanamh agus má tá tú in ann é a shocrú (mar a thomhaistear de réir do chumas códaithe, eolas ar inmheánacha Django agus infhaighteacht ama), éileamh é trí na céimeanna seo a leanúint:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://code.djangoproject.com/github/login\">Log in using your GitHub account</a> or <a class=\"reference external\" href=\"https://www.djangoproject.com/accounts/register/\">create an account</a> in our ticket\nsystem. If you have an account but have forgotten your password, you can\nreset it using the <a class=\"reference external\" href=\"https://www.djangoproject.com/accounts/password/reset/\">password reset page</a>.</p></li>\n<li><p>If a ticket for this issue doesn't exist yet, create one in our\n<a class=\"reference external\" href=\"https://code.djangoproject.com/\">ticket tracker</a>. Remember that proposals for new features should follow\nthe <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/bugs-and-features/#requesting-features\"><span class=\"std std-ref\">process for suggesting new features</span></a>.</p></li>\n<li><p>If a ticket for this issue already exists and has been accepted, make sure\nnobody else has claimed it. To do this, look at the &quot;Owned by&quot; section of\nthe ticket. If it's assigned to &quot;nobody,&quot; then it's available to be claimed.\nOtherwise, somebody else may be working on this ticket. Either find another\nbug/feature to work on, or contact the developer working on the ticket to\noffer your help. If a ticket has been assigned for weeks or months without\nany activity, it's probably safe to reassign it to yourself. If a ticket\nhasn't been approved yet, join the conversation.</p></li>\n<li><p>Logáil isteach i do chuntas, mura bhfuil tú cheana féin, trí chliceáil “Logáil Isteach GitHub” nó “Logáil Isteach DjangoProject” ar an taobh clé uachtarach den leathanach ticéad. Nuair a bheidh tú logáilte isteach, is féidir leat an cnaipe “Athraigh Ticéad” a chliceáil in aice le bun an leathanaigh.</p></li>\n<li><p>Éileamh an ticéad trí chliceáil ar an gcnaipe raidió “sannadh chuig” sa chuid “Gníomhaíocht”. Líonfar d'ainm úsáideora sa bhosca téacs de réir réamhshocraithe.</p></li>\n<li><p>Finally, click the &quot;Submit changes&quot; button at the bottom to save.</p></li>\n</ul>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>If your change is not <a class=\"reference internal\" href=\"#trivial-change\"><span class=\"std std-ref\">trivial</span></a>, you have the option\nto sign and submit a <a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/cla/\">Contributor License Agreement</a> clarifying the status\nof your contribution. This ensures that the Django Software Foundation has\nclear license to your contribution.</p>\n</aside>\n<section id=\"ticket-claimers-responsibility\">\n<h3>Freagracht éilimh ticéad<a class=\"heading-anchor\" href=\"#ticket-claimers-responsibility\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Nuair a bheidh ticéad éileamh agat, tá freagracht agat oibriú ar an ticéad sin ar bhealach réasúnta tráthúil. Mura bhfuil am agat oibriú air, déan é a éileamh nó ná éileamh é ar an gcéad dul síos!</p>\n<p>Mura bhfuil aon chomhartha dul chun cinn ar thicéad éilimh áirithe ar feadh seachtaine nó dhó, féadfaidh forbróir eile iarraidh ort an t-éileamh ticéad a fhágáil ionas nach mbeidh sé monaplaithe a thuilleadh agus gur féidir le duine eile é a éileamh.</p>\n<p>Má éiligh tú ticéad agus má thógann sé tamall fada (laethanta nó seachtainí) chun cóid a dhéanamh, coinnigh gach duine ar an dáta trí thuairimí a phostáil ar an ticéad. Mura gcuireann tú nuashonruithe rialta ar fáil, agus mura bhfreagraíonn tú iarratas ar thuarascáil ar dhul chun cinn, féadfar d'éileamh ar an ticéad a chúlghairm.</p>\n<p>Mar is gnách, is fearr níos mó cumarsáide ná níos lú cumarsáide!</p>\n</section>\n<section id=\"which-tickets-should-be-claimed\">\n<h3>Cé na ticéid ba chóir a éileamh?<a class=\"heading-anchor\" href=\"#which-tickets-should-be-claimed\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Tá sé ró-mhór dul trí na céimeanna chun ticéid a éileamh i gcásanna áirithe.</p>\n<p>I gcás athruithe beaga, mar shampla clóscríobh sa dhoiciméadú nó fabhtanna beaga nach dtógfaidh ach cúpla nóiméad iad a shocrú, ní gá duit léim trí chrupaí ticéid a éileamh. Cuir isteach d'athruithe go díreach agus tá tú déanta!</p>\n<p>It is <em>always</em> acceptable, regardless of whether someone has claimed it or not,\nto link proposals to a ticket if you happen to have the changes ready.</p>\n</section>\n</section>\n<section id=\"contribution-style\">\n<span id=\"patch-style\"></span><h2>Stíl ranníocaíochta<a class=\"heading-anchor\" href=\"#contribution-style\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Déan cinnte go gcomhlíonann aon ranníocaíocht atá agat na ceanglais seo a leanas ar a laghad:</p>\n<ul class=\"simple\">\n<li><p>The code required to fix a problem or add a feature is an essential part\nof a solution, but it is not the only part. A good fix should also include a\n<a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/writing-code/unit-tests/\"><span class=\"doc\">regression test</span></a> to\nvalidate the behavior that has been fixed and to prevent the problem from\narising again. Also, if some tickets are relevant to the code that you've\nwritten, mention the ticket numbers in some comments in the test so that one\ncan easily trace back the relevant discussions after your patch gets\ncommitted, and the tickets get closed.</p></li>\n<li><p>Má chuireann an cód gné nua leis, nó má athraíonn sé iompar gné atá ann cheana, ba cheart go mbeadh cáipéisíocht san athrú freisin.</p></li>\n</ul>\n<p>When you think your work is ready to be reviewed, send <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/writing-code/working-with-git/\"><span class=\"doc\">a GitHub pull\nrequest</span></a>. If you can't\nsend a pull request for some reason, you can also use patches in Trac. When\nusing this style, follow these guidelines.</p>\n<ul class=\"simple\">\n<li><p>Cuir isteach paistí san fhormáid a thugtar ar ais leis an ordú <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">diff</span></code>.</p></li>\n<li><p>Ceangail paistí le ticéad sa <a class=\"reference external\" href=\"https://code.djangoproject.com/\">rianaitheoir ticéad</a>, ag baint úsáide as an gcnaipe “comhad ceangail”. * Ná cuir an paiste sa tuairisc nó trácht ar an ticéad mura bhfuil paiste líne amháin ann.</p></li>\n<li><p>Ainmnigh an comhad paiste le síneadh .diff`; ligfidh sé seo don rianaitheoir ticéad aibhsiú comhréireachta ceart a chur i bhfeidhm, rud atá cabhrach go leor.</p></li>\n</ul>\n<p>Beag beann ar an mbealach a chuireann tú do chuid oibre isteach, lean na céimeanna seo.</p>\n<ul class=\"simple\">\n<li><p>&lt;patch-review-checklist&gt;Déan cinnte go gcomhlíonann do chód na riachtanais inár: ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>seicliosta ranníocaíochta <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>.</p></li>\n<li><p>Seiceáil an bosca “Tá paiste” ar an ticéad agus déan cinnte nach ndéantar na boscaí “Doiciméadú riachtanais”, “Tástálacha riachtanais”, agus “Feabhsú riachtanais” a sheiceáil. Fágann sé sin go bhfuil an ticéad le feiceáil sa scuaine “Paistí a theastaíonn athbhreithniú” ar an “dashboard Forbartha” _.</p></li>\n</ul>\n</section>\n<section id=\"contributions-which-require-community-feedback\">\n<h2>Ranníocaí a dteastaíonn aiseolas<a class=\"heading-anchor\" href=\"#contributions-which-require-community-feedback\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Teastaíonn plé pobail níos leithne nuair a thugann paiste feidhmiúlacht nua Django isteach agus déanann sé cinneadh dearaidh de chineál éigin. Tá sé seo tábhachtach go háirithe má bhaineann leis an gcur chuige a: ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>diprecation &lt;deprecating-a-feature&gt;`nó má thugann sé athruithe briseadh isteach.</p>\n<p>Seo a leanas cur chuige éagsúla chun aiseolas a fháil ón bpobal.</p>\n<section id=\"the-new-feature-ideas-tracker\">\n<h3>The new feature ideas tracker<a class=\"heading-anchor\" href=\"#the-new-feature-ideas-tracker\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>If you have an idea for a new feature, please create a new proposal (or join an\nexisting discussion) following the <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/bugs-and-features/#requesting-features\"><span class=\"std std-ref\">process for suggesting new features</span></a>. You should explain the need for the change, go into\ndetails of the approach and discuss alternatives.</p>\n</section>\n<section id=\"the-django-forum\">\n<h3>The Django Forum<a class=\"heading-anchor\" href=\"#the-django-forum\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>You can propose a change (that is not a new feature idea) on the\n<a class=\"reference external\" href=\"https://forum.djangoproject.com/\">Django Forum</a>. You should explain the need for the change, go into details of\nthe approach and discuss alternatives.</p>\n<p>Cuir nasc chuig díospóireachtaí den sórt sin i do chuid tuairimí.</p>\n</section>\n<section id=\"third-party-package\">\n<h3>Pacáiste tríú páirtí<a class=\"heading-anchor\" href=\"#third-party-package\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Ní ghlacann Django le gnéithe turgnamhacha. &lt;internal-release-deprecation-policy&gt;Caithfidh gach gné ár n:ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>beartas díréachtaithe <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>a leanúint. Dá bhrí sin, féadfaidh sé míonna nó blianta a thógáil ar Django athrú ar dhearadh API.</p>\n<p>Má theastaíonn aiseolas úsáideora uait ar chomhéadan poiblí, is fearr pacáiste tríú páirtí a chruthú ar dtús. Is féidir leat athrá a dhéanamh ar an API poiblí i bhfad níos gasta, agus an gá atá leis an ngné a bhailíochtú freisin.</p>\n<p>Once this package becomes stable and there are clear benefits of incorporating\naspects into Django core, the next step is to propose its inclusion by\nfollowing the <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/bugs-and-features/#requesting-features\"><span class=\"std std-ref\">process for suggesting new features</span></a>.</p>\n</section>\n<section id=\"django-enhancement-proposal-dep\">\n<h3>Togra Feabhsúcháin Django (DEP)<a class=\"heading-anchor\" href=\"#django-enhancement-proposal-dep\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Cosúil le PEPanna Python, tá <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>Tograí Feabhsaithe Django <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>_ nó DEPanna ag Django. Is doiciméad dearaidh é DEP a sholáthraíonn faisnéis do phobal Django, nó a dhéanann cur síos ar ghné nó próiseas nua do Django. Soláthraíonn siad sonraíochtaí teicniúla gonta de ghnéithe, mar aon le réasúnaí. Is iad DEPanna an príomh-mheicníocht freisin chun ionchur pobail a mholadh agus a bhailiú ar phríomhghnéithe nua.</p>\n<p>Before considering writing a DEP, it is recommended to first open a discussion\nfollowing the <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/bugs-and-features/#requesting-features\"><span class=\"std std-ref\">process for suggesting new features</span></a>.\nThis allows the community to provide feedback and helps refine the proposal.\nOnce the DEP is ready, the <a class=\"reference internal\" href=\"/ga/6.0/internals/organization/#steering-council\"><span class=\"std std-ref\">Steering Council</span></a> votes on\nwhether to accept it.</p>\n<p>Roinnt samplaí de DEPanna atá ceadaithe agus curtha i bhfeidhm go hiomlán:</p>\n<ul class=\"simple\">\n<li><p>&lt; <a class=\"reference external\" href=\"https://github.com/django/deps/blob/main/final/0181-orm-expressions.rst\">https://github.com/django/deps/blob/main/final/0181-orm-expressions.rst</a>&gt;`DEP 181: Expressions ORM <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>_</p></li>\n<li><p>&lt; <a class=\"reference external\" href=\"https://github.com/django/deps/blob/main/final/0182-multiple-template-engines.rst\">https://github.com/django/deps/blob/main/final/0182-multiple-template-engines.rst</a>&gt;`DEP 182: Innill Teimpléad Iolracha <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>_</p></li>\n<li><p>&lt; <a class=\"reference external\" href=\"https://github.com/django/deps/blob/main/final/0201-simplified-routing-syntax.rst\">https://github.com/django/deps/blob/main/final/0201-simplified-routing-syntax.rst</a>&gt;`DEP 201: Syntax ródú simplithe <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>_</p></li>\n</ul>\n</section>\n</section>\n<section id=\"deprecating-a-feature\">\n<span id=\"id2\"></span><h2>Gné a dhíspreagadh<a class=\"heading-anchor\" href=\"#deprecating-a-feature\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Tá cúpla cúis ann go bhféadfadh cód i Django a dhíchur:</p>\n<ul class=\"simple\">\n<li><p>Má tá gné feabhsaithe nó modhnaithe ar bhealach atá neamhchomhoiriúnach le cúlra, déanfar an sean-ghné nó an t-iompar a dhíchur.</p></li>\n<li><p>Uaireanta cuimsíonn Django backport de leabharlann Python nach bhfuil san áireamh i leagan de Python a thacaíonn Django faoi láthair. Nuair nach gá Django tacú leis an leagan níos sine de Python nach n-áirítear an leabharlann a thuilleadh, déanfar an leabharlann a dhíchur i Django.</p></li>\n</ul>\n<p>Mar a thuairiscíonn an:ref: beartas díscoireach &lt;internal-release-deprecation-policy&gt;, ba cheart don chéad scaoileadh de Django a dhíspreagann gné (A.B`) <code class=\"docutils literal notranslate\"><span class=\"pre\">removedindjangoxxWarning</span></code> a ardú (áit gurb é XX an leagan Django ina mbainfear an ghné) nuair a ghairmtear an ghné díscoite. Ag glacadh leis go bhfuil clúdach maith tástála againn, déantar na rabhaidh seo a thiontú go earráidí nuair: ref: reáchtáil an tsraith tástála &lt;running-unit-tests&gt;`le rabhaidh cumasaithe: ``python -Wa runtests.py`. Dá bhrí sin, nuair a chuireann tú <code class=\"docutils literal notranslate\"><span class=\"pre\">removedindjangoxxWarning</span></code>, ní mór duit deireadh a chur le haon rabhaidh a ghintear agus na tástálacha á reáchtáil agat.</p>\n<p>Is é an chéad chéim ná aon úsáid a bhaint as an iompar dlús ag Django féin. Ansin is féidir leat rabhaidh a thostú i dtástálacha a thástáil i ndáiríre an t-iompar míchuir tríd an maisitheoir <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>ignore_warnings <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">``</span></a>a úsáid, ag an leibhéal tástála nó ag an rang:</p>\n<ol class=\"arabic\">\n<li><p>I dtástáil áirithe:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.test</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">ignore_warnings</span>\n<span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.utils.deprecation</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">RemovedInDjangoXXWarning</span>\n\n\n<span class=\"nd\">@ignore_warnings</span><span class=\"p\">(</span><span class=\"n\">category</span><span class=\"o\">=</span><span class=\"n\">RemovedInDjangoXXWarning</span><span class=\"p\">)</span>\n<span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">test_foo</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">):</span> <span class=\"o\">...</span>\n</code></pre></div>\n</li>\n<li><p>Maidir le cás tástála iomlán:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.test</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">ignore_warnings</span>\n<span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.utils.deprecation</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">RemovedInDjangoXXWarning</span>\n\n\n<span class=\"nd\">@ignore_warnings</span><span class=\"p\">(</span><span class=\"n\">category</span><span class=\"o\">=</span><span class=\"n\">RemovedInDjangoXXWarning</span><span class=\"p\">)</span>\n<span class=\"k\">class</span><span class=\"w\"> </span><span class=\"nc\">MyDeprecatedTests</span><span class=\"p\">(</span><span class=\"n\">unittest</span><span class=\"o\">.</span><span class=\"n\">TestCase</span><span class=\"p\">):</span> <span class=\"o\">...</span>\n</code></pre></div>\n</li>\n</ol>\n<p>Ba chóir duit tástáil a chur leis freisin maidir leis an rabhadh díscrúdaithe:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.utils.deprecation</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">RemovedInDjangoXXWarning</span>\n\n\n<span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">test_foo_deprecation_warning</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">):</span>\n    <span class=\"n\">msg</span> <span class=\"o\">=</span> <span class=\"s2\">&quot;Expected deprecation message&quot;</span>\n    <span class=\"k\">with</span> <span class=\"bp\">self</span><span class=\"o\">.</span><span class=\"n\">assertWarnsMessage</span><span class=\"p\">(</span><span class=\"n\">RemovedInDjangoXXWarning</span><span class=\"p\">,</span> <span class=\"n\">msg</span><span class=\"p\">)</span> <span class=\"k\">as</span> <span class=\"n\">ctx</span><span class=\"p\">:</span>\n        <span class=\"c1\"># invoke deprecated behavior</span>\n        <span class=\"o\">...</span>\n    <span class=\"bp\">self</span><span class=\"o\">.</span><span class=\"n\">assertEqual</span><span class=\"p\">(</span><span class=\"n\">ctx</span><span class=\"o\">.</span><span class=\"n\">filename</span><span class=\"p\">,</span> <span class=\"vm\">__file__</span><span class=\"p\">)</span>\n</code></pre></div>\n<p>Tá sé tábhachtach trácht <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>RemovedindjangoXXWarning` a chur san áireamh thuas an chód nach bhfuil aon tagairt rabhaidh aige, ach go gcaithfear é a athrú nó a bhaint nuair a chríochnaíonn an díghabháil. D'fhéadfadh sé seo a bheith san áireamh crúcaí a cuireadh leis chun an t-iompar roimhe seo a choinneáil, nó míreanna neamhspleácha nach bhfuil gan ghá nó neamhúsáidte nuair a chríochnaíonn Mar shampla:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"kn\">import</span><span class=\"w\"> </span><span class=\"nn\">warnings</span>\n<span class=\"kn\">from</span><span class=\"w\"> </span><span class=\"nn\">django.utils.deprecation</span><span class=\"w\"> </span><span class=\"kn\">import</span> <span class=\"n\">RemovedInDjangoXXWarning</span><span class=\"p\">,</span> <span class=\"n\">django_file_prefixes</span>\n\n\n<span class=\"c1\"># RemovedInDjangoXXWarning.</span>\n<span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">old_private_helper</span><span class=\"p\">():</span>\n    <span class=\"c1\"># Helper function that is only used in foo().</span>\n    <span class=\"k\">pass</span>\n\n\n<span class=\"k\">def</span><span class=\"w\"> </span><span class=\"nf\">foo</span><span class=\"p\">():</span>\n    <span class=\"n\">warnings</span><span class=\"o\">.</span><span class=\"n\">warn</span><span class=\"p\">(</span>\n        <span class=\"s2\">&quot;foo() is deprecated.&quot;</span><span class=\"p\">,</span>\n        <span class=\"n\">category</span><span class=\"o\">=</span><span class=\"n\">RemovedInDjangoXXWarning</span><span class=\"p\">,</span>\n        <span class=\"n\">skip_file_prefixes</span><span class=\"o\">=</span><span class=\"n\">django_file_prefixes</span><span class=\"p\">(),</span>\n    <span class=\"p\">)</span>\n    <span class=\"n\">old_private_helper</span><span class=\"p\">()</span>\n    <span class=\"o\">...</span>\n</code></pre></div>\n<p>Faoi dheireadh, tá cúpla nuashonrú ar dhoiciméadú Django le déanamh:</p>\n<ol class=\"arabic simple\">\n<li><p>Má dhéantar an ghné atá ann cheana doiciméadaithe, déan é a mharcáil go díluasaithe i ndoiciméadú ag baint úsáide as an anótáil <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">diúscartha::</span> <span class=\"pre\">A.B</span></code>. Cuir tuairisc ghearr agus nóta faoin gcosán uasghrádaithe más infheidhme.</p></li>\n<li><p>Cuir cur síos ar an iompar míchuir, agus an cosán uasghrádaithe más infheidhme, leis na nótaí scaoileadh reatha (Docs/releases/A.B.txt`) faoin gceannteideal “Gnéithe a dhíchur in AB”.</p></li>\n<li><p>Cuir iontráil san amlíne díscrúdaithe (<code class=\"docutils literal notranslate\"><span class=\"pre\">docs/internals/deprecation.txt</span></code>) faoin leagan cuí ag cur síos ar an gcód a bhainfear.</p></li>\n</ol>\n<p>Nuair a bheidh na céimeanna seo críochnaithe agat, tá tú críochnaithe leis an díghabháil. I ngach:term: gné scaoileadh `&lt;Feature release&gt;, baintear gach ``RemovedindJangOxxWarning` a mheaitseálann leis an leagan nua.</p>\n<p>The <code class=\"docutils literal notranslate\"><span class=\"pre\">django.utils.deprecation</span></code> module provides some helpful deprecation\nutilities, such as a <code class=\"docutils literal notranslate\"><span class=\"pre\">&#64;deprecate_posargs</span></code> decorator to assist with converting\npositional-or-keyword arguments to keyword-only. See the inline documentation\nin the module source.</p>\n</section>\n<section id=\"testing-with-a-django-project\">\n<h2>Testing with a Django project<a class=\"heading-anchor\" href=\"#testing-with-a-django-project\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>It's important to test local changes using a Django project. This allows\nensuring that the changes behave as expected in a real environment, especially\nfor user-facing features such as templates, forms, or the admin.</p>\n<p>To do this:</p>\n<ol class=\"arabic simple\">\n<li><p>Create a virtual environment and <a class=\"reference internal\" href=\"/ga/6.0/intro/contributing/#intro-contributing-install-local-copy\"><span class=\"std std-ref\">install the cloned copy of Django in\neditable mode</span></a>.</p></li>\n<li><p>Set up a Django project outside the source tree (you can use the <a class=\"reference internal\" href=\"/ga/6.0/intro/tutorial01/\"><span class=\"doc\">first\npart of the tutorial</span></a> for guidance).</p></li>\n</ol>\n<p>With this setup, any changes made to the Django checkout will take effect\nimmediately in the test project, allowing manual testing of contributions\nagainst a new or existing app.</p>\n</section>\n<section id=\"javascript-contributions\">\n<h2>Ranníocaíochtaí JavaScript<a class=\"heading-anchor\" href=\"#javascript-contributions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Le haghaidh faisnéise maidir le ranníocaíochtaí JavaScript, féach an doiciméadach:ref: javascript-patches.</p>\n</section>\n<section id=\"optimization-patches\">\n<h2>Paistí optamaithe<a class=\"heading-anchor\" href=\"#optimization-patches\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Ba cheart go soláthródh paistí a bhfuil sé mar aidhm acu feabhas feidhmíochta a sheachadadh tagarmharcanna a thaispeánann iarmhairt an phaiste agus ina dhiaidh sin agus na horduithe a roinnt le hathbhreithneoirí a atáirgeadh.</p>\n<section id=\"django-asv-benchmarks\">\n<span id=\"id3\"></span><h3>Tagarmharcanna <code class=\"docutils literal notranslate\"><span class=\"pre\">django-asv</span></code><a class=\"heading-anchor\" href=\"#django-asv-benchmarks\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Monatóireacht <a class=\"reference external\" href=\"https://github.com/django/django-asv/\">django-asv</a> ar fheidhmíocht cód Django le himeacht ama. Is féidir na tagarmharcanna seo a reáchtáil ar iarratas tarraingthe tríd an iarraidh tarraingthe a lipéadú le “tagarmharc”. Spreagtar go mór leis na tagarmharcanna seo a chur leis.</p>\n</section>\n</section>\n<section id=\"contribution-checklist\">\n<span id=\"patch-review-checklist\"></span><h2>Seicliosta ranníocaíochta<a class=\"heading-anchor\" href=\"#contribution-checklist\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Use this checklist to review a pull request. If this contribution would not be\n<a class=\"reference internal\" href=\"#trivial-change\"><span class=\"std std-ref\">considered trivial</span></a>, first ensure it has an accepted\nticket before proceeding with the review.</p>\n<p>If the pull request passes all the criteria below and is not your own, please\nset the &quot;Triage Stage&quot; on the corresponding Trac ticket to &quot;Ready for checkin&quot;.\nIf you've left comments for improvement on the pull request, please tick the\nappropriate flags on the Trac ticket based on the results of your review:\n&quot;Patch needs improvement&quot;, &quot;Needs documentation&quot;, and/or &quot;Needs tests&quot;. As time\nand interest permit, mergers do final reviews of &quot;Ready for checkin&quot; tickets\nand will either commit the changes or bump it back to &quot;Accepted&quot; if further\nwork needs to be done.</p>\n<p>If you're looking to become a member of the <a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/teams/#triage-review-team\">triage &amp; review team</a>, doing\nthorough reviews of contributions is a great way to earn trust.</p>\n<p>Ag lorg paiste le hathbhreithniú? Amharc ar an rannán &quot;Paistí a dteastaíonn athbhreithniú uathu&quot; den Phainéal Forbartha Django &lt;<a class=\"reference external\" href=\"https://dashboard.djangoproject.com/\">https://dashboard.djangoproject.com/</a>&gt;`_.</p>\n<p>Ag iarraidh d'iarratas tarraingthe a athbhreithniú Déan cinnte go bhfuil bratacha Trac ar an ticéad socraithe ionas go mbeidh an ticéad le feiceáil sa scuaine sin.</p>\n<section id=\"all-tickets\">\n<h3>Gach ticéad<a class=\"heading-anchor\" href=\"#all-tickets\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>&lt;committing-guidelines&gt;An bhfuil an t-iarratas tarraingthe ná tiomantas aonair le teachtaireacht a leanann inn:ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>formáid teachtaireachta comhartha <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>?</p></li>\n<li><p>Are you the patch author and a new contributor? Please add yourself to the\n<a class=\"extlink-source reference external\" href=\"https://github.com/django/django/blob/stable/6.0.x/AUTHORS\">AUTHORS</a> file. At your option, submit a\n<a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/cla/\">Contributor License Agreement</a>.</p></li>\n<li><p>Does this have an accepted ticket on Trac? All contributions require a ticket\nunless the <a class=\"reference internal\" href=\"#trivial-change\"><span class=\"std std-ref\">change is considered trivial</span></a>.</p></li>\n</ul>\n</section>\n<section id=\"all-code-changes\">\n<h3>Athraíonn gach cód<a class=\"heading-anchor\" href=\"#all-code-changes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>Does the <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/writing-code/coding-style/\"><span class=\"doc\">coding style</span></a> conform to our\nguidelines? Are there any  <code class=\"docutils literal notranslate\"><span class=\"pre\">black</span></code>, <code class=\"docutils literal notranslate\"><span class=\"pre\">blacken-docs</span></code>, <code class=\"docutils literal notranslate\"><span class=\"pre\">flake8</span></code>,\n<code class=\"docutils literal notranslate\"><span class=\"pre\">isort</span></code>, or <code class=\"docutils literal notranslate\"><span class=\"pre\">zizmor</span></code> errors? You can install the <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/writing-code/coding-style/#coding-style-pre-commit\"><span class=\"std std-ref\">pre-commit</span></a> hooks to automatically catch these errors.</p></li>\n<li><p>Má tá an t-athrú ag teacht ar ais ar bhealach ar bith, an bhfuil nóta sna nótaí scaoilte (Docs/releases/a.b.txt`)?</p></li>\n<li><p>An bhfuil sraith tástála Django ag rith?</p></li>\n<li><p>If there is a <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/writing-code/unit-tests/#code-coverage-on-pull-requests\"><span class=\"std std-ref\">code coverage report</span></a>\ncomment on the pull request, have you reviewed the missing coverage in\ncontext (considering database/platform-specific limitations)?</p></li>\n<li><p>If the change affects the Django admin or rendered HTML output, has\n<a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/accessibility/#accessibility-testing-baseline\"><span class=\"std std-ref\">accessibility testing</span></a> been done?</p></li>\n</ul>\n</section>\n<section id=\"documentation\">\n<h3>Doiciméadúchán<a class=\"heading-anchor\" href=\"#documentation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>An dtógann an doiciméadú gan aon earráidí (<code class=\"docutils literal notranslate\"><span class=\"pre\">make</span> <span class=\"pre\">html</span></code>, nó <code class=\"docutils literal notranslate\"><span class=\"pre\">make.bat</span> <span class=\"pre\">html</span></code> ar Windows, ón eolaire <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>docs`)?</p></li>\n<li><p>An leanann an doiciméadú na treoirlínte stíl scríbhneoireachta in:doc: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>/inmheán/ranníoc/scríbhneoireach-doiciméadúcháin <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>?</p></li>\n<li><p>&lt;documentation-spelling-check&gt;An bhfuil aon earráidí litrithe ann: ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>earráidí litrithe <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>?</p></li>\n</ul>\n</section>\n<section id=\"bugs\">\n<h3>Fabhtanna<a class=\"heading-anchor\" href=\"#bugs\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>An bhfuil tástáil cheart aischéimnithí ann (ba cheart go dteipfeadh ar an tástáil sula gcuirtear an deisiú i bhfeidhm)?</p></li>\n<li><p>Más fabht é a cháilíonn :ref:` le haghaidh cúlport &lt;supported-versions-policy&gt;` chuig an leagan cobhsaí de Django, an bhfuil nóta eisiúna in <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/releases/A.B.C.txt</span></code>? Ní gá nóta scaoilte a bheith ag ceartúcháin fabhtanna a chuirfear i bhfeidhm sa phríomhbhrainse amháin.</p></li>\n</ul>\n</section>\n<section id=\"new-features\">\n<h3>Gnéithe Nua<a class=\"heading-anchor\" href=\"#new-features\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p>An bhfuil tástálacha ann chun an cód nua go léir a “feidhmiú”?</p></li>\n<li><p>An bhfuil nóta scaoileadh i Docs/releases/a.b.txt`?</p></li>\n<li><p>An bhfuil cáipéisíocht ann don ghné agus an bhfuil sé: ref: anótáilte go cuí `le &lt;documenting-new-features&gt;`.. leaganadded:: A.B`` nó <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">leaganmodified::</span> <span class=\"pre\">A.B</span></code>?</p></li>\n</ul>\n</section>\n<section id=\"id4\">\n<h3>Gné a dhíspreagadh<a class=\"heading-anchor\" href=\"#id4\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Féach an treor:ref: deprecating-a-feature.</p>\n</section>\n</section>","rootId":"submitting-contributions","toc":[{"title":"Socruithe clóscríbe agus athruithe doiciméadaithe","anchor":"typo-fixes-and-trivial-documentation-changes","children":[]},{"title":"Ticéid “Éileamh”","anchor":"claiming-tickets","children":[{"title":"Freagracht éilimh ticéad","anchor":"ticket-claimers-responsibility","children":[]},{"title":"Cé na ticéid ba chóir a éileamh?","anchor":"which-tickets-should-be-claimed","children":[]}]},{"title":"Stíl ranníocaíochta","anchor":"contribution-style","children":[]},{"title":"Ranníocaí a dteastaíonn aiseolas","anchor":"contributions-which-require-community-feedback","children":[{"title":"The new feature ideas tracker","anchor":"the-new-feature-ideas-tracker","children":[]},{"title":"The Django Forum","anchor":"the-django-forum","children":[]},{"title":"Pacáiste tríú páirtí","anchor":"third-party-package","children":[]},{"title":"Togra Feabhsúcháin Django (DEP)","anchor":"django-enhancement-proposal-dep","children":[]}]},{"title":"Gné a dhíspreagadh","anchor":"deprecating-a-feature","children":[]},{"title":"Testing with a Django project","anchor":"testing-with-a-django-project","children":[]},{"title":"Ranníocaíochtaí JavaScript","anchor":"javascript-contributions","children":[]},{"title":"Paistí optamaithe","anchor":"optimization-patches","children":[{"title":"Tagarmharcanna django-asv","anchor":"django-asv-benchmarks","children":[]}]},{"title":"Seicliosta ranníocaíochta","anchor":"contribution-checklist","children":[{"title":"Gach ticéad","anchor":"all-tickets","children":[]},{"title":"Athraíonn gach cód","anchor":"all-code-changes","children":[]},{"title":"Doiciméadúchán","anchor":"documentation","children":[]},{"title":"Fabhtanna","anchor":"bugs","children":[]},{"title":"Gnéithe Nua","anchor":"new-features","children":[]},{"title":"Gné a dhíspreagadh","anchor":"id4","children":[]}]}],"breadcrumbs":[{"docname":"internals/index","title":"Inmheánacha Django","url":"/ga/6.0/internals/"},{"docname":"internals/contributing/index","title":"Ag cur le Django","url":"/ga/6.0/internals/contributing/"},{"docname":"internals/contributing/writing-code/index","title":"Cód rannpháirteach","url":"/ga/6.0/internals/contributing/writing-code/"}],"prev":{"docname":"internals/contributing/writing-code/index","title":"Cód rannpháirteach","url":"/ga/6.0/internals/contributing/writing-code/"},"next":{"docname":"internals/contributing/writing-code/unit-tests","title":"Tástálacha aonaid","url":"/ga/6.0/internals/contributing/writing-code/unit-tests/"},"formats":{"html":"/ga/6.0/internals/contributing/writing-code/submitting-patches/","markdown":"/ga/6.0/internals/contributing/writing-code/submitting-patches.md","json":"/ga/6.0/internals/contributing/writing-code/submitting-patches.json"},"source":"https://github.com/django/django/blob/stable/6.0.x/docs/internals/contributing/writing-code/submitting-patches.txt","official":"https://docs.djangoproject.com/ga/6.0/internals/contributing/writing-code/submitting-patches/","inVersions":["6.1","6.0","5.2"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}