@@ -37,7 +37,7 @@ msgstr "autor"
37
37
38
38
#: ../../howto/pyporting.rst:7
39
39
msgid "Brett Cannon"
40
- msgstr ""
40
+ msgstr "Brett Cannon "
41
41
42
42
#: ../../howto/pyporting.rstNone
43
43
msgid "Abstract"
@@ -50,19 +50,28 @@ msgid ""
50
50
"Python. This guide is meant to help you figure out how best to support both "
51
51
"Python 2 & 3 simultaneously."
52
52
msgstr ""
53
+ "Com o Python 3 sendo o futuro do Python, enquanto o Python 2 ainda está em "
54
+ "uso ativo, é bom ter seu projeto disponível para ambos os principais "
55
+ "lançamentos do Python. Este guia destina-se a ajudá-lo a descobrir como "
56
+ "melhor para dar suporte a tanto Python 2 & 3 simultaneamente."
53
57
54
58
#: ../../howto/pyporting.rst:16
55
59
msgid ""
56
60
"If you are looking to port an extension module instead of pure Python code, "
57
61
"please see :ref:`cporting-howto`."
58
62
msgstr ""
63
+ "Se você está pensando wm portar um módulo de extensão em vez de puro código "
64
+ "Python, veja :ref:`cporting-howto`."
59
65
60
66
#: ../../howto/pyporting.rst:19
61
67
msgid ""
62
68
"If you would like to read one core Python developer's take on why Python 3 "
63
69
"came into existence, you can read Nick Coghlan's `Python 3 Q & A`_ or Brett "
64
70
"Cannon's `Why Python 3 exists`_."
65
71
msgstr ""
72
+ "Se você gostaria de ler algo do ponto de vista de um desenvolvedor core do "
73
+ "Python sobre por que Python 3 veio à existência, você pode ler `Python 3 Q & "
74
+ "A`_ de Nick Coghlan ou `Why Python 3 exists`_ de Brett Cannon."
66
75
67
76
#: ../../howto/pyporting.rst:23
68
77
msgid ""
@@ -79,59 +88,80 @@ msgid ""
79
88
"To make your project be single-source Python 2/3 compatible, the basic steps "
80
89
"are:"
81
90
msgstr ""
91
+ "Para tornar seu projeto compatível com Python 2/3 de código único, as etapas "
92
+ "básicas são:"
82
93
83
94
#: ../../howto/pyporting.rst:32
84
95
msgid "Only worry about supporting Python 2.7"
85
- msgstr ""
96
+ msgstr "Apenas se preocupe com suporte ao Python 2.7 "
86
97
87
98
#: ../../howto/pyporting.rst:33
88
99
msgid ""
89
100
"Make sure you have good test coverage (coverage.py_ can help; ``python -m "
90
101
"pip install coverage``)"
91
102
msgstr ""
103
+ "Certifique-se de ter uma boa cobertura de teste (coverage.py_ pode ajudar; "
104
+ "``python -m pip install coverage``)"
92
105
93
106
#: ../../howto/pyporting.rst:35 ../../howto/pyporting.rst:122
94
107
msgid "Learn the differences between Python 2 & 3"
95
- msgstr ""
108
+ msgstr "Aprenda as diferenças entre Python 2 e 3 "
96
109
97
110
#: ../../howto/pyporting.rst:36
98
111
msgid ""
99
112
"Use Futurize_ (or Modernize_) to update your code (e.g. ``python -m pip "
100
113
"install future``)"
101
114
msgstr ""
115
+ "Use Futurize_ (ou Modernize_) para atualizar o seu código (por exemplo, "
116
+ "``python -m pip install future``)"
102
117
103
118
#: ../../howto/pyporting.rst:37
104
119
msgid ""
105
120
"Use Pylint_ to help make sure you don't regress on your Python 3 support "
106
121
"(``python -m pip install pylint``)"
107
122
msgstr ""
123
+ "Use Pylint_ para ajudar a garantir que você não regresse em seu suporte a "
124
+ "Python 3 (``python -m pip install pylint``)"
108
125
109
126
#: ../../howto/pyporting.rst:39
110
127
msgid ""
111
128
"Use caniusepython3_ to find out which of your dependencies are blocking your "
112
129
"use of Python 3 (``python -m pip install caniusepython3``)"
113
130
msgstr ""
131
+ "Use caniusepython3_ para descobrir qual de suas dependências está bloqueando "
132
+ "seu uso de Python 3 (``python -m pip install caniusepython3``)"
114
133
115
134
#: ../../howto/pyporting.rst:41
116
135
msgid ""
117
136
"Once your dependencies are no longer blocking you, use continuous "
118
137
"integration to make sure you stay compatible with Python 2 & 3 (tox_ can "
119
138
"help test against multiple versions of Python; ``python -m pip install tox``)"
120
139
msgstr ""
140
+ "Uma vez que suas dependências não estão bloqueando, use a integração "
141
+ "contínua para garantir que você fique compatível com Python 2 e 3 (tox_ pode "
142
+ "ajudar a testar contra várias versões do Python; ``python -m pip install "
143
+ "tox``)"
121
144
122
145
#: ../../howto/pyporting.rst:44
123
146
msgid ""
124
147
"Consider using optional static type checking to make sure your type usage "
125
148
"works in both Python 2 & 3 (e.g. use mypy_ to check your typing under both "
126
149
"Python 2 & Python 3; ``python -m pip install mypy``)."
127
150
msgstr ""
151
+ "Considere o uso de verificação de tipo estático opcional para garantir que "
152
+ "seu uso de tipo funciona em ambos Python 2 e 3 (por exemplo, use mypy_ para "
153
+ "verificar sua tipagem em ambos Python 2 e Python 3; ``python -m pip install "
154
+ "mypy``)."
128
155
129
156
#: ../../howto/pyporting.rst:50
130
157
msgid ""
131
158
"Note: Using ``python -m pip install`` guarantees that the ``pip`` you invoke "
132
159
"is the one installed for the Python currently in use, whether it be a system-"
133
160
"wide ``pip`` or one installed within a :ref:`virtual environment <tut-venv>`."
134
161
msgstr ""
162
+ "Nota: Usar ``python -m pip install`` garante que o ``pip`` que você invoca é "
163
+ "o instalado para o Python atualmente em uso, seja um ``pip`` em todo o "
164
+ "sistema ou um instalado dentro de um :ref:`ambiente virtual <tut-venv>`."
135
165
136
166
#: ../../howto/pyporting.rst:56
137
167
msgid "Details"
@@ -145,6 +175,12 @@ msgid ""
145
175
"3. Most changes required to support Python 3 lead to cleaner code using "
146
176
"newer practices even in Python 2 code."
147
177
msgstr ""
178
+ "Um ponto-chave sobre o suporte ao Python 2 e 3 simultaneamente é que você "
179
+ "pode começar hoje! Mesmo que suas dependências não tenham suporte ao Python "
180
+ "3 ainda isso não significa que você não pode modernizar seu código agora "
181
+ "para apoiar o Python 3. A maioria das alterações necessárias para dar "
182
+ "suportea o Python 3 levam ao código mais limpo usando práticas mais "
183
+ "recentes, mesmo no código Python 2."
148
184
149
185
#: ../../howto/pyporting.rst:64
150
186
msgid ""
@@ -154,12 +190,20 @@ msgid ""
154
190
"lower-level work is now mostly done for you and thus can at least benefit "
155
191
"from the automated changes immediately."
156
192
msgstr ""
193
+ "Outro ponto-chave é que modernizar seu código Python 2 para também dar "
194
+ "suporte a Python 3 é amplamente automatizado para você. Embora você possa "
195
+ "ter que tomar algumas decisões da API graças ao Python 3 esclarecendo dados "
196
+ "de texto versus dados binários, o trabalho de nível inferior agora é feito "
197
+ "principalmente para você e, portanto, pode pelo menos beneficiar das "
198
+ "mudanças automatizadas imediatamente."
157
199
158
200
#: ../../howto/pyporting.rst:70
159
201
msgid ""
160
202
"Keep those key points in mind while you read on about the details of porting "
161
203
"your code to support Python 2 & 3 simultaneously."
162
204
msgstr ""
205
+ "Mantenha esses pontos-chave em mente enquanto você lê sobre os detalhes de "
206
+ "portar seu código para dar suporte a Python 2 e 3 simultaneamente."
163
207
164
208
#: ../../howto/pyporting.rst:75
165
209
msgid "Drop support for Python 2.6 and older"
@@ -173,6 +217,12 @@ msgid ""
173
217
"simultaneously (``python -m pip install six``). Do realize, though, that "
174
218
"nearly all the projects listed in this HOWTO will not be available to you."
175
219
msgstr ""
220
+ "Enquanto você pode fazer Python 2.5 funcionar com Python 3, é **muito** mais "
221
+ "fácil se você só tem que fazer funcionar com Python 2.7. Se descartar Python "
222
+ "2.5 não é uma opção, então o projeto six_ pode lhe ajudar a dar suporte a "
223
+ "Python 2.5 e 3 simultaneamente (``python -m pip install six``). Note, porém, "
224
+ "que quase todos os projetos listados neste HOWTO não estarão disponíveis "
225
+ "para você."
176
226
177
227
#: ../../howto/pyporting.rst:83
178
228
msgid ""
@@ -182,6 +232,12 @@ msgid ""
182
232
"or have to import a function instead of using a built-in one, but otherwise "
183
233
"the overall transformation should not feel foreign to you."
184
234
msgstr ""
235
+ "Se você puder ignorar o Python 2.5 e versões mais antigas, então as "
236
+ "alterações necessárias para o seu código devem continuar a olhar e sentir "
237
+ "como código Python idiomático. Na pior das hipóteses você terá que usar uma "
238
+ "função em vez de um método em algumas instâncias ou tem que importar uma "
239
+ "função em vez de usar uma embutida, mas de outra forma a transformação geral "
240
+ "não deve se sentir estranha para você."
185
241
186
242
#: ../../howto/pyporting.rst:89
187
243
msgid ""
@@ -193,11 +249,20 @@ msgid ""
193
249
"simply be easier for you if you only support the versions of Python that you "
194
250
"have to support."
195
251
msgstr ""
252
+ "Mas você deve visar apenas dar suporte ao Python 2.7. Python 2.6 não é mais "
253
+ "suportado e, portanto, não está recebendo correções de bugs. Isso significa "
254
+ "que você terá que contornar qualquer problema que você se deparar com Python "
255
+ "2.6. Há também algumas ferramentas mencionadas neste HOWTO que não tem "
256
+ "suporte ao Python 2.6 (por exemplo, Pylint_,) e isso vai se tornar mais "
257
+ "comum à medida que o tempo passa. Será simplesmente mais fácil para você se "
258
+ "você só provê suporte às versões do Python que você tem que dar suporte."
196
259
197
260
#: ../../howto/pyporting.rst:98
198
261
msgid ""
199
262
"Make sure you specify the proper version support in your ``setup.py`` file"
200
263
msgstr ""
264
+ "Certifique-se de especificar o suporte de versão adequado no seu arquivo "
265
+ "``setup.py``"
201
266
202
267
#: ../../howto/pyporting.rst:100
203
268
msgid ""
@@ -208,10 +273,17 @@ msgid ""
208
273
"minor version of Python that you do support, e.g. ``Programming Language :: "
209
274
"Python :: 2.7``."
210
275
msgstr ""
276
+ "Em seu arquivo ``setup.py``, você deve ter o `classificador de Trove <trove "
277
+ "classifier>`_ apropriado especificando que versões do Python você dá "
278
+ "suporte. Como seu projeto ainda não tem suporte a Python 3, você deve pelo "
279
+ "menos ter ``Programming Language :: Python :: 2 :: Only`` especificado. "
280
+ "Idealmente, você também deve especificar cada versão principal/menor do "
281
+ "Python que você dá suporte, por exemplo, ``Programming Language :: Python :: "
282
+ "2.7``."
211
283
212
284
#: ../../howto/pyporting.rst:109
213
285
msgid "Have good test coverage"
214
- msgstr ""
286
+ msgstr "Tenha uma boa cobertura de testes "
215
287
216
288
#: ../../howto/pyporting.rst:111
217
289
msgid ""
0 commit comments